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_LAYOUT_NORMAL, /**< Default 4x4 layout */
84 ECORE_IMF_INPUT_PANEL_LAYOUT_NUMBER, /**< Number layout */
85 ECORE_IMF_INPUT_PANEL_LAYOUT_EMAIL, /**< Email layout */
86 ECORE_IMF_INPUT_PANEL_LAYOUT_URL, /**< URL layout */
87 ECORE_IMF_INPUT_PANEL_LAYOUT_PHONENUMBER, /**< Phone Number layout */
88 ECORE_IMF_INPUT_PANEL_LAYOUT_IP, /**< IP layout */
89 ECORE_IMF_INPUT_PANEL_LAYOUT_MONTH, /**< Month layout */
90 ECORE_IMF_INPUT_PANEL_LAYOUT_NUMBERONLY, /**< Number Only layout */
91 ECORE_IMF_INPUT_PANEL_LAYOUT_CUSTOM_1 = 100, /* Reserved for future use */
92 ECORE_IMF_INPUT_PANEL_LAYOUT_CUSTOM_2,
93 ECORE_IMF_INPUT_PANEL_LAYOUT_CUSTOM_3,
94 ECORE_IMF_INPUT_PANEL_LAYOUT_CUSTOM_4,
95 ECORE_IMF_INPUT_PANEL_LAYOUT_CUSTOM_5,
96 ECORE_IMF_INPUT_PANEL_LAYOUT_CUSTOM_6,
97 ECORE_IMF_INPUT_PANEL_LAYOUT_CUSTOM_7,
98 ECORE_IMF_INPUT_PANEL_LAYOUT_CUSTOM_8,
99 ECORE_IMF_INPUT_PANEL_LAYOUT_CUSTOM_9,
100 ECORE_IMF_INPUT_PANEL_LAYOUT_CUSTOM_10,
101 ECORE_IMF_INPUT_PANEL_LAYOUT_INVALID
102 } Ecore_IMF_Input_Panel_Layout;
106 ECORE_IMF_INPUT_PANEL_LANG_AUTOMATIC, /**< Automatic */
107 ECORE_IMF_INPUT_PANEL_LANG_ALPHABET /**< Alphabet */
108 } Ecore_IMF_Input_Panel_Lang;
112 ECORE_IMF_KEYBOARD_LANG_NATIVE, /**< Native */
113 ECORE_IMF_KEYBOARD_LANG_ALPHABET /**< Alphabet */
114 } Ecore_IMF_Keyboard_Lang;
118 ECORE_IMF_AUTOCORRECTION_DEFAULT,
119 ECORE_IMF_AUTOCORRECTION_NO,
120 ECORE_IMF_AUTOCORRECTION_YES,
121 ECORE_IMF_AUTOCORRECTION_INVALID
122 } Ecore_IMF_Autocorrection;
126 ECORE_IMF_INPUT_PANEL_CAPS_MODE_OFF, /**< Off */
127 ECORE_IMF_INPUT_PANEL_CAPS_MODE_ON, /**< On */
128 ECORE_IMF_INPUT_PANEL_CAPS_MODE_LOCK, /**< Lock */
129 } Ecore_IMF_Input_Panel_Caps_Mode;
133 ECORE_IMF_INPUT_PANEL_ORIENT_NONE,
134 ECORE_IMF_INPUT_PANEL_ORIENT_90_CW, /* Clockwise */
135 ECORE_IMF_INPUT_PANEL_ORIENT_180,
136 ECORE_IMF_INPUT_PANEL_ORIENT_90_CCW /* CounterClockwise */
137 } Ecore_IMF_Input_Panel_Orient;
151 char data[128]; // label or image path
156 /* Events sent by the Input Method */
157 typedef struct _Ecore_IMF_Event_Preedit_Start Ecore_IMF_Event_Preedit_Start;
158 typedef struct _Ecore_IMF_Event_Preedit_End Ecore_IMF_Event_Preedit_End;
159 typedef struct _Ecore_IMF_Event_Preedit_Changed Ecore_IMF_Event_Preedit_Changed;
160 typedef struct _Ecore_IMF_Event_Commit Ecore_IMF_Event_Commit;
161 typedef struct _Ecore_IMF_Event_Delete_Surrounding Ecore_IMF_Event_Delete_Surrounding;
163 /* Events to filter */
164 typedef struct _Ecore_IMF_Event_Mouse_Down Ecore_IMF_Event_Mouse_Down;
165 typedef struct _Ecore_IMF_Event_Mouse_Up Ecore_IMF_Event_Mouse_Up;
166 typedef struct _Ecore_IMF_Event_Mouse_In Ecore_IMF_Event_Mouse_In;
167 typedef struct _Ecore_IMF_Event_Mouse_Out Ecore_IMF_Event_Mouse_Out;
168 typedef struct _Ecore_IMF_Event_Mouse_Move Ecore_IMF_Event_Mouse_Move;
169 typedef struct _Ecore_IMF_Event_Mouse_Wheel Ecore_IMF_Event_Mouse_Wheel;
170 typedef struct _Ecore_IMF_Event_Key_Down Ecore_IMF_Event_Key_Down;
171 typedef struct _Ecore_IMF_Event_Key_Up Ecore_IMF_Event_Key_Up;
172 typedef union _Ecore_IMF_Event Ecore_IMF_Event;
174 typedef struct _Ecore_IMF_Context Ecore_IMF_Context; /**< An Input Method Context */
175 typedef struct _Ecore_IMF_Context_Class Ecore_IMF_Context_Class; /**< An Input Method Context class */
176 typedef struct _Ecore_IMF_Context_Info Ecore_IMF_Context_Info; /**< An Input Method Context info */
178 /* Preedit attribute info */
179 typedef struct _Ecore_IMF_Preedit_Attr Ecore_IMF_Preedit_Attr;
181 EAPI extern int ECORE_IMF_EVENT_PREEDIT_START;
182 EAPI extern int ECORE_IMF_EVENT_PREEDIT_END;
183 EAPI extern int ECORE_IMF_EVENT_PREEDIT_CHANGED;
184 EAPI extern int ECORE_IMF_EVENT_COMMIT;
185 EAPI extern int ECORE_IMF_EVENT_DELETE_SURROUNDING;
189 ECORE_IMF_EVENT_MOUSE_DOWN,
190 ECORE_IMF_EVENT_MOUSE_UP,
191 ECORE_IMF_EVENT_MOUSE_IN,
192 ECORE_IMF_EVENT_MOUSE_OUT,
193 ECORE_IMF_EVENT_MOUSE_MOVE,
194 ECORE_IMF_EVENT_MOUSE_WHEEL,
195 ECORE_IMF_EVENT_KEY_DOWN,
196 ECORE_IMF_EVENT_KEY_UP
197 } Ecore_IMF_Event_Type;
201 ECORE_IMF_KEYBOARD_MODIFIER_NONE = 0, /**< No active modifiers */
202 ECORE_IMF_KEYBOARD_MODIFIER_CTRL = 1 << 0, /**< "Control" is pressed */
203 ECORE_IMF_KEYBOARD_MODIFIER_ALT = 1 << 1, /**< "Alt" is pressed */
204 ECORE_IMF_KEYBOARD_MODIFIER_SHIFT = 1 << 2, /**< "Shift" is pressed */
205 ECORE_IMF_KEYBOARD_MODIFIER_WIN = 1 << 3 /**< "Win" (between "Ctrl" and "Alt") is pressed */
206 } Ecore_IMF_Keyboard_Modifiers;
210 ECORE_IMF_KEYBOARD_LOCK_NONE = 0, /**< No locks are active */
211 ECORE_IMF_KEYBOARD_LOCK_NUM = 1 << 0, /**< "Num" lock is active */
212 ECORE_IMF_KEYBOARD_LOCK_CAPS = 1 << 1, /**< "Caps" lock is active */
213 ECORE_IMF_KEYBOARD_LOCK_SCROLL = 1 << 2 /**< "Scroll" lock is active */
214 } Ecore_IMF_Keyboard_Locks;
218 ECORE_IMF_MOUSE_NONE = 0, /**< A single click */
219 ECORE_IMF_MOUSE_DOUBLE_CLICK = 1 << 0, /**< A double click */
220 ECORE_IMF_MOUSE_TRIPLE_CLICK = 1 << 1 /**< A triple click */
221 } Ecore_IMF_Mouse_Flags;
225 ECORE_IMF_INPUT_MODE_ALPHA = 1 << 0,
226 ECORE_IMF_INPUT_MODE_NUMERIC = 1 << 1,
227 ECORE_IMF_INPUT_MODE_SPECIAL = 1 << 2,
228 ECORE_IMF_INPUT_MODE_HEXA = 1 << 3,
229 ECORE_IMF_INPUT_MODE_TELE = 1 << 4,
230 ECORE_IMF_INPUT_MODE_FULL = (ECORE_IMF_INPUT_MODE_ALPHA | ECORE_IMF_INPUT_MODE_NUMERIC | ECORE_IMF_INPUT_MODE_SPECIAL),
231 ECORE_IMF_INPUT_MODE_INVISIBLE = 1 << 29,
232 ECORE_IMF_INPUT_MODE_AUTOCAP = 1 << 30
233 } Ecore_IMF_Input_Mode;
237 ECORE_IMF_PREEDIT_TYPE_NONE,
238 ECORE_IMF_PREEDIT_TYPE_SUB1,
239 ECORE_IMF_PREEDIT_TYPE_SUB2,
240 ECORE_IMF_PREEDIT_TYPE_SUB3
241 } Ecore_IMF_Preedit_Type;
243 struct _Ecore_IMF_Event_Preedit_Start
245 Ecore_IMF_Context *ctx;
248 struct _Ecore_IMF_Event_Preedit_End
250 Ecore_IMF_Context *ctx;
253 struct _Ecore_IMF_Event_Preedit_Changed
255 Ecore_IMF_Context *ctx;
258 struct _Ecore_IMF_Event_Commit
260 Ecore_IMF_Context *ctx;
264 struct _Ecore_IMF_Event_Delete_Surrounding
266 Ecore_IMF_Context *ctx;
271 struct _Ecore_IMF_Event_Mouse_Down
273 int button; /**< The button which has been pressed */
280 Ecore_IMF_Keyboard_Modifiers modifiers; /**< The keyboard modifiers active when the event has been emitted */
281 Ecore_IMF_Keyboard_Locks locks; /**< The keyboard locks active when the event has been emitted */
282 Ecore_IMF_Mouse_Flags flags; /**< The flags corresponding the mouse click (single, double or triple click) */
283 unsigned int timestamp; /**< The timestamp when the event occurred */
286 struct _Ecore_IMF_Event_Mouse_Up
288 int button; /**< The button which has been pressed */
295 Ecore_IMF_Keyboard_Modifiers modifiers; /**< The keyboard modifiers active when the event has been emitted */
296 Ecore_IMF_Keyboard_Locks locks; /**< The keyboard locks active when the event has been emitted */
297 Ecore_IMF_Mouse_Flags flags; /**< The flags corresponding the mouse click (single, double or triple click) */
298 unsigned int timestamp; /**< The timestamp when the event occurred */
301 struct _Ecore_IMF_Event_Mouse_In
310 Ecore_IMF_Keyboard_Modifiers modifiers; /**< The keyboard modifiers active when the event has been emitted */
311 Ecore_IMF_Keyboard_Locks locks; /**< The keyboard locks active when the event has been emitted */
312 unsigned int timestamp; /**< The timestamp when the event occurred */
315 struct _Ecore_IMF_Event_Mouse_Out
324 Ecore_IMF_Keyboard_Modifiers modifiers; /**< The keyboard modifiers active when the event has been emitted */
325 Ecore_IMF_Keyboard_Locks locks; /**< The keyboard locks active when the event has been emitted */
326 unsigned int timestamp; /**< The timestamp when the event occurred */
329 struct _Ecore_IMF_Event_Mouse_Move
340 Ecore_IMF_Keyboard_Modifiers modifiers; /**< The keyboard modifiers active when the event has been emitted */
341 Ecore_IMF_Keyboard_Locks locks; /**< The keyboard locks active when the event has been emitted */
342 unsigned int timestamp; /**< The timestamp when the event occurred */
345 struct _Ecore_IMF_Event_Mouse_Wheel
347 int direction; /* 0 = default up/down wheel */
348 int z; /* ...,-2,-1 = down, 1,2,... = up */
355 Ecore_IMF_Keyboard_Modifiers modifiers; /**< The keyboard modifiers active when the event has been emitted */
356 Ecore_IMF_Keyboard_Locks locks; /**< The keyboard locks active when the event has been emitted */
357 unsigned int timestamp; /**< The timestamp when the event occurred */
360 struct _Ecore_IMF_Event_Key_Down
362 const char *keyname; /**< The string name of the key pressed */
363 Ecore_IMF_Keyboard_Modifiers modifiers; /**< The keyboard modifiers active when the event has been emitted */
364 Ecore_IMF_Keyboard_Locks locks; /**< The keyboard locks active when the event has been emitted */
365 const char *key; /**< The logical key : (eg shift+1 == exclamation) */
366 const char *string; /**< A UTF8 string if this keystroke has produced a visible string to be ADDED */
367 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 */
368 unsigned int timestamp; /**< The timestamp when the event occurred */
371 struct _Ecore_IMF_Event_Key_Up
373 const char *keyname; /**< The string name of the key pressed */
374 Ecore_IMF_Keyboard_Modifiers modifiers; /**< The keyboard modifiers active when the event has been emitted */
375 Ecore_IMF_Keyboard_Locks locks; /**< The keyboard locks active when the event has been emitted */
376 const char *key; /**< The logical key : (eg shift+1 == exclamation) */
377 const char *string; /**< A UTF8 string if this keystroke has produced a visible string to be ADDED */
378 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 */
379 unsigned int timestamp; /**< The timestamp when the event occurred */
382 union _Ecore_IMF_Event
384 Ecore_IMF_Event_Mouse_Down mouse_down;
385 Ecore_IMF_Event_Mouse_Up mouse_up;
386 Ecore_IMF_Event_Mouse_In mouse_in;
387 Ecore_IMF_Event_Mouse_Out mouse_out;
388 Ecore_IMF_Event_Mouse_Move mouse_move;
389 Ecore_IMF_Event_Mouse_Wheel mouse_wheel;
390 Ecore_IMF_Event_Key_Down key_down;
391 Ecore_IMF_Event_Key_Up key_up;
394 struct _Ecore_IMF_Preedit_Attr
396 Ecore_IMF_Preedit_Type preedit_type;
397 unsigned int start_index;
398 unsigned int end_index;
401 struct _Ecore_IMF_Context_Class
403 void (*add) (Ecore_IMF_Context *ctx);
404 void (*del) (Ecore_IMF_Context *ctx);
405 void (*client_window_set) (Ecore_IMF_Context *ctx, void *window);
406 void (*client_canvas_set) (Ecore_IMF_Context *ctx, void *canvas);
407 void (*show) (Ecore_IMF_Context *ctx);
408 void (*hide) (Ecore_IMF_Context *ctx);
409 void (*preedit_string_get) (Ecore_IMF_Context *ctx, char **str, int *cursor_pos);
410 void (*focus_in) (Ecore_IMF_Context *ctx);
411 void (*focus_out) (Ecore_IMF_Context *ctx);
412 void (*reset) (Ecore_IMF_Context *ctx);
413 void (*cursor_position_set) (Ecore_IMF_Context *ctx, int cursor_pos);
414 void (*use_preedit_set) (Ecore_IMF_Context *ctx, Eina_Bool use_preedit);
415 void (*input_mode_set) (Ecore_IMF_Context *ctx, Ecore_IMF_Input_Mode input_mode);
416 Eina_Bool (*filter_event) (Ecore_IMF_Context *ctx, Ecore_IMF_Event_Type type, Ecore_IMF_Event *event);
418 /* Input Panel Control APIs */
419 void (*control_panel_show) (Ecore_IMF_Context *ctx);
420 void (*control_panel_hide) (Ecore_IMF_Context *ctx);
422 void (*input_panel_layout_set) (Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Layout layout);
423 Ecore_IMF_Input_Panel_Layout (*input_panel_layout_get) (Ecore_IMF_Context *ctx);
425 void (*input_panel_language_set) (Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Lang lang);
426 Ecore_IMF_Input_Panel_Lang (*input_panel_language_get) (Ecore_IMF_Context *ctx);
428 void (*input_panel_imdata_set) (Ecore_IMF_Context *ctx, const char* data, int len);
429 void (*input_panel_imdata_get) (Ecore_IMF_Context *ctx, char* data, int *len);
431 void (*input_panel_use_effect_set) (Ecore_IMF_Context *ctx, Eina_Bool use_effect);
432 void (*input_panel_orient_set) (Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Orient orientation);
434 void (*input_panel_move) (Ecore_IMF_Context *ctx, int x, int y);
435 void (*input_panel_geometry_get) (Ecore_IMF_Context *ctx, int *x, int *y, int *w, int *h);
436 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);
437 void (*input_panel_key_disabled_set) (Ecore_IMF_Context *ctx, int layout_index, int key_index, Eina_Bool disabled);
439 void (*input_panel_reset) (Ecore_IMF_Context *ctx); /* Same as reset to default property*/
440 Ecore_IMF_Input_Panel_State (*input_panel_state_get) (Ecore_IMF_Context *ctx);
443 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);
444 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));
446 /* ISF related APIs */
447 int (*ise_get_ise_language) (Ecore_IMF_Context *ctx, const char* input_panel_name, char*** langlist);
448 int (*ise_set_isf_language) (Ecore_IMF_Context *ctx, const char* lang);
449 int (*ise_get_active_isename) (Ecore_IMF_Context *ctx, char* name); /**< will be deprecated */
450 int (*ise_set_active_ise_by_name) (Ecore_IMF_Context *ctx, const char* name); /**< will be deprecated */
451 int (*ise_set_active_ise_by_uuid) (Ecore_IMF_Context *ctx, const char* uuid); /**< will be deprecated */
452 int (*ise_get_iselist) (Ecore_IMF_Context *ctx, char*** iselist); /**< will be deprecated */
453 void (*input_panel_caps_mode_set) (Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Caps_Mode mode);
455 void (*preedit_string_with_attributes_get) (Ecore_IMF_Context *ctx, char **str, Eina_List **attrs, int *cursor_pos);
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);
510 EAPI void ecore_imf_context_control_panel_show(Ecore_IMF_Context *ctx);
511 EAPI void ecore_imf_context_control_panel_hide(Ecore_IMF_Context *ctx);
513 EAPI void ecore_imf_context_input_panel_show(Ecore_IMF_Context *ctx);
514 EAPI void ecore_imf_context_input_panel_hide(Ecore_IMF_Context *ctx);
515 EAPI void ecore_imf_context_input_panel_layout_set(Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Layout layout);
516 EAPI Ecore_IMF_Input_Panel_Layout ecore_imf_context_input_panel_layout_get(Ecore_IMF_Context *ctx);
517 EAPI void ecore_imf_context_input_panel_language_set(Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Lang lang);
518 EAPI Ecore_IMF_Input_Panel_Lang ecore_imf_context_input_panel_language_get(Ecore_IMF_Context *ctx);
519 EAPI void ecore_imf_context_input_panel_imdata_set(Ecore_IMF_Context *ctx, const char * data, int len);
520 EAPI void ecore_imf_context_input_panel_imdata_get(Ecore_IMF_Context *ctx, char *data, int *len);
521 EAPI void ecore_imf_context_input_panel_use_effect_set(Ecore_IMF_Context *ctx, Eina_Bool use_effect);
522 EAPI Eina_Bool ecore_imf_context_input_panel_use_effect_get(Ecore_IMF_Context *ctx);
523 EAPI void ecore_imf_context_input_panel_geometry_get(Ecore_IMF_Context *ctx, int *x, int *y, int *w, int *h);
524 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);
525 EAPI Eina_List *ecore_imf_context_input_panel_private_key_list_get(Ecore_IMF_Context *ctx);
526 EAPI void ecore_imf_context_input_panel_reset(Ecore_IMF_Context *ctx); /* Same as reset to default property*/
527 EAPI void ecore_imf_context_input_panel_orient_set(Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Orient orientation);
528 EAPI Ecore_IMF_Input_Panel_Orient ecore_imf_context_input_panel_orient_get(Ecore_IMF_Context *ctx);
529 EAPI Ecore_IMF_Input_Panel_State ecore_imf_context_input_panel_state_get(Ecore_IMF_Context *ctx);
530 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);
531 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));
532 EAPI void ecore_imf_context_input_panel_key_disabled_set(Ecore_IMF_Context *ctx, int layout_index, int key_index, Eina_Bool disabled);
533 EAPI Eina_List *ecore_imf_context_input_panel_key_disabled_list_get(Ecore_IMF_Context *ctx);
534 EAPI void ecore_imf_context_input_panel_move(Ecore_IMF_Context *ctx, int x, int y);
535 EAPI void ecore_imf_context_input_panel_caps_mode_set(Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Caps_Mode mode);
537 EAPI void ecore_imf_context_keyboard_language_set(Ecore_IMF_Context *ctx, Ecore_IMF_Keyboard_Lang lang);
538 EAPI Ecore_IMF_Keyboard_Lang ecore_imf_context_keyboard_language_get(Ecore_IMF_Context *ctx);
540 /* functions to control isf */
541 EAPI int ecore_imf_context_ise_get_ise_language(Ecore_IMF_Context *ctx, const char* ise_name, char ***langlist);
542 EAPI void ecore_imf_context_ise_set_isf_language(Ecore_IMF_Context *ctx, const char* lang);
543 EAPI void ecore_imf_context_ise_get_active_isename(Ecore_IMF_Context *ctx, char* name);
544 EAPI void ecore_imf_context_ise_set_active_ise_by_name(Ecore_IMF_Context *ctx, const char* name);
545 EAPI void ecore_imf_context_ise_set_active_ise_by_uuid(Ecore_IMF_Context *ctx, const char* uuid);
546 EAPI int ecore_imf_context_ise_get_iselist(Ecore_IMF_Context *ctx, char*** iselist);
548 /* The following entry points must be exported by each input method module
552 * int imf_module_init (const Ecore_IMF_Context_Info **info);
553 * void imf_module_exit (void);
554 * Ecore_IMF_Context *imf_module_create (void);