Back to index

im-sdk  12.3.91
iml.c
Go to the documentation of this file.
00001 /*
00002  * Copyright 2003 Sun Microsystems Inc.
00003  *
00004  * This is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU Lesser General Public
00006  * License as published by the Free Software Foundation; either
00007  * version 2 of the License, or (at your option) any later version.
00008  *
00009  * This library is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012  * Lesser General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU Lesser General Public
00015  * License along with this library; if not, write to the
00016  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00017  * Boston, MA 02111-1307, USA.
00018  *
00019  * Authors: Karl Park <karl.park@sun.com>
00020  */
00021 
00022 #ifdef HAVE_CONFIG_H
00023 #include <config.h>
00024 #endif
00025 #include <stdlib.h>
00026 #include <string.h>
00027 
00028 #include "SunIM.h"
00029 #include "koinput.h"
00030 #include "le.h"
00031 #include "kolelog.h"
00032 
00033 extern int          g_number_of_engines;
00034 extern int          default_engine_id;
00035 extern IMEEngineRec *g_engines[MAX_ENGINE_NUM];
00036 
00037 /* general functions */
00038 IMFeedbackList *
00039 create_feedback (iml_session_t *s, int size)
00040 {
00041     int i;
00042     IMFeedbackList *feedback, *fbl;
00043     
00044     if (s) {
00045        feedback =
00046            (IMFeedbackList *)s->If->m->iml_new (s, sizeof(IMFeedbackList) * size);
00047        memset (feedback, 0, sizeof(IMFeedbackList) * size);
00048     
00049     } else {
00050     
00051        feedback = (IMFeedbackList *) calloc(1, sizeof(IMFeedbackList) * size);
00052     }
00053   
00054     for (i = 0; i < size; i++) {
00055        fbl = &feedback[i];
00056        fbl->count_feedbacks = 1;
00057     
00058        if (s) {
00059            fbl->feedbacks =
00060               (IMFeedback *) s->If->m->iml_new (s, sizeof (IMFeedback));
00061            memset (fbl->feedbacks, 0, sizeof (IMFeedback));
00062       
00063        } else {
00064            fbl->feedbacks = (IMFeedback *) calloc(1, sizeof(IMFeedback));
00065        }
00066     }
00067     return feedback;
00068 }
00069 
00070 void free_feedback(iml_session_t *s, IMFeedbackList *feedback, int size)
00071 {
00072     int i;
00073     IMFeedbackList *fbl;
00074 
00075     if ((s!= NULL) || (feedback == NULL)) return;
00076 
00077     for (i = 0; i < size; i++) {
00078        fbl = &feedback[i];
00079        if (fbl->feedbacks != NULL)
00080            free(fbl->feedbacks);
00081     }
00082     free(feedback);
00083 }
00084 
00085 int
00086 get_feedback (IMFeedbackList * fbl)
00087 {
00088     IMFeedback *fb = &fbl->feedbacks[0];
00089     return IM_FEEDBACK_VALUE(fb);
00090 }
00091 
00092 void
00093 set_feedback (IMFeedbackList * fbl, int value)
00094 {
00095     IMFeedback *fb = &fbl->feedbacks[0];
00096     IM_FEEDBACK_TYPE(fb)=IM_DECORATION_FEEDBACK;
00097     IM_FEEDBACK_VALUE(fb)=value;
00098 }
00099 
00100 void
00101 set_feedback_private (IMFeedbackList *fbl, int normalfeedback,
00102                     int fg, int bg, int underline)
00103 {
00104     int count = 0;
00105     IMFeedback *fb;
00106        
00107     fb = &fbl->feedbacks[count];
00108     IM_FEEDBACK_TYPE(fb) = IM_DECORATION_FEEDBACK;
00109     IM_FEEDBACK_VALUE(fb) = normalfeedback;
00110     count++;
00111 
00112     if (fg != -1) {
00113        fb = &fbl->feedbacks[count];
00114        IM_FEEDBACK_TYPE(fb) = IM_FOREGROUND_RGB_FEEDBACK;
00115        IM_FEEDBACK_VALUE(fb) = fg;
00116        count++;
00117     }
00118     if (bg != -1) {
00119        fb = &fbl->feedbacks[count];
00120        IM_FEEDBACK_TYPE(fb) = IM_BACKGROUND_RGB_FEEDBACK;
00121        IM_FEEDBACK_VALUE(fb) = bg;
00122        count++;
00123     }
00124     if (underline != -1) {
00125        fb = &fbl->feedbacks[count];
00126        IM_FEEDBACK_TYPE(fb) = IM_UNDERLINE_RGB_FEEDBACK;
00127        IM_FEEDBACK_VALUE(fb) = underline;
00128        count++;
00129     }
00130     IM_FEEDBACK_COUNT(fbl) = count;
00131 }
00132 
00133 /* UTF16 string handle functions */
00134 int
00135 UTFCHARCat (UTFCHAR *dest, UTFCHAR *str1, UTFCHAR *str2)
00136 {
00137     int i;
00138     for (i = 0; *str1; i++) {
00139        *dest++ = *str1++;
00140     }
00141     for (i = 0; *str2; i++) {
00142        *dest++ = *str2++;
00143     }
00144     *dest = 0;
00145     return i;
00146 }
00147 
00148 int
00149 UTFCHARCpy(UTFCHAR * dest, UTFCHAR * original)
00150 {
00151     int i;
00152     for (i = 0; *original; i++) {
00153        *dest++ = *original++;
00154     }
00155     *dest = 0;
00156     return i;
00157 }
00158 
00159 int
00160 UTFCHARLen(UTFCHAR * p)
00161 {
00162     int i;
00163     if (!p)
00164        return 0;
00165     for (i = 0; *p; i++)
00166        p++;
00167     return i;
00168 }
00169 
00170 IMText *
00171 make_imtext(iml_session_t * s, UTFCHAR * p)
00172 {
00173     int len;
00174     IMText *text = (IMText *) s->If->m->iml_new(s, sizeof(IMText));
00175 
00176     memset(text, 0, sizeof(IMText));
00177 
00178     len = UTFCHARLen(p);
00179 
00180     text->encoding = UTF16_CODESET;
00181 
00182     text->text.utf_chars =
00183        (UTFCHAR *) s->If->m->iml_new(s, sizeof(UTFCHAR) * (len + 1));
00184     UTFCHARCpy(text->text.utf_chars, p);
00185 
00186     text->char_length = len;
00187 
00188     text->feedback = create_feedback(s, len);
00189 #if 0
00190     for (i = 0; i < len; i++) {
00191        set_feedback_private(&text->feedback[i], IMReverse, -1, -1, -1);
00192     }
00193 #endif
00194 
00195     return text;
00196 }
00197 
00198 /* Send a Korean string to system */
00199 void
00200 iml_commit (iml_session_t * s, UTFCHAR *commit_buf)
00201 {
00202     int len;
00203     iml_inst *lp;
00204     IMText *im_text;
00205     
00206     len = UTFCHARLen(commit_buf);
00207     if (len == 0) return;
00208 
00209     im_text = make_imtext(s, commit_buf);
00210     lp = (iml_inst *)s->If->m->iml_make_commit_inst(s, im_text);
00211     s->If->m->iml_execute(s, &lp);
00212 }
00213 
00214 /* Send a KeyPress Event to system */
00215 void
00216 iml_sendback_key (iml_session_t *s, IMKeyEventStruct *key)
00217 {
00218     iml_inst *lp;
00219 
00220     lp = (iml_inst *)s->If->m->iml_make_keypress_inst(s, key);
00221     s->If->m->iml_execute(s, &lp);
00222 }
00223 
00224 /* Begin catch the system Key Event */
00225 void
00226 iml_conversion_on (iml_session_t * s)
00227 {
00228     MyDataPerSession *session_data = (MyDataPerSession *) s->specific_data;
00229     IMEBufferMethods ime_methods =  session_data->session_core.ime_methods_table;   
00230     IMEBuffer session_ime_buffer = session_data->session_core.ime_buffer;
00231 #if 0
00232     (*ime_methods->ime_buffer_conversion_start) (session_ime_buffer);
00233 #endif
00234     iml_inst *lp;
00235     lp = (iml_inst *)s->If->m->iml_make_start_conversion_inst(s);
00236     lp = s->If->m->iml_execute(s, &lp);
00237 }
00238 
00239 /* Do not catch the system Key Event */
00240 void
00241 iml_conversion_off (iml_session_t * s)
00242 {
00243     MyDataPerSession *session_data = (MyDataPerSession *) s->specific_data;
00244     IMEBufferMethods ime_methods =  session_data->session_core.ime_methods_table;
00245     IMEBuffer session_ime_buffer = session_data->session_core.ime_buffer;
00246     iml_inst *lp;
00247     IMText *text;
00248     iml_inst *rrv = NULL;
00249     UTFCHAR status_str[] = { 0 };
00250 #if 0
00251     (*ime_methods->ime_buffer_conversion_end) (session_ime_buffer);
00252 #endif
00253 
00254     text = make_imtext (s, status_str);
00255     lp = s->If->m->iml_make_status_draw_inst(s, text);
00256     s->If->m->iml_link_inst_tail(&rrv, lp);
00257     lp = s->If->m->iml_make_status_done_inst(s);
00258     s->If->m->iml_link_inst_tail(&rrv, lp);
00259     lp = s->If->m->iml_make_preedit_done_inst(s);
00260     s->If->m->iml_link_inst_tail(&rrv, lp);
00261     lp = s->If->m->iml_make_lookup_done_inst(s);
00262     s->If->m->iml_link_inst_tail (&rrv, lp);
00263     lp = s->If->m->iml_make_end_conversion_inst(s);
00264     s->If->m->iml_link_inst_tail(&rrv, lp);
00265     s->If->m->iml_execute(s, &rrv);
00266 }
00267 
00268 /* Start Status Area Information */
00269 void
00270 iml_status_start (iml_session_t * s)
00271 {
00272     iml_inst *lp;
00273     iml_inst *rrv = NULL;
00274     
00275     lp = (iml_inst *)s->If->m->iml_make_status_start_inst(s);
00276     s->If->m->iml_link_inst_tail(&rrv, lp);
00277 }
00278 
00279 /* Destroy Status Area Information */
00280 void
00281 iml_status_enddraw (iml_session_t * s)
00282 {
00283     iml_inst *lp;
00284     
00285     lp = (iml_inst *)s->If->m->iml_make_status_done_inst(s);
00286     s->If->m->iml_execute(s, &lp);
00287 }
00288 
00289 /* Draw Status line information */
00290 void
00291 iml_status_draw (iml_session_t * s)
00292 {
00293     MyDataPerSession *session_data = (MyDataPerSession *) s->specific_data;
00294     IMEBufferMethods ime_methods =  session_data->session_core.ime_methods_table;
00295     IMEBuffer session_ime_buffer = session_data->session_core.ime_buffer;
00296     UTFCHAR *le_status_string = NULL;
00297     Bool result_is_success;
00298                                                                                                   
00299     iml_inst *lp;
00300     iml_inst *rrv = NULL;
00301     IMText  *im_text;
00302 
00303     if (!ime_methods)
00304        return;
00305   
00306     result_is_success = 
00307        (*ime_methods->ime_buffer_get_status) (session_ime_buffer, &le_status_string);
00308 
00309     if (!result_is_success)
00310        return;
00311 
00312     iml_status_start(s);
00313 
00314     im_text = make_imtext(s, le_status_string);
00315     lp = (iml_inst *)s->If->m->iml_make_status_draw_inst(s, im_text);
00316     s->If->m->iml_link_inst_tail(&rrv, lp);
00317     s->If->m->iml_execute(s, &rrv);
00318 }
00319 
00320 void
00321 iml_preedit_start (iml_session_t * s)
00322 {
00323     iml_inst *lp;
00324     iml_inst *rrv = NULL;
00325     
00326     lp = (iml_inst *)s->If->m->iml_make_preedit_start_inst(s);
00327     s->If->m->iml_link_inst_tail(&rrv, lp);
00328 }
00329 
00330 /* Destroy Pre_edit Area Information */
00331 void
00332 iml_preedit_enddraw (iml_session_t * s)
00333 {
00334     iml_inst *lp;
00335     iml_inst *rrv = NULL;
00336     
00337     lp = (iml_inst *)s->If->m->iml_make_preedit_erase_inst(s);
00338     s->If->m->iml_link_inst_tail(&rrv, lp);
00339     lp = (iml_inst *)s->If->m->iml_make_preedit_done_inst(s);
00340     s->If->m->iml_link_inst_tail(&rrv, lp);
00341     
00342     s->If->m->iml_execute(s, &rrv);
00343 }
00344 
00345 /* Draw Pre_edit Area Information */
00346 void
00347 iml_preedit_draw (iml_session_t * s, UTFCHAR *preedit_buf, int caret_pos)
00348 {
00349     int i, len;
00350     iml_inst *lp;
00351     iml_inst *rrv = NULL;
00352     IMText *im_text;
00353     
00354     iml_preedit_start(s);
00355 
00356     if (preedit_buf == NULL || (len = UTFCHARLen(preedit_buf)) == 0){
00357        lp = (iml_inst *)s->If->m->iml_make_preedit_erase_inst(s);
00358        s->If->m->iml_link_inst_tail(&rrv, lp);
00359        s->If->m->iml_execute(s, &rrv);
00360        return;
00361     }
00362 
00363     im_text = make_imtext(s, preedit_buf);
00364 
00365     if (caret_pos < 0 || caret_pos > len)
00366        caret_pos = len;
00367 
00368 
00369     for(i = 0; i < caret_pos; i ++) {
00370        set_feedback(&(im_text->feedback[i]), IMReverse);
00371     }
00372     for(i = caret_pos; i < len; i ++) {
00373        set_feedback(&(im_text->feedback[i]), IMReverse);
00374     }
00375 
00376 #if 0
00377     set_feedback(&(im_text->feedback[caret_pos - 1]), IMNormal);
00378 #endif
00379 
00380     lp = (iml_inst *)s->If->m->iml_make_preedit_draw_inst(s, im_text);
00381     s->If->m->iml_link_inst_tail(&rrv, lp);
00382     
00383     if(caret_pos != -1) {
00384        lp = (iml_inst *)s->If->m->iml_make_preedit_caret_inst(s, caret_pos); 
00385        s->If->m->iml_link_inst_tail(&rrv, lp);
00386     }
00387     s->If->m->iml_execute(s, &rrv);
00388 }
00389 
00390 void
00391 iml_lookup_start (iml_session_t * s)
00392 {
00393     /*
00394       IMLookupStartCallbackStruct *start;
00395       iml_inst *lp;
00396        
00397       start = (IMLookupStartCallbackStruct *)s->If->m->iml_new (s,
00398       sizeof(IMLookupStartCallbackStruct) );
00399       start->whoIsMaster = IMIsMaster;
00400       start->CBPreference = NULL;
00401 
00402       start->IMPreference = (LayoutInfo *)s->If->m->iml_new (s, sizeof (LayoutInfo));
00403       start->IMPreference->choice_per_window = 10;
00404       start->IMPreference->ncolumns = 1;
00405       start->IMPreference->nrows = 10;
00406       start->IMPreference->drawUpDirection = DrawUpHorizontally;
00407       start->IMPreference->whoOwnsLabel = IMOwnsLabel;
00408 
00409       lp = s->If->m->iml_make_lookup_start_inst (s, start);
00410 
00411     */ 
00412     iml_inst *lp;
00413     IMLookupStartCallbackStruct *start;
00414     
00415     start = (IMLookupStartCallbackStruct *) s->If->m->iml_new(s, sizeof(IMLookupStartCallbackStruct));
00416     memset(start, 0, sizeof(IMLookupStartCallbackStruct));
00417 
00418     start->IMPreference = (LayoutInfo *) s->If->m->iml_new(s, sizeof(LayoutInfo));
00419     memset(start->IMPreference, 0, sizeof(LayoutInfo));
00420 
00421     start->IMPreference->choice_per_window = 10;
00422     start->IMPreference->ncolumns = 1;
00423     start->IMPreference->nrows = 10;
00424     start->IMPreference->drawUpDirection = DrawUpHorizontally;
00425     start->IMPreference->whoOwnsLabel = IMOwnsLabel;
00426 
00427     start->CBPreference = NULL;
00428     start->whoIsMaster = IMIsMaster;
00429 
00430     lp = (iml_inst *)s->If->m->iml_make_lookup_start_inst(s, start);
00431     s->If->m->iml_execute(s, &lp);
00432 }
00433 
00434 /* Destroy Candidate Selection Area */
00435 void
00436 iml_lookup_enddraw (iml_session_t *s)
00437 {
00438     iml_inst *lp;
00439 
00440     lp = (iml_inst*)s->If->m->iml_make_lookup_done_inst(s);
00441     s->If->m->iml_execute(s, &lp);
00442 }
00443 
00444 void
00445 iml_lookup_draw (iml_session_t * s, UTFCHAR ** luc_tmp,
00446                int luc_num, int i_current_candidate,int label_type)
00447 {
00448     int i, char_len;
00449     char begin_char;
00450     int max_len = 0;
00451     int lookup_pos_return;
00452     iml_inst *lp;
00453     IMText **candidates, **labels;
00454     IMLookupDrawCallbackStruct *draw;
00455     IMEBufferMethods methods_table = 
00456        ((MyDataPerSession *)s->specific_data)->session_core.ime_methods_table;
00457     IMEBuffer ime_buffer = ((MyDataPerSession *)s->specific_data)->session_core.ime_buffer;
00458     Bool method_return;
00459     UTFCHAR u16titlestr[] = { 0xD6C4, 0xBCF4, 0x0000};
00460     UTFCHAR *u16ptr = u16titlestr;
00461     
00462     if (luc_num <= 0) return;
00463 
00464     iml_lookup_start(s);
00465 
00466     if (luc_num > MAX_CANDIDATES_NUM) 
00467        luc_num = MAX_CANDIDATES_NUM;
00468 
00469     /* Set candidate data */
00470     candidates = (IMText **) s->If->m->iml_new(s, luc_num * sizeof(IMText *));
00471     memset(candidates, 0, luc_num * sizeof(IMText *));
00472     for (i = 0; i < luc_num; i++) {
00473        candidates[i] = (IMText *) s->If->m->iml_new(s, sizeof(IMText));
00474        memset(candidates[i], 0, sizeof(IMText));
00475        candidates[i]->encoding = UTF16_CODESET;
00476        candidates[i]->count_annotations = 0;
00477        candidates[i]->annotations = NULL;
00478        char_len = UTFCHARLen(luc_tmp[i]);
00479        candidates[i]->char_length = char_len;
00480        candidates[i]->text.utf_chars = 
00481            (UTFCHAR *)s->If->m->iml_new(s, sizeof(UTFCHAR) * char_len);
00482        UTFCHARCpy(candidates[i]->text.utf_chars, luc_tmp[i]);
00483        candidates[i]->feedback = create_feedback(s, char_len);
00484     }
00485 
00486     /* Set Label data */
00487     switch(label_type) {
00488        case NUMERIC_LABEL:
00489            begin_char = '0';
00490            break;
00491        case LOWER_LABEL:
00492            begin_char = 'a';
00493            break;
00494        case UPPER_LABEL:
00495            begin_char = 'A';
00496            break;
00497        default:
00498            begin_char = '0';
00499     }
00500 
00501     labels = (IMText **) s->If->m->iml_new(s, luc_num  * sizeof(IMText *));
00502     memset(labels, 0, luc_num * sizeof(IMText *));
00503     for (i = 0; i < luc_num; i++) {
00504        labels[i] = (IMText *) s->If->m->iml_new(s, sizeof(IMText));
00505        memset(labels[i], 0, sizeof(IMText));
00506        labels[i]->encoding = UTF16_CODESET;
00507        labels[i]->count_annotations = 0;
00508        labels[i]->annotations = NULL;
00509        char_len = 2;
00510        labels[i]->char_length = char_len;
00511        labels[i]->text.utf_chars =
00512            (UTFCHAR *) s->If->m->iml_new(s, sizeof(UTFCHAR) * char_len);
00513        labels[i]->text.utf_chars[0] = (UTFCHAR) (begin_char + i);
00514        labels[i]->text.utf_chars[1] = (UTFCHAR) ('.');
00515        labels[i]->feedback = create_feedback(s, char_len);
00516     }
00517 
00518     draw = (IMLookupDrawCallbackStruct *) s->If->m->iml_new(s, sizeof(IMLookupDrawCallbackStruct));
00519     memset (draw, 0, sizeof(IMLookupDrawCallbackStruct));
00520        
00521     method_return =
00522        (*methods_table->ime_buffer_get_current_lookup_pos)(ime_buffer, &lookup_pos_return);
00523     if (method_return == False)
00524        lookup_pos_return = 0;
00525 
00526     draw->title = make_imtext (s, u16ptr);
00527     /*
00528       draw->title = NULL;
00529     */
00530     draw->n_choices = luc_num ;
00531 #if 0
00532     if (i_current_candidate <0 || i_current_candidate > luc_num)
00533        draw->index_of_first_candidate = 0;
00534     else
00535        draw->index_of_first_candidate = i_current_candidate;
00536 #endif
00537     draw->index_of_first_candidate = 0;
00538        
00539     draw->index_of_last_candidate = luc_num - 1;
00540     draw->index_of_current_candidate = lookup_pos_return;
00541     
00542     /* Set choices data */
00543     draw->choices = (IMChoiceObject *) s->If->m->iml_new(s, luc_num * sizeof(IMChoiceObject));
00544     memset(draw->choices, 0, luc_num * sizeof(IMChoiceObject));
00545     
00546     for (i = 0; i < luc_num; i++) {
00547        IMText *vt;          /* for value */
00548        IMText *lt;          /* for label */
00549 
00550        vt = draw->choices[i].value = candidates[i];
00551        lt = draw->choices[i].label = labels[i];
00552         
00553        if (max_len < vt->char_length)
00554            max_len = vt->char_length;
00555     }
00556 
00557     draw->max_len = max_len;
00558     
00559     lp = (iml_inst *)s->If->m->iml_make_lookup_draw_inst(s, draw);
00560     s->If->m->iml_execute(s, &lp);
00561 }
00562 
00563 /* Start An Auxiliary Window */
00564 void
00565 iml_aux_start (iml_session_t * s, char *classname)
00566 {
00567   iml_inst *lp;
00568   IMAuxStartCallbackStruct *aux;
00569 
00570   aux = (IMAuxStartCallbackStruct *) s->If->m->iml_new(s, sizeof(IMAuxStartCallbackStruct));
00571   memset(aux, 0, sizeof(IMAuxStartCallbackStruct));
00572   aux->aux_name = classname;
00573 
00574   lp = (iml_inst *)s->If->m->iml_make_aux_start_inst(s, aux);
00575   s->If->m->iml_execute(s, &lp);
00576 
00577   KOLE_LOG (LOGDEST_STDOUT, "iml_aux_start ----- auxwin name :%s \n", classname);
00578 }
00579 
00580 /* Close the Auxiliary Window */
00581 void
00582 iml_aux_done (iml_session_t * s, char *classname)
00583 {
00584     iml_inst *lp;
00585     IMAuxDoneCallbackStruct *aux;
00586 
00587     aux = (IMAuxDoneCallbackStruct *)s->If->m->iml_new(s, sizeof(IMAuxDoneCallbackStruct));
00588     memset(aux, 0, sizeof(IMAuxDoneCallbackStruct));
00589     aux->aux_name = classname;
00590 
00591     lp = (iml_inst *)s->If->m->iml_make_aux_done_inst(s, aux);
00592     s->If->m->iml_execute(s, &lp);
00593 
00594     KOLE_LOG (LOGDEST_STDOUT, "iml_aux_done -------------------------------- end \n");
00595 }
00596 
00597 /* Draw the Auxiliary Window Items */
00598 void iml_aux_draw (iml_session_t *s, char *classname, int count_integers,
00599                  int *integers, int count_strings,   int *len_strings,
00600                  unsigned char **strings)
00601 {
00602     iml_inst *lp;
00603     IMText *lt;
00604     IMAuxDrawCallbackStruct *aux;
00605     int i, len;
00606 
00607     aux = (IMAuxDrawCallbackStruct *) s->If->m->iml_new(s, sizeof(IMAuxDrawCallbackStruct));
00608     memset(aux, 0, sizeof(IMAuxDrawCallbackStruct));
00609     aux->aux_name = classname;
00610 
00611     aux->count_integer_values = count_integers;
00612     if (count_integers) {
00613        aux->integer_values = (int *) s->If->m->iml_new(s, sizeof(int) * count_integers);
00614        memset(aux->integer_values, 0, sizeof(int) * count_integers);
00615 
00616        for (i = 0; i < count_integers; i++) {
00617            aux->integer_values[i] = integers[i];
00618        }
00619     }
00620 
00621     aux->count_string_values = count_strings;
00622     if (count_strings) {
00623        aux->string_values = (IMText *) s->If->m->iml_new(s, sizeof(IMText) * count_strings);
00624        memset(aux->string_values, 0, sizeof(IMText) * count_strings);
00625 
00626        aux->string_values->encoding = UTF16_CODESET;
00627        for (i = 0, lt = aux->string_values; i < count_strings; i++, lt++) {
00628            len = len_strings[i];
00629            lt->text.utf_chars = (UTFCHAR *) s->If->m->iml_new(s, len+1);
00630            lt->char_length = len;
00631            memcpy(lt->text.utf_chars, strings[i], len);
00632        }
00633     }
00634 
00635     lp = (iml_inst *)s->If->m->iml_make_aux_draw_inst(s, aux);
00636     s->If->m->iml_execute(s, &lp);
00637 
00638     KOLE_LOG (LOGDEST_STDOUT, "iml_aux_draw -------------------------------- end \n");
00639 }
00640 
00641