Back to index

im-sdk  12.3.91
Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes
IMInputContext Class Reference

#include <IMInputContext.hh>

Inheritance diagram for IMInputContext:
Inheritance graph
[legend]
Collaboration diagram for IMInputContext:
Collaboration graph
[legend]

List of all members.

Public Member Functions

IMConnectionget_imconnection ()
void get_lecontext_args (vector< IMArg > &args)
 IMInputContext (IMConnection *pimc, const ICAttribute &attr)
virtual void destroy ()
virtual bool send_event (IMLExec *pimlex, IMInputEvent *pimevent)
virtual bool send_event_getvalues (IMLExec *pimlex, IMInputEvent *pimevent)
virtual bool send_event_getvalues_finished (IMLExec *pimlex)
virtual const ICAttributeget_icattr ()
virtual bool set_icattr (const ICAttribute &attr)
virtual bool toggle_conversion (IMLExec *pimlex, bool flag)
virtual bool invoke_desktop_listener (IMLExec *pimlex, int listener_id, int file_size, void *object)
virtual iml_desktop_tget_current_desktop ()
virtual bool reset (IMLExec *pimlex)
virtual bool destroy (IMLExec *pimlex)
virtual bool toggle_focus (IMLExec *pimlex, bool flag)

Protected Member Functions

virtual ~IMInputContext ()

Private Types

typedef list< LEContext * > LEContextList

Private Member Functions

LEMgrget_lemgr ()
LEContextcreate_lecontext ()
LEContextget_current_lecontext ()
bool switch_lecontext (const ICAttribute &attr)

Private Attributes

IMConnectionpimc
LEContextList leclist
LEContextpcur_lec
ICAttribute attr

Detailed Description

Definition at line 11 of file IMInputContext.hh.


Member Typedef Documentation

Definition at line 15 of file IMInputContext.hh.


Constructor & Destructor Documentation

Definition at line 252 of file IMInputContext.cpp.

{
    pimc = x_pimc;
    attr = x_attr;
    pcur_lec = NULL;
}
IMInputContext::~IMInputContext ( ) [protected, virtual]

Definition at line 262 of file IMInputContext.cpp.

{
}

Member Function Documentation

Definition at line 20 of file IMInputContext.cpp.

{
    LEContext* plec;

    plec = get_lemgr()->choose_LE(this);
    if (plec) leclist.push_back(plec);

    return plec;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void IMInputContext::destroy ( ) [virtual]

Implements ICHandler.

Definition at line 229 of file IMInputContext.cpp.

{
    destroy_all(leclist);
    delete this;
}

Here is the call graph for this function:

bool IMInputContext::destroy ( IMLExec pimlex) [virtual]

Implements ICHandler.

Definition at line 216 of file IMInputContext.cpp.

{
    LEContextList::iterator i;
    for (i = leclist.begin(); i != leclist.end(); i++) {
       (*i)->destroy(pimlex);
    }
    delete this;
    return true;
}

Implements ICHandler.

Definition at line 197 of file IMInputContext.cpp.

{
    LEContext *plec = get_current_lecontext();
    return plec->get_iml_desktop();
}

Here is the call graph for this function:

Definition at line 31 of file IMInputContext.cpp.

{
    if (pcur_lec) return pcur_lec;
    pcur_lec = create_lecontext();

    if (!pcur_lec) {
       LOG_ERROR("Failed to create LE context.");
    }
    //TODO attr = pcur_lec->get_icattribute();
    return pcur_lec;
}

Here is the call graph for this function:

Here is the caller graph for this function:

const ICAttribute & IMInputContext::get_icattr ( ) [virtual]

Implements ICHandler.

Definition at line 146 of file IMInputContext.cpp.

{
    return attr;
}

Here is the caller graph for this function:

Definition at line 27 of file IMInputContext.hh.

    { return pimc; }

Here is the caller graph for this function:

void IMInputContext::get_lecontext_args ( vector< IMArg > &  args)

Definition at line 57 of file IMInputContext.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 14 of file IMInputContext.cpp.

{
    return get_imconnection()->get_imsvr()->get_lemgr();
}

Here is the call graph for this function:

Here is the caller graph for this function:

bool IMInputContext::invoke_desktop_listener ( IMLExec pimlex,
int  listener_id,
int  file_size,
void *  object 
) [virtual]

Implements ICHandler.

Definition at line 177 of file IMInputContext.cpp.

{
    LEContext *plec = get_current_lecontext();
    iml_desktop_t *desktop = plec->get_iml_desktop();
    iml_listener_t *l;

    if (!plec) return false;

    l = desktop->lookupListenerFromDesktop(plec->get_iml_session(), listener_id);
    l->listener(listener_id, file_size, object, l->private_data);
   
    return true;
}

Here is the call graph for this function:

bool IMInputContext::reset ( IMLExec pimlex) [virtual]

Implements ICHandler.

Definition at line 204 of file IMInputContext.cpp.

{
    LEContext *plec = get_current_lecontext();

    if (!plec) return false;

    return plec->reset(pimlex);
}

Here is the call graph for this function:

bool IMInputContext::send_event ( IMLExec pimlex,
IMInputEvent pimevent 
) [virtual]

Implements ICHandler.

Definition at line 81 of file IMInputContext.cpp.

{
#if 0 // AUX forwarding... TODO!!!!
    if (fev->type == IM_EventAux) {
       IMAuxEvent *aux_event = (IMAuxEvent*)fev;
       ImlSession *temp_session;

       for (int i = 1; i <= session_list.getSize(); i++) {
           temp_session = (ImlSession *)&(session_list.getItem(i));
           int len = temp_session->mAuxName.length();
           if (len > 0 && strstr(aux_event->aux->aux_name,
                              (const char*)temp_session->mAuxName)) {
              sc = temp_session->sc;
              break;
           }
       }
#if 0
       // not found, save current aux name for later comparison.
       if (active_session->mAuxName.length() == 0) {
           char *p = 0;
           char *aux_name = strdup(aux_event->aux->aux_name);
           if (p = rindex (aux_name, '.'))
              *p = 0;
           active_session->mAuxName = CompoundString(aux_name);
           free (aux_name);
       }
#endif
    }
#endif
    LEContext *plec = get_current_lecontext();

    if (!plec) return false;

    return plec->send_event(pimlex, pimevent);
}

Here is the call graph for this function:

bool IMInputContext::send_event_getvalues ( IMLExec pimlex,
IMInputEvent pimevent 
) [virtual]

Implements ICHandler.

Definition at line 121 of file IMInputContext.cpp.

{
    LEContext *plec = get_current_lecontext();

    if (!plec) return false;

    return plec->send_event_getvalues(pimlex, pimevent);
}

Here is the call graph for this function:

Implements ICHandler.

Definition at line 134 of file IMInputContext.cpp.

{
    LEContext *plec = get_current_lecontext();

    if (!plec) return false;

    return plec->send_event_getvalues_finished(pimlex);
}

Here is the call graph for this function:

bool IMInputContext::set_icattr ( const ICAttribute attr) [virtual]

Implements ICHandler.

Definition at line 152 of file IMInputContext.cpp.

{
    attr = x_attr;
    // TODO...
    pcur_lec = create_lecontext();

    return true;
}

Here is the call graph for this function:

bool IMInputContext::switch_lecontext ( const ICAttribute attr) [private]

Definition at line 44 of file IMInputContext.cpp.

{
    // TODO  spcicial client HTT_XBE requires this feature...
    return false;
}
bool IMInputContext::toggle_conversion ( IMLExec pimlex,
bool  flag 
) [virtual]

Implements ICHandler.

Definition at line 164 of file IMInputContext.cpp.

{
    LEContext *plec = get_current_lecontext();

    if (!plec) return false;

    return plec->toggle_conversion(pimlex, flag);
}

Here is the call graph for this function:

bool IMInputContext::toggle_focus ( IMLExec pimlex,
bool  flag 
) [virtual]

Implements ICHandler.

Definition at line 236 of file IMInputContext.cpp.

{
    LEContext *plec = get_current_lecontext();

    if (!plec) return false;

    return plec->toggle_focus(pimlex, flag);
}

Here is the call graph for this function:


Member Data Documentation

Definition at line 19 of file IMInputContext.hh.

Definition at line 16 of file IMInputContext.hh.

Definition at line 17 of file IMInputContext.hh.

Definition at line 13 of file IMInputContext.hh.


The documentation for this class was generated from the following files: