Back to index

im-sdk  12.3.91
neima_im.h
Go to the documentation of this file.
00001 #ifndef _NEIMA_IM_H_
00002 #define _NEIMA_IM_H_
00003 
00004 #include "ime.h"
00005 
00006 #define MAX_CANDIDATES_NUM              16
00007 #define MAX_INPUT_KEY_NUM               9
00008 #define MAX_PREEDIT_CHAR_NUM            9
00009 #define MAX_CANDIDATE_CHAR_NUM          9
00010 #define MAX_COMMIT_CHAR_NUM             9
00011 
00012 #define MAX_KEYMAP_KEY_NUM              95
00013 
00014 #define IME_PREEDIT_AREA                1
00015 #define IME_LOOKUP_AREA                 2
00016 #define IME_STATUS_AREA                 4
00017 #define IME_COMMIT                      8
00018 
00019 typedef struct _ImeBufferRec {
00020        ImeEncoding encoding;
00021 
00022        char preedit_buf[MAX_PREEDIT_CHAR_NUM];
00023        int  preedit_len;
00024 
00025        char *lookups[MAX_CANDIDATES_NUM];
00026        char lookups_buf[MAX_CANDIDATES_NUM][MAX_CANDIDATE_CHAR_NUM];
00027        int  num_candidates;
00028 
00029        int  commit_len;
00030        char commit_buf[MAX_COMMIT_CHAR_NUM];
00031 
00032        int  preedit_caretpos;
00033         int  lookup_label_type;
00034         int  return_status;
00035 } ImeBufferRec;
00036 
00037 #define imm_map_keyevent           imm_services->ImmPrefilterKey
00038 #define imm_get_ime_info           imm_services->ImmGetImeInfo
00039 #define imm_get_ime_session_data   imm_services->ImmGetData
00040 #define imm_set_ime_session_data   imm_services->ImmSetData
00041 #define imm_show_preedit           imm_services->ImmShowPreedit
00042 #define imm_hide_preedit           imm_services->ImmHidePreedit
00043 #define imm_update_preedit         imm_services->ImmUpdatePreedit
00044 #define imm_show_candidates        imm_services->ImmShowCandidates
00045 #define imm_hide_candidates        imm_services->ImmHideCandidates
00046 #define imm_update_candidates             imm_services->ImmUpdateCandidates
00047 #define imm_commit                 imm_services->ImmCommit
00048 #define imm_beep                   imm_services->ImmBeep
00049 #define imm_show_aux               imm_services->ImmStartAux
00050 #define imm_hide_aux               imm_services->ImmCloseAux
00051 
00052 #endif /* _NEIMA_IM_H_ */