ecore_imf: fix some doxygen warnings
[framework/uifw/ecore.git] / src / lib / ecore_imf / Ecore_IMF.h
1 #ifndef _ECORE_IMF_H
2 #define _ECORE_IMF_H
3
4 #include <Eina.h>
5
6 #ifdef EAPI
7 # undef EAPI
8 #endif
9
10 #ifdef _WIN32
11 # ifdef EFL_ECORE_IMF_BUILD
12 #  ifdef DLL_EXPORT
13 #   define EAPI __declspec(dllexport)
14 #  else
15 #   define EAPI
16 #  endif /* ! DLL_EXPORT */
17 # else
18 #  define EAPI __declspec(dllimport)
19 # endif /* ! EFL_ECORE_IMF_BUILD */
20 #else
21 # ifdef __GNUC__
22 #  if __GNUC__ >= 4
23 #   define EAPI __attribute__ ((visibility("default")))
24 #  else
25 #   define EAPI
26 #  endif
27 # else
28 #  define EAPI
29 # endif
30 #endif /* ! _WIN32 */
31
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35
36 /**
37  * @addtogroup Ecore_IMF_Context_Group
38  *
39  * @{
40  */
41
42 /* Events sent by the Input Method */
43 typedef struct _Ecore_IMF_Event_Preedit_Start      Ecore_IMF_Event_Preedit_Start;
44 typedef struct _Ecore_IMF_Event_Preedit_End        Ecore_IMF_Event_Preedit_End;
45 typedef struct _Ecore_IMF_Event_Preedit_Changed    Ecore_IMF_Event_Preedit_Changed;
46 typedef struct _Ecore_IMF_Event_Commit             Ecore_IMF_Event_Commit;
47 typedef struct _Ecore_IMF_Event_Delete_Surrounding Ecore_IMF_Event_Delete_Surrounding;
48
49 /* Events to filter */
50 typedef struct _Ecore_IMF_Event_Mouse_Down         Ecore_IMF_Event_Mouse_Down;
51 typedef struct _Ecore_IMF_Event_Mouse_Up           Ecore_IMF_Event_Mouse_Up;
52 typedef struct _Ecore_IMF_Event_Mouse_In           Ecore_IMF_Event_Mouse_In;
53 typedef struct _Ecore_IMF_Event_Mouse_Out          Ecore_IMF_Event_Mouse_Out;
54 typedef struct _Ecore_IMF_Event_Mouse_Move         Ecore_IMF_Event_Mouse_Move;
55 typedef struct _Ecore_IMF_Event_Mouse_Wheel        Ecore_IMF_Event_Mouse_Wheel;
56 typedef struct _Ecore_IMF_Event_Key_Down           Ecore_IMF_Event_Key_Down;
57 typedef struct _Ecore_IMF_Event_Key_Up             Ecore_IMF_Event_Key_Up;
58 typedef union  _Ecore_IMF_Event                    Ecore_IMF_Event;
59
60 typedef struct _Ecore_IMF_Context                  Ecore_IMF_Context;                  /**< An Input Method Context */
61 typedef struct _Ecore_IMF_Context_Class            Ecore_IMF_Context_Class;            /**< An Input Method Context class */
62 typedef struct _Ecore_IMF_Context_Info             Ecore_IMF_Context_Info;             /**< An Input Method Context info */
63
64 /* Preedit attribute info */
65 typedef struct _Ecore_IMF_Preedit_Attr             Ecore_IMF_Preedit_Attr;
66
67 EAPI extern int ECORE_IMF_EVENT_PREEDIT_START;
68 EAPI extern int ECORE_IMF_EVENT_PREEDIT_END;
69 EAPI extern int ECORE_IMF_EVENT_PREEDIT_CHANGED;
70 EAPI extern int ECORE_IMF_EVENT_COMMIT;
71 EAPI extern int ECORE_IMF_EVENT_DELETE_SURROUNDING;
72
73 typedef void (*Ecore_IMF_Event_Cb) (void *data, Ecore_IMF_Context *ctx, void *event_info);
74
75 /**
76  * @typedef Ecore_IMF_Callback_Type
77  *
78  * Ecore IMF Event callback types.
79  *
80  * @see ecore_imf_context_event_callback_add()
81  */
82 typedef enum
83 {
84    ECORE_IMF_CALLBACK_PREEDIT_START,      /**< "PREEDIT_START" is called when a new preediting sequence starts. */
85    ECORE_IMF_CALLBACK_PREEDIT_END,        /**< "PREEDIT_END" is called when a preediting sequence has been completed or canceled. */
86    ECORE_IMF_CALLBACK_PREEDIT_CHANGED,    /**< "PREEDIT_CHANGED" is called whenever the preedit sequence currently being entered has changed. */
87    ECORE_IMF_CALLBACK_COMMIT,             /**< "COMMIT" is called when a complete input sequence has been entered by the user */
88    ECORE_IMF_CALLBACK_DELETE_SURROUNDING  /**< "DELETE_SURROUNDING" is called when the input method needs to delete all or part of the context surrounding the cursor */
89 } Ecore_IMF_Callback_Type;
90
91 /**
92  * @typedef Ecore_IMF_Event_Type
93  *
94  * Ecore IMF event types.
95  *
96  * @see ecore_imf_context_filter_event()
97  */
98 typedef enum
99 {
100    ECORE_IMF_EVENT_MOUSE_DOWN,  /**< Mouse Down event */
101    ECORE_IMF_EVENT_MOUSE_UP,    /**< Mouse Up event */
102    ECORE_IMF_EVENT_MOUSE_IN,    /**< Mouse In event */
103    ECORE_IMF_EVENT_MOUSE_OUT,   /**< Mouse Out event */
104    ECORE_IMF_EVENT_MOUSE_MOVE,  /**< Mouse Move event */
105    ECORE_IMF_EVENT_MOUSE_WHEEL, /**< Mouse Wheel event */
106    ECORE_IMF_EVENT_KEY_DOWN,    /**< Key Down event */
107    ECORE_IMF_EVENT_KEY_UP       /**< Key Up event */
108 } Ecore_IMF_Event_Type;
109
110 typedef enum
111 {
112    ECORE_IMF_KEYBOARD_MODIFIER_NONE  = 0,      /**< No active modifiers */
113    ECORE_IMF_KEYBOARD_MODIFIER_CTRL  = 1 << 0, /**< "Control" is pressed */
114    ECORE_IMF_KEYBOARD_MODIFIER_ALT   = 1 << 1, /**< "Alt" is pressed */
115    ECORE_IMF_KEYBOARD_MODIFIER_SHIFT = 1 << 2, /**< "Shift" is pressed */
116    ECORE_IMF_KEYBOARD_MODIFIER_WIN   = 1 << 3  /**< "Win" (between "Ctrl" and "Alt") is pressed */
117 } Ecore_IMF_Keyboard_Modifiers;
118
119 typedef enum
120 {
121    ECORE_IMF_KEYBOARD_LOCK_NONE      = 0,      /**< No locks are active */
122    ECORE_IMF_KEYBOARD_LOCK_NUM       = 1 << 0, /**< "Num" lock is active */
123    ECORE_IMF_KEYBOARD_LOCK_CAPS      = 1 << 1, /**< "Caps" lock is active */
124    ECORE_IMF_KEYBOARD_LOCK_SCROLL    = 1 << 2  /**< "Scroll" lock is active */
125 } Ecore_IMF_Keyboard_Locks;
126
127 typedef enum
128 {
129    ECORE_IMF_MOUSE_NONE              = 0,      /**< A single click */
130    ECORE_IMF_MOUSE_DOUBLE_CLICK      = 1 << 0, /**< A double click */
131    ECORE_IMF_MOUSE_TRIPLE_CLICK      = 1 << 1  /**< A triple click */
132 } Ecore_IMF_Mouse_Flags;
133
134 typedef enum
135 {
136    ECORE_IMF_INPUT_MODE_ALPHA        = 1 << 0,
137    ECORE_IMF_INPUT_MODE_NUMERIC      = 1 << 1,
138    ECORE_IMF_INPUT_MODE_SPECIAL      = 1 << 2,
139    ECORE_IMF_INPUT_MODE_HEXA         = 1 << 3,
140    ECORE_IMF_INPUT_MODE_TELE         = 1 << 4,
141    ECORE_IMF_INPUT_MODE_FULL         = (ECORE_IMF_INPUT_MODE_ALPHA | ECORE_IMF_INPUT_MODE_NUMERIC | ECORE_IMF_INPUT_MODE_SPECIAL),
142    ECORE_IMF_INPUT_MODE_INVISIBLE    = 1 << 29,
143    ECORE_IMF_INPUT_MODE_AUTOCAP      = 1 << 30
144 } Ecore_IMF_Input_Mode;
145
146 /**
147  * @typedef Ecore_IMF_Preedit_Type
148  *
149  * Ecore IMF Preedit style types
150  *
151  * @see ecore_imf_context_preedit_string_with_attributes_get()
152  */
153 typedef enum
154 {
155    ECORE_IMF_PREEDIT_TYPE_NONE, /**< None style */
156    ECORE_IMF_PREEDIT_TYPE_SUB1, /**< Substring style 1 */
157    ECORE_IMF_PREEDIT_TYPE_SUB2, /**< Substring style 2 */
158    ECORE_IMF_PREEDIT_TYPE_SUB3  /**< Substring style 3 */
159 } Ecore_IMF_Preedit_Type;
160
161 /**
162  * @typedef Ecore_IMF_Autocapital_Type
163  *
164  * Autocapitalization Types.
165  *
166  * @see ecore_imf_context_autocapital_type_set()
167  */
168 typedef enum
169 {
170    ECORE_IMF_AUTOCAPITAL_TYPE_NONE,         /**< No auto-capitalization when typing */
171    ECORE_IMF_AUTOCAPITAL_TYPE_WORD,         /**< Autocapitalize each word typed */
172    ECORE_IMF_AUTOCAPITAL_TYPE_SENTENCE,     /**< Autocapitalize the start of each sentence */
173    ECORE_IMF_AUTOCAPITAL_TYPE_ALLCHARACTER, /**< Autocapitalize all letters */
174 } Ecore_IMF_Autocapital_Type;
175
176 /**
177  * @typedef Ecore_IMF_Input_Panel_Layout
178  *
179  * Input panel (virtual keyboard) layout types.
180  *
181  * @see ecore_imf_context_input_panel_layout_set()
182  */
183 typedef enum
184 {
185    ECORE_IMF_INPUT_PANEL_LAYOUT_NORMAL,          /**< Default layout */
186    ECORE_IMF_INPUT_PANEL_LAYOUT_NUMBER,          /**< Number layout */
187    ECORE_IMF_INPUT_PANEL_LAYOUT_EMAIL,           /**< Email layout */
188    ECORE_IMF_INPUT_PANEL_LAYOUT_URL,             /**< URL layout */
189    ECORE_IMF_INPUT_PANEL_LAYOUT_PHONENUMBER,     /**< Phone Number layout */
190    ECORE_IMF_INPUT_PANEL_LAYOUT_IP,              /**< IP layout */
191    ECORE_IMF_INPUT_PANEL_LAYOUT_MONTH,           /**< Month layout */
192    ECORE_IMF_INPUT_PANEL_LAYOUT_NUMBERONLY,      /**< Number Only layout */
193    ECORE_IMF_INPUT_PANEL_LAYOUT_INVALID,         /**< Never use this */
194    ECORE_IMF_INPUT_PANEL_LAYOUT_HEX,             /**< Hexadecimal layout @since 1.2 */
195    ECORE_IMF_INPUT_PANEL_LAYOUT_TERMINAL,        /**< Command-line terminal layout @since 1.2 */
196    ECORE_IMF_INPUT_PANEL_LAYOUT_PASSWORD         /**< Like normal, but no auto-correct, no auto-capitalization etc. @since 1.2 */
197 } Ecore_IMF_Input_Panel_Layout;
198
199 /**
200  * @typedef Ecore_IMF_Input_Panel_Lang
201  *
202  * Input panel (virtual keyboard) language modes.
203  *
204  * @see ecore_imf_context_input_panel_language_set()
205  */
206 typedef enum
207 {
208    ECORE_IMF_INPUT_PANEL_LANG_AUTOMATIC,    /**< Automatic @since 1.2 */
209    ECORE_IMF_INPUT_PANEL_LANG_ALPHABET      /**< Alphabet @since 1.2 */
210 } Ecore_IMF_Input_Panel_Lang;
211
212 /**
213  * @typedef Ecore_IMF_Input_Panel_Return_Key_Type
214  *
215  * "Return" Key types on the input panel (virtual keyboard).
216  *
217  * @see ecore_imf_context_input_panel_return_key_type_set()
218  */
219 typedef enum
220 {
221    ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_DEFAULT, /**< Default @since 1.2 */
222    ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_DONE,    /**< Done @since 1.2 */
223    ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_GO,      /**< Go @since 1.2 */
224    ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_JOIN,    /**< Join @since 1.2 */
225    ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_LOGIN,   /**< Login @since 1.2 */
226    ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_NEXT,    /**< Next @since 1.2 */
227    ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_SEARCH,  /**< Search or magnifier icon @since 1.2 */
228    ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_SEND     /**< Send @since 1.2 */
229 } Ecore_IMF_Input_Panel_Return_Key_Type;
230
231 struct _Ecore_IMF_Event_Preedit_Start
232 {
233    Ecore_IMF_Context *ctx;
234 };
235
236 struct _Ecore_IMF_Event_Preedit_End
237 {
238    Ecore_IMF_Context *ctx;
239 };
240
241 struct _Ecore_IMF_Event_Preedit_Changed
242 {
243    Ecore_IMF_Context *ctx;
244 };
245
246 struct _Ecore_IMF_Event_Commit
247 {
248    Ecore_IMF_Context *ctx;
249    char              *str;
250 };
251
252 struct _Ecore_IMF_Event_Delete_Surrounding
253 {
254    Ecore_IMF_Context *ctx;
255    int                offset;
256    int                n_chars;
257 };
258
259 struct _Ecore_IMF_Event_Mouse_Down
260 {
261    int button;                             /**< The button which has been pressed */
262    struct {
263       int x, y;
264    } output;
265    struct {
266       int x, y;
267    } canvas;
268    Ecore_IMF_Keyboard_Modifiers modifiers; /**< The keyboard modifiers active when the event has been emitted */
269    Ecore_IMF_Keyboard_Locks     locks;     /**< The keyboard locks active when the event has been emitted */
270    Ecore_IMF_Mouse_Flags        flags;     /**< The flags corresponding the mouse click (single, double or triple click) */
271    unsigned int                 timestamp; /**< The timestamp when the event occurred */
272 };
273
274 struct _Ecore_IMF_Event_Mouse_Up
275 {
276    int button;                             /**< The button which has been pressed */
277    struct {
278       int x, y;
279    } output;
280    struct {
281       int x, y;
282    } canvas;
283    Ecore_IMF_Keyboard_Modifiers modifiers; /**< The keyboard modifiers active when the event has been emitted */
284    Ecore_IMF_Keyboard_Locks     locks;     /**< The keyboard locks active when the event has been emitted */
285    Ecore_IMF_Mouse_Flags        flags;     /**< The flags corresponding the mouse click (single, double or triple click) */
286    unsigned int                 timestamp; /**< The timestamp when the event occurred */
287 };
288
289 struct _Ecore_IMF_Event_Mouse_In
290 {
291    int buttons;
292    struct {
293       int x, y;
294    } output;
295    struct {
296       int x, y;
297    } canvas;
298    Ecore_IMF_Keyboard_Modifiers modifiers; /**< The keyboard modifiers active when the event has been emitted */
299    Ecore_IMF_Keyboard_Locks     locks;     /**< The keyboard locks active when the event has been emitted */
300    unsigned int                 timestamp; /**< The timestamp when the event occurred */
301 };
302
303 struct _Ecore_IMF_Event_Mouse_Out
304 {
305    int buttons;
306    struct {
307       int x, y;
308    } output;
309    struct {
310       int x, y;
311    } canvas;
312    Ecore_IMF_Keyboard_Modifiers modifiers; /**< The keyboard modifiers active when the event has been emitted */
313    Ecore_IMF_Keyboard_Locks     locks;     /**< The keyboard locks active when the event has been emitted */
314    unsigned int                 timestamp; /**< The timestamp when the event occurred */
315 };
316
317 struct _Ecore_IMF_Event_Mouse_Move
318 {
319    int buttons;
320    struct {
321       struct {
322          int x, y;
323       } output;
324       struct {
325          int x, y;
326       } canvas;
327    } cur, prev;
328    Ecore_IMF_Keyboard_Modifiers modifiers; /**< The keyboard modifiers active when the event has been emitted */
329    Ecore_IMF_Keyboard_Locks     locks;     /**< The keyboard locks active when the event has been emitted */
330    unsigned int                 timestamp; /**< The timestamp when the event occurred */
331 };
332
333 struct _Ecore_IMF_Event_Mouse_Wheel
334 {
335    int direction;                         /* 0 = default up/down wheel */
336    int z;                                 /* ...,-2,-1 = down, 1,2,... = up */
337    struct {
338       int x, y;
339    } output;
340    struct {
341       int x, y;
342    } canvas;
343    Ecore_IMF_Keyboard_Modifiers modifiers; /**< The keyboard modifiers active when the event has been emitted */
344    Ecore_IMF_Keyboard_Locks     locks;     /**< The keyboard locks active when the event has been emitted */
345    unsigned int                 timestamp; /**< The timestamp when the event occurred */
346 };
347
348 struct _Ecore_IMF_Event_Key_Down
349 {
350    const char                   *keyname;   /**< The string name of the key pressed */
351    Ecore_IMF_Keyboard_Modifiers  modifiers; /**< The keyboard modifiers active when the event has been emitted */
352    Ecore_IMF_Keyboard_Locks      locks;     /**< The keyboard locks active when the event has been emitted */
353    const char                   *key;       /**< The logical key : (eg shift+1 == exclamation) */
354    const char                   *string;    /**< A UTF8 string if this keystroke has produced a visible string to be ADDED */
355    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 */
356    unsigned int                  timestamp; /**< The timestamp when the event occurred */
357 };
358
359 struct _Ecore_IMF_Event_Key_Up
360 {
361    const char                   *keyname;   /**< The string name of the key pressed */
362    Ecore_IMF_Keyboard_Modifiers  modifiers; /**< The keyboard modifiers active when the event has been emitted */
363    Ecore_IMF_Keyboard_Locks      locks;     /**< The keyboard locks active when the event has been emitted */
364    const char                   *key;       /**< The logical key : (eg shift+1 == exclamation) */
365    const char                   *string;    /**< A UTF8 string if this keystroke has produced a visible string to be ADDED */
366    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 */
367    unsigned int                  timestamp; /**< The timestamp when the event occurred */
368 };
369
370 union _Ecore_IMF_Event
371 {
372    Ecore_IMF_Event_Mouse_Down  mouse_down;
373    Ecore_IMF_Event_Mouse_Up    mouse_up;
374    Ecore_IMF_Event_Mouse_In    mouse_in;
375    Ecore_IMF_Event_Mouse_Out   mouse_out;
376    Ecore_IMF_Event_Mouse_Move  mouse_move;
377    Ecore_IMF_Event_Mouse_Wheel mouse_wheel;
378    Ecore_IMF_Event_Key_Down    key_down;
379    Ecore_IMF_Event_Key_Up      key_up;
380 };
381
382 struct _Ecore_IMF_Preedit_Attr
383 {
384    Ecore_IMF_Preedit_Type preedit_type; /**< preedit style type */
385    unsigned int start_index;            /**< start index of the range (in bytes) */
386    unsigned int end_index;              /**< end index of the range (in bytes) */
387 };
388
389 struct _Ecore_IMF_Context_Class
390 {
391    void (*add)                 (Ecore_IMF_Context *ctx);
392    void (*del)                 (Ecore_IMF_Context *ctx);
393    void (*client_window_set)   (Ecore_IMF_Context *ctx, void *window);
394    void (*client_canvas_set)   (Ecore_IMF_Context *ctx, void *canvas);
395    void (*show)                (Ecore_IMF_Context *ctx);
396    void (*hide)                (Ecore_IMF_Context *ctx);
397    void (*preedit_string_get)  (Ecore_IMF_Context *ctx, char **str, int *cursor_pos);
398    void (*focus_in)            (Ecore_IMF_Context *ctx);
399    void (*focus_out)           (Ecore_IMF_Context *ctx);
400    void (*reset)               (Ecore_IMF_Context *ctx);
401    void (*cursor_position_set) (Ecore_IMF_Context *ctx, int cursor_pos);
402    void (*use_preedit_set)     (Ecore_IMF_Context *ctx, Eina_Bool use_preedit);
403    void (*input_mode_set)      (Ecore_IMF_Context *ctx, Ecore_IMF_Input_Mode input_mode);
404    Eina_Bool (*filter_event)   (Ecore_IMF_Context *ctx, Ecore_IMF_Event_Type type, Ecore_IMF_Event *event);
405    void (*preedit_string_with_attributes_get) (Ecore_IMF_Context *ctx, char **str, Eina_List **attrs, int *cursor_pos);
406    void (*prediction_allow_set)(Ecore_IMF_Context *ctx, Eina_Bool prediction);
407    void (*autocapital_type_set)(Ecore_IMF_Context *ctx, Ecore_IMF_Autocapital_Type autocapital_type);
408    void (*control_panel_show)   (Ecore_IMF_Context *ctx);
409    void (*control_panel_hide)   (Ecore_IMF_Context *ctx);
410    void (*input_panel_layout_set) (Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Layout layout);
411    Ecore_IMF_Input_Panel_Layout (*input_panel_layout_get) (Ecore_IMF_Context *ctx);
412    void (*input_panel_language_set) (Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Lang lang);
413    Ecore_IMF_Input_Panel_Lang (*input_panel_language_get) (Ecore_IMF_Context *ctx);
414    void (*cursor_location_set) (Ecore_IMF_Context *ctx, int x, int y, int w, int h);
415    void (*input_panel_imdata_set)(Ecore_IMF_Context *ctx, const void* data, int len);
416    void (*input_panel_imdata_get)(Ecore_IMF_Context *ctx, void* data, int *len);
417    void (*input_panel_return_key_type_set) (Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Return_Key_Type return_key_type);
418    void (*input_panel_return_key_disabled_set) (Ecore_IMF_Context *ctx, Eina_Bool disabled);
419    void (*input_panel_caps_lock_mode_set) (Ecore_IMF_Context *ctx, Eina_Bool mode);
420 };
421
422 struct _Ecore_IMF_Context_Info
423 {
424    const char *id;              /* ID */
425    const char *description;     /* Human readable description */
426    const char *default_locales; /* Languages for which this context is the default, separated by : */
427    const char *canvas_type;     /* The canvas type used by the input method. Eg.: evas */
428    int         canvas_required; /* Whether the canvas usage is required for this input method */
429 };
430
431 /**
432  * @}
433  */
434
435 EAPI int                           ecore_imf_init(void);
436 EAPI int                           ecore_imf_shutdown(void);
437
438 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));
439
440 EAPI Eina_List                    *ecore_imf_context_available_ids_get(void);
441 EAPI Eina_List                    *ecore_imf_context_available_ids_by_canvas_type_get(const char *canvas_type);
442 EAPI const char                   *ecore_imf_context_default_id_get(void);
443 EAPI const char                   *ecore_imf_context_default_id_by_canvas_type_get(const char *canvas_type);
444 EAPI const Ecore_IMF_Context_Info *ecore_imf_context_info_by_id_get(const char *id);
445
446 EAPI Ecore_IMF_Context            *ecore_imf_context_add(const char *id);
447 EAPI const Ecore_IMF_Context_Info *ecore_imf_context_info_get(Ecore_IMF_Context *ctx);
448 EAPI void                          ecore_imf_context_del(Ecore_IMF_Context *ctx);
449 EAPI void                          ecore_imf_context_client_window_set(Ecore_IMF_Context *ctx, void *window);
450 EAPI void                         *ecore_imf_context_client_window_get(Ecore_IMF_Context *ctx);
451 EAPI void                          ecore_imf_context_client_canvas_set(Ecore_IMF_Context *ctx, void *canvas);
452 EAPI void                         *ecore_imf_context_client_canvas_get(Ecore_IMF_Context *ctx);
453 EAPI void                          ecore_imf_context_show(Ecore_IMF_Context *ctx);
454 EAPI void                          ecore_imf_context_hide(Ecore_IMF_Context *ctx);
455 EAPI void                          ecore_imf_context_preedit_string_get(Ecore_IMF_Context *ctx, char **str, int *cursor_pos);
456 EAPI void                          ecore_imf_context_preedit_string_with_attributes_get(Ecore_IMF_Context *ctx, char **str, Eina_List **attrs, int *cursor_pos);
457 EAPI void                          ecore_imf_context_focus_in(Ecore_IMF_Context *ctx);
458 EAPI void                          ecore_imf_context_focus_out(Ecore_IMF_Context *ctx);
459 EAPI void                          ecore_imf_context_reset(Ecore_IMF_Context *ctx);
460 EAPI void                          ecore_imf_context_cursor_position_set(Ecore_IMF_Context *ctx, int cursor_pos);
461 EAPI void                          ecore_imf_context_cursor_location_set(Ecore_IMF_Context *ctx, int x, int y, int w, int h);
462 EAPI void                          ecore_imf_context_use_preedit_set(Ecore_IMF_Context *ctx, Eina_Bool use_preedit);
463 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);
464 EAPI void                          ecore_imf_context_input_mode_set(Ecore_IMF_Context *ctx, Ecore_IMF_Input_Mode input_mode);
465 EAPI Ecore_IMF_Input_Mode          ecore_imf_context_input_mode_get(Ecore_IMF_Context *ctx);
466 EAPI Eina_Bool                     ecore_imf_context_filter_event(Ecore_IMF_Context *ctx, Ecore_IMF_Event_Type type, Ecore_IMF_Event *event);
467
468 /* plugin specific functions */
469 EAPI Ecore_IMF_Context            *ecore_imf_context_new(const Ecore_IMF_Context_Class *ctxc);
470 EAPI void                          ecore_imf_context_data_set(Ecore_IMF_Context *ctx, void *data);
471 EAPI void                         *ecore_imf_context_data_get(Ecore_IMF_Context *ctx);
472 EAPI Eina_Bool                     ecore_imf_context_surrounding_get(Ecore_IMF_Context *ctx, char **text, int *cursor_pos);
473 EAPI void                          ecore_imf_context_preedit_start_event_add(Ecore_IMF_Context *ctx);
474 EAPI void                          ecore_imf_context_preedit_end_event_add(Ecore_IMF_Context *ctx);
475 EAPI void                          ecore_imf_context_preedit_changed_event_add(Ecore_IMF_Context *ctx);
476 EAPI void                          ecore_imf_context_commit_event_add(Ecore_IMF_Context *ctx, const char *str);
477 EAPI void                          ecore_imf_context_delete_surrounding_event_add(Ecore_IMF_Context *ctx, int offset, int n_chars);
478 EAPI void                          ecore_imf_context_event_callback_add(Ecore_IMF_Context *ctx, Ecore_IMF_Callback_Type type, Ecore_IMF_Event_Cb func, const void *data);
479 EAPI void                         *ecore_imf_context_event_callback_del(Ecore_IMF_Context *ctx, Ecore_IMF_Callback_Type type, Ecore_IMF_Event_Cb func);
480 EAPI void                          ecore_imf_context_event_callback_call(Ecore_IMF_Context *ctx, Ecore_IMF_Callback_Type type, void *event_info);
481 EAPI void                          ecore_imf_context_prediction_allow_set(Ecore_IMF_Context *ctx, Eina_Bool prediction);
482 EAPI Eina_Bool                     ecore_imf_context_prediction_allow_get(Ecore_IMF_Context *ctx);
483 EAPI void                          ecore_imf_context_autocapital_type_set(Ecore_IMF_Context *ctx, Ecore_IMF_Autocapital_Type autocapital_type);
484 EAPI Ecore_IMF_Autocapital_Type    ecore_imf_context_autocapital_type_get(Ecore_IMF_Context *ctx);
485
486 EAPI void                          ecore_imf_context_control_panel_show(Ecore_IMF_Context *ctx);
487 EAPI void                          ecore_imf_context_control_panel_hide(Ecore_IMF_Context *ctx);
488
489 EAPI void                          ecore_imf_context_input_panel_show(Ecore_IMF_Context *ctx);
490 EAPI void                          ecore_imf_context_input_panel_hide(Ecore_IMF_Context *ctx);
491 EAPI void                          ecore_imf_context_input_panel_layout_set(Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Layout layout);
492 EAPI Ecore_IMF_Input_Panel_Layout  ecore_imf_context_input_panel_layout_get(Ecore_IMF_Context *ctx);
493 EAPI void                          ecore_imf_context_input_panel_language_set(Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Lang lang);
494 EAPI Ecore_IMF_Input_Panel_Lang    ecore_imf_context_input_panel_language_get(Ecore_IMF_Context *ctx);
495 EAPI void                          ecore_imf_context_input_panel_enabled_set(Ecore_IMF_Context *ctx, Eina_Bool enable);
496 EAPI Eina_Bool                     ecore_imf_context_input_panel_enabled_get(Ecore_IMF_Context *ctx);
497 EAPI void                          ecore_imf_context_input_panel_imdata_set(Ecore_IMF_Context *ctx, const void *data, int len);
498 EAPI void                          ecore_imf_context_input_panel_imdata_get(Ecore_IMF_Context *ctx, void *data, int *len);
499 EAPI void                          ecore_imf_context_input_panel_return_key_type_set(Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Return_Key_Type return_key_type);
500 EAPI Ecore_IMF_Input_Panel_Return_Key_Type ecore_imf_context_input_panel_return_key_type_get(Ecore_IMF_Context *ctx);
501 EAPI void                          ecore_imf_context_input_panel_return_key_disabled_set(Ecore_IMF_Context *ctx, Eina_Bool disabled);
502 EAPI Eina_Bool                     ecore_imf_context_input_panel_return_key_disabled_get(Ecore_IMF_Context *ctx);
503 EAPI void                          ecore_imf_context_input_panel_caps_lock_mode_set(Ecore_IMF_Context *ctx, Eina_Bool mode);
504 EAPI Eina_Bool                     ecore_imf_context_input_panel_caps_lock_mode_get(Ecore_IMF_Context *ctx);
505
506 /* The following entry points must be exported by each input method module
507  */
508
509 /*
510  * int                imf_module_init   (const Ecore_IMF_Context_Info **info);
511  * void               imf_module_exit   (void);
512  * Ecore_IMF_Context *imf_module_create (void);
513  */
514
515 #ifdef __cplusplus
516 }
517 #endif
518
519 #endif