Back to index

im-sdk  12.3.91
le_auxevent.c
Go to the documentation of this file.
00001 #include <stdio.h>
00002 
00003 #if 0
00004 
00005 #include "thai_keymap.h"
00006 #include "wtt_isc.h"
00007 
00008 /* ============================================================== */
00009 /*            Process information from Auxiliary Window           */
00010 /* ============================================================== */
00011 void le_session_process_aux_event(iml_session_t * s, IMAuxEvent * auxevent)
00012 {
00013     IMAuxDrawCallbackStruct *aux_data = auxevent->aux;
00014     int nIntegerCount, *pIntegerList;
00015     int nStringCount, nStringLen;
00016     int reqType;
00017     int locale_id, on, mode_id, qjbj, punct, x, y;
00018     int nKeyboardID, keycode, keychar, keystatus;
00019     char *command_str, *commit_str;
00020     int isc_mode_id, keyboard_id;
00021     IMText *lt;
00022 
00023     nIntegerCount = aux_data->count_integer_values;
00024     pIntegerList = aux_data->integer_values;
00025 
00026     if (nIntegerCount <= 0)
00027        return;
00028 
00029     reqType = pIntegerList[0];
00030 
00031     logf("proc_aux_event: session:%x\n", aux_data, s);
00032     logf("reqType: %d\n", reqType);
00033     switch (reqType) {
00034        /* need not check whether the Palette is started */
00035     case PALETTEAUX_CONNECT:
00036        locale_id = pIntegerList[1];
00037        proc_paletteaux_connect_event(s, locale_id);
00038        break;
00039 
00040     case PALETTEAUX_SWITCH_ISC_MODE:
00041        mode_id = pIntegerList[1];
00042        proc_paletteaux_switch_mode_event(s, mode_id);
00043        break;
00044 
00045     case PALETTEAUX_CHANGE_POSITION:
00046        x = pIntegerList[1];
00047        y = pIntegerList[2];
00048        proc_paletteaux_change_position_event(s, x, y);
00049        break;
00050 
00051     case PALETTEAUX_SHOW_KEYBOARDAUX:
00052        nKeyboardID = pIntegerList[1];
00053        proc_paletteaux_show_keyboardaux_event(s, nKeyboardID);
00054        break;
00055 
00056     case PALETTEAUX_SHOW_OPTIONAUX:
00057        proc_paletteaux_show_optionaux_event(s);
00058        break;
00059 
00060     case KEYBOARDAUX_CHANGE_POSITION:
00061        x = pIntegerList[1];
00062        y = pIntegerList[2];
00063        proc_keyboardaux_change_position_event(s, x, y);
00064        break;
00065 
00066     case KEYBOARDAUX_CHANGE_KEY_STATUS:
00067        keystatus = pIntegerList[1];
00068        proc_keyboardaux_change_key_status_event(s, keystatus);
00069        break;
00070 
00071     case OPTIONAUX_CHANGE_STATUS:
00072        on = pIntegerList[1];
00073        proc_optionaux_change_status_event(s, on);
00074        break;
00075 
00076     case COMMONAUX_COMMIT_STRING:
00077        nStringCount = aux_data->count_string_values;
00078        if (nStringCount != 1)
00079            break;
00080 
00081        locale_id = pIntegerList[1];
00082        commit_str = (char *) aux_data->string_values->text.utf_chars;
00083        proc_commonaux_commit_string_event(s, locale_id, commit_str);
00084 
00085        break;
00086 
00087     case COMMONAUX_COMMIT_KEY:
00088        keycode = pIntegerList[1];
00089        keychar = pIntegerList[2];
00090        keystatus = pIntegerList[3];
00091        proc_commonaux_commit_key_event(s, keycode, keychar, keystatus);
00092        break;
00093 
00094     case COMMONAUX_SET_DEFAULT_VALUE:
00095        isc_mode_id = pIntegerList[1];
00096        keyboard_id = pIntegerList[2];
00097 
00098        proc_commonaux_set_default_value_event(s, isc_mode_id,
00099                                           keyboard_id);
00100 
00101        break;
00102 
00103     case COMMONAUX_LOST_FOCUS:
00104        proc_commonaux_lost_focus_event(s);
00105        break;
00106 
00107     }
00108 }
00109 
00110 void proc_paletteaux_connect_event(iml_session_t * s, int locale_id)
00111 {
00112     MyDataPerDesktop *desktop_data =
00113        (MyDataPerDesktop *) (s->desktop->specific_data);
00114 
00115     logf("PALETTEAUX_CONNECT Request Received\n");
00116     desktop_data->bPaletteAux_Ready = True;
00117 }
00118 
00119 void proc_paletteaux_switch_mode_event(iml_session_t * s, int isc_mode_id)
00120 {
00121     logf("PALETTEAUX_SWITCH_ISC_MODE:  mode_id:%d\n", isc_mode_id);
00122     le_session_save_isc_mode(s, isc_mode_id);
00123 
00124     isc_mode_id = le_session_get_isc_mode(s);
00125     le_switch_mode_notify(s, isc_mode_id);
00126 
00127     le_status_draw(s);
00128 }
00129 
00130 void proc_paletteaux_change_position_event(iml_session_t * s, int x, int y)
00131 {
00132     MyDataPerSession *session_data = (MyDataPerSession *) s->specific_data;
00133 
00134     logf("PALETTEAUX_CHANGE_POSITION:  x: 0x%x, y:0x%x\n", x, y);
00135     session_data->tPaletteAux_Status.nXPos = x;
00136     session_data->tPaletteAux_Status.nYPos = y;
00137 }
00138 
00139 void proc_paletteaux_show_keyboardaux_event(iml_session_t * s,
00140                                        int nKeyboardID)
00141 {
00142     MyDataPerDesktop *desktop_data =
00143        (MyDataPerDesktop *) (s->desktop->specific_data);
00144     MyDataPerSession *session_data = (MyDataPerSession *) s->specific_data;
00145     char *classname = XAUX_KEYBOARD_CLASS_NAME;
00146     int keyboard_id;
00147 
00148     le_start_keyboardaux(s);
00149 
00150     if (session_data->tKeyboardAux_Status.bShow == False) {
00151        keyboard_id = le_session_get_keyboard_mode(s);
00152        le_show_keyboardaux_notify(s, keyboard_id);
00153        session_data->tKeyboardAux_Status.bShow = True;
00154     } else {
00155        session_data->tKeyboardAux_Status.bShow = False;
00156        le_hide_keyboardaux_notify(s);
00157     }
00158 }
00159 
00160 void proc_paletteaux_show_optionaux_event(iml_session_t * s)
00161 {
00162     MyDataPerSession *session_data = (MyDataPerSession *) s->specific_data;
00163 
00164     le_start_optionaux(s);
00165 
00166     logf("proc_paletteaux_show_optionaux_event\n");
00167     session_data->tOptionAux_Status.bShow = True;
00168     le_show_optionaux_notify(s);
00169 }
00170 
00171 void proc_keyboardaux_change_position_event(iml_session_t * s, int x,
00172                                        int y)
00173 {
00174     MyDataPerSession *session_data = (MyDataPerSession *) s->specific_data;
00175 
00176     logf("KEYBOARDAUX_CHANGE_POSITION:  x: 0x%x, y:0x%x\n", x, y);
00177     session_data->tKeyboardAux_Status.nXPos = x;
00178     session_data->tKeyboardAux_Status.nYPos = y;
00179 }
00180 
00181 void proc_keyboardaux_change_key_status_event(iml_session_t * s,
00182                                          int key_status)
00183 {
00184     MyDataPerSession *session_data = (MyDataPerSession *) s->specific_data;
00185 
00186     logf("KEYBOARDAUX_CHANGE_KEY_STATUS:  key_status: 0x%x\n", key_status);
00187     session_data->tKeyboardAux_Status.nKeyStatus = key_status;
00188 }
00189 
00190 void proc_optionaux_change_status_event(iml_session_t * s, int on_status)
00191 {
00192     MyDataPerSession *session_data = (MyDataPerSession *) s->specific_data;
00193 
00194     logf("OPTIONAUX_CHANGE_STATUS:  on_status: 0x%x\n", on_status);
00195     session_data->tOptionAux_Status.bShow = on_status;
00196     if (on_status == False) {
00197        le_change_focus_notify(s);
00198     }
00199 }
00200 
00201 void proc_commonaux_commit_string_event(iml_session_t * s, int locale_id,
00202                                    char *commit_str)
00203 {
00204     logf("COMMONAUX_COMMIT_STRING Request Received: \n");
00205     logf("locale_id:%d, command_str:%s, len:%d\n",
00206         locale_id, commit_str, strlen(commit_str));
00207 
00208     encode_commit(s, locale_id, (unsigned char *) commit_str);
00209 }
00210 
00211 void proc_commonaux_commit_key_event(iml_session_t * s, int keycode,
00212                                  int keychar, int keystatus)
00213 {
00214     static IMKeyEventStruct akey;
00215     static IMKeyListEvent keyev;
00216 
00217     logf("COMMONAUX_COMMIT_KEY Request Received: \n");
00218     logf("keycode:0x%x, keychar:0x%x, keystatus:0x%x\n",
00219         keycode, keychar, keystatus);
00220 
00221     akey.keyCode = keycode;
00222     akey.keyChar = keychar;
00223     akey.modifier = keystatus;
00224     keyev.type = IM_EventKeyList;
00225     keyev.keylist = (IMKeyList) & akey;
00226     proc_key_event(s, (IMKeyListEvent *) & keyev);
00227 }
00228 
00229 void proc_commonaux_lost_focus_event(iml_session_t * s)
00230 {
00231     MyDataPerSession *session_data = (MyDataPerSession *) s->specific_data;
00232     int on_save = session_data->tPaletteAux_Status.bShow;
00233 
00234     logf("COMMONAUX_LOST_FOCUS Request Received\n");
00235     session_data->tPaletteAux_Status.bShow = False;
00236     le_change_focus_notify(s);
00237     session_data->tPaletteAux_Status.bShow = on_save;
00238 }
00239 
00240 void proc_commonaux_set_default_value_event(iml_session_t * s,
00241                                        int isc_mode_id,
00242                                        int keyboard_id)
00243 {
00244     MyDataPerDesktop *desktop_data =
00245        (MyDataPerDesktop *) (s->desktop->specific_data);
00246 
00247     logf("COMMONAUX_SET_DEFAULT_VALUE Request Received: isc_mode_id: %d, keyboard_id:%d\n", isc_mode_id, keyboard_id);
00248 
00249     le_desktop_save_default_isc_mode(s, isc_mode_id);
00250     le_desktop_save_default_keyboard_mode(s, keyboard_id);
00251 
00252     proc_paletteaux_switch_mode_event(s, isc_mode_id);
00253 
00254     if (desktop_data->bKeyboardAux_Started == True)
00255        le_change_keyboardaux_focus_notify(s);
00256 
00257 }
00258 
00259 /* ============================================================== */
00260 /*              Send information to Auxiliary Window              */
00261 /* ============================================================== */
00262 void le_start_paletteaux(iml_session_t * s)
00263 {
00264     MyDataPerDesktop *desktop_data =
00265        (MyDataPerDesktop *) (s->desktop->specific_data);
00266     char *classname = XAUX_PALETTE_CLASS_NAME;
00267 
00268     if (desktop_data->pRootSession == NULL)
00269        return;
00270     if (desktop_data->bPaletteAux_Started == True)
00271        return;
00272 
00273     logf("First start PaletteAux\n");
00274     desktop_data->bPaletteAux_Started = True;
00275     iml_aux_start(desktop_data->pRootSession, classname);
00276 
00277     le_send_modename_list_info(s, classname);
00278 }
00279 
00280 void le_start_keyboardaux(iml_session_t * s)
00281 {
00282     MyDataPerDesktop *desktop_data =
00283        (MyDataPerDesktop *) (s->desktop->specific_data);
00284     char *classname = XAUX_KEYBOARD_CLASS_NAME;
00285 
00286     if (desktop_data->pRootSession == NULL)
00287        return;
00288     if (desktop_data->bKeyboardAux_Started == True)
00289        return;
00290 
00291     logf("First start KeyboardAux\n");
00292     desktop_data->bKeyboardAux_Started = True;
00293     iml_aux_start(desktop_data->pRootSession, classname);
00294 
00295     le_send_keyboardlayout_info(s, classname);
00296 }
00297 
00298 void le_start_optionaux(iml_session_t * s)
00299 {
00300     MyDataPerDesktop *desktop_data =
00301        (MyDataPerDesktop *) (s->desktop->specific_data);
00302     char *classname = XAUX_OPTION_CLASS_NAME;
00303 
00304     if (desktop_data->pRootSession == NULL)
00305        return;
00306     if (desktop_data->bOptionAux_Started == True)
00307        return;
00308 
00309     logf("First start OptionAux\n");
00310     desktop_data->bOptionAux_Started = True;
00311     iml_aux_start(desktop_data->pRootSession, classname);
00312 
00313     le_send_modename_list_info(s, classname);
00314     le_send_keyboardname_list_info(s, classname);
00315 }
00316 
00317 void send_info_to_aux(iml_session_t * s, char *classname,
00318                     int count_integers, int *integers,
00319                     int count_strings, int *len_strings, char **strings)
00320 {
00321     MyDataPerDesktop *desktop_data =
00322        (MyDataPerDesktop *) (s->desktop->specific_data);
00323 
00324     if (desktop_data->pRootSession == NULL)
00325        return;
00326 
00327     iml_aux_draw(desktop_data->pRootSession, classname,
00328                count_integers, integers,
00329                count_strings, len_strings, strings);
00330 }
00331 
00332 void le_switch_mode_notify(iml_session_t * s, int mode_id)
00333 {
00334     char *classname = XAUX_PALETTE_CLASS_NAME;
00335     int nIntegerCount, pIntegerList[2];
00336 
00337     logf("le_switch_ime_notify: ======\n");
00338 
00339     nIntegerCount = 2;
00340     pIntegerList[0] = PALETTEAUX_SWITCH_ISC_MODE_NOTIFY;
00341     pIntegerList[1] = mode_id;
00342 
00343     send_info_to_aux(s, classname, nIntegerCount, pIntegerList, 0, NULL,
00344                    NULL);
00345 }
00346 
00347 void le_change_paletteaux_focus_notify(iml_session_t * s)
00348 {
00349     MyDataPerSession *session_data = (MyDataPerSession *) s->specific_data;
00350     char *classname = XAUX_PALETTE_CLASS_NAME;
00351     int nIntegerCount, pIntegerList[5];
00352 
00353     logf("le_change_paletteaux_focus_notify: ======\n");
00354 
00355     nIntegerCount = 5;
00356     pIntegerList[0] = COMMONAUX_CHANGE_FOCUS_NOTIFY;
00357     pIntegerList[1] = session_data->tPaletteAux_Status.nXPos;
00358     pIntegerList[2] = session_data->tPaletteAux_Status.nYPos;
00359     pIntegerList[3] = session_data->tPaletteAux_Status.bShow;
00360     pIntegerList[4] = le_session_get_isc_mode(s);
00361 
00362     logf(" x:%d, y:%d, on:%d, mode_id:%d\n",
00363         pIntegerList[1],
00364         pIntegerList[2], pIntegerList[3], pIntegerList[4]);
00365     send_info_to_aux(s, classname, nIntegerCount, pIntegerList, 0, NULL,
00366                    NULL);
00367 }
00368 
00369 void le_change_keyboardaux_focus_notify(iml_session_t * s)
00370 {
00371     MyDataPerSession *session_data = (MyDataPerSession *) s->specific_data;
00372     char *classname = XAUX_KEYBOARD_CLASS_NAME;
00373     int nIntegerCount, pIntegerList[7];
00374 
00375     logf("le_change_keyboardaux_focus_notify: ======\n");
00376 
00377     nIntegerCount = 7;
00378     pIntegerList[0] = COMMONAUX_CHANGE_FOCUS_NOTIFY;
00379     pIntegerList[1] = session_data->tKeyboardAux_Status.nXPos;
00380     pIntegerList[2] = session_data->tKeyboardAux_Status.nYPos;
00381     pIntegerList[3] = session_data->tPaletteAux_Status.bShow;
00382     pIntegerList[4] = session_data->tKeyboardAux_Status.bShow;
00383     pIntegerList[5] = le_session_get_keyboard_mode(s);
00384     pIntegerList[6] = session_data->tKeyboardAux_Status.nKeyStatus;
00385     send_info_to_aux(s, classname, nIntegerCount, pIntegerList, 0, NULL,
00386                    NULL);
00387 }
00388 
00389 void le_change_optionaux_focus_notify(iml_session_t * s)
00390 {
00391     MyDataPerSession *session_data = (MyDataPerSession *) s->specific_data;
00392     char *classname = XAUX_OPTION_CLASS_NAME;
00393     int nIntegerCount, pIntegerList[5];
00394 
00395     logf("le_change_optionaux_focus_notify: ======\n");
00396 
00397     nIntegerCount = 5;
00398     pIntegerList[0] = COMMONAUX_CHANGE_FOCUS_NOTIFY;
00399     pIntegerList[1] = session_data->tPaletteAux_Status.bShow;
00400     pIntegerList[2] = session_data->tOptionAux_Status.bShow;
00401     pIntegerList[3] = le_session_get_isc_mode(s);
00402     pIntegerList[4] = le_session_get_keyboard_mode(s);
00403     send_info_to_aux(s, classname, nIntegerCount, pIntegerList, 0, NULL,
00404                    NULL);
00405 }
00406 
00407 void le_change_focus_notify(iml_session_t * s)
00408 {
00409     MyDataPerDesktop *desktop_data =
00410        (MyDataPerDesktop *) (s->desktop->specific_data);
00411 
00412     if (desktop_data->bPaletteAux_Started == True)
00413        le_change_paletteaux_focus_notify(s);
00414 
00415     if (desktop_data->bKeyboardAux_Started == True)
00416        le_change_keyboardaux_focus_notify(s);
00417 
00418     if (desktop_data->bOptionAux_Started == True)
00419        le_change_optionaux_focus_notify(s);
00420 }
00421 
00422 void le_show_keyboardaux_notify(iml_session_t * s, int nKeyboardID)
00423 {
00424     char *classname = XAUX_KEYBOARD_CLASS_NAME;
00425     int nIntegerCount, pIntegerList[2];
00426 
00427     logf("le_show_keyboardaux_notify: ====== nKeyboardID:%d\n",
00428         nKeyboardID);
00429 
00430     nIntegerCount = 2;
00431     pIntegerList[0] = KEYBOARDAUX_SHOW_NOTIFY;
00432     pIntegerList[1] = nKeyboardID;
00433 
00434     send_info_to_aux(s, classname, nIntegerCount, pIntegerList, 0, NULL,
00435                    NULL);
00436 }
00437 
00438 void le_hide_keyboardaux_notify(iml_session_t * s)
00439 {
00440     char *classname = XAUX_KEYBOARD_CLASS_NAME;
00441     int nIntegerCount, pIntegerList[1];
00442 
00443     logf("le_hide_keyboardaux_notify: \n");
00444 
00445     nIntegerCount = 1;
00446     pIntegerList[0] = KEYBOARDAUX_HIDE_NOTIFY;
00447 
00448     send_info_to_aux(s, classname, nIntegerCount, pIntegerList, 0, NULL,
00449                    NULL);
00450 }
00451 
00452 void le_show_optionaux_notify(iml_session_t * s)
00453 {
00454     char *classname = XAUX_OPTION_CLASS_NAME;
00455     int nIntegerCount, pIntegerList[3];
00456 
00457     logf("le_show_optionaux_notify: ======\n");
00458 
00459     nIntegerCount = 3;
00460     pIntegerList[0] = OPTIONAUX_SHOW_NOTIFY;
00461     pIntegerList[1] = le_session_get_isc_mode(s);
00462     pIntegerList[2] = le_session_get_keyboard_mode(s);
00463 
00464     send_info_to_aux(s, classname, nIntegerCount, pIntegerList, 0, NULL,
00465                    NULL);
00466 }
00467 
00468 void le_hide_optionaux_notify(iml_session_t * s)
00469 {
00470     char *classname = XAUX_OPTION_CLASS_NAME;
00471     int nIntegerCount, pIntegerList[1];
00472 
00473     logf("le_hide_optionaux_notify: ======\n");
00474 
00475     nIntegerCount = 1;
00476     pIntegerList[0] = OPTIONAUX_HIDE_NOTIFY;
00477 
00478     send_info_to_aux(s, classname, nIntegerCount, pIntegerList, 0, NULL,
00479                    NULL);
00480 }
00481 
00482 void le_send_modename_list_info(iml_session_t * s, char *classname)
00483 {
00484     int nIntegerCount, pIntegerList[2];
00485     int nStringsCount, pLenStrings[WTT_ISC_MODES_NUM];
00486     char *pStrings[WTT_ISC_MODES_NUM];
00487 
00488     int i;
00489     char *mode_name;
00490 
00491     logf("le_send_modename_list_info_notify\n");
00492 
00493     nIntegerCount = 2;
00494     pIntegerList[0] = COMMONAUX_MODE_NAME_NOTIFY;
00495     pIntegerList[1] = WTT_ISC_MODES_NUM;
00496 
00497     nStringsCount = WTT_ISC_MODES_NUM;
00498     for (i = 0; i < WTT_ISC_MODES_NUM; i++) {
00499        mode_name = (char *) wtt_isc_mode_names[i];
00500        pLenStrings[i] = strlen(mode_name) + 1;
00501        pStrings[i] = (char *) mode_name;
00502        logf("%d, mode_name:%s\n", i, mode_name);
00503     }
00504 
00505     send_info_to_aux(s, classname, nIntegerCount, pIntegerList,
00506                    nStringsCount, pLenStrings, pStrings);
00507 }
00508 
00509 void le_send_keyboardname_list_info(iml_session_t * s, char *classname)
00510 {
00511     int nIntegerCount, pIntegerList[2];
00512     int nStringsCount, *pLenStrings;
00513     char **pStrings;
00514 
00515     int i, nKeyboard_Num;
00516     char *keyboard_name;
00517 
00518     nKeyboard_Num = gThaiKeymapList.nNum_Keymaps;
00519 
00520     if (nKeyboard_Num < 0)
00521        return;
00522 
00523     if (gThaiKeymapList.pKeymaps == NULL)
00524        return;
00525 
00526     pLenStrings = (int *) calloc(nKeyboard_Num + 1, sizeof(int));
00527     pStrings = (char **) calloc(nKeyboard_Num + 1, sizeof(char *));
00528     if (pLenStrings == NULL || pStrings == NULL)
00529        goto Error;
00530 
00531     nIntegerCount = 2;
00532     pIntegerList[0] = COMMONAUX_KEYBOARD_NAME_NOTIFY;
00533     pIntegerList[1] = nKeyboard_Num;
00534 
00535     nStringsCount = 0;
00536     for (i = 0; i < nKeyboard_Num; i++) {
00537        if (gThaiKeymapList.pKeymaps[i] == NULL)
00538            continue;
00539        keyboard_name = (char *) gThaiKeymapList.pKeymaps[i]->pName;
00540        if (keyboard_name == NULL)
00541            keyboard_name = "keyboard";
00542        pLenStrings[i] = strlen(keyboard_name) + 1;
00543        pStrings[i] = (char *) keyboard_name;
00544 
00545        nStringsCount++;
00546     }
00547 
00548     logf("le_send_keyboardname_list_notify\n");
00549     send_info_to_aux(s, classname, nIntegerCount, pIntegerList,
00550                    nStringsCount, pLenStrings, pStrings);
00551 
00552   Error:
00553     if (pLenStrings != NULL)
00554        free((char *) pLenStrings);
00555 
00556     if (pStrings != NULL)
00557        free((char *) pStrings);
00558 }
00559 
00560 void le_send_keyboardlayout_info(iml_session_t * s, char *classname)
00561 {
00562     int nIntegerCount, pIntegerList[2];
00563     int nStringsCount, *pLenStrings;
00564     char **pStrings;
00565 
00566     int i, nKeyboard_Num;
00567     char *th_keymap;
00568 
00569     nKeyboard_Num = gThaiKeymapList.nNum_Keymaps;
00570 
00571     if (nKeyboard_Num < 0)
00572        return;
00573 
00574     if (gThaiKeymapList.pKeymaps == NULL)
00575        return;
00576 
00577     pLenStrings = (int *) calloc(nKeyboard_Num + 1, sizeof(int));
00578     pStrings = (char **) calloc(nKeyboard_Num + 1, sizeof(char *));
00579     if (pLenStrings == NULL || pStrings == NULL)
00580        goto Error;
00581 
00582     nIntegerCount = 2;
00583     pIntegerList[0] = COMMONAUX_KEYBOARD_LAYOUT_NOTIFY;
00584     pIntegerList[1] = nKeyboard_Num;
00585 
00586     nStringsCount = 0;
00587     for (i = 0; i < nKeyboard_Num; i++) {
00588        if (gThaiKeymapList.pKeymaps[i] == NULL)
00589            continue;
00590        th_keymap = (char *) gThaiKeymapList.pKeymaps[i]->pKeymap;
00591        if (th_keymap == NULL)
00592            continue;
00593        pLenStrings[i] = THAI_KEYMAP_LEN + 1;
00594        pStrings[i] = (char *) th_keymap;
00595 
00596        nStringsCount++;
00597     }
00598 
00599     logf("le_send_modename_list_notify\n");
00600     send_info_to_aux(s, classname, nIntegerCount, pIntegerList,
00601                    nStringsCount, pLenStrings, pStrings);
00602 
00603   Error:
00604     if (pLenStrings != NULL)
00605        free((char *) pLenStrings);
00606 
00607     if (pStrings != NULL)
00608        free((char *) pStrings);
00609 }