Back to index

im-sdk  12.3.91
ctim.h
Go to the documentation of this file.
00001 #ifndef _CTIM_H_
00002 #define _CTIM_H_
00003 
00004 #include "ime.h"
00005 #include "codetable.h"
00006 
00007 #define MAX_CANDIDATES_NUM              16
00008 #define MAX_INPUT_KEY_NUM               128
00009 #define MAX_PREEDIT_CHAR_NUM            128
00010 #define MAX_CANDIDATE_CHAR_NUM          256
00011 #define MAX_COMMIT_CHAR_NUM             256
00012 
00013 #define MAX_KEYMAP_KEY_NUM              95
00014 
00015 #define IME_PREEDIT_AREA                0x01
00016 #define IME_LOOKUP_AREA                 0x02
00017 #define IME_STATUS_AREA                 0x04
00018 #define IME_COMMIT                      0x08
00019 #define IME_BEEP                        0x10
00020 
00021 enum ctim_arguments {
00022        KEYBYKEY_MODE_ID = 0,
00023        HELPINFO_MODE_ID,
00024        AUTOSELECT_MODE_ID,
00025        KEYPROMPT_MODE_ID,
00026        KEYMAPPING_MODE_ID,
00027        CTIM_ARGS_NUM
00028 };
00029 
00030 typedef struct _ImeBufferRec {
00031        ImeEncoding encoding;
00032 
00033        char input_buf[MAX_INPUT_KEY_NUM];
00034        int  input_len;
00035 
00036        char preedit_buf[MAX_PREEDIT_CHAR_NUM];
00037        int  preedit_len;
00038 
00039        char *candidates[MAX_CANDIDATES_NUM];
00040        char candidates_buf[MAX_CANDIDATES_NUM][MAX_CANDIDATE_CHAR_NUM];
00041        char *comments[MAX_CANDIDATES_NUM];
00042        char comments_buf[MAX_CANDIDATES_NUM][MAX_CANDIDATE_CHAR_NUM];
00043        char *lookups[MAX_CANDIDATES_NUM];
00044        char lookups_buf[MAX_CANDIDATES_NUM][MAX_CANDIDATE_CHAR_NUM];
00045        int  num_candidates;
00046        int  candidates_start_pos;
00047 
00048        int  commit_len;
00049        char commit_buf[MAX_COMMIT_CHAR_NUM];
00050 
00051        int  preedit_caretpos;
00052         int  cur_lookup_pos;
00053         int  lookup_label_type;
00054        int  page_state;
00055         int  return_status;
00056 } ImeBufferRec;
00057 
00058 #endif /* _CTIM_H_ */