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