Back to index

im-sdk  12.3.91
Functions
common_aux_methods.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void composite_aux_get_cursor_position (aux_ext_data_t *aux_ext_data, int *pos_x, int *pos_y)
void composite_aux_Connect_To_LE_Request (int locale_id)
int NotifyIntegerListDataToLanguageEngine (Display *display, int nIntegerCount, int *pIntegerList)
int NotifyStringListDataToLanguageEngine (Display *display, int nIntegerCount, int *pIntegerList, int nStringCount, int *pStringLen, char **pStringList)
void composite_aux_Proc_LE_Notify (aux_ext_data_t *aux_ext_data)

Function Documentation

void composite_aux_Connect_To_LE_Request ( int  locale_id)

Definition at line 191 of file common_aux_methods.c.

{
    int nIntegerCount, pIntegerList[2];

    nIntegerCount = 2;
    pIntegerList[0] = SELECTAUX_CONNECT;
    pIntegerList[1] = locale_id;
    NotifyIntegerListDataToLanguageEngine(gDisplay, nIntegerCount,
                                          pIntegerList);
}

Here is the call graph for this function:

void composite_aux_get_cursor_position ( aux_ext_data_t aux_ext_data,
int *  pos_x,
int *  pos_y 
)

Definition at line 159 of file common_aux_methods.c.

{
    int win_x = 0, win_y = 0;

    Window w_none;
    Window clientwindow;
    XWindowAttributes attr;

    clientwindow = aux_ext_data->clientwin;
    if (clientwindow && gDisplay) {
        XGetWindowAttributes(gDisplay, clientwindow, &attr);
        if (attr.root)
            XTranslateCoordinates(gDisplay, clientwindow, attr.root, -(attr.border_width), -(attr.border_width), &win_x, &win_y, &w_none );
    }

    /*
    if ((win_x == 0 && win_y == 0) || (aux_ext_data->point.x == 0 && aux_ext_data->point.y == 0)) {
        win_x =  (gdk_screen_width () > 640)?200:100;
        win_y = (gdk_screen_height () - 200);
    } else {
    */
        win_x += aux_ext_data->point.x;
        win_y += aux_ext_data->point.y + 22;
    //}

    *pos_x = win_x;
    *pos_y = win_y;
}
void composite_aux_Proc_LE_Notify ( aux_ext_data_t aux_ext_data)

Definition at line 32 of file composite_methods.c.

{
    int nIntegerCount, notifyType;

    nIntegerCount = aux_ext_data->integer_count;
    if (nIntegerCount <= 0)
        return;

    notifyType = aux_ext_data->integer_list[0];

    switch (notifyType) {
    case COMMONAUX_SHOW_PREEDIT_NOTIFY:
        DEBUG_printf("COMMONAUX_SHOW_PREEDIT_NOTIFY Notify Received\n");
        composite_aux_Proc_LE_Show_Preedit_Notify(aux_ext_data);
        break;
    case COMMONAUX_HIDE_PREEDIT_NOTIFY:
        DEBUG_printf("COMMONAUX_HIDE_PREEDIT_NOTIFY Notify Received\n");
        composite_aux_Proc_LE_Hide_Preedit_Notify(aux_ext_data);
        break;
    case COMMONAUX_UPDATE_PREEDIT_NOTIFY:
        DEBUG_printf("COMMONAUX_UPDATE_PREEDIT_NOTIFY Notify Received\n");
        composite_aux_Proc_LE_Update_Preedit_Notify(aux_ext_data);
        break;
    case COMMONAUX_SHOW_CANDIDATES_NOTIFY:
        DEBUG_printf("COMMONAUX_SHOW_CANDIDATES_NOTIFY Notify Received\n");
        composite_aux_Proc_LE_Show_Candidates_Notify(aux_ext_data);
        break;
    case COMMONAUX_HIDE_CANDIDATES_NOTIFY:
        DEBUG_printf("COMMONAUX_HIDE_CANDIDATES_NOTIFY Notify Received\n");
        composite_aux_Proc_LE_Hide_Candidates_Notify(aux_ext_data);
        break;
    case COMMONAUX_UPDATE_CANDIDATES_NOTIFY:
        DEBUG_printf("COMMONAUX_UPDATE_CANDIDATES_NOTIFY Notify Received\n");
        composite_aux_Proc_LE_Update_Candidates_Notify(aux_ext_data);
        break;
    case COMPOSITE_PC_OPTION:
        DEBUG_printf("COMPOSITE_PC_OPTION Notify Received\n");
        composite_aux_Proc_LE_Change_Option(aux_ext_data);
        break;
    case COMPOSITE_PC_MOVE:
        DEBUG_printf("COMPOSITE_PC_MOVE Notify Received\n");
        composite_aux_Proc_LE_Restore_Position(aux_ext_data);
        break;
    }
}

Here is the call graph for this function:

int NotifyIntegerListDataToLanguageEngine ( Display *  display,
int  nIntegerCount,
int *  pIntegerList 
)

Definition at line 166 of file aux_manager_methods.c.

{
       aux_ext_data_t aux_ext_data;

       DEBUG_printf("im_:%d, ic_:%d\n", im_, ic_);

/*
       if (!im_ || !ic_ || !xc_)
              return;
*/

       aux_ext_data.im = im_;
       aux_ext_data.ic = ic_;
       aux_ext_data.integer_count = nIntegerCount;
       aux_ext_data.integer_list = pIntegerList;
       aux_ext_data.string_count = 0;
       aux_ext_data.string_list = NULL;
       aux_ext_data.string_ptr = NULL;
       aux_ext_data.point.x = 0;
       aux_ext_data.point.y = 0;

       DEBUG_printf("begin xaux_exe_setValue =============\n");
       xaux_ext_SetValue(display, xc_, &aux_ext_data);
       XFlush(display);
}

Here is the call graph for this function:

Here is the caller graph for this function:

int NotifyStringListDataToLanguageEngine ( Display *  display,
int  nIntegerCount,
int *  pIntegerList,
int  nStringCount,
int *  pStringLen,
char **  pStringList 
)

Definition at line 193 of file aux_manager_methods.c.

{
       int i;

       aux_ext_data_t aux_ext_data;
       aux_ext_string_t *p;

       DEBUG_printf("im_:%d, ic_:%d\n", im_, ic_);

/*
       if (!im_ || !ic_ || !xc_)
              return;
*/

       aux_ext_data.im = im_;
       aux_ext_data.ic = ic_;
       aux_ext_data.integer_count = nIntegerCount;
       aux_ext_data.integer_list = pIntegerList;
       aux_ext_data.point.x = 0;
       aux_ext_data.point.y = 0;

       aux_ext_data.string_count = nStringCount;
       aux_ext_data.string_ptr = NULL;

       if (nStringCount > 0) {
              aux_ext_data.string_list = (aux_ext_string_t *) calloc(nStringCount, sizeof(aux_ext_string_t));
              for (i = 0; i < nStringCount; i++) {
                     aux_ext_string_t *p = &aux_ext_data.string_list[i];
                     p->length = pStringLen[i];
                     p->ptr = (unsigned char *) (pStringList[i]);
              }
       }

       xaux_ext_SetValue(display, xc_, &aux_ext_data);
       XFlush(display);

       free(aux_ext_data.string_list);
}

Here is the call graph for this function:

Here is the caller graph for this function: