b704ce878c2ac21b3f87e4bf66c81037ec8dcb4b
[profile/ivi/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 #include <Ecore_IMF_Input_Panel_Key.h>
6
7 #ifdef EAPI
8 # undef EAPI
9 #endif
10
11 #ifdef _WIN32
12 # ifdef EFL_ECORE_IMF_BUILD
13 #  ifdef DLL_EXPORT
14 #   define EAPI __declspec(dllexport)
15 #  else
16 #   define EAPI
17 #  endif /* ! DLL_EXPORT */
18 # else
19 #  define EAPI __declspec(dllimport)
20 # endif /* ! EFL_ECORE_IMF_BUILD */
21 #else
22 # ifdef __GNUC__
23 #  if __GNUC__ >= 4
24 #   define EAPI __attribute__ ((visibility("default")))
25 #  else
26 #   define EAPI
27 #  endif
28 # else
29 #  define EAPI
30 # endif
31 #endif /* ! _WIN32 */
32
33 /* Faked 'bool'.  */
34 #ifndef __cplusplus
35 # ifndef bool
36 #  define bool int
37 #  ifndef FALSE
38 #   define FALSE 0
39 #  endif
40 #  ifndef TRUE 
41 #   define TRUE 1
42 #  endif
43 # endif
44 #endif
45
46 /**
47  * @file Ecore_IMF.h
48  * @brief The file that provides the ISF IMCONTROL Structures and APIs
49  * @version   1.0
50  * @ingroup   Ecore_IMF_Context_IMControl_Group
51  */
52
53 #ifdef __cplusplus
54 extern "C" {
55 #endif
56
57    /* ecore_imf_context_input_panel_event_callback_add() flag */
58    typedef enum
59      {
60         ECORE_IMF_INPUT_PANEL_STATE_EVENT,              /**< Input Panel STATE Event */
61         ECORE_IMF_INPUT_PANEL_MODE_EVENT,               /**< Input Panel MODE Event */
62         ECORE_IMF_INPUT_PANEL_LANGUAGE_EVENT,           /**< Input Panel LANGUAGE Event */
63         ECORE_IMF_INPUT_PANEL_SHIFT_MODE_EVENT,         /**< Input Panel SHIFT MODE */
64         ECORE_IMF_INPUT_PANEL_PREEDIT_MODE_EVENT,       /**< Input Panel PREEDIT MODE */
65         ECORE_IMF_INPUT_PANEL_COMPLETION_MODE_EVENT,    /**< Input Panel COMPLETION MODE */
66         ECORE_IMF_INPUT_PANEL_CUSTOM_INPUT_MODE_EVENT,  /**< Input Panel CUSTOM INPUT MODE */
67
68         ECORE_IMF_INPUT_PANEL_PRIVATE_CONTEXT_01,       /**< Input Panel PRIVATE CONTEXT */
69         ECORE_IMF_INPUT_PANEL_PRIVATE_CONTEXT_02,       /**< Input Panel PRIVATE CONTEXT */
70         ECORE_IMF_INPUT_PANEL_PRIVATE_CONTEXT_03,       /**< Input Panel PRIVATE CONTEXT */
71         ECORE_IMF_INPUT_PANEL_PRIVATE_CONTEXT_04,       /**< Input Panel PRIVATE CONTEXT */
72         ECORE_IMF_INPUT_PANEL_PRIVATE_CONTEXT_05,       /**< Input Panel PRIVATE CONTEXT */
73         ECORE_IMF_INPUT_PANEL_PRIVATE_CONTEXT_06,       /**< Input Panel PRIVATE CONTEXT */
74         ECORE_IMF_INPUT_PANEL_PRIVATE_CONTEXT_07,       /**< Input Panel PRIVATE CONTEXT */
75         ECORE_IMF_INPUT_PANEL_PRIVATE_CONTEXT_08,       /**< Input Panel PRIVATE CONTEXT */
76         ECORE_IMF_INPUT_PANEL_PRIVATE_CONTEXT_09,       /**< Input Panel PRIVATE CONTEXT */
77         ECORE_IMF_INPUT_PANEL_PRIVATE_CONTEXT_10,       /**< Input Panel PRIVATE CONTEXT */
78         ECORE_IMF_INPUT_PANEL_EVENT_INVALID
79      } Ecore_IMF_Input_Panel_Event;
80
81    typedef enum
82      {
83         ECORE_IMF_INPUT_PANEL_STATE_SHOW,         /**< Show Input panel */
84         ECORE_IMF_INPUT_PANEL_STATE_HIDE,         /**< Hide Input panel */
85         ECORE_IMF_INPUT_PANEL_STATE_INVALID
86      } Ecore_IMF_Input_Panel_State;
87
88    typedef enum
89      {
90         ECORE_IMF_INPUT_PANEL_LAYOUT_NORMAL,          /**< Default 4x4 layout */
91         ECORE_IMF_INPUT_PANEL_LAYOUT_NUMBER,          /**< Number layout */
92         ECORE_IMF_INPUT_PANEL_LAYOUT_EMAIL,           /**< Email layout */
93         ECORE_IMF_INPUT_PANEL_LAYOUT_URL,             /**< URL layout */
94         ECORE_IMF_INPUT_PANEL_LAYOUT_PHONENUMBER,     /**< Phone Number layout */
95         ECORE_IMF_INPUT_PANEL_LAYOUT_IP,              /**< IP layout */
96         ECORE_IMF_INPUT_PANEL_LAYOUT_MONTH,           /**< Month layout */
97         ECORE_IMF_INPUT_PANEL_LAYOUT_NUMBERONLY,      /**< Number Only layout */
98         ECORE_IMF_INPUT_PANEL_LAYOUT_CUSTOM_1 = 100,  /* Reserved for future use */
99         ECORE_IMF_INPUT_PANEL_LAYOUT_CUSTOM_2,
100         ECORE_IMF_INPUT_PANEL_LAYOUT_CUSTOM_3,
101         ECORE_IMF_INPUT_PANEL_LAYOUT_CUSTOM_4,
102         ECORE_IMF_INPUT_PANEL_LAYOUT_CUSTOM_5,
103         ECORE_IMF_INPUT_PANEL_LAYOUT_CUSTOM_6,
104         ECORE_IMF_INPUT_PANEL_LAYOUT_CUSTOM_7,
105         ECORE_IMF_INPUT_PANEL_LAYOUT_CUSTOM_8,
106         ECORE_IMF_INPUT_PANEL_LAYOUT_CUSTOM_9,
107         ECORE_IMF_INPUT_PANEL_LAYOUT_CUSTOM_10,
108         ECORE_IMF_INPUT_PANEL_LAYOUT_INVALID
109      } Ecore_IMF_Input_Panel_Layout;
110
111    typedef enum
112      {
113         ECORE_IMF_INPUT_PANEL_LANG_AUTOMATIC,  /**< Automatic */
114         ECORE_IMF_INPUT_PANEL_LANG_ALPHABET    /**< Alphabet */
115      } Ecore_IMF_Input_Panel_Lang;
116
117    typedef enum
118      {
119         ECORE_IMF_KEYBOARD_LANG_NATIVE,    /**< Native */
120         ECORE_IMF_KEYBOARD_LANG_ALPHABET   /**< Alphabet */
121      } Ecore_IMF_Keyboard_Lang;
122
123    typedef enum
124      {
125         ECORE_IMF_AUTOCORRECTION_DEFAULT,
126         ECORE_IMF_AUTOCORRECTION_NO,
127         ECORE_IMF_AUTOCORRECTION_YES,
128         ECORE_IMF_AUTOCORRECTION_INVALID
129      } Ecore_IMF_Autocorrection;
130
131    typedef enum
132      {
133         ECORE_IMF_INPUT_PANEL_CAPS_MODE_OFF,    /**< Off */
134         ECORE_IMF_INPUT_PANEL_CAPS_MODE_ON,         /**< On */
135         ECORE_IMF_INPUT_PANEL_CAPS_MODE_LOCK,   /**< Lock */
136      } Ecore_IMF_Input_Panel_Caps_Mode;
137
138    typedef enum
139      {
140         ECORE_IMF_INPUT_PANEL_ORIENT_NONE,
141         ECORE_IMF_INPUT_PANEL_ORIENT_90_CW, /* Clockwise */
142         ECORE_IMF_INPUT_PANEL_ORIENT_180,
143         ECORE_IMF_INPUT_PANEL_ORIENT_90_CCW /* CounterClockwise */
144      } Ecore_IMF_Input_Panel_Orient;
145
146    typedef struct _Disable_Key_Item Disable_Key_Item;
147
148    struct _Disable_Key_Item
149      {
150         int layout_idx;
151         int key_idx;
152         Eina_Bool disabled;
153      };
154
155    typedef struct _Private_Key_Item Private_Key_Item;
156
157    struct _Private_Key_Item
158      {
159         int layout_idx;
160         int key_idx;
161         int type;
162         char data[128]; // label or image path
163         int key_value;
164         char key_string[32];
165      };
166
167    /* Events sent by the Input Method */
168    typedef struct _Ecore_IMF_Event_Preedit_Start      Ecore_IMF_Event_Preedit_Start;
169    typedef struct _Ecore_IMF_Event_Preedit_End        Ecore_IMF_Event_Preedit_End;
170    typedef struct _Ecore_IMF_Event_Preedit_Changed    Ecore_IMF_Event_Preedit_Changed;
171    typedef struct _Ecore_IMF_Event_Commit             Ecore_IMF_Event_Commit;
172    typedef struct _Ecore_IMF_Event_Delete_Surrounding Ecore_IMF_Event_Delete_Surrounding;
173
174    /* Events to filter */
175    typedef struct _Ecore_IMF_Event_Mouse_Down         Ecore_IMF_Event_Mouse_Down;
176    typedef struct _Ecore_IMF_Event_Mouse_Up           Ecore_IMF_Event_Mouse_Up;
177    typedef struct _Ecore_IMF_Event_Mouse_In           Ecore_IMF_Event_Mouse_In;
178    typedef struct _Ecore_IMF_Event_Mouse_Out          Ecore_IMF_Event_Mouse_Out;
179    typedef struct _Ecore_IMF_Event_Mouse_Move         Ecore_IMF_Event_Mouse_Move;
180    typedef struct _Ecore_IMF_Event_Mouse_Wheel        Ecore_IMF_Event_Mouse_Wheel;
181    typedef struct _Ecore_IMF_Event_Key_Down           Ecore_IMF_Event_Key_Down;
182    typedef struct _Ecore_IMF_Event_Key_Up             Ecore_IMF_Event_Key_Up;
183    typedef union  _Ecore_IMF_Event                    Ecore_IMF_Event;
184
185    typedef struct _Ecore_IMF_Context                  Ecore_IMF_Context;                  /**< An Input Method Context */
186    typedef struct _Ecore_IMF_Context_Class            Ecore_IMF_Context_Class;            /**< An Input Method Context class */
187    typedef struct _Ecore_IMF_Context_Info             Ecore_IMF_Context_Info;             /**< An Input Method Context info */
188
189    EAPI extern int ECORE_IMF_EVENT_PREEDIT_START;
190    EAPI extern int ECORE_IMF_EVENT_PREEDIT_END;
191    EAPI extern int ECORE_IMF_EVENT_PREEDIT_CHANGED;
192    EAPI extern int ECORE_IMF_EVENT_COMMIT;
193    EAPI extern int ECORE_IMF_EVENT_DELETE_SURROUNDING;
194
195    typedef enum
196      {
197         ECORE_IMF_EVENT_MOUSE_DOWN,
198         ECORE_IMF_EVENT_MOUSE_UP,
199         ECORE_IMF_EVENT_MOUSE_IN,
200         ECORE_IMF_EVENT_MOUSE_OUT,
201         ECORE_IMF_EVENT_MOUSE_MOVE,
202         ECORE_IMF_EVENT_MOUSE_WHEEL,
203         ECORE_IMF_EVENT_KEY_DOWN,
204         ECORE_IMF_EVENT_KEY_UP
205      } Ecore_IMF_Event_Type;
206
207    typedef enum
208      {
209         ECORE_IMF_KEYBOARD_MODIFIER_NONE  = 0,      /**< No active modifiers */
210         ECORE_IMF_KEYBOARD_MODIFIER_CTRL  = 1 << 0, /**< "Control" is pressed */
211         ECORE_IMF_KEYBOARD_MODIFIER_ALT   = 1 << 1, /**< "Alt" is pressed */
212         ECORE_IMF_KEYBOARD_MODIFIER_SHIFT = 1 << 2, /**< "Shift" is pressed */
213         ECORE_IMF_KEYBOARD_MODIFIER_WIN   = 1 << 3  /**< "Win" (between "Ctrl" and "Alt") is pressed */
214      } Ecore_IMF_Keyboard_Modifiers;
215
216    typedef enum
217      {
218         ECORE_IMF_KEYBOARD_LOCK_NONE      = 0,      /**< No locks are active */
219         ECORE_IMF_KEYBOARD_LOCK_NUM       = 1 << 0, /**< "Num" lock is active */
220         ECORE_IMF_KEYBOARD_LOCK_CAPS      = 1 << 1, /**< "Caps" lock is active */
221         ECORE_IMF_KEYBOARD_LOCK_SCROLL    = 1 << 2  /**< "Scroll" lock is active */
222      } Ecore_IMF_Keyboard_Locks;
223
224    typedef enum
225      {
226         ECORE_IMF_MOUSE_NONE              = 0,      /**< A single click */
227         ECORE_IMF_MOUSE_DOUBLE_CLICK      = 1 << 0, /**< A double click */
228         ECORE_IMF_MOUSE_TRIPLE_CLICK      = 1 << 1  /**< A triple click */
229      } Ecore_IMF_Mouse_Flags;
230
231    typedef enum
232      {
233         ECORE_IMF_INPUT_MODE_ALPHA        = 1 << 0,
234         ECORE_IMF_INPUT_MODE_NUMERIC      = 1 << 1,
235         ECORE_IMF_INPUT_MODE_SPECIAL      = 1 << 2,
236         ECORE_IMF_INPUT_MODE_HEXA         = 1 << 3,
237         ECORE_IMF_INPUT_MODE_TELE         = 1 << 4,
238         ECORE_IMF_INPUT_MODE_FULL         = (ECORE_IMF_INPUT_MODE_ALPHA | ECORE_IMF_INPUT_MODE_NUMERIC | ECORE_IMF_INPUT_MODE_SPECIAL),
239         ECORE_IMF_INPUT_MODE_INVISIBLE    = 1 << 29,
240         ECORE_IMF_INPUT_MODE_AUTOCAP      = 1 << 30
241      } Ecore_IMF_Input_Mode;
242
243    struct _Ecore_IMF_Event_Preedit_Start
244      {
245         Ecore_IMF_Context *ctx;
246      };
247
248    struct _Ecore_IMF_Event_Preedit_End
249      {
250         Ecore_IMF_Context *ctx;
251      };
252
253    struct _Ecore_IMF_Event_Preedit_Changed
254      {
255         Ecore_IMF_Context *ctx;
256      };
257
258    struct _Ecore_IMF_Event_Commit
259      {
260         Ecore_IMF_Context *ctx;
261         char *str;
262      };
263
264    struct _Ecore_IMF_Event_Delete_Surrounding
265      {
266         Ecore_IMF_Context *ctx;
267         int offset;
268         int n_chars;
269      };
270
271    struct _Ecore_IMF_Event_Mouse_Down
272      {
273         int button;                             /**< The button which has been pressed */
274         struct {
275              int x, y;
276         } output;
277         struct {
278              int x, y;
279         } canvas;
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 occured */
284      };
285
286    struct _Ecore_IMF_Event_Mouse_Up
287      {
288         int button;                             /**< The button which has been pressed */
289         struct {
290              int x, y;
291         } output;
292         struct {
293              int x, y;
294         } canvas;
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 occured */
299      };
300
301    struct _Ecore_IMF_Event_Mouse_In
302      {
303         int buttons;
304         struct {
305              int x, y;
306         } output;
307         struct {
308              int x, y;
309         } canvas;
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 occured */
313      };
314
315    struct _Ecore_IMF_Event_Mouse_Out
316      {
317         int buttons;
318         struct {
319              int x, y;
320         } output;
321         struct {
322              int x, y;
323         } canvas;
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 occured */
327      };
328
329    struct _Ecore_IMF_Event_Mouse_Move
330      {
331         int buttons;
332         struct {
333              struct {
334                   int x, y;
335              } output;
336              struct {
337                   int x, y;
338              } canvas;
339         } cur, prev;
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 occured */
343      };
344
345    struct _Ecore_IMF_Event_Mouse_Wheel
346      {
347         int direction;                         /* 0 = default up/down wheel */
348         int z;                                 /* ...,-2,-1 = down, 1,2,... = up */
349         struct {
350              int x, y;
351         } output;
352         struct {
353              int x, y;
354         } canvas;
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 occured */
358      };
359
360    struct _Ecore_IMF_Event_Key_Down
361      {
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 occured */
369      };
370
371    struct _Ecore_IMF_Event_Key_Up
372      {
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 occured */
380      };
381
382    union _Ecore_IMF_Event
383      {
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;
392      };
393
394    typedef enum
395      {
396         ECORE_IMF_PREEDIT_TYPE_NONE = 0,
397         ECORE_IMF_PREEDIT_TYPE_SUB1 = 1,
398         ECORE_IMF_PREEDIT_TYPE_SUB2 = 2,
399         ECORE_IMF_PREEDIT_TYPE_SUB3 = 3
400      } Ecore_IMF_Preedit_Type;
401
402    typedef struct _Ecore_IMF_Preedit_Attr Ecore_IMF_Preedit_Attr;
403
404    struct _Ecore_IMF_Preedit_Attr
405      {
406         Ecore_IMF_Preedit_Type preedit_type;
407         unsigned int start_index;
408         unsigned int end_index;
409      };
410
411    typedef struct _Ecore_IMF_Input_Panel_Event_Callback Ecore_IMF_Input_Panel_Event_Callback;
412
413    struct _Ecore_IMF_Input_Panel_Event_Callback
414      {
415         void (*func)(void *data, Ecore_IMF_Context *ctx, int value);
416         const void *data;
417         Ecore_IMF_Input_Panel_Event type;
418      };
419
420    struct _Ecore_IMF_Context_Class
421      {
422         void (*add)                 (Ecore_IMF_Context *ctx);
423         void (*del)                 (Ecore_IMF_Context *ctx);
424         void (*client_window_set)   (Ecore_IMF_Context *ctx, void *window);
425         void (*client_canvas_set)   (Ecore_IMF_Context *ctx, void *canvas);
426         void (*show)                (Ecore_IMF_Context *ctx);
427         void (*hide)                (Ecore_IMF_Context *ctx);
428         void (*preedit_string_get)  (Ecore_IMF_Context *ctx, char **str, int *cursor_pos);
429         void (*focus_in)            (Ecore_IMF_Context *ctx);
430         void (*focus_out)           (Ecore_IMF_Context *ctx);
431         void (*reset)               (Ecore_IMF_Context *ctx);
432         void (*cursor_position_set) (Ecore_IMF_Context *ctx, int cursor_pos);
433         void (*use_preedit_set)     (Ecore_IMF_Context *ctx, Eina_Bool use_preedit);
434         void (*input_mode_set)      (Ecore_IMF_Context *ctx, Ecore_IMF_Input_Mode input_mode);
435         Eina_Bool (*filter_event)   (Ecore_IMF_Context *ctx, Ecore_IMF_Event_Type type, Ecore_IMF_Event *event);
436
437         /* Input Panel Control APIs */
438         void (*control_panel_show)   (Ecore_IMF_Context *ctx);
439         void (*control_panel_hide)   (Ecore_IMF_Context *ctx);
440
441         void (*input_panel_layout_set)         (Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Layout layout);
442         Ecore_IMF_Input_Panel_Layout (*input_panel_layout_get)         (Ecore_IMF_Context *ctx);
443
444         void (*input_panel_language_set)       (Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Lang lang);
445         Ecore_IMF_Input_Panel_Lang (*input_panel_language_get) (Ecore_IMF_Context *ctx);
446
447         void (*input_panel_imdata_set)         (Ecore_IMF_Context *ctx, const char* data, int len);
448         void (*input_panel_imdata_get)         (Ecore_IMF_Context *ctx, char* data, int *len);
449
450         void (*input_panel_use_effect_set)     (Ecore_IMF_Context *ctx, Eina_Bool use_effect);
451         void (*input_panel_orient_set)         (Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Orient orientation);
452
453         void (*input_panel_move) (Ecore_IMF_Context *ctx, int x, int y);
454         void (*input_panel_geometry_get)       (Ecore_IMF_Context *ctx, int *x, int *y, int *w, int *h);
455         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);
456         void (*input_panel_key_disabled_set)   (Ecore_IMF_Context *ctx, int layout_index, int key_index, Eina_Bool disabled);
457
458         void (*input_panel_reset)              (Ecore_IMF_Context *ctx); /* Same as reset to default property*/
459         Ecore_IMF_Input_Panel_State (*input_panel_state_get)          (Ecore_IMF_Context *ctx);
460
461         /* CallBack APIs  */
462         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);
463         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));
464
465         /* ISF related APIs */
466         int (*ise_get_ise_language)       (Ecore_IMF_Context *ctx, const char* input_panel_name, char*** langlist);
467         int (*ise_set_isf_language)       (Ecore_IMF_Context *ctx, const char* lang);
468         int (*ise_get_active_isename)     (Ecore_IMF_Context *ctx, char* name);       /**< will be deprecated */
469         int (*ise_set_active_ise_by_name) (Ecore_IMF_Context *ctx, const char* name); /**< will be deprecated */
470         int (*ise_set_active_ise_by_uuid) (Ecore_IMF_Context *ctx, const char* uuid); /**< will be deprecated */
471         int (*ise_get_iselist)            (Ecore_IMF_Context *ctx, char*** iselist);  /**< will be deprecated */
472         void (*input_panel_caps_mode_set) (Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Caps_Mode mode);
473
474         void (*preedit_string_with_attributes_get) (Ecore_IMF_Context *ctx, char **str, Eina_List **attrs, int *cursor_pos);
475      };
476
477    struct _Ecore_IMF_Context_Info
478      {
479         const char *id;              /* ID */
480         const char *description;     /* Human readable description */
481         const char *default_locales; /* Languages for which this context is the default, separated by : */
482         const char *canvas_type;     /* The canvas type used by the input method. Eg.: evas */
483         int         canvas_required; /* Whether the canvas usage is required for this input method */
484      };
485
486    EAPI int                           ecore_imf_init(void);
487    EAPI int                           ecore_imf_shutdown(void);
488
489    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));
490
491    EAPI Eina_List                    *ecore_imf_context_available_ids_get(void);
492    EAPI Eina_List                    *ecore_imf_context_available_ids_by_canvas_type_get(const char *canvas_type);
493    EAPI const char                   *ecore_imf_context_default_id_get(void);
494    EAPI const char                   *ecore_imf_context_default_id_by_canvas_type_get(const char *canvas_type);
495    EAPI const Ecore_IMF_Context_Info *ecore_imf_context_info_by_id_get(const char *id);
496
497    EAPI Ecore_IMF_Context            *ecore_imf_context_add(const char *id);
498    EAPI const Ecore_IMF_Context_Info *ecore_imf_context_info_get(Ecore_IMF_Context *ctx);
499    EAPI void                          ecore_imf_context_del(Ecore_IMF_Context *ctx);
500    EAPI void                          ecore_imf_context_client_window_set(Ecore_IMF_Context *ctx, void *window);
501    EAPI void*                         ecore_imf_context_client_window_get(Ecore_IMF_Context *ctx);
502    EAPI void                          ecore_imf_context_client_canvas_set(Ecore_IMF_Context *ctx, void *canvas);
503    EAPI void*                         ecore_imf_context_client_canvas_get(Ecore_IMF_Context *ctx);
504    EINA_DEPRECATED EAPI void          ecore_imf_context_show(Ecore_IMF_Context *ctx);
505    EINA_DEPRECATED EAPI void          ecore_imf_context_hide(Ecore_IMF_Context *ctx);
506    EAPI void                          ecore_imf_context_preedit_string_get(Ecore_IMF_Context *ctx, char **str, int *cursor_pos);
507    EAPI void                          ecore_imf_context_preedit_string_with_attributes_get(Ecore_IMF_Context *ctx, char **str, Eina_List **attrs, int *cursor_pos);
508    EAPI void                          ecore_imf_context_focus_in(Ecore_IMF_Context *ctx);
509    EAPI void                          ecore_imf_context_focus_out(Ecore_IMF_Context *ctx);
510    EAPI void                          ecore_imf_context_reset(Ecore_IMF_Context *ctx);
511    EAPI void                          ecore_imf_context_cursor_position_set(Ecore_IMF_Context *ctx, int cursor_pos);
512    EAPI void                          ecore_imf_context_use_preedit_set(Ecore_IMF_Context *ctx, Eina_Bool use_preedit);
513    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);
514    EINA_DEPRECATED EAPI void          ecore_imf_context_input_mode_set(Ecore_IMF_Context *ctx, Ecore_IMF_Input_Mode input_mode);
515    EINA_DEPRECATED EAPI Ecore_IMF_Input_Mode          ecore_imf_context_input_mode_get(Ecore_IMF_Context *ctx);
516    EAPI Eina_Bool                     ecore_imf_context_filter_event(Ecore_IMF_Context *ctx, Ecore_IMF_Event_Type type, Ecore_IMF_Event *event);
517
518    /* plugin specific functions */
519    EAPI Ecore_IMF_Context            *ecore_imf_context_new(const Ecore_IMF_Context_Class *ctxc);
520    EAPI void                          ecore_imf_context_data_set(Ecore_IMF_Context *ctx, void *data);
521    EAPI void                         *ecore_imf_context_data_get(Ecore_IMF_Context *ctx);
522    EAPI Eina_Bool                     ecore_imf_context_surrounding_get(Ecore_IMF_Context *ctx, char **text, int *cursor_pos);
523    EAPI void                          ecore_imf_context_preedit_start_event_add(Ecore_IMF_Context *ctx);
524    EAPI void                          ecore_imf_context_preedit_end_event_add(Ecore_IMF_Context *ctx);
525    EAPI void                          ecore_imf_context_preedit_changed_event_add(Ecore_IMF_Context *ctx);
526    EAPI void                          ecore_imf_context_commit_event_add(Ecore_IMF_Context *ctx, const char *str);
527    EAPI void                          ecore_imf_context_delete_surrounding_event_add(Ecore_IMF_Context *ctx, int offset, int n_chars);
528
529    /**
530     * Show the current active ISE with given state.
531     * To use this API application should include Ecore_IMF.h header file.
532     * The first parameter i.e Ecore_IMF_Context *ctx is used to map the ecore_imf API into real implemented API which is inside ISF.
533     * @param ctx context used to map real loaded APIs
534     * @ingroup Ecore_IMF_Context_IMControl_Group
535     * @code
536     * #include <Ecore_IMF.h>
537     *
538     * static void entry_application(appdata * ad)
539     * {
540     *     Evas_Object *en;
541     *     en = elm_entry_add(ad->win_main);
542     *     Ecore_IMF_Context *imf_context = elm_entry_imf_context_get(en);
543     *     if(imf_context)
544     *     {    
545     *         // show input panel window
546     *         ecore_imf_context_input_panel_show (imf_context);
547     *     }
548     * }
549     *
550     * @endcode
551     */
552    EAPI void ecore_imf_context_input_panel_show(Ecore_IMF_Context *ctx);
553
554    /**
555     * Hide the current active ISE.
556     * To use this API application should include Ecore_IMF.h header file.
557     * The first parameter i.e Ecore_IMF_Context *ctx is used to map the ecore_imf API into real implemented API which is inside ISF.
558     * @param ctx context used to map real loaded APIs
559     * @ingroup Ecore_IMF_Context_IMControl_Group
560     * @code
561     * #include <Ecore_IMF.h>
562     *
563     * static void button_clicked_cb(void *data, Evas_Object *obj, void *event_info)
564     * {
565     *     Ecore_IMF_Context *imf_context = elm_entry_imf_context_get(obj);
566     *
567     *     if(imf_context)
568     *     {    
569     *         ecore_imf_context_input_panel_hide (imf_context);      
570     *     }
571     * }
572     *
573     * static void entry_application(appdata * ad)
574     * {
575     *     Evas_Object *en;
576     *     en = elm_entry_add(ad->win_main);
577     *     evas_object_smart_callback_add(en, "clicked", button_clicked_cb, NULL);
578     * }
579     *
580     * @endcode
581     */
582    EAPI void ecore_imf_context_input_panel_hide(Ecore_IMF_Context *ctx);
583
584    /**
585     * Show control panel.
586     * @param ctx context used to map real loaded APIs
587     * @ingroup Ecore_IMF_Context_IMControl_Group
588     *
589     * ISE control panel shows ISE list and provides setup of each ISE
590     */
591    EAPI void ecore_imf_context_control_panel_show (Ecore_IMF_Context *ctx);
592
593    /**
594     * Hide control panel.
595     * @param ctx context used to map real loaded APIs
596     * @ingroup Ecore_IMF_Context_IMControl_Group
597     *
598     * ISE control panel shows ISE list and provides setup of each ISE
599     */
600    EAPI void ecore_imf_context_control_panel_hide (Ecore_IMF_Context *ctx);
601
602    /**
603     * Set ISE Language before show ISE.
604     * @param ctx context used to map real loaded APIs
605     * @param lang see Ecore_IMF_Input_Panel_Lang
606     * @ingroup Ecore_IMF_Context_IMControl_Group
607     * THIS API IS NOT SUPPORTED NOW
608     */
609    EAPI void ecore_imf_context_input_panel_language_set (Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Lang lang);
610
611    /**
612     * Get ISE Language of current active ISE.
613     * @param ctx context used to map real loaded APIs
614     * @return Ecore_IMF_Input_Panel_Lang
615     * @ingroup Ecore_IMF_Context_IMControl_Group
616     * THIS API IS NOT SUPPORTED NOW
617     */
618    EAPI Ecore_IMF_Input_Panel_Lang ecore_imf_context_input_panel_language_get (Ecore_IMF_Context *ctx);
619
620    /**
621     * Set keyboard language.
622     * @param ctx context used to map real loaded APIs
623     * @param lang see Ecore_IMF_Input_Panel_Lang
624     * @ingroup Ecore_IMF_Context_IMControl_Group
625     * THIS API IS NOT SUPPORTED NOW
626     */
627    EAPI void ecore_imf_context_keyboard_language_set (Ecore_IMF_Context *ctx, Ecore_IMF_Keyboard_Lang lang);
628
629    /**
630     * Get keyboard language.
631     * @param ctx context used to map real loaded APIs
632     * @return Ecore_IMF_Input_Panel_Lang
633     * @ingroup Ecore_IMF_Context_IMControl_Group
634     * THIS API IS NOT SUPPORTED NOW
635     */
636    EAPI Ecore_IMF_Keyboard_Lang ecore_imf_context_keyboard_language_get (Ecore_IMF_Context *ctx);
637
638    /**
639     * Get ISE Language of given ISE. -- Not supported for now --
640     * @ingroup Ecore_IMF_Context_IMControl_Group
641     */
642    EAPI int ecore_imf_context_ise_get_ise_language (Ecore_IMF_Context *ctx, const char* ise_name, char ***langlist);
643
644    /**
645     * Set ISF Language. -- Not supported for now --
646     * @ingroup Ecore_IMF_Context_IMControl_Group
647     */
648    EAPI void ecore_imf_context_ise_set_isf_language (Ecore_IMF_Context *ctx, const char* lang);
649
650    /**
651     * Set ISE Specific data before show ISE.
652     * To use this API application should include Ecore_IMF.h header file.
653     * The first parameter i.e Ecore_IMF_Context *ctx is used to map the ecore_imf API into real implemented API which is inside ISF.
654     * @param ctx context used to map real loaded APIs
655     * @param data data pointer
656     * @param len data length
657     * @ingroup Ecore_IMF_Context_IMControl_Group
658     *
659     * this API is used by applications to deliver specific data to ISE. 
660     * the data format MUST be negotiated by both application and ISE negotiate.
661     *
662     * @code
663     * #include <Ecore_IMF.h>
664     *
665     * static void create_entry(struct appdata *ad)
666     * {
667     *     char *im_data="application sample imdata";
668     *     Evas_Object *en;
669     *
670     *     en = elm_entry_add(ad->layout_main);
671     *     elm_layout_content_set(ad->layout_main, "entry", en);
672     *
673     *     Ecore_IMF_Context *imf_context = elm_entry_imf_context_get(en);
674     *     
675     *     if (imf_context)
676     *     {    
677     *         ecore_imf_context_input_panel_imdata_set (imf_context, im_data, strlen(im_data)+1);
678     *     }
679     * }
680     * @endcode
681     */
682    EAPI void ecore_imf_context_input_panel_imdata_set       (Ecore_IMF_Context *ctx, const char * data, int len);
683
684    /**
685     * Get ISE Specific data of current active ISE.
686     * To use this API application should include Ecore_IMF.h header file.
687     * The first parameter i.e Ecore_IMF_Context *ctx is used to map the ecore_imf API into real implemented API which is inside ISF.
688     * @param ctx context used to map real loaded APIs
689     * @param data data pointer
690     * @param len data length
691     * @ingroup Ecore_IMF_Context_IMControl_Group
692     * @code
693     * #include <Ecore_IMF.h>
694     *
695     * static void create_entry(struct appdata *ad)
696     * {
697     *     int len = 256;
698     *     char *im_data = (char*) malloc (len);
699     *
700     *     Ecore_IMF_Context *imf_context = elm_entry_imf_context_get(ad->entry);
701     *     
702     *     if (imf_context)
703     *     {    
704     *         ecore_imf_context_input_panel_imdata_get (imf_context, im_data, &len);
705     *     }
706     *
707     *     free(im_data);
708     * }
709     * @endcode
710     */
711    EAPI void ecore_imf_context_input_panel_imdata_get       (Ecore_IMF_Context *ctx, char *data, int *len);
712
713    /**
714     * Set ISE whether animation effect is shown or not.
715     * To use this API application should include Ecore_IMF.h header file.
716     * The first parameter i.e Ecore_IMF_Context *ctx is used to map the ecore_imf API into real implemented API which is inside ISF.
717     * @param ctx context used to map real loaded APIs
718     * @param use_effect whether animation effect is shown or not
719     * @ingroup Ecore_IMF_Context_IMControl_Group
720     *
721     * this API is used by applications to deliver specific data to ISE. 
722     * the data format MUST be negotiated by both application and ISE negotiate.
723     *
724     * @code
725     * #include <Ecore_IMF.h>
726     *
727     * static void create_entry(struct appdata *ad)
728     * {
729     *     Evas_Object *en;
730     *
731     *     en = elm_entry_add(ad->layout_main);
732     *     elm_layout_content_set(ad->layout_main, "entry", en);
733     *
734     *     Ecore_IMF_Context *imf_context = elm_entry_imf_context_get(en);
735     *     
736     *     if (imf_context)
737     *     {    
738     *         ecore_imf_context_input_panel_use_effect_set (imf_context, EINA_FALSE); // turn off the animation effect when input panel is appeared.
739     *     }
740     * }
741     * @endcode
742     */
743    EAPI void ecore_imf_context_input_panel_use_effect_set           (Ecore_IMF_Context *ctx, Eina_Bool use_effect);
744
745    /**
746     * Get whether ISE supports animation effect or not when it is shown or hidden.
747     * To use this API application should include Ecore_IMF.h header file.
748     * The first parameter i.e Ecore_IMF_Context *ctx is used to map the ecore_imf API into real implemented API which is inside ISF.
749     * @param ctx context used to map real loaded APIs
750     * @param use_effect whether animation effect is shown or not
751     * @ingroup Ecore_IMF_Context_IMControl_Group
752     *
753     * this API is used by applications to deliver specific data to ISE. 
754     * the data format MUST be negotiated by both application and ISE negotiate.
755     *
756     * @code
757     * #include <Ecore_IMF.h>
758     *
759     * static Eina_Bool get_effect_info(struct appdata *ad)
760     * {
761     *     Eina_Bool use_effect = EINA_TRUE;
762     *
763     *     Ecore_IMF_Context *imf_context = elm_entry_imf_context_get(ad->entry);
764     *     
765     *     if (imf_context)
766     *     {    
767     *         use_effect = ecore_imf_context_input_panel_use_effect_get (imf_context); 
768     *     }
769     *
770     *     return use_effect;
771     * }
772     * @endcode
773     */
774    EAPI Eina_Bool ecore_imf_context_input_panel_use_effect_get      (Ecore_IMF_Context *ctx);
775
776    /**
777     * Get ISE position of current active ISE. 
778     * To use this API application should include Ecore_IMF.h header file.
779     * The first parameter i.e Ecore_IMF_Context *ctx is used to map the ecore_imf API into real implemented API which is inside ISF.
780     * @param ctx context used to map real loaded APIs
781     * @param x top-left x co-ordinate of rectangle;
782     * @param y top-left y co-ordinate of rectangle;
783     * @param w width of rectangle ;
784     * @param h height of rectangle;
785     * @ingroup Ecore_IMF_Context_IMControl_Group
786     * @code
787     * #include <Ecore_IMF.h>
788     *
789     * int get_geometry(struct appdata *ad)
790     * {
791     *    Ecore_IMF_Context *imf_context = NULL;
792     *    int x, y, w, h;   
793     *    imf_context = elm_entry_imf_context_get (ad->entry);
794     *    if (imf_context)
795     *    {
796     *        ecore_imf_context_input_panel_geometry_get (imf_context, &x, &y, &w, &h);
797     *        //here application can get window size rect 
798     *        printf ("x=%d \n", x);
799     *        printf ("y=%d \n", y);
800     *        printf ("width=%d \n", w);
801     *        printf ("height=%d \n", h);
802     *    }
803     * @endcode
804     */
805    EAPI void ecore_imf_context_input_panel_geometry_get  (Ecore_IMF_Context *ctx, int *x, int *y, int *w, int *h);
806
807    /**
808     * Set ISE private key before show ISE.
809     * To use this API application should include Ecore_IMF.h header file.
810     * The first parameter i.e Ecore_IMF_Context *ctx is used to map the ecore_imf API into real implemented API which is inside ISF.
811     * Since the second parameter of this API requires a layout index, so before using this API application has to set a specific layout and that layout index 
812     * should be passed in the 2nd argument of this API(see sample code).
813     * @param ctx context used to map real loaded APIs
814     * @param layout_index index of layout page to be set
815     * @param key_index index of key to be set
816     * @param label text label to be appeared on private key
817     * @param value value of key, If NULL it will use original value of key
818     * @ingroup Ecore_IMF_Context_IMControl_Group
819     * @code
820     *
821     * #include <Ecore_IMF.h>
822     *
823     * static void create_entry(struct appdata *ad)
824     * {
825     *     Evas_Object *en;
826     *
827     *     en = elm_entry_add(ad->layout_main);
828     *
829     *     Ecore_IMF_Context *imf_context = elm_entry_imf_context_get(en);
830     *     
831     *     if (imf_context)
832     *     {    
833     *         ecore_imf_context_input_panel_private_key_set (imf_context, layout, 0, NULL, "www", -1, "www");
834     *     }
835     * }
836     * @endcode
837     */
838    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);
839
840    EAPI Eina_List *ecore_imf_context_input_panel_private_key_list_get  (Ecore_IMF_Context *ctx);
841
842    /**
843     * Set ISE Layout before show ISE.
844     * To use this API application should include Ecore_IMF.h header file.
845     * The first parameter i.e Ecore_IMF_Context *ctx is used to map the ecore_imf API into real implemented API which is inside ISF.
846     * @param ctx context used to map real loaded APIs
847     * @param layout see ECORE_IMF_INPUT_PANEL_LAYOUT
848     * @ingroup Ecore_IMF_Context_IMControl_Group
849     * @code
850     * #include <Ecore_IMF.h>
851     *
852     * static void create_entry(struct appdata *ad)
853     * {
854     *     en = elm_entry_add(ad->layout_main);
855     *     Ecore_IMF_Context *imf_context = elm_entry_imf_context_get(en);
856     *     
857     *     if (imf_context)
858     *     {    
859     *         ecore_imf_context_input_panel_layout_set (imf_context, ECORE_IMF_INPUT_PANEL_LAYOUT_EMAIL);
860     *     }
861     * }
862     * @endcode
863     */
864    EAPI void ecore_imf_context_input_panel_layout_set  (Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Layout layout);
865
866    /**
867     * Get ISE Layout of current active ISE.
868     * To use this API application should include Ecore_IMF.h header file.
869     * The first parameter i.e Ecore_IMF_Context *ctx is used to map the ecore_imf API into real implemented API which is inside ISF.
870     * @param ctx context used to map real loaded APIs
871     * @return layout see ECORE_IMF_INPUT_PANEL_LAYOUT
872     * @ingroup Ecore_IMF_Context_IMControl_Group
873     * @code
874     * #include <Ecore_IMF.h>
875     *
876     * static void layout_get(struct appdata *ad)
877     * {
878     *     Ecore_IMF_Context *imf_context = elm_entry_imf_context_get(ad->entry);
879     *     
880     *     if (imf_context)
881     *     {    
882     *         layout = ecore_imf_context_input_panel_layout_get (imf_context); 
883     *     }
884     * }
885     * @endcode
886     */
887    EAPI Ecore_IMF_Input_Panel_Layout ecore_imf_context_input_panel_layout_get  (Ecore_IMF_Context *ctx);
888
889    /**
890     * Reset ISE Context including its Style. 
891     * To use this API application should include Ecore_IMF.h header file.
892     * The first parameter i.e Ecore_IMF_Context *ctx is used to map the ecore_imf API into real implemented API which is inside ISF.
893     * This is special function that should be called before calling any ecore_imf_context_set*** APIs to restore all default properties of ISE.
894     * @ingroup Ecore_IMF_Context_IMControl_Group
895     *
896     * NOTE: This API MUST be called before calling ecore_imf_context_input_panel_show().
897     */
898    EAPI void ecore_imf_context_input_panel_reset       (Ecore_IMF_Context *ctx);        /* Same as reset to default property*/
899
900    /**
901     * Set ISE screen orientation.
902     * To use this API application should include Ecore_IMF.h header file.
903     * The first parameter i.e Ecore_IMF_Context *ctx is used to map the ecore_imf API into real implemented API which is inside ISF.
904     * To show the keypad in landscape mode application should first call this API with 2nd parameter as 90 or 270.
905     * After then only application should call ecore_imf_context_input_panel_show() function.
906     * @ingroup Ecore_IMF_Context_IMControl_Group
907     * @code
908     * #include <Ecore_IMF.h>
909     *
910     * static void create_entry(struct appdata *ad)
911     * {
912     *     en = elm_entry_add(ad->layout_main);
913     *     elm_layout_content_set(ad->layout_main, "entry", en);
914     *
915     *     Ecore_IMF_Context *imf_context = elm_entry_imf_context_get(en);
916     *     int degree = 90; // the degree value can be either 90/270 for landscape mode and normal portrait mode 0/360.
917     *       
918     *     if (imf_context)
919     *     {    
920     *         // the orient value can be 
921     *         // ECORE_IMF_INPUT_PANEL_ORIENT_NONE,
922     *         // ECORE_IMF_INPUT_PANEL_ORIENT_90_CW // Clockwise
923     *         // ECORE_IMF_INPUT_PANEL_ORIENT_180, 
924     *         // ECORE_IMF_INPUT_PANEL_ORIENT_90_CCW // CounterClockwise
925     *         ecore_imf_context_input_panel_orient_set(imf_context, ECORE_IMF_INPUT_PANEL_ORIENT_90_CW); 
926     *     }
927     * }
928     */
929    EAPI void ecore_imf_context_input_panel_orient_set (Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Orient  orientation);
930
931    /**
932     * Get Input panel orientation.
933     * To use this API application should include Ecore_IMF.h header file.
934     * The first parameter i.e Ecore_IMF_Context *ctx is used to map the ecore_imf API into real implemented API which is inside ISF.
935     * To show the keypad in landscape mode application should first call this API with 2nd parameter as 90 or 270.
936     * After then only application should call ecore_imf_context_input_panel_show() function.
937     * @ingroup Ecore_IMF_Context_IMControl_Group
938     * @code
939     * #include <Ecore_IMF.h>
940
941     * void get_orient (struct appdata *ad)
942     * {
943     *     Ecore_IMF_Input_Panel_Orient orient;
944     *     ad->entry = elm_entry_add(ad->layout_main);
945     *     elm_entry_input_panel_layout_set(ad->entry, ELM_INPUT_PANEL_LAYOUT_URL);
946     *     imf_context = elm_entry_imf_context_get (ad->entry);
947     *     if (imf_context)
948     *     {
949     *         orient = ecore_imf_context_input_panel_orient_get (imf_context);
950     *     }
951     * 
952     *     switch (orient)
953     *     {
954     *     case ECORE_IMF_INPUT_PANEL_ORIENT_NONE:
955     *         printf("0 degree\n");
956     *         break;
957     *     case ECORE_IMF_INPUT_PANEL_ORIENT_90_CW:
958     *         printf("90 degree clockwise\n");
959     *         break;
960     *     case ECORE_IMF_INPUT_PANEL_ORIENT_180:
961     *         printf("90 degree clockwise\n");
962     *         break;
963     *     case ECORE_IMF_INPUT_PANEL_ORIENT_90_CCW:
964     *         printf("90 degree counter-clockwise\n");
965     *         break;
966     *     }
967     * }
968     */
969
970    EAPI Ecore_IMF_Input_Panel_Orient ecore_imf_context_input_panel_orient_get (Ecore_IMF_Context *ctx);
971
972    /**
973     * Get name of current active ISE.
974     * To use this API application should include Ecore_IMF.h header file.
975     * The first parameter i.e Ecore_IMF_Context *ctx is used to map the ecore_imf API into real implemented API which is inside ISF.
976     * @param ctx context used to map real loaded APIs
977     * @param name ISE name to be got
978     * @ingroup Ecore_IMF_Context_IMControl_Group
979     * @code
980     * #include <Ecore_IMF.h>
981     *
982     * static void create_entry(struct appdata *ad)
983     * {
984     *     int len = 256;
985     *     char *isename = (char*) malloc (len);
986     *     memset(isename, '\0', sizeof(isename));
987     *
988     *     Ecore_IMF_Context *imf_context = NULL;
989     *     imf_context = elm_entry_imf_context_get(obj);
990     *     
991     *     if (imf_context)
992     *     {    
993     *         ecore_imf_context_ise_get_active_isename (imf_context, isename);
994     *         printf("get isename=[%s]\n", isename);
995     *     }
996     * }
997     * @endcode
998     */
999    EAPI void ecore_imf_context_ise_get_active_isename     (Ecore_IMF_Context *ctx, char* name);
1000
1001    /**
1002     * Set ISE by its name.
1003     * To use this API application should include Ecore_IMF.h header file.
1004     * Before calling this API, every application should call ecore_imf_init() to initialize the ecore_imf shared library.
1005     * The first parameter i.e Ecore_IMF_Context *ctx is used to map the ecore_imf API into real implemented API which is inside ISF.
1006     * @param ctx context used to map real loaded APIs
1007     * @param name ISE name to be set
1008     * @ingroup Ecore_IMF_Context_IMControl_Group
1009     * @code
1010     * #include <Ecore_IMF.h>
1011     *
1012     * static void create_entry(struct appdata *ad)
1013     * {
1014     *     ecore_imf_init();
1015     *     
1016     *     Ecore_IMF_Context *imf_context = elm_entry_imf_context_get(obj);
1017     *     
1018     *     if (imf_context)
1019     *     {    
1020     *         ecore_imf_context_ise_set_active_ise_by_name (imf_context, "Input Pad");
1021     *     }
1022     *
1023     *     //do imf related things
1024     * 
1025     *     ecore_imf_shutdown();
1026     * 
1027     *     //do imf irrelated things
1028     * }
1029     * @endcode
1030     */
1031    EAPI void ecore_imf_context_ise_set_active_ise_by_name (Ecore_IMF_Context *ctx, const char* name);
1032
1033    /**
1034     * Set ISE by its uuid.
1035     * To use this API application should include Ecore_IMF.h header file.
1036     * Before calling this API, every application should call ecore_imf_init() to initialize the ecore_imf shared library.
1037     * The first parameter i.e Ecore_IMF_Context *ctx is used to map the ecore_imf API into real implemented API which is inside ISF.
1038     * @param ctx context used to map real loaded APIs
1039     * @param uuid ISE uuid to be set
1040     * @ingroup Ecore_IMF_Context_IMControl_Group
1041     * @code
1042     * #include <Ecore_IMF.h>
1043     *
1044     * static void create_entry(struct appdata *ad)
1045     * {
1046     *     Ecore_IMF_Context *imf_context = elm_entry_imf_context_get(obj);
1047     *     
1048     *     if (imf_context)
1049     *     {    
1050     *         ecore_imf_context_ise_set_active_ise_by_uuid (imf_context, "ff110940-b8f0-4062-9ff6-a84f4f3575c0");
1051     *         ecore_imf_context_input_panel_show (imf_context);
1052     *     }
1053     * }
1054     * @endcode
1055     */
1056    EAPI void ecore_imf_context_ise_set_active_ise_by_uuid (Ecore_IMF_Context *ctx, const char* uuid);
1057
1058    /**
1059     * Get list of ISEs.
1060     * To use this API application should include Ecore_IMF.h header file.
1061     * Before calling this API, every application should call ecore_imf_init() to initialize the ecore_imf shared library.
1062     * The first parameter i.e Ecore_IMF_Context *ctx is used to map the ecore_imf API into real implemented API which is inside ISF.
1063     * @param ctx context used to map real loaded APIs
1064     * @param iselist pointer to the list to be got.
1065     * @return  int ise counter of iselist
1066     * @ingroup Ecore_IMF_Context_IMControl_Group
1067     * @code
1068     * #include <Ecore_IMF.h>
1069     *
1070     * static void create_entry(struct appdata *ad)
1071     * {
1072     *     ecore_imf_init();
1073     *
1074     *     Ecore_IMF_Context *imf_context = elm_entry_imf_context_get(obj);
1075     *     
1076     *     if (imf_context)
1077     *     {    
1078     *         char** iselist;
1079     *         int count,i;
1080     *         count = ecore_imf_context_input_panel_get_iselist(imf_context, &iselist);
1081     *         printf("get_iselist : count[%d] ", count);
1082     *         for (i=0;i<count;i++)
1083     *             printf("[%d:%s] ", i, iselist[i]);
1084     *     }
1085     *
1086     *     //do imf related things
1087     * 
1088     *     ecore_imf_shutdown();
1089     * 
1090     *     //do imf irrelated things
1091     * }
1092     * @endcode
1093     */
1094    EAPI int ecore_imf_context_ise_get_iselist (Ecore_IMF_Context *ctx, char*** iselist);
1095
1096    /**
1097     * Get state of current active ISE.
1098     * To use this API application should include Ecore_IMF.h header file.
1099     * Before calling this API, every application should call ecore_imf_init() to initialize the ecore_imf shared library.
1100     * The first parameter i.e Ecore_IMF_Context *ctx is used to map the ecore_imf API into real implemented API which is inside ISF.
1101     * @param ctx context used to map real loaded APIs
1102     * @param state see ISE_STATE
1103     * @ingroup Ecore_IMF_Context_IMControl_Group
1104     * @code
1105     * #include <Ecore_IMF.h>
1106     *
1107     * static void input_panel_state_get(struct appdata *ad)
1108     * {
1109     *     Ecore_IMF_Input_Panel_State state;
1110     *
1111     *     Ecore_IMF_Context *imf_context = elm_entry_imf_context_get(ad->entry);
1112     *     
1113     *     if (imf_context)
1114     *     {    
1115     *         state = ecore_imf_context_input_panel_state_get (imf_context); 
1116     *         //here u can see what the current state is
1117     *         printf("the current state of ISE is %d", state);
1118     *     }
1119     * }
1120     * @endcode
1121     */
1122    EAPI Ecore_IMF_Input_Panel_State ecore_imf_context_input_panel_state_get (Ecore_IMF_Context *ctx);
1123
1124    /**
1125     * Application can register a callback function which will be called if there is change in ise state,language,mode etc. 
1126     * To use this API application should include Ecore_IMF.h header file.
1127     * The first parameter i.e Ecore_IMF_Context *ctx is used to map the ecore_imf API into real implemented API which is inside ISF.
1128     * @param ctx context used to map real loaded APIs.
1129     * @param pEventCallback the callback function to be called 
1130     * @param data application-ISE specific data.
1131     * @return an integer unique to callabck registered.
1132     * @ingroup Ecore_IMF_Context_IMControl_Group
1133     * @code
1134     * #include <Ecore_IMF.h>
1135     *
1136     * void _input_panel_event_callback(void *data, Ecore_IMF_Context *ctx, int value)
1137     * {
1138     *     if(value == ECORE_IMF_INPUT_PANEL_STATE_SHOW) {
1139     *         // ISE state has changed to ECORE_IMF_INPUT_PANEL_STATE_SHOW status
1140     *     } else if(value == ECORE_IMF_INPUT_PANEL_STATE_HIDE) {
1141     *         // ISE state has changed to ECORE_IMF_INPUT_PANEL_STATE_HIDE status
1142     *     }
1143     *     printf("value: %d\n", value);
1144     * }
1145     *
1146     * static void create_entry(struct appdata *ad)
1147     * {
1148     *     Evas_Object *en;
1149     *     en = elm_entry_add(ad->layout_main);
1150     *     elm_layout_content_set(ad->layout_main, "entry", en);
1151     * 
1152     *     Ecore_IMF_Context *imf_context = elm_entry_imf_context_get(en);
1153     *     
1154     *     if (imf_context)
1155     *     {    
1156     *         ecore_imf_context_input_panel_event_callback_add (imf_context, ECORE_IMF_INPUT_PANEL_STATE_EVENT, _input_panel_event_callback, data);
1157     *     }
1158     * }
1159     * @endcode
1160     * In order to deregister the callback function registered application should follow the below step.
1161     * ecore_imf_context_input_panel_event_callback_del (imf_context, ECORE_IMF_INPUT_PANEL_STATE_EVENT, _ise_event_callback);
1162     */
1163    EAPI void ecore_imf_context_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), const void *data);
1164
1165    EAPI void ecore_imf_context_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));
1166
1167    /**
1168     * Set the key to be disabled.
1169     * To use this API application should include Ecore_IMF.h header file.
1170     * The first parameter i.e Ecore_IMF_Context *ctx is used to map the ecore_imf API into real implemented API which is inside ISF.
1171     * Since the second parameter of this API requires a layout index, so before using this API application has to set a specific layout and that layout index 
1172     * should be passed in the 2nd argument of this API(see sample code).
1173     * @param ctx context used to map real loaded APIs
1174     * @param layout_index index of layout page to be set
1175     * @param key_index index of key to be set
1176     * @param disabled The state
1177     * @ingroup Ecore_IMF_Context_IMControl_Group
1178     * @code
1179     * #include <Ecore_IMF.h>
1180     *
1181     * static void create_entry(struct appdata *ad)
1182     * {
1183     *     Evas_Object *en;
1184     *     en = elm_entry_add(ad->layout_main);
1185     *     Ecore_IMF_Context *imf_context = elm_entry_imf_context_get(en);
1186     *     
1187     *     if (imf_context)
1188     *     {    
1189     *         ecore_imf_context_input_panel_key_disabled_set (imf_context, layout, ECORE_IMF_INPUT_PANEL_KEY_SPACE, EINA_TRUE);
1190     *     }
1191     * }
1192     * @endcode
1193     */
1194    EAPI void ecore_imf_context_input_panel_key_disabled_set (Ecore_IMF_Context *ctx, int layout_index, int key_index, Eina_Bool disabled);
1195
1196    EAPI Eina_List *ecore_imf_context_input_panel_key_disabled_list_get (Ecore_IMF_Context *ctx);
1197
1198    EAPI Eina_List *ecore_imf_context_input_panel_event_callback_list_get (Ecore_IMF_Context *ctx);
1199
1200    /**
1201     * Move the soft keyboard to the new position.
1202     * To use this API application should include Ecore_IMF.h header file.
1203     * The first parameter i.e Ecore_IMF_Context *ctx is used to map the ecore_imf API into real implemented API which is inside ISF.
1204     * Since the second parameter of this API requires a layout index, so before using this API application has to set a specific layout and that layout index 
1205     * should be passed in the 2nd argument of this API(see sample code).
1206     * @param ctx context used to map real loaded APIs
1207     * @param x X position to move the virtual keyboard to
1208     * @param y Y position to move the virtual keyboard to
1209     * @ingroup Ecore_IMF_Context_IMControl_Group
1210     * @code
1211     * #include <Ecore_IMF.h>
1212     *
1213     * static void create_entry(struct appdata *ad)
1214     * {
1215     *     Ecore_IMF_Context *imf_context = elm_entry_imf_context_get(obj);
1216     *     
1217     *     if (imf_context)
1218     *     {    
1219     *         ecore_imf_context_input_panel_move (imf_context, 0, 400);
1220     *     }
1221     * }
1222     * @endcode
1223     */
1224    EAPI void ecore_imf_context_input_panel_move (Ecore_IMF_Context *ctx, int x, int y);
1225
1226    EAPI void ecore_imf_context_input_panel_caps_mode_set (Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Caps_Mode mode);
1227
1228    /* The following entry points must be exported by each input method module
1229     */
1230
1231    /*
1232     * int                imf_module_init   (const Ecore_IMF_Context_Info **info);
1233     * void               imf_module_exit   (void);
1234     * Ecore_IMF_Context *imf_module_create (void);
1235     */
1236
1237 #ifdef __cplusplus
1238 }
1239 #endif
1240
1241 #endif
1242
1243 /* vim:set ts=8 sw=3 sts=3 expandtab cino=>5n-2f0^-2{2(0W1st0 :*/