Back to index

im-sdk  12.3.91
ime_buffer.h
Go to the documentation of this file.
00001 #ifndef IME_BUFFER_H
00002 #define IME_BUFFER_H
00003 
00004 #include "ime.h"
00005 
00006 #define IME_PREEDIT_AREA                1
00007 #define IME_LOOKUP_AREA                 2
00008 #define IME_STATUS_AREA                 4
00009 #define IME_COMMIT                      8
00010 
00011 typedef struct _ImeBufferRec {
00012     ImePreeditRec       preedit;
00013     ImeCandidatesRec    candidates;
00014     unsigned char      *commit_buf;
00015     int                 return_status;
00016     int                 max_cand_num;  //used for free the space. do not use it any other place.
00017 } ImeBufferRec;
00018 
00019 ImeBufferRec * alloc_ime_buffer(int max_preedit_bytes,      //max byte lenght of the preedit buffer
00020                                 int max_candidate_num,      //max number of candidates
00021                                 int max_candidate_byte,     //max byte length of single candidates
00022                                 int max_numberring_byte,    //max byte length of single numberring
00023                                 int max_commit_byte);       //max byte length of the commit buffer
00024 
00025 void free_ime_buffer(ImeBufferRec *ime_buffer);
00026 
00027 void clear_ime_buffer(ImeBufferRec *ime_buffer);
00028 
00029 #endif