5 #include <Ecore_IMF_Input_Panel_Key.h>
12 # ifdef EFL_ECORE_IMF_BUILD
14 # define EAPI __declspec(dllexport)
17 # endif /* ! DLL_EXPORT */
19 # define EAPI __declspec(dllimport)
20 # endif /* ! EFL_ECORE_IMF_BUILD */
24 # define EAPI __attribute__ ((visibility("default")))
50 /* ecore_imf_context_input_panel_event_callback_add() flag */
53 ECORE_IMF_INPUT_PANEL_STATE_EVENT, /**< Input Panel STATE Event */
54 ECORE_IMF_INPUT_PANEL_MODE_EVENT, /**< Input Panel MODE Event */
55 ECORE_IMF_INPUT_PANEL_LANGUAGE_EVENT, /**< Input Panel LANGUAGE Event */
56 ECORE_IMF_INPUT_PANEL_SHIFT_MODE_EVENT, /**< Input Panel SHIFT MODE */
57 ECORE_IMF_INPUT_PANEL_PREEDIT_MODE_EVENT, /**< Input Panel PREEDIT MODE */
58 ECORE_IMF_INPUT_PANEL_COMPLETION_MODE_EVENT, /**< Input Panel COMPLETION MODE */
59 ECORE_IMF_INPUT_PANEL_CUSTOM_INPUT_MODE_EVENT, /**< Input Panel CUSTOM INPUT MODE */
61 ECORE_IMF_INPUT_PANEL_PRIVATE_CONTEXT_01, /**< Input Panel PRIVATE CONTEXT */
62 ECORE_IMF_INPUT_PANEL_PRIVATE_CONTEXT_02, /**< Input Panel PRIVATE CONTEXT */
63 ECORE_IMF_INPUT_PANEL_PRIVATE_CONTEXT_03, /**< Input Panel PRIVATE CONTEXT */
64 ECORE_IMF_INPUT_PANEL_PRIVATE_CONTEXT_04, /**< Input Panel PRIVATE CONTEXT */
65 ECORE_IMF_INPUT_PANEL_PRIVATE_CONTEXT_05, /**< Input Panel PRIVATE CONTEXT */
66 ECORE_IMF_INPUT_PANEL_PRIVATE_CONTEXT_06, /**< Input Panel PRIVATE CONTEXT */
67 ECORE_IMF_INPUT_PANEL_PRIVATE_CONTEXT_07, /**< Input Panel PRIVATE CONTEXT */
68 ECORE_IMF_INPUT_PANEL_PRIVATE_CONTEXT_08, /**< Input Panel PRIVATE CONTEXT */
69 ECORE_IMF_INPUT_PANEL_PRIVATE_CONTEXT_09, /**< Input Panel PRIVATE CONTEXT */
70 ECORE_IMF_INPUT_PANEL_PRIVATE_CONTEXT_10, /**< Input Panel PRIVATE CONTEXT */
71 ECORE_IMF_INPUT_PANEL_EVENT_INVALID
72 } Ecore_IMF_Input_Panel_Event;
76 ECORE_IMF_INPUT_PANEL_STATE_SHOW, /**< Show Input panel */
77 ECORE_IMF_INPUT_PANEL_STATE_HIDE, /**< Hide Input panel */
78 ECORE_IMF_INPUT_PANEL_STATE_INVALID
79 } Ecore_IMF_Input_Panel_State;
83 ECORE_IMF_INPUT_PANEL_LANG_AUTOMATIC, /**< Automatic */
84 ECORE_IMF_INPUT_PANEL_LANG_ALPHABET /**< Alphabet */
85 } Ecore_IMF_Input_Panel_Lang;
89 ECORE_IMF_KEYBOARD_LANG_NATIVE, /**< Native */
90 ECORE_IMF_KEYBOARD_LANG_ALPHABET /**< Alphabet */
91 } Ecore_IMF_Keyboard_Lang;
95 ECORE_IMF_AUTOCORRECTION_DEFAULT,
96 ECORE_IMF_AUTOCORRECTION_NO,
97 ECORE_IMF_AUTOCORRECTION_YES,
98 ECORE_IMF_AUTOCORRECTION_INVALID
99 } Ecore_IMF_Autocorrection;
103 ECORE_IMF_INPUT_PANEL_CAPS_MODE_OFF, /**< Off */
104 ECORE_IMF_INPUT_PANEL_CAPS_MODE_ON, /**< On */
105 ECORE_IMF_INPUT_PANEL_CAPS_MODE_LOCK, /**< Lock */
106 } Ecore_IMF_Input_Panel_Caps_Mode;
110 ECORE_IMF_INPUT_PANEL_ORIENT_NONE,
111 ECORE_IMF_INPUT_PANEL_ORIENT_90_CW, /* Clockwise */
112 ECORE_IMF_INPUT_PANEL_ORIENT_180,
113 ECORE_IMF_INPUT_PANEL_ORIENT_90_CCW /* CounterClockwise */
114 } Ecore_IMF_Input_Panel_Orient;
128 char data[128]; // label or image path
133 /* Events sent by the Input Method */
134 typedef struct _Ecore_IMF_Event_Preedit_Start Ecore_IMF_Event_Preedit_Start;
135 typedef struct _Ecore_IMF_Event_Preedit_End Ecore_IMF_Event_Preedit_End;
136 typedef struct _Ecore_IMF_Event_Preedit_Changed Ecore_IMF_Event_Preedit_Changed;
137 typedef struct _Ecore_IMF_Event_Commit Ecore_IMF_Event_Commit;
138 typedef struct _Ecore_IMF_Event_Delete_Surrounding Ecore_IMF_Event_Delete_Surrounding;
140 /* Events to filter */
141 typedef struct _Ecore_IMF_Event_Mouse_Down Ecore_IMF_Event_Mouse_Down;
142 typedef struct _Ecore_IMF_Event_Mouse_Up Ecore_IMF_Event_Mouse_Up;
143 typedef struct _Ecore_IMF_Event_Mouse_In Ecore_IMF_Event_Mouse_In;
144 typedef struct _Ecore_IMF_Event_Mouse_Out Ecore_IMF_Event_Mouse_Out;
145 typedef struct _Ecore_IMF_Event_Mouse_Move Ecore_IMF_Event_Mouse_Move;
146 typedef struct _Ecore_IMF_Event_Mouse_Wheel Ecore_IMF_Event_Mouse_Wheel;
147 typedef struct _Ecore_IMF_Event_Key_Down Ecore_IMF_Event_Key_Down;
148 typedef struct _Ecore_IMF_Event_Key_Up Ecore_IMF_Event_Key_Up;
149 typedef union _Ecore_IMF_Event Ecore_IMF_Event;
151 typedef struct _Ecore_IMF_Context Ecore_IMF_Context; /**< An Input Method Context */
152 typedef struct _Ecore_IMF_Context_Class Ecore_IMF_Context_Class; /**< An Input Method Context class */
153 typedef struct _Ecore_IMF_Context_Info Ecore_IMF_Context_Info; /**< An Input Method Context info */
155 /* Preedit attribute info */
156 typedef struct _Ecore_IMF_Preedit_Attr Ecore_IMF_Preedit_Attr;
158 EAPI extern int ECORE_IMF_EVENT_PREEDIT_START;
159 EAPI extern int ECORE_IMF_EVENT_PREEDIT_END;
160 EAPI extern int ECORE_IMF_EVENT_PREEDIT_CHANGED;
161 EAPI extern int ECORE_IMF_EVENT_COMMIT;
162 EAPI extern int ECORE_IMF_EVENT_DELETE_SURROUNDING;
166 ECORE_IMF_EVENT_MOUSE_DOWN,
167 ECORE_IMF_EVENT_MOUSE_UP,
168 ECORE_IMF_EVENT_MOUSE_IN,
169 ECORE_IMF_EVENT_MOUSE_OUT,
170 ECORE_IMF_EVENT_MOUSE_MOVE,
171 ECORE_IMF_EVENT_MOUSE_WHEEL,
172 ECORE_IMF_EVENT_KEY_DOWN,
173 ECORE_IMF_EVENT_KEY_UP
174 } Ecore_IMF_Event_Type;
178 ECORE_IMF_KEYBOARD_MODIFIER_NONE = 0, /**< No active modifiers */
179 ECORE_IMF_KEYBOARD_MODIFIER_CTRL = 1 << 0, /**< "Control" is pressed */
180 ECORE_IMF_KEYBOARD_MODIFIER_ALT = 1 << 1, /**< "Alt" is pressed */
181 ECORE_IMF_KEYBOARD_MODIFIER_SHIFT = 1 << 2, /**< "Shift" is pressed */
182 ECORE_IMF_KEYBOARD_MODIFIER_WIN = 1 << 3 /**< "Win" (between "Ctrl" and "Alt") is pressed */
183 } Ecore_IMF_Keyboard_Modifiers;
187 ECORE_IMF_KEYBOARD_LOCK_NONE = 0, /**< No locks are active */
188 ECORE_IMF_KEYBOARD_LOCK_NUM = 1 << 0, /**< "Num" lock is active */
189 ECORE_IMF_KEYBOARD_LOCK_CAPS = 1 << 1, /**< "Caps" lock is active */
190 ECORE_IMF_KEYBOARD_LOCK_SCROLL = 1 << 2 /**< "Scroll" lock is active */
191 } Ecore_IMF_Keyboard_Locks;
195 ECORE_IMF_MOUSE_NONE = 0, /**< A single click */
196 ECORE_IMF_MOUSE_DOUBLE_CLICK = 1 << 0, /**< A double click */
197 ECORE_IMF_MOUSE_TRIPLE_CLICK = 1 << 1 /**< A triple click */
198 } Ecore_IMF_Mouse_Flags;
202 ECORE_IMF_INPUT_MODE_ALPHA = 1 << 0,
203 ECORE_IMF_INPUT_MODE_NUMERIC = 1 << 1,
204 ECORE_IMF_INPUT_MODE_SPECIAL = 1 << 2,
205 ECORE_IMF_INPUT_MODE_HEXA = 1 << 3,
206 ECORE_IMF_INPUT_MODE_TELE = 1 << 4,
207 ECORE_IMF_INPUT_MODE_FULL = (ECORE_IMF_INPUT_MODE_ALPHA | ECORE_IMF_INPUT_MODE_NUMERIC | ECORE_IMF_INPUT_MODE_SPECIAL),
208 ECORE_IMF_INPUT_MODE_INVISIBLE = 1 << 29,
209 ECORE_IMF_INPUT_MODE_AUTOCAP = 1 << 30
210 } Ecore_IMF_Input_Mode;
214 ECORE_IMF_PREEDIT_TYPE_NONE,
215 ECORE_IMF_PREEDIT_TYPE_SUB1,
216 ECORE_IMF_PREEDIT_TYPE_SUB2,
217 ECORE_IMF_PREEDIT_TYPE_SUB3
218 } Ecore_IMF_Preedit_Type;
222 ECORE_IMF_AUTOCAPITAL_TYPE_NONE,
223 ECORE_IMF_AUTOCAPITAL_TYPE_WORD,
224 ECORE_IMF_AUTOCAPITAL_TYPE_SENTENCE,
225 ECORE_IMF_AUTOCAPITAL_TYPE_ALLCHARACTER
226 } Ecore_IMF_Autocapital_Type;
230 ECORE_IMF_INPUT_PANEL_LAYOUT_NORMAL, /**< Default layout */
231 ECORE_IMF_INPUT_PANEL_LAYOUT_NUMBER, /**< Number layout */
232 ECORE_IMF_INPUT_PANEL_LAYOUT_EMAIL, /**< Email layout */
233 ECORE_IMF_INPUT_PANEL_LAYOUT_URL, /**< URL layout */
234 ECORE_IMF_INPUT_PANEL_LAYOUT_PHONENUMBER, /**< Phone Number layout */
235 ECORE_IMF_INPUT_PANEL_LAYOUT_IP, /**< IP layout */
236 ECORE_IMF_INPUT_PANEL_LAYOUT_MONTH, /**< Month layout */
237 ECORE_IMF_INPUT_PANEL_LAYOUT_NUMBERONLY, /**< Number Only layout */
238 ECORE_IMF_INPUT_PANEL_LAYOUT_INVALID
239 } Ecore_IMF_Input_Panel_Layout;
241 struct _Ecore_IMF_Event_Preedit_Start
243 Ecore_IMF_Context *ctx;
246 struct _Ecore_IMF_Event_Preedit_End
248 Ecore_IMF_Context *ctx;
251 struct _Ecore_IMF_Event_Preedit_Changed
253 Ecore_IMF_Context *ctx;
256 struct _Ecore_IMF_Event_Commit
258 Ecore_IMF_Context *ctx;
262 struct _Ecore_IMF_Event_Delete_Surrounding
264 Ecore_IMF_Context *ctx;
269 struct _Ecore_IMF_Event_Mouse_Down
271 int button; /**< The button which has been pressed */
278 Ecore_IMF_Keyboard_Modifiers modifiers; /**< The keyboard modifiers active when the event has been emitted */
279 Ecore_IMF_Keyboard_Locks locks; /**< The keyboard locks active when the event has been emitted */
280 Ecore_IMF_Mouse_Flags flags; /**< The flags corresponding the mouse click (single, double or triple click) */
281 unsigned int timestamp; /**< The timestamp when the event occurred */
284 struct _Ecore_IMF_Event_Mouse_Up
286 int button; /**< The button which has been pressed */
293 Ecore_IMF_Keyboard_Modifiers modifiers; /**< The keyboard modifiers active when the event has been emitted */
294 Ecore_IMF_Keyboard_Locks locks; /**< The keyboard locks active when the event has been emitted */
295 Ecore_IMF_Mouse_Flags flags; /**< The flags corresponding the mouse click (single, double or triple click) */
296 unsigned int timestamp; /**< The timestamp when the event occurred */
299 struct _Ecore_IMF_Event_Mouse_In
308 Ecore_IMF_Keyboard_Modifiers modifiers; /**< The keyboard modifiers active when the event has been emitted */
309 Ecore_IMF_Keyboard_Locks locks; /**< The keyboard locks active when the event has been emitted */
310 unsigned int timestamp; /**< The timestamp when the event occurred */
313 struct _Ecore_IMF_Event_Mouse_Out
322 Ecore_IMF_Keyboard_Modifiers modifiers; /**< The keyboard modifiers active when the event has been emitted */
323 Ecore_IMF_Keyboard_Locks locks; /**< The keyboard locks active when the event has been emitted */
324 unsigned int timestamp; /**< The timestamp when the event occurred */
327 struct _Ecore_IMF_Event_Mouse_Move
338 Ecore_IMF_Keyboard_Modifiers modifiers; /**< The keyboard modifiers active when the event has been emitted */
339 Ecore_IMF_Keyboard_Locks locks; /**< The keyboard locks active when the event has been emitted */
340 unsigned int timestamp; /**< The timestamp when the event occurred */
343 struct _Ecore_IMF_Event_Mouse_Wheel
345 int direction; /* 0 = default up/down wheel */
346 int z; /* ...,-2,-1 = down, 1,2,... = up */
353 Ecore_IMF_Keyboard_Modifiers modifiers; /**< The keyboard modifiers active when the event has been emitted */
354 Ecore_IMF_Keyboard_Locks locks; /**< The keyboard locks active when the event has been emitted */
355 unsigned int timestamp; /**< The timestamp when the event occurred */
358 struct _Ecore_IMF_Event_Key_Down
360 const char *keyname; /**< The string name of the key pressed */
361 Ecore_IMF_Keyboard_Modifiers modifiers; /**< The keyboard modifiers active when the event has been emitted */
362 Ecore_IMF_Keyboard_Locks locks; /**< The keyboard locks active when the event has been emitted */
363 const char *key; /**< The logical key : (eg shift+1 == exclamation) */
364 const char *string; /**< A UTF8 string if this keystroke has produced a visible string to be ADDED */
365 const char *compose; /**< A UTF8 string if this keystroke has modified a string in the middle of being composed - this string replaces the previous one */
366 unsigned int timestamp; /**< The timestamp when the event occurred */
369 struct _Ecore_IMF_Event_Key_Up
371 const char *keyname; /**< The string name of the key pressed */
372 Ecore_IMF_Keyboard_Modifiers modifiers; /**< The keyboard modifiers active when the event has been emitted */
373 Ecore_IMF_Keyboard_Locks locks; /**< The keyboard locks active when the event has been emitted */
374 const char *key; /**< The logical key : (eg shift+1 == exclamation) */
375 const char *string; /**< A UTF8 string if this keystroke has produced a visible string to be ADDED */
376 const char *compose; /**< A UTF8 string if this keystroke has modified a string in the middle of being composed - this string replaces the previous one */
377 unsigned int timestamp; /**< The timestamp when the event occurred */
380 union _Ecore_IMF_Event
382 Ecore_IMF_Event_Mouse_Down mouse_down;
383 Ecore_IMF_Event_Mouse_Up mouse_up;
384 Ecore_IMF_Event_Mouse_In mouse_in;
385 Ecore_IMF_Event_Mouse_Out mouse_out;
386 Ecore_IMF_Event_Mouse_Move mouse_move;
387 Ecore_IMF_Event_Mouse_Wheel mouse_wheel;
388 Ecore_IMF_Event_Key_Down key_down;
389 Ecore_IMF_Event_Key_Up key_up;
392 struct _Ecore_IMF_Preedit_Attr
394 Ecore_IMF_Preedit_Type preedit_type;
395 unsigned int start_index;
396 unsigned int end_index;
399 struct _Ecore_IMF_Context_Class
401 void (*add) (Ecore_IMF_Context *ctx);
402 void (*del) (Ecore_IMF_Context *ctx);
403 void (*client_window_set) (Ecore_IMF_Context *ctx, void *window);
404 void (*client_canvas_set) (Ecore_IMF_Context *ctx, void *canvas);
405 void (*show) (Ecore_IMF_Context *ctx);
406 void (*hide) (Ecore_IMF_Context *ctx);
407 void (*preedit_string_get) (Ecore_IMF_Context *ctx, char **str, int *cursor_pos);
408 void (*focus_in) (Ecore_IMF_Context *ctx);
409 void (*focus_out) (Ecore_IMF_Context *ctx);
410 void (*reset) (Ecore_IMF_Context *ctx);
411 void (*cursor_position_set) (Ecore_IMF_Context *ctx, int cursor_pos);
412 void (*use_preedit_set) (Ecore_IMF_Context *ctx, Eina_Bool use_preedit);
413 void (*input_mode_set) (Ecore_IMF_Context *ctx, Ecore_IMF_Input_Mode input_mode);
414 Eina_Bool (*filter_event) (Ecore_IMF_Context *ctx, Ecore_IMF_Event_Type type, Ecore_IMF_Event *event);
416 /* Input Panel Control APIs */
417 void (*control_panel_show) (Ecore_IMF_Context *ctx);
418 void (*control_panel_hide) (Ecore_IMF_Context *ctx);
420 void (*input_panel_layout_set) (Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Layout layout);
421 Ecore_IMF_Input_Panel_Layout (*input_panel_layout_get) (Ecore_IMF_Context *ctx);
423 void (*input_panel_language_set) (Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Lang lang);
424 Ecore_IMF_Input_Panel_Lang (*input_panel_language_get) (Ecore_IMF_Context *ctx);
426 void (*input_panel_imdata_set) (Ecore_IMF_Context *ctx, const char* data, int len);
427 void (*input_panel_imdata_get) (Ecore_IMF_Context *ctx, char* data, int *len);
429 void (*input_panel_use_effect_set) (Ecore_IMF_Context *ctx, Eina_Bool use_effect);
430 void (*input_panel_orient_set) (Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Orient orientation);
432 void (*input_panel_move) (Ecore_IMF_Context *ctx, int x, int y);
433 void (*input_panel_geometry_get) (Ecore_IMF_Context *ctx, int *x, int *y, int *w, int *h);
434 void (*input_panel_private_key_set) (Ecore_IMF_Context *ctx, int layout_index, int key_index, const char *img_path, const char* label, const char* value);
435 void (*input_panel_key_disabled_set) (Ecore_IMF_Context *ctx, int layout_index, int key_index, Eina_Bool disabled);
437 void (*input_panel_reset) (Ecore_IMF_Context *ctx); /* Same as reset to default property*/
438 Ecore_IMF_Input_Panel_State (*input_panel_state_get) (Ecore_IMF_Context *ctx);
441 void (*input_panel_event_callback_add) (Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Event type, void (*pEventCallBackFunc) (void *data, Ecore_IMF_Context *ctx, int value), void *data);
442 void (*input_panel_event_callback_del) (Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Event type, void (*pEventCallbackFunc) (void *data, Ecore_IMF_Context *ctx, int value));
444 /* ISF related APIs */
445 int (*ise_get_ise_language) (Ecore_IMF_Context *ctx, const char* input_panel_name, char*** langlist);
446 int (*ise_set_isf_language) (Ecore_IMF_Context *ctx, const char* lang);
447 int (*ise_get_active_isename) (Ecore_IMF_Context *ctx, char* name); /**< will be deprecated */
448 int (*ise_set_active_ise_by_name) (Ecore_IMF_Context *ctx, const char* name); /**< will be deprecated */
449 int (*ise_set_active_ise_by_uuid) (Ecore_IMF_Context *ctx, const char* uuid); /**< will be deprecated */
450 int (*ise_get_iselist) (Ecore_IMF_Context *ctx, char*** iselist); /**< will be deprecated */
451 void (*input_panel_caps_mode_set) (Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Caps_Mode mode);
453 void (*preedit_string_with_attributes_get) (Ecore_IMF_Context *ctx, char **str, Eina_List **attrs, int *cursor_pos);
454 void (*prediction_allow_set)(Ecore_IMF_Context *ctx, Eina_Bool prediction);
455 void (*autocapital_type_set)(Ecore_IMF_Context *ctx, Ecore_IMF_Autocapital_Type autocapital_type);
458 struct _Ecore_IMF_Context_Info
460 const char *id; /* ID */
461 const char *description; /* Human readable description */
462 const char *default_locales; /* Languages for which this context is the default, separated by : */
463 const char *canvas_type; /* The canvas type used by the input method. Eg.: evas */
464 int canvas_required; /* Whether the canvas usage is required for this input method */
467 EAPI int ecore_imf_init(void);
468 EAPI int ecore_imf_shutdown(void);
470 EAPI void ecore_imf_module_register(const Ecore_IMF_Context_Info *info, Ecore_IMF_Context *(*imf_module_create)(void), Ecore_IMF_Context *(*imf_module_exit)(void));
472 EAPI Eina_List *ecore_imf_context_available_ids_get(void);
473 EAPI Eina_List *ecore_imf_context_available_ids_by_canvas_type_get(const char *canvas_type);
474 EAPI const char *ecore_imf_context_default_id_get(void);
475 EAPI const char *ecore_imf_context_default_id_by_canvas_type_get(const char *canvas_type);
476 EAPI const Ecore_IMF_Context_Info *ecore_imf_context_info_by_id_get(const char *id);
478 EAPI Ecore_IMF_Context *ecore_imf_context_add(const char *id);
479 EAPI const Ecore_IMF_Context_Info *ecore_imf_context_info_get(Ecore_IMF_Context *ctx);
480 EAPI void ecore_imf_context_del(Ecore_IMF_Context *ctx);
481 EAPI void ecore_imf_context_client_window_set(Ecore_IMF_Context *ctx, void *window);
482 EAPI void *ecore_imf_context_client_window_get(Ecore_IMF_Context *ctx);
483 EAPI void ecore_imf_context_client_canvas_set(Ecore_IMF_Context *ctx, void *canvas);
484 EAPI void *ecore_imf_context_client_canvas_get(Ecore_IMF_Context *ctx);
485 EAPI void ecore_imf_context_show(Ecore_IMF_Context *ctx);
486 EAPI void ecore_imf_context_hide(Ecore_IMF_Context *ctx);
487 EAPI void ecore_imf_context_preedit_string_get(Ecore_IMF_Context *ctx, char **str, int *cursor_pos);
488 EAPI void ecore_imf_context_preedit_string_with_attributes_get(Ecore_IMF_Context *ctx, char **str, Eina_List **attrs, int *cursor_pos);
489 EAPI void ecore_imf_context_focus_in(Ecore_IMF_Context *ctx);
490 EAPI void ecore_imf_context_focus_out(Ecore_IMF_Context *ctx);
491 EAPI void ecore_imf_context_reset(Ecore_IMF_Context *ctx);
492 EAPI void ecore_imf_context_cursor_position_set(Ecore_IMF_Context *ctx, int cursor_pos);
493 EAPI void ecore_imf_context_use_preedit_set(Ecore_IMF_Context *ctx, Eina_Bool use_preedit);
494 EAPI void ecore_imf_context_retrieve_surrounding_callback_set(Ecore_IMF_Context *ctx, Eina_Bool (*func)(void *data, Ecore_IMF_Context *ctx, char **text, int *cursor_pos), const void *data);
495 EAPI void ecore_imf_context_input_mode_set(Ecore_IMF_Context *ctx, Ecore_IMF_Input_Mode input_mode);
496 EAPI Ecore_IMF_Input_Mode ecore_imf_context_input_mode_get(Ecore_IMF_Context *ctx);
497 EAPI Eina_Bool ecore_imf_context_filter_event(Ecore_IMF_Context *ctx, Ecore_IMF_Event_Type type, Ecore_IMF_Event *event);
499 /* plugin specific functions */
500 EAPI Ecore_IMF_Context *ecore_imf_context_new(const Ecore_IMF_Context_Class *ctxc);
501 EAPI void ecore_imf_context_data_set(Ecore_IMF_Context *ctx, void *data);
502 EAPI void *ecore_imf_context_data_get(Ecore_IMF_Context *ctx);
503 EAPI Eina_Bool ecore_imf_context_surrounding_get(Ecore_IMF_Context *ctx, char **text, int *cursor_pos);
504 EAPI void ecore_imf_context_preedit_start_event_add(Ecore_IMF_Context *ctx);
505 EAPI void ecore_imf_context_preedit_end_event_add(Ecore_IMF_Context *ctx);
506 EAPI void ecore_imf_context_preedit_changed_event_add(Ecore_IMF_Context *ctx);
507 EAPI void ecore_imf_context_commit_event_add(Ecore_IMF_Context *ctx, const char *str);
508 EAPI void ecore_imf_context_delete_surrounding_event_add(Ecore_IMF_Context *ctx, int offset, int n_chars);
509 EAPI void ecore_imf_context_prediction_allow_set(Ecore_IMF_Context *ctx, Eina_Bool prediction);
510 EAPI Eina_Bool ecore_imf_context_prediction_allow_get(Ecore_IMF_Context *ctx);
511 EAPI void ecore_imf_context_autocapital_type_set(Ecore_IMF_Context *ctx, Ecore_IMF_Autocapital_Type autocapital_type);
512 EAPI Ecore_IMF_Autocapital_Type ecore_imf_context_autocapital_type_get(Ecore_IMF_Context *ctx);
514 EAPI void ecore_imf_context_control_panel_show(Ecore_IMF_Context *ctx);
515 EAPI void ecore_imf_context_control_panel_hide(Ecore_IMF_Context *ctx);
517 EAPI void ecore_imf_context_input_panel_show(Ecore_IMF_Context *ctx);
518 EAPI void ecore_imf_context_input_panel_hide(Ecore_IMF_Context *ctx);
519 EAPI void ecore_imf_context_input_panel_layout_set(Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Layout layout);
520 EAPI Ecore_IMF_Input_Panel_Layout ecore_imf_context_input_panel_layout_get(Ecore_IMF_Context *ctx);
521 EAPI void ecore_imf_context_input_panel_language_set(Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Lang lang);
522 EAPI Ecore_IMF_Input_Panel_Lang ecore_imf_context_input_panel_language_get(Ecore_IMF_Context *ctx);
523 EAPI void ecore_imf_context_input_panel_imdata_set(Ecore_IMF_Context *ctx, const char *data, int len);
524 EAPI void ecore_imf_context_input_panel_imdata_get(Ecore_IMF_Context *ctx, char *data, int *len);
525 EAPI void ecore_imf_context_input_panel_use_effect_set(Ecore_IMF_Context *ctx, Eina_Bool use_effect);
526 EAPI Eina_Bool ecore_imf_context_input_panel_use_effect_get(Ecore_IMF_Context *ctx);
527 EAPI void ecore_imf_context_input_panel_geometry_get(Ecore_IMF_Context *ctx, int *x, int *y, int *w, int *h);
528 EAPI void ecore_imf_context_input_panel_private_key_set(Ecore_IMF_Context *ctx, int layout_index, int key_index, const char *img_path, const char* label, int key_value, const char* key_string);
529 EAPI Eina_List *ecore_imf_context_input_panel_private_key_list_get(Ecore_IMF_Context *ctx);
530 EAPI void ecore_imf_context_input_panel_reset(Ecore_IMF_Context *ctx); /* Same as reset to default property*/
531 EAPI void ecore_imf_context_input_panel_orient_set(Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Orient orientation);
532 EAPI Ecore_IMF_Input_Panel_Orient ecore_imf_context_input_panel_orient_get(Ecore_IMF_Context *ctx);
533 EAPI Ecore_IMF_Input_Panel_State ecore_imf_context_input_panel_state_get(Ecore_IMF_Context *ctx);
534 EAPI void ecore_imf_context_input_panel_event_callback_add(Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Event type, void (*func) (void *data, Ecore_IMF_Context *ctx, int value), const void *data);
535 EAPI void ecore_imf_context_input_panel_event_callback_del(Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Event type, void (*func) (void *data, Ecore_IMF_Context *ctx, int value));
536 EAPI void ecore_imf_context_input_panel_key_disabled_set(Ecore_IMF_Context *ctx, int layout_index, int key_index, Eina_Bool disabled);
537 EAPI Eina_List *ecore_imf_context_input_panel_key_disabled_list_get(Ecore_IMF_Context *ctx);
538 EAPI void ecore_imf_context_input_panel_move(Ecore_IMF_Context *ctx, int x, int y);
539 EAPI void ecore_imf_context_input_panel_caps_mode_set(Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Caps_Mode mode);
541 EAPI void ecore_imf_context_keyboard_language_set(Ecore_IMF_Context *ctx, Ecore_IMF_Keyboard_Lang lang);
542 EAPI Ecore_IMF_Keyboard_Lang ecore_imf_context_keyboard_language_get(Ecore_IMF_Context *ctx);
544 /* functions to control isf */
545 EAPI int ecore_imf_context_ise_get_ise_language(Ecore_IMF_Context *ctx, const char* ise_name, char ***langlist);
546 EAPI void ecore_imf_context_ise_set_isf_language(Ecore_IMF_Context *ctx, const char* lang);
547 EAPI void ecore_imf_context_ise_get_active_isename(Ecore_IMF_Context *ctx, char* name);
548 EAPI void ecore_imf_context_ise_set_active_ise_by_name(Ecore_IMF_Context *ctx, const char* name);
549 EAPI void ecore_imf_context_ise_set_active_ise_by_uuid(Ecore_IMF_Context *ctx, const char* uuid);
550 EAPI int ecore_imf_context_ise_get_iselist(Ecore_IMF_Context *ctx, char*** iselist);
552 /* The following entry points must be exported by each input method module
556 * int imf_module_init (const Ecore_IMF_Context_Info **info);
557 * void imf_module_exit (void);
558 * Ecore_IMF_Context *imf_module_create (void);