Back to index

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

Go to the source code of this file.

Functions

void encode_draw_status (iml_session_t *s, int encode, unsigned char *status_buf)
void encode_draw_preedit (iml_session_t *s, int encode, unsigned char *preedit_buf, int caret)
void encode_draw_candidates (iml_session_t *s, int encode, unsigned char **lookup_buf, int lookup_num, int lookup_label_type)
void encode_commit (iml_session_t *s, int encode, unsigned char *commit_buf, int commit_len)

Function Documentation

void encode_commit ( iml_session_t s,
int  encode,
unsigned char *  commit_buf,
int  commit_len 
)

Definition at line 133 of file encode_draw.c.

{
    static UTFCHAR Commit_Buffer[MAX_COMMIT_CHAR_NUM * 2];
    if (commit_len <= 0)
       return;
    encode_to_unicode(encode, commit_buf, commit_len, Commit_Buffer, MAX_COMMIT_CHAR_NUM * 2);
    iml_commit(s, Commit_Buffer);
}

Here is the call graph for this function:

void encode_draw_candidates ( iml_session_t s,
int  encode,
unsigned char **  lookup_buf,
int  lookup_num,
int  lookup_label_type 
)

Definition at line 67 of file encode_draw.c.

{
       static UTFCHAR *Lookup_Buffer[MAX_CANDIDATES_NUM];
       static UTFCHAR Lookup_Items_Buffer[MAX_CANDIDATES_NUM][MAX_CANDIDATE_CHAR_NUM * 2];
       static int bLookupInited = 0;

       int i, lookup_len;

       if (bLookupInited == 0) {
              bLookupInited = 1;
              for (i=0; i<MAX_CANDIDATES_NUM; i++)
                     Lookup_Buffer[i] = Lookup_Items_Buffer[i];
       }

       if (lookup_num <= 0)
              iml_lookup_enddraw(s);

       /* Notes that Lookup_Buffer has point to Lookup_Items_Buffer */
       for (i=0; i<lookup_num; i++) {
              lookup_len = strlen((char *)lookup_buf[i]);
              encode_to_unicode(encode, lookup_buf[i], lookup_len, Lookup_Items_Buffer[i], MAX_CANDIDATE_CHAR_NUM * 2);
       }

       iml_lookup_draw(s, Lookup_Buffer, lookup_num, lookup_label_type);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void encode_draw_preedit ( iml_session_t s,
int  encode,
unsigned char *  preedit_buf,
int  caret 
)

Definition at line 37 of file encode_draw.c.

{
       static UTFCHAR Preedit_Buffer[MAX_PREEDIT_CHAR_NUM * 2];
       int preedit_len, caret_pos;
       
       preedit_len = strlen((char *)preedit_buf);
       if (preedit_len <=0)
              iml_preedit_enddraw(s);
       /*
        The value of encode is from IMEBuffer->encode member, which is
        default encoding the language engine is using internally
       */
       encode_to_unicode(encode, preedit_buf, preedit_len, Preedit_Buffer, MAX_PREEDIT_CHAR_NUM * 2);
       iml_preedit_draw(s, Preedit_Buffer, caret);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void encode_draw_status ( iml_session_t s,
int  encode,
unsigned char *  status_buf 
)

Definition at line 53 of file encode_draw.c.

{
       static UTFCHAR Status_Buffer[MAX_STATUS_CHAR_NUM * 2];
       int status_len;
       int i, len;

       status_len = strlen((char *)status_buf);
       if (status_len <= 0)
              return;

       encode_to_unicode(encode, status_buf, status_len, Status_Buffer, MAX_STATUS_CHAR_NUM * 2);
       iml_status_draw(s, Status_Buffer);
}

Here is the call graph for this function:

Here is the caller graph for this function: