Back to index

im-sdk  12.3.91
Classes | Defines | Functions | Variables
UDEngine.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include "SunIM.h"
#include "SunIMMMan.h"
#include "SunIMProt.h"
#include "SunIMMthd.h"
#include "SunIMPriv.h"
#include "SunIMCore.h"
#include "SunIMPub.h"
#include "UDEngine.h"

Go to the source code of this file.

Classes

struct  MyDataPerDesktop
struct  MyDataPerSession

Defines

#define MAX_SESSION   512
#define MAX_PHRASE_LEN   20
#define DEBUG1
#define BUFSIZE   256
#define MAXCANDIDATES   40

Functions

Bool if_udengine_OpenIF (iml_if_t *)
Bool if_udengine_CloseIF (iml_if_t *)
Bool if_udengine_GetIFValue (iml_if_t *, IMArgList, int)
Bool if_udengine_SetIFValue (iml_if_t *, IMArgList, int)
Bool if_udengine_OpenDesktop (iml_desktop_t *, IMArgList, int)
Bool if_udengine_CloseDesktop (iml_desktop_t *)
Bool if_udengine_CreateSC (iml_session_t *, IMArgList, int)
Bool if_udengine_DestroySC (iml_session_t *)
Bool if_udengine_GetSCValue (iml_session_t *, IMArgList, int)
Bool if_udengine_SetSCValue (iml_session_t *, IMArgList, int)
IMTextif_udengine_ResetSC (iml_session_t *)
void if_udengine_SetSCFocus (iml_session_t *)
void if_udengine_UnsetSCFocus (iml_session_t *)
void if_udengine_SendEvent (iml_session_t *, IMInputEvent *ev)
void init_objects ()
void free_objects ()
void if_GetIfInfo (IMArgList args, int num_args)
void aux_start (iml_session_t *)
void aux_draw (iml_session_t *, int, int, int *, int, UTFCHAR **)
void aux_done (iml_session_t *)
void aux_set (iml_session_t *)
void receive_aux (iml_session_t *, IMAuxDrawCallbackStruct *)
Bool receive_keylist (iml_session_t *, IMKeyListEvent *)
void my_conversion_on (iml_session_t *)
void my_conversion_off (iml_session_t *)
void status_draw (iml_session_t *)
void preedit_draw (iml_session_t *)
void lookup_draw (iml_session_t *, UTFCHAR **, int)
void commit (iml_session_t *)
void eval_packet (iml_session_t *, im_data *)
IMTextmake_preedit_imtext (iml_session_t *)
void preedit_buf_print (iml_session_t *)
IMTextmake_imtext (iml_session_t *, UTFCHAR *)
int UTFCHARLen (UTFCHAR *)
int UTFCHARCpy (UTFCHAR *, UTFCHAR *)
IMFeedbackListcreate_feedback (iml_session_t *s, int size)
IMFeedbackListcreate_feedback2 (iml_session_t *s, int size)
void set_feedback (IMFeedbackList *, int)
int get_feedback (IMFeedbackList *)
void debugprint (iml_session_t *s)
void im_send_aux_event (iml_session_t *s, int key, int index)
void eval_packet (s, im_data *imdata)
 UTFCHARCat (UTFCHAR *dest, UTFCHAR *str1, UTFCHAR *str2)

Variables

if_methods_t udengine_methods2
UTFCHAR lename_string [] = {0x7b80, 0x4f53, 0x4e2d, 0x872d, 0x65b0, 0x62fc, 0x97f3, 0x8f93, 0x8815, 0x6cd5, 0x0}
UTFCHAR zhhrn_string [] = {0x7b80, 0x4f53, 0x4e2d, 0x872d, 0x0}
static IMLEName lename
static IMLocale locales []
IMObjectDescriptorStructobjects = NULL
int max_codetable_number = 0
char * class_names [] = {"com.sun.iiim.sample.udengine.NewPYPanel"}
static int s_id [MAX_SESSION]
UTFCHAR aux_name_panel [] = {0x65b0, 0x62fc, 0x97f3, 0x8f85, 0x52a9, 0x7a97, 0x53e3, 0}
UTFCHAR aux_name_aux [] = {0x65b0, 0x62fc, 0x97f3, 0x8f85, 0x52a9, 0x7a97, 0x53e3, 0}
UTFCHAR off_string [] = {0x897f, 0x6587, 0}
UTFCHAR title_string [] = {0x67e5, 0x627e, 0x8868, 0}

Class Documentation

struct MyDataPerDesktop

Definition at line 202 of file NewPY.c.

Collaboration diagram for MyDataPerDesktop:
Class Members
CARD8 actionaux_started
CARD8 aux_locale_id
int aux_start
int aux_started
iml_session_t * auxproxy_session
CARD8 bSentKeymapToAux
iml_session_t * current_session
int engine_id
int gbk_support
IMEArgList ime_args
CARD8 keyboardaux_started
CARD8 lookupaux_started
CARD8 optionaux_started
CARD8 paletteaux_first_trigger_on
CARD8 paletteaux_ready
CARD8 paletteaux_started
int punc
iml_session_t * root_session
CARD8 selectaux_started
int skb
unit_desktop_t * udp
UserPreference user_pref
henkan_table3 * userdict
int wordcount
struct MyDataPerSession

Definition at line 211 of file NewPY.c.

Collaboration diagram for MyDataPerSession:
Class Members
int caret_pos
TClientType client_type
UTFCHAR * commit_buf
int conv_on
UTFCHAR * conversion_string
int hkp_notify_flag
IMEBuffer ime_buffer
int input_mode
TKeyboardAuxStatus keyboardaux_status
char * locale
TLookupAuxStatus lookupaux_status
IMText ** luc_candidates
int luc_current_candidate
IMFeedbackList * luc_fbs_normal
IMFeedbackList * luc_fbs_reverse
IMText ** luc_labels
int luc_nchoices
int luc_start
int luc_top
int luc_type
int max_candidates
TOptionAuxStatus optionaux_status
IMEEngine * p_engine
TPaletteAuxStatus paletteaux_status
UTFCHAR * preedit_buf
IMFeedbackList * preedit_feedback
int preedit_start
UTFCHAR * preedit_string
TIMProtocolType protocol_type
TSelectAuxStatus selectaux_status
SessionCoreStruct session_core
int session_id
UTFCHAR * status_buf
int status_start
char * username

Define Documentation

#define BUFSIZE   256

Definition at line 405 of file UDEngine.c.

#define DEBUG1

Definition at line 237 of file UDEngine.c.

#define MAX_PHRASE_LEN   20

Definition at line 230 of file UDEngine.c.

#define MAX_SESSION   512

Definition at line 229 of file UDEngine.c.

#define MAXCANDIDATES   40

Definition at line 406 of file UDEngine.c.


Function Documentation

void aux_done ( iml_session_t s)
void aux_draw ( iml_session_t s,
int  class_name_id,
int  count_integers,
int *  integers,
int  count_strings,
UTFCHAR **  strings 
)
void aux_set ( iml_session_t s)

Definition at line 1011 of file UDEngine.c.

{
    int caret;
    char mode[40];
    MyDataPerSession *session_data = (MyDataPerSession *) s->specific_data;
    MyDataPerDesktop *desktop_data = (MyDataPerDesktop *) s->desktop->specific_data;
    im_data* imdata;
    extern im_data *IM_setAuxValue();

    IM_setAuxValue(session_data->session_id, PUNCTUATION_STATUS, desktop_data->punc);

    imdata = (im_data *)IM_setAuxValue(session_data->session_id, SOFTKEYBOARD_LAYOUT, desktop_data->skb);
    if(imdata) {
        zh_str_to_utf16(imdata->status_str, session_data->status_buf, &caret);
        eval_packet(s,imdata);
    }
    else {
       IM_getValue(session_data->session_id, IM_STATUS, mode);
       zh_str_to_utf16(mode, session_data->status_buf, &caret);
       status_draw(s);
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void aux_start ( iml_session_t s)
void commit ( iml_session_t s)
IMFeedbackList* create_feedback ( iml_session_t s,
int  size 
)

Definition at line 338 of file CannaLE.c.

{
    int i;
    IMFeedbackList *feedback;
    IMFeedback *fb;
    
    if (!s) return NULL;

    feedback = ((IMFeedbackList *)
              s->If->m->iml_new(s, sizeof(IMFeedbackList) * size));
    for (i = 0; i < size; i++) {
       IMFeedbackList *fbl = &feedback[i];
       fbl->count_feedbacks = 1;
       fb = ((IMFeedback *) s->If->m->iml_new(s, sizeof(IMFeedback) * 4));
       fbl->feedbacks = fb;
       memset(fbl->feedbacks, 0, sizeof(IMFeedback) * 4);
    }
    return feedback;
}
IMFeedbackList* create_feedback2 ( iml_session_t s,
int  size 
)
void debugprint ( iml_session_t s)

Definition at line 240 of file UDEngine.c.

                                  {
    printf("  s=[%x]\n", s);
    printf("  If=[%x]\n", s->desktop->If);
    printf("  desktop=[%x]\n", s->desktop);
    printf("  locale=[%s]\n", s->desktop->If->locale);
    printf("  if_name=[%s]\n", s->desktop->If->if_name);
    printf("  USER:%s\n", s->desktop->user_name);
    printf("  HOST:%s\n", s->desktop->host_name);
    printf("    DISPLAY:%s\n", s->desktop->display_id);
}
void eval_packet ( iml_session_t ,
im_data  
)
void eval_packet ( ,
im_data imdata 
)

Definition at line 841 of file UDEngine.c.

{
    MyDataPerSession *session_data = (MyDataPerSession *) s->specific_data;
    iml_inst *lp;
    UTFCHAR **luc_tmp;
    int k;
    int caret;

    if(imdata->operation == CIM_STATUS) status_draw(s); 
       
    session_data->caret_pos = imdata->caret_pos;
    zh_str_to_utf16(imdata->pre_str, session_data->preedit_buf, &session_data->caret_pos);
    preedit_draw(s);
       
    if( (imdata->operation == CIM_COMMIT) || (imdata->operation == CIM_COMMITSYMBOL) ) {
       zh_str_to_utf16(imdata->commit_str, session_data->commit_buf, &caret);
       commit(s);
    }

    if (imdata->luc_num > 0) {
       session_data->luc_nchoices = imdata->luc_num;
       luc_tmp = (UTFCHAR**) s->If->m->iml_new(s, session_data->luc_nchoices * sizeof(UTFCHAR*));
       for(k = 0; k < session_data->luc_nchoices; k ++) {
           luc_tmp[k] = (UTFCHAR*) s->If->m->iml_new(s, MAX_PHRASE_LEN * sizeof(UTFCHAR));
           luc_tmp[k][0] = 0;
           zh_str_to_utf16(imdata->luc_str[k], luc_tmp[k], &caret);
       }
       lookup_draw(s, luc_tmp, imdata->luc_num);
    }
    else if(session_data->luc_start == True){
        lp = (iml_inst*)s->If->m->iml_make_lookup_done_inst(s);
        s->If->m->iml_execute(s, &lp);
       session_data->luc_start = False;
    }
}

Here is the call graph for this function:

void free_objects ( )
int get_feedback ( IMFeedbackList fbl)

Definition at line 380 of file CannaLE.c.

{
    /* returns IM_DECORATION_FEEDBACK */
    IMFeedback *fb = &fbl->feedbacks[0];
    return IM_FEEDBACK_VALUE(fb);
}
void if_GetIfInfo ( IMArgList  args,
int  num_args 
)

Definition at line 120 of file UDEngine.c.

{
    int i;

    init_objects(); 
    for (i = 0; i < num_args; i++, args++) {
        switch (args->id) {
            case IF_VERSION:
                args->value = (IMArgVal) "1.2";
                break;
            case IF_METHOD_TABLE:
                args->value = (IMArgVal) & udengine_methods2;
                break;
            case IF_LE_NAME:
                args->value = (IMArgVal) & lename;
                break;
            case IF_SUPPORTED_LOCALES:
                args->value = (IMArgVal) & locales;
                break;
            case IF_SUPPORTED_OBJECTS:
                args->value = (IMArgVal) NULL; 
                break;
            case IF_NEED_THREAD_LOCK:
                args->value = (IMArgVal) False;
                break;
            default:
                break;
            }
    }
}

Here is the call graph for this function:

Definition at line 384 of file UDEngine.c.

{
    MyDataPerDesktop *desktop_data = (MyDataPerDesktop *) desktop->specific_data;

#ifdef DEBUG
    printf("if_udengine_CloseDesktop()\n");
    printf("  If=[%x]\n", desktop->If);
    printf("  desktop=[%x]\n", desktop);
    printf("  locale=[%s]\n", desktop->If->locale);
    printf("  if_name=[%s]\n", desktop->If->if_name);
    printf("  USER:%s\n", desktop->user_name);
    printf("  HOST:%s\n", desktop->host_name);
    printf("  DISPLAY:%s\n", desktop->display_id);
#endif

    free(desktop_data);
    return True;
}

Definition at line 262 of file UDEngine.c.

{
#ifdef  notdef
    free_objects();
#endif

    IM_close(max_codetable_number);

    return True;
}

Here is the call graph for this function:

Bool if_udengine_CreateSC ( iml_session_t s,
IMArgList  args,
int  num_args 
)

Definition at line 409 of file UDEngine.c.

{
    iml_desktop_t *desktop = s->desktop;
    static int first_create = 1;
    int i;

    MyDataPerSession *p = (MyDataPerSession *) calloc(1, sizeof(MyDataPerSession));
    p->status_start = False;
    p->luc_start = False;
    p->preedit_start = False;
    p->preedit_buf = (UTFCHAR *) calloc(1, sizeof(UTFCHAR) * BUFSIZE);
    p->status_buf = (UTFCHAR *) calloc(1, sizeof(UTFCHAR) * BUFSIZE);
    p->commit_buf = (UTFCHAR *) calloc(1, sizeof(UTFCHAR) * BUFSIZE);
    
    p->conversion_string = (UTFCHAR *) calloc(1, sizeof(UTFCHAR) * BUFSIZE);
    p->preedit_string = (UTFCHAR *) calloc(1, sizeof(UTFCHAR) * BUFSIZE);
    p->luc_candidates = NULL;
    p->luc_labels = NULL;
    p->luc_nchoices = 36;
    p->caret_pos = -1;
    p->max_candidates = MAXCANDIDATES - 1;
    p->luc_current_candidate = 0;
    p->luc_fbs_reverse = create_feedback(0, BUFSIZE);
    p->luc_fbs_normal = create_feedback(0, BUFSIZE);
    p->preedit_feedback = create_feedback(0, BUFSIZE);
    for(i=0;i<BUFSIZE;i++) {
       set_feedback(&p->luc_fbs_reverse[i], IMUnderline);
       set_feedback(&p->luc_fbs_reverse[i], IMReverse);
       set_feedback(&p->luc_fbs_reverse[i], IMNormal);
    }

    if(first_create) {
        for (i = 0; i < MAX_SESSION; i ++) s_id[i] = 0;
        first_create = 0;
    }

    for (i = 0; i < MAX_SESSION; i ++)
        if (s_id[i] == 0) { p->session_id = i ; break; }

    if ( i == MAX_SESSION ) {
         perror(" Can't open so many subwindows");
         return False;
    }
    s_id[i] = 1;
    p->username = (char *)strdup(desktop->user_name);
    
#ifdef DEBUG
    printf("if_udengine_CreateSC()\n");
    printf("    If=[%x]\n", desktop->If);
    printf("    desktop=[%x]\n", desktop);
    printf("    locale=[%s]\n", desktop->If->locale);
    printf("    if_name=[%s]\n", desktop->If->if_name);
    printf("    USER:%s\n", desktop->user_name);
    printf("    HOST:%s\n", desktop->host_name);
    printf("    DISPLAY:%s\n", desktop->display_id);

    for (i = 0; i < num_args; i++, args++) {
        switch (args->id) {
            case UI_USER_NAME:
                if (args->value) {
                    printf("    UI_USER_NAME=%s\n", args->value);
                }
                break;
            case UI_HOST_NAME:
                if (args->value) {
                    printf("    UI_HOST_NAME=%s\n", args->value);
                }
                break;
            case UI_DISPLAY_ID:
                if (args->value) {
                    printf("    UI_DISPLAY_ID=%s\n", args->value);
                }
                break;
            case UI_PROTOCOL_TYPE:
                if (args->value) {
                    printf("    UI_PROTOCOL_TYPE=%s\n", args->value);
                }
                break;
            case UI_XSERVER_VENDOR:
                if (args->value) {
                    printf("    UI_XSERVER_VENDOR=%s\n", args->value);
                }
                break;
            case UI_CLIENT_TYPE:
                if (args->value) {
                    printf("    UI_CLIENT_TYPE=%s\n", args->value);
                }
                break;
            case UI_OS_NAME:
                if (args->value) {
                    printf("    UI_OS_NAME=%s\n", args->value);
                }
                break;
            case UI_OS_ARCH:
                if (args->value) {
                    printf("    UI_OS_ARCH=%s\n", args->value);
                }
                break;
            case UI_OS_VERSION:
                if (args->value) {
                    printf("    UI_OS_VERSION=%s\n", args->value);
                }
                break;
            }
    }
#endif
    s->specific_data = (void*) p;
    
    return True;
}

Here is the call graph for this function:

Definition at line 525 of file UDEngine.c.

{
    MyDataPerSession *p = (MyDataPerSession *) s->specific_data;
    MyDataPerDesktop *desktop_data = (MyDataPerDesktop *) s->desktop->specific_data;

    IM_destroySession(p->session_id);
    s_id[p->session_id] = 0;

    if ( s == desktop_data->auxproxy_session) {
       aux_done(s);
       desktop_data->auxproxy_session = NULL;
       desktop_data->punc = 0;
       desktop_data->skb = 0;
       desktop_data->gbk_support = 0;
    }

    if (p->preedit_buf)
        free((char *) p->preedit_buf);
    if (p->status_buf)
        free((char *) p->status_buf);
    if (p->commit_buf)
        free((char *) p->commit_buf);
    if (p->conversion_string)
        free((char *) p->conversion_string);
    if (p->preedit_string)
        free((char *) p->preedit_string);
    if (p->preedit_feedback)
        free((char *) p->preedit_feedback);
    if (p->luc_fbs_reverse)
        free((char *) p->luc_fbs_reverse);
    if (p->luc_fbs_normal)
        free((char *) p->luc_fbs_normal);
    free((char *) p);
#ifdef DEBUG
    printf("if_udengine_DestroySC(s=%x)\n", s);
    debugprint(s);
#endif
    return True;
}

Here is the call graph for this function:

Bool if_udengine_GetIFValue ( iml_if_t If,
IMArgList  args,
int  num_args 
)

Definition at line 314 of file UDEngine.c.

{

#ifdef DEBUG
    printf("if_udengine_GetIFValue()\n");
    printf("  If=[%x]\n", If);
    printf("  locale=[%s]\n", If->locale);
    printf("  if_name=[%s]\n", If->if_name);
#endif

    return True;
}
Bool if_udengine_GetSCValue ( iml_session_t s,
IMArgList  args,
int  num_args 
)

Definition at line 568 of file UDEngine.c.

{
    int i;
    IMArg *p = args;
    
    static int charsubset[] = {
        67,                 /* LATIN */
        47,                 /* HIRAGANA */
        48,                 /* KATAKANA */
        71,                 /* KANJI */
        0
    };
    
#ifdef DEBUG
    printf("if_udengine_GetSCValue(s=%x)\n", s);
    debugprint(s);
#endif
    for (i = 0; i < num_args; i++, p++) {
        switch (p->id) {
            case SC_SUPPORTED_CHARACTER_SUBSETS:
                /* specify CHARACTER_SUBSETS */
                p->value = (IMArgVal) charsubset;
                break;
            default:
                break;
            }
    }
    return True;
}

Here is the call graph for this function:

Bool if_udengine_OpenDesktop ( iml_desktop_t desktop,
IMArgList  args,
int  num_args 
)

Definition at line 353 of file UDEngine.c.

{
    MyDataPerDesktop *desktop_data = (MyDataPerDesktop *) calloc(1, sizeof(MyDataPerDesktop));
    int i;

#ifdef DEBUG
    printf("if_udengine_OpenDesktop()\n");
    printf("  If=[%x]\n", desktop->If);
    printf("  desktop=[%x]\n", desktop);
    printf("  locale=[%s]\n", desktop->If->locale);
    printf("  if_name=[%s]\n", desktop->If->if_name);
    printf("  USER:%s\n", desktop->user_name);
    printf("  HOST:%s\n", desktop->host_name);
    printf("  DISPLAY:%s\n", desktop->display_id);
#endif

    desktop_data->aux_started = False;
    desktop_data->engine_id = 0;
    desktop_data->punc = 0;
    desktop_data->skb = 0;
    desktop_data->gbk_support = 0;
    desktop_data->auxproxy_session = NULL;
    desktop->specific_data = (void *) desktop_data;
    return True;
}

Definition at line 252 of file UDEngine.c.

Here is the call graph for this function:

Definition at line 712 of file UDEngine.c.

{
    int i;
    iml_inst *lp;
    IMText *p = make_preedit_imtext(s);
    MyDataPerSession *session_data = (MyDataPerSession *) s->specific_data;
    
#ifdef DEBUG
    printf("if_udengine_ResetSC(s=%x)\n", s);
    debugprint(s);
#endif
    
    /*
    * when you return IMText for commit string, you need to call
    * iml_make_preedit_erase_inst() here.
    */
    lp = s->If->m->iml_make_preedit_erase_inst(s);
    s->If->m->iml_execute(s, &lp);
    
    /*
    * reset buffer
    */
    for(i=0;i<BUFSIZE;i++){
       set_feedback(&session_data->preedit_feedback[i], IMUnderline);
    }
    memset(session_data->preedit_buf, 0, sizeof(UTFCHAR) * BUFSIZE);
    memset(session_data->status_buf, 0, sizeof(UTFCHAR) * BUFSIZE);
    memset(session_data->commit_buf, 0, sizeof(UTFCHAR) * BUFSIZE);
    memset(session_data->preedit_string, 0, sizeof(UTFCHAR) * BUFSIZE);
    memset(session_data->conversion_string, 0, sizeof(UTFCHAR) * BUFSIZE);
    session_data->caret_pos = -1;
    
    /*
    * return committed string
    */
    if (p->char_length) {
        return p;
    }
    return (IMText *) NULL;
}

Here is the call graph for this function:

Definition at line 781 of file UDEngine.c.

{
#ifdef DEBUG
    printf("if_udengine_SendEvent s=%x ev=%x\n", s, ev);
#endif
    if (ev) {
        if (ev->type == IM_EventKeyList) {
            if (receive_keylist(s, (IMKeyListEvent *) ev) == False) {
                IMKeyListEvent *keylist = (IMKeyListEvent *) ev;
                iml_inst *lp = s->If->m->iml_make_keypress_inst(s, (IMKeyEventStruct *) keylist->keylist);
                s->If->m->iml_execute(s, &lp);
            }
        } else if (ev->type == IM_EventAux) {
            IMAuxEvent *aux = (IMAuxEvent *) ev;
            IMAuxDrawCallbackStruct *data = aux->aux;
            receive_aux(s, data);
        } else if (ev->type == IM_EventString) {
            /* String Event */
        } else if (ev->type == IM_EventText) {
            /* Text Event */
        }
    }
}

Here is the call graph for this function:

Bool if_udengine_SetIFValue ( iml_if_t If,
IMArgList  args,
int  num_args 
)

Definition at line 332 of file UDEngine.c.

{
    int i;
#ifdef DEBUG
    printf("if_udengine_SetIFValue()\n");
    printf("  If=[%x]\n", If);
    printf("  locale=[%s]\n", If->locale);
    printf("  if_name=[%s]\n", If->if_name);
#endif
    for (i = 0; i < num_args; i++, args++) {
        switch (args->id) {
        }
    }
    return True;
}

Definition at line 756 of file UDEngine.c.

{
    MyDataPerSession *session_data = (MyDataPerSession *) s->specific_data;
    MyDataPerDesktop *desktop_data = (MyDataPerDesktop *) s->desktop->specific_data;
#ifdef DEBUG
    printf("if_udengine_SetSCFocus()\n");
#endif
    aux_start(s);
    aux_set(s);
}

Here is the call graph for this function:

Bool if_udengine_SetSCValue ( iml_session_t s,
IMArgList  args,
int  num_args 
)

Definition at line 665 of file UDEngine.c.

{
    int i;
    IMArg *p = args;

#ifdef DEBUG
    printf("if_udengine_SetSCValue()\n");
    debugprint(s);
#endif

    for (i = 0; i < num_args; i++, p++) {
        switch (p->id) {
            case SC_TRIGGER_ON_NOTIFY:
                my_conversion_on(s);
                break;
                
            case SC_TRIGGER_OFF_NOTIFY:
                my_conversion_off(s);
                break;
                
            case SC_REALIZE:
              {
                  MyDataPerDesktop *desktop_data = (MyDataPerDesktop *) s->desktop->specific_data;
                  MyDataPerSession *session_data = (MyDataPerSession *) s->specific_data;
                  IM_createSession(session_data->session_id);
                    if(desktop_data->auxproxy_session == NULL) 
                      desktop_data->auxproxy_session = s;
                    /* aux_start(s); */
                  
              }
                break;

           case SC_LOOKUP_LABELTYPE:
                break;

            default:
                break;
            }
    }
    return True;
}

Here is the call graph for this function:

Definition at line 770 of file UDEngine.c.

{
#ifdef DEBUG
    printf("if_udengine_UnsetSCFocus()\n");
    debugprint(s);
#endif
}

Here is the call graph for this function:

void im_send_aux_event ( iml_session_t s,
int  key,
int  index 
)

Definition at line 808 of file UDEngine.c.

{
    MyDataPerSession *session_data = (MyDataPerSession *) s->specific_data;
    MyDataPerDesktop *desktop_data = (MyDataPerDesktop *) s->desktop->specific_data;

/*        XIMAuxDrawCallbackStruct *dcb;*/

    switch(key) {
        case '1':
            desktop_data->punc = (desktop_data->punc == 0) ? 1 : 0 ;
            break;

        case '2':
           if(index != -1) desktop_data->skb = index;
           else {
                     desktop_data->skb ++; 
              desktop_data->skb = desktop_data->skb % max_codetable_number;
           }
        default:
            break;
    }
    aux_set(s);

/*
        dcb = (XIMAuxDrawCallbackStruct *)create_aux_struct(s);
        im_draw_aux(s,dcb);
*/
        return;
}

Here is the call graph for this function:

void init_objects ( )
void lookup_draw ( iml_session_t s,
UTFCHAR **  luc_tmp,
int  luc_num 
)
IMText* make_imtext ( iml_session_t s,
UTFCHAR u 
)

Definition at line 1198 of file NewPY.c.

{
    int len;
    IMText *p = (IMText *) s->If->m->iml_new(s, sizeof(IMText));
    memset(p, 0, sizeof(IMText));
    p->encoding = UTF16_CODESET;
    len = UTFCHARLen(u);
    p->text.utf_chars = (UTFCHAR *) s->If->m->iml_new(s, sizeof(UTFCHAR) * (len + 1));
    UTFCHARCpy(p->text.utf_chars, u);
    p->char_length = len;
    p->feedback = create_feedback(s, p->char_length);
    return p;
}

Here is the call graph for this function:

void preedit_draw ( iml_session_t s)
void set_feedback ( IMFeedbackList fbl,
int  value 
)

Definition at line 1611 of file NewPY.c.

void status_draw ( iml_session_t s)
UTFCHARCat ( UTFCHAR dest,
UTFCHAR str1,
UTFCHAR str2 
)

Definition at line 934 of file UDEngine.c.

{
    int i;
    for (i = 0; *str1; i++) {
        *dest++ = *str1++;
    }
    for (i = 0; *str2; i++) {
        *dest++ = *str2++;
    }
    *dest = 0;
    return i;
}
int UTFCHARCpy ( UTFCHAR dest,
UTFCHAR original 
)

Definition at line 112 of file le_iml.c.

{
    int i;
    for (i = 0; *original; i++) {
        *dest++ = *original++;
    }
    *dest = 0;
    return i;
}
int UTFCHARLen ( UTFCHAR p)

Definition at line 122 of file le_iml.c.

{
    int i;
    for (i = 0; *p; i++)
        p++;
    return i;
}

Variable Documentation

UTFCHAR aux_name_aux[] = {0x65b0, 0x62fc, 0x97f3, 0x8f85, 0x52a9, 0x7a97, 0x53e3, 0}

Definition at line 276 of file UDEngine.c.

UTFCHAR aux_name_panel[] = {0x65b0, 0x62fc, 0x97f3, 0x8f85, 0x52a9, 0x7a97, 0x53e3, 0}

Definition at line 275 of file UDEngine.c.

char* class_names[] = {"com.sun.iiim.sample.udengine.NewPYPanel"}

Definition at line 154 of file UDEngine.c.

IMLEName lename [static]
Initial value:
 {
    "udengine", lename_string      
}

Definition at line 96 of file UDEngine.c.

UTFCHAR lename_string[] = {0x7b80, 0x4f53, 0x4e2d, 0x872d, 0x65b0, 0x62fc, 0x97f3, 0x8f93, 0x8815, 0x6cd5, 0x0}

Definition at line 93 of file UDEngine.c.

IMLocale locales[] [static]
Initial value:
 {
    {"zh", zhhrn_string},   
    NULL
}

Definition at line 100 of file UDEngine.c.

Definition at line 107 of file UDEngine.c.

Definition at line 105 of file UDEngine.c.

UTFCHAR off_string[] = {0x897f, 0x6587, 0}

Definition at line 602 of file UDEngine.c.

int s_id[MAX_SESSION] [static]

Definition at line 231 of file UDEngine.c.

UTFCHAR title_string[] = {0x67e5, 0x627e, 0x8868, 0}

Definition at line 603 of file UDEngine.c.

UTFCHAR zhhrn_string[] = {0x7b80, 0x4f53, 0x4e2d, 0x872d, 0x0}

Definition at line 94 of file UDEngine.c.