1 #ifndef _ECORE_IMF_PRIVATE_H 2 #define _ECORE_IMF_PRIVATE_H 3 4 #define ECORE_MAGIC_CONTEXT 0x56c1b39a 5 6 #ifdef ECORE_IMF_DEFAULT_LOG_COLOR 7 #undef ECORE_IMF_DEFAULT_LOG_COLOR 8 #endif 9 #define ECORE_IMF_DEFAULT_LOG_COLOR EINA_COLOR_BLUE 10 11 extern int _ecore_imf_log_dom; 12 #ifdef ERR 13 # undef ERR 14 #endif 15 #define ERR(...) EINA_LOG_DOM_ERR(_ecore_imf_log_dom, __VA_ARGS__) 16 17 #ifdef DBG 18 # undef DBG 19 #endif 20 #define DBG(...) EINA_LOG_DOM_DBG(_ecore_imf_log_dom, __VA_ARGS__) 21 22 #ifdef INF 23 # undef INF 24 #endif 25 #define INF(...) EINA_LOG_DOM_INFO(_ecore_imf_log_dom, __VA_ARGS__) 26 27 #ifdef WRN 28 # undef WRN 29 #endif 30 #define WRN(...) EINA_LOG_DOM_WARN(_ecore_imf_log_dom, __VA_ARGS__) 31 32 #ifdef CRI 33 # undef CRI 34 #endif 35 #define CRI(...) EINA_LOG_DOM_CRIT(_ecore_imf_log_dom, __VA_ARGS__) 36 37 typedef struct _Ecore_IMF_Module Ecore_IMF_Module; 38 typedef struct _Ecore_IMF_Func_Node Ecore_IMF_Func_Node; 39 typedef struct _Ecore_IMF_Input_Panel_Callback_Node Ecore_IMF_Input_Panel_Callback_Node; 40 41 struct _Ecore_IMF_Context 42 { 43 ECORE_MAGIC; 44 const Ecore_IMF_Module *module; 45 const Ecore_IMF_Context_Class *klass; 46 void *data; 47 int input_mode; 48 void *window; 49 void *client_canvas; 50 Eina_Bool (*retrieve_surrounding_func)(void *data, Ecore_IMF_Context *ctx, char **text, int *cursor_pos); 51 void *retrieve_surrounding_data; 52 Eina_List *callbacks; 53 Eina_List *input_panel_callbacks; 54 Ecore_IMF_Autocapital_Type autocapital_type; 55 Ecore_IMF_Input_Panel_Layout input_panel_layout; 56 Ecore_IMF_Input_Panel_Lang input_panel_lang; 57 Ecore_IMF_Input_Panel_Return_Key_Type input_panel_return_key_type; 58 Ecore_IMF_Input_Hints input_hints; 59 Ecore_IMF_BiDi_Direction bidi_direction; 60 int input_panel_layout_variation; 61 Eina_Bool (*retrieve_selection_func)(void *data, Ecore_IMF_Context *ctx, char **text); 62 void *retrieve_selection_data; 63 Eina_Hash *prediction_hint_hash; 64 Eina_Bool allow_prediction : 1; 65 Eina_Bool input_panel_enabled : 1; 66 Eina_Bool input_panel_return_key_disabled : 1; 67 Eina_Bool input_panel_caps_lock_mode : 1; 68 Eina_Bool input_panel_show_on_demand : 1; 69 }; 70 71 struct _Ecore_IMF_Module 72 { 73 const Ecore_IMF_Context_Info *info; 74 Ecore_IMF_Context *(*create)(void); 75 Ecore_IMF_Context *(*exit)(void); 76 }; 77 78 struct _Ecore_IMF_Func_Node 79 { 80 void (*func) (); 81 const void *data; 82 Ecore_IMF_Callback_Type type; 83 }; 84 85 struct _Ecore_IMF_Input_Panel_Callback_Node 86 { 87 void (*func) (); 88 const void *data; 89 Ecore_IMF_Input_Panel_Event type; 90 }; 91 92 void ecore_imf_module_init(void); 93 void ecore_imf_module_shutdown(void); 94 Eina_List *ecore_imf_module_available_get(void); 95 Ecore_IMF_Module *ecore_imf_module_get(const char *ctx_id); 96 Ecore_IMF_Context *ecore_imf_module_context_create(const char *ctx_id); 97 Eina_List *ecore_imf_module_context_ids_get(void); 98 Eina_List *ecore_imf_module_context_ids_by_canvas_type_get(const char *canvas_type); 99 100 #endif 101