Back to index

im-sdk  12.3.91
newpinyin_im.h
Go to the documentation of this file.
00001 #ifndef _NEWPINYIN_IM_H_
00002 #define _NEWPINYIN_IM_H_
00003 
00004 #include "ime.h"
00005 #include "NewPY.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 typedef struct _ImeBufferRec {
00022        ImeEncoding encoding;
00023 
00024        char input_buf[MAX_INPUT_KEY_NUM];
00025        int  input_len;
00026 
00027        char preedit_buf[MAX_PREEDIT_CHAR_NUM];
00028        int  preedit_len;
00029 
00030        char *candidates[MAX_CANDIDATES_NUM];
00031        char candidates_buf[MAX_CANDIDATES_NUM][MAX_CANDIDATE_CHAR_NUM];
00032        char *comments[MAX_CANDIDATES_NUM];
00033        char comments_buf[MAX_CANDIDATES_NUM][MAX_CANDIDATE_CHAR_NUM];
00034        char *lookups[MAX_CANDIDATES_NUM];
00035        char lookups_buf[MAX_CANDIDATES_NUM][MAX_CANDIDATE_CHAR_NUM];
00036        int  num_candidates;
00037        int  candidates_start_pos;
00038 
00039        int  commit_len;
00040        char commit_buf[MAX_COMMIT_CHAR_NUM];
00041 
00042        int  preedit_caretpos;
00043         int  cur_lookup_pos;
00044         int  lookup_label_type;
00045         int  return_status;
00046        int  session_id;
00047 } ImeBufferRec;
00048 
00049 #endif /* _NEWPINYIN_IM_H_ */