/* 注册LCUI默认的输入法 */ static int LCUI_DefaultIMERegister(void) { LCUIIME_Func ime_func; ime_func.gettarget = IME_GetTarget; ime_func.settarget = IME_SetTarget; ime_func.prockey = IME_ProcessKey; ime_func.totext = IME_ToText; ime_func.close = IME_Close; ime_func.open = IME_Open; return LCUIIME_Register( "LCUI Input Method", &ime_func ); }
int LCUI_RegisterLinuxIME( void ) { LCUI_IMEHandlerRec handler; LCUI_BOOL is_x11_mode = TRUE; if( is_x11_mode ) { handler.gettarget = X11IME_GetTarget; handler.settarget = X11IME_SetTarget; handler.cleartarget = X11IME_ClearTarget; handler.prockey = X11IME_ProcessKey; handler.totext = X11IME_ToText; handler.close = X11IME_Close; handler.open = X11IME_Open; return LCUIIME_Register( "LCUI Input Method", &handler ); } return -1; }