aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/ecore/src/lib/ecore_imf
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/ecore/src/lib/ecore_imf')
-rw-r--r--libraries/ecore/src/lib/ecore_imf/Ecore_IMF.h526
-rw-r--r--libraries/ecore/src/lib/ecore_imf/Makefile.am28
-rw-r--r--libraries/ecore/src/lib/ecore_imf/Makefile.in836
-rw-r--r--libraries/ecore/src/lib/ecore_imf/ecore_imf.c73
-rw-r--r--libraries/ecore/src/lib/ecore_imf/ecore_imf_context.c1718
-rw-r--r--libraries/ecore/src/lib/ecore_imf/ecore_imf_module.c212
-rw-r--r--libraries/ecore/src/lib/ecore_imf/ecore_imf_private.h84
7 files changed, 0 insertions, 3477 deletions
diff --git a/libraries/ecore/src/lib/ecore_imf/Ecore_IMF.h b/libraries/ecore/src/lib/ecore_imf/Ecore_IMF.h
deleted file mode 100644
index 1757d79..0000000
--- a/libraries/ecore/src/lib/ecore_imf/Ecore_IMF.h
+++ /dev/null
@@ -1,526 +0,0 @@
1#ifndef _ECORE_IMF_H
2#define _ECORE_IMF_H
3
4#include <Eina.h>
5
6#ifdef EAPI
7# undef EAPI
8#endif
9
10#ifdef _WIN32
11# ifdef EFL_ECORE_IMF_BUILD
12# ifdef DLL_EXPORT
13# define EAPI __declspec(dllexport)
14# else
15# define EAPI
16# endif /* ! DLL_EXPORT */
17# else
18# define EAPI __declspec(dllimport)
19# endif /* ! EFL_ECORE_IMF_BUILD */
20#else
21# ifdef __GNUC__
22# if __GNUC__ >= 4
23# define EAPI __attribute__ ((visibility("default")))
24# else
25# define EAPI
26# endif
27# else
28# define EAPI
29# endif
30#endif /* ! _WIN32 */
31
32#ifdef __cplusplus
33extern "C" {
34#endif
35
36/**
37 * @addtogroup Ecore_IMF_Context_Group
38 *
39 * @{
40 */
41
42/* Events sent by the Input Method */
43typedef struct _Ecore_IMF_Event_Preedit_Start Ecore_IMF_Event_Preedit_Start;
44typedef struct _Ecore_IMF_Event_Preedit_End Ecore_IMF_Event_Preedit_End;
45typedef struct _Ecore_IMF_Event_Preedit_Changed Ecore_IMF_Event_Preedit_Changed;
46typedef struct _Ecore_IMF_Event_Commit Ecore_IMF_Event_Commit;
47typedef struct _Ecore_IMF_Event_Delete_Surrounding Ecore_IMF_Event_Delete_Surrounding;
48
49/* Events to filter */
50typedef struct _Ecore_IMF_Event_Mouse_Down Ecore_IMF_Event_Mouse_Down;
51typedef struct _Ecore_IMF_Event_Mouse_Up Ecore_IMF_Event_Mouse_Up;
52typedef struct _Ecore_IMF_Event_Mouse_In Ecore_IMF_Event_Mouse_In;
53typedef struct _Ecore_IMF_Event_Mouse_Out Ecore_IMF_Event_Mouse_Out;
54typedef struct _Ecore_IMF_Event_Mouse_Move Ecore_IMF_Event_Mouse_Move;
55typedef struct _Ecore_IMF_Event_Mouse_Wheel Ecore_IMF_Event_Mouse_Wheel;
56typedef struct _Ecore_IMF_Event_Key_Down Ecore_IMF_Event_Key_Down;
57typedef struct _Ecore_IMF_Event_Key_Up Ecore_IMF_Event_Key_Up;
58typedef union _Ecore_IMF_Event Ecore_IMF_Event;
59
60typedef struct _Ecore_IMF_Context Ecore_IMF_Context; /**< An Input Method Context */
61typedef struct _Ecore_IMF_Context_Class Ecore_IMF_Context_Class; /**< An Input Method Context class */
62typedef struct _Ecore_IMF_Context_Info Ecore_IMF_Context_Info; /**< An Input Method Context info */
63
64/* Preedit attribute info */
65typedef struct _Ecore_IMF_Preedit_Attr Ecore_IMF_Preedit_Attr;
66
67EAPI extern int ECORE_IMF_EVENT_PREEDIT_START;
68EAPI extern int ECORE_IMF_EVENT_PREEDIT_END;
69EAPI extern int ECORE_IMF_EVENT_PREEDIT_CHANGED;
70EAPI extern int ECORE_IMF_EVENT_COMMIT;
71EAPI extern int ECORE_IMF_EVENT_DELETE_SURROUNDING;
72
73typedef void (*Ecore_IMF_Event_Cb) (void *data, Ecore_IMF_Context *ctx, void *event_info);
74
75/**
76 * @enum _Ecore_IMF_Callback_Type
77 * @typedef Ecore_IMF_Callback_Type
78 *
79 * Ecore IMF Event callback types.
80 *
81 * @see ecore_imf_context_event_callback_add()
82 */
83typedef enum
84{
85 ECORE_IMF_CALLBACK_PREEDIT_START, /**< "PREEDIT_START" is called when a new preediting sequence starts. */
86 ECORE_IMF_CALLBACK_PREEDIT_END, /**< "PREEDIT_END" is called when a preediting sequence has been completed or canceled. */
87 ECORE_IMF_CALLBACK_PREEDIT_CHANGED, /**< "PREEDIT_CHANGED" is called whenever the preedit sequence currently being entered has changed. */
88 ECORE_IMF_CALLBACK_COMMIT, /**< "COMMIT" is called when a complete input sequence has been entered by the user */
89 ECORE_IMF_CALLBACK_DELETE_SURROUNDING /**< "DELETE_SURROUNDING" is called when the input method needs to delete all or part of the context surrounding the cursor */
90} Ecore_IMF_Callback_Type;
91
92/**
93 * @enum _Ecore_IMF_Event_Type
94 * @typedef Ecore_IMF_Event_Type
95 *
96 * Ecore IMF event types.
97 *
98 * @see ecore_imf_context_filter_event()
99 */
100typedef enum
101{
102 ECORE_IMF_EVENT_MOUSE_DOWN, /**< Mouse Down event */
103 ECORE_IMF_EVENT_MOUSE_UP, /**< Mouse Up event */
104 ECORE_IMF_EVENT_MOUSE_IN, /**< Mouse In event */
105 ECORE_IMF_EVENT_MOUSE_OUT, /**< Mouse Out event */
106 ECORE_IMF_EVENT_MOUSE_MOVE, /**< Mouse Move event */
107 ECORE_IMF_EVENT_MOUSE_WHEEL, /**< Mouse Wheel event */
108 ECORE_IMF_EVENT_KEY_DOWN, /**< Key Down event */
109 ECORE_IMF_EVENT_KEY_UP /**< Key Up event */
110} Ecore_IMF_Event_Type;
111
112typedef enum
113{
114 ECORE_IMF_KEYBOARD_MODIFIER_NONE = 0, /**< No active modifiers */
115 ECORE_IMF_KEYBOARD_MODIFIER_CTRL = 1 << 0, /**< "Control" is pressed */
116 ECORE_IMF_KEYBOARD_MODIFIER_ALT = 1 << 1, /**< "Alt" is pressed */
117 ECORE_IMF_KEYBOARD_MODIFIER_SHIFT = 1 << 2, /**< "Shift" is pressed */
118 ECORE_IMF_KEYBOARD_MODIFIER_WIN = 1 << 3 /**< "Win" (between "Ctrl" and "Alt") is pressed */
119} Ecore_IMF_Keyboard_Modifiers;
120
121typedef enum
122{
123 ECORE_IMF_KEYBOARD_LOCK_NONE = 0, /**< No locks are active */
124 ECORE_IMF_KEYBOARD_LOCK_NUM = 1 << 0, /**< "Num" lock is active */
125 ECORE_IMF_KEYBOARD_LOCK_CAPS = 1 << 1, /**< "Caps" lock is active */
126 ECORE_IMF_KEYBOARD_LOCK_SCROLL = 1 << 2 /**< "Scroll" lock is active */
127} Ecore_IMF_Keyboard_Locks;
128
129typedef enum
130{
131 ECORE_IMF_MOUSE_NONE = 0, /**< A single click */
132 ECORE_IMF_MOUSE_DOUBLE_CLICK = 1 << 0, /**< A double click */
133 ECORE_IMF_MOUSE_TRIPLE_CLICK = 1 << 1 /**< A triple click */
134} Ecore_IMF_Mouse_Flags;
135
136typedef enum
137{
138 ECORE_IMF_INPUT_MODE_ALPHA = 1 << 0,
139 ECORE_IMF_INPUT_MODE_NUMERIC = 1 << 1,
140 ECORE_IMF_INPUT_MODE_SPECIAL = 1 << 2,
141 ECORE_IMF_INPUT_MODE_HEXA = 1 << 3,
142 ECORE_IMF_INPUT_MODE_TELE = 1 << 4,
143 ECORE_IMF_INPUT_MODE_FULL = (ECORE_IMF_INPUT_MODE_ALPHA | ECORE_IMF_INPUT_MODE_NUMERIC | ECORE_IMF_INPUT_MODE_SPECIAL),
144 ECORE_IMF_INPUT_MODE_INVISIBLE = 1 << 29,
145 ECORE_IMF_INPUT_MODE_AUTOCAP = 1 << 30
146} Ecore_IMF_Input_Mode;
147
148/**
149 * @enum _Ecore_IMF_Preedit_Type
150 * @typedef Ecore_IMF_Preedit_Type
151 *
152 * Ecore IMF Preedit style types
153 *
154 * @see ecore_imf_context_preedit_string_with_attributes_get()
155 */
156typedef enum
157{
158 ECORE_IMF_PREEDIT_TYPE_NONE, /**< None style */
159 ECORE_IMF_PREEDIT_TYPE_SUB1, /**< Substring style 1 */
160 ECORE_IMF_PREEDIT_TYPE_SUB2, /**< Substring style 2 */
161 ECORE_IMF_PREEDIT_TYPE_SUB3 /**< Substring style 3 */
162} Ecore_IMF_Preedit_Type;
163
164/**
165 * @enum _Ecore_IMF_Autocapital_Type
166 * @typedef Ecore_IMF_Autocapital_Type
167 *
168 * Autocapitalization Types.
169 *
170 * @see ecore_imf_context_autocapital_type_set()
171 */
172typedef enum
173{
174 ECORE_IMF_AUTOCAPITAL_TYPE_NONE, /**< No auto-capitalization when typing */
175 ECORE_IMF_AUTOCAPITAL_TYPE_WORD, /**< Autocapitalize each word typed */
176 ECORE_IMF_AUTOCAPITAL_TYPE_SENTENCE, /**< Autocapitalize the start of each sentence */
177 ECORE_IMF_AUTOCAPITAL_TYPE_ALLCHARACTER, /**< Autocapitalize all letters */
178} Ecore_IMF_Autocapital_Type;
179
180/**
181 * @enum _Ecore_IMF_Input_Panel_Layout
182 * @typedef Ecore_IMF_Input_Panel_Layout
183 *
184 * Input panel (virtual keyboard) layout types.
185 *
186 * @see ecore_imf_context_input_panel_layout_set()
187 */
188typedef enum
189{
190 ECORE_IMF_INPUT_PANEL_LAYOUT_NORMAL, /**< Default layout */
191 ECORE_IMF_INPUT_PANEL_LAYOUT_NUMBER, /**< Number layout */
192 ECORE_IMF_INPUT_PANEL_LAYOUT_EMAIL, /**< Email layout */
193 ECORE_IMF_INPUT_PANEL_LAYOUT_URL, /**< URL layout */
194 ECORE_IMF_INPUT_PANEL_LAYOUT_PHONENUMBER, /**< Phone Number layout */
195 ECORE_IMF_INPUT_PANEL_LAYOUT_IP, /**< IP layout */
196 ECORE_IMF_INPUT_PANEL_LAYOUT_MONTH, /**< Month layout */
197 ECORE_IMF_INPUT_PANEL_LAYOUT_NUMBERONLY, /**< Number Only layout */
198 ECORE_IMF_INPUT_PANEL_LAYOUT_INVALID, /**< Never use this */
199 ECORE_IMF_INPUT_PANEL_LAYOUT_HEX, /**< Hexadecimal layout @since 1.2 */
200 ECORE_IMF_INPUT_PANEL_LAYOUT_TERMINAL, /**< Command-line terminal layout @since 1.2 */
201 ECORE_IMF_INPUT_PANEL_LAYOUT_PASSWORD /**< Like normal, but no auto-correct, no auto-capitalization etc. @since 1.2 */
202} Ecore_IMF_Input_Panel_Layout;
203
204/**
205 * @enum _Ecore_IMF_Input_Panel_Lang
206 * @typedef Ecore_IMF_Input_Panel_Lang
207 *
208 * Input panel (virtual keyboard) language modes.
209 *
210 * @see ecore_imf_context_input_panel_language_set()
211 */
212typedef enum
213{
214 ECORE_IMF_INPUT_PANEL_LANG_AUTOMATIC, /**< Automatic @since 1.2 */
215 ECORE_IMF_INPUT_PANEL_LANG_ALPHABET /**< Alphabet @since 1.2 */
216} Ecore_IMF_Input_Panel_Lang;
217
218/**
219 * @enum _Ecore_IMF_Input_Panel_Return_Key_Type
220 * @typedef Ecore_IMF_Input_Panel_Return_Key_Type
221 *
222 * "Return" Key types on the input panel (virtual keyboard).
223 *
224 * @see ecore_imf_context_input_panel_return_key_type_set()
225 */
226typedef enum
227{
228 ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_DEFAULT, /**< Default @since 1.2 */
229 ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_DONE, /**< Done @since 1.2 */
230 ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_GO, /**< Go @since 1.2 */
231 ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_JOIN, /**< Join @since 1.2 */
232 ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_LOGIN, /**< Login @since 1.2 */
233 ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_NEXT, /**< Next @since 1.2 */
234 ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_SEARCH, /**< Search or magnifier icon @since 1.2 */
235 ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_SEND /**< Send @since 1.2 */
236} Ecore_IMF_Input_Panel_Return_Key_Type;
237
238struct _Ecore_IMF_Event_Preedit_Start
239{
240 Ecore_IMF_Context *ctx;
241};
242
243struct _Ecore_IMF_Event_Preedit_End
244{
245 Ecore_IMF_Context *ctx;
246};
247
248struct _Ecore_IMF_Event_Preedit_Changed
249{
250 Ecore_IMF_Context *ctx;
251};
252
253struct _Ecore_IMF_Event_Commit
254{
255 Ecore_IMF_Context *ctx;
256 char *str;
257};
258
259struct _Ecore_IMF_Event_Delete_Surrounding
260{
261 Ecore_IMF_Context *ctx;
262 int offset;
263 int n_chars;
264};
265
266struct _Ecore_IMF_Event_Mouse_Down
267{
268 int button; /**< The button which has been pressed */
269 struct {
270 int x, y;
271 } output;
272 struct {
273 int x, y;
274 } canvas;
275 Ecore_IMF_Keyboard_Modifiers modifiers; /**< The keyboard modifiers active when the event has been emitted */
276 Ecore_IMF_Keyboard_Locks locks; /**< The keyboard locks active when the event has been emitted */
277 Ecore_IMF_Mouse_Flags flags; /**< The flags corresponding the mouse click (single, double or triple click) */
278 unsigned int timestamp; /**< The timestamp when the event occurred */
279};
280
281struct _Ecore_IMF_Event_Mouse_Up
282{
283 int button; /**< The button which has been pressed */
284 struct {
285 int x, y;
286 } output;
287 struct {
288 int x, y;
289 } canvas;
290 Ecore_IMF_Keyboard_Modifiers modifiers; /**< The keyboard modifiers active when the event has been emitted */
291 Ecore_IMF_Keyboard_Locks locks; /**< The keyboard locks active when the event has been emitted */
292 Ecore_IMF_Mouse_Flags flags; /**< The flags corresponding the mouse click (single, double or triple click) */
293 unsigned int timestamp; /**< The timestamp when the event occurred */
294};
295
296struct _Ecore_IMF_Event_Mouse_In
297{
298 int buttons;
299 struct {
300 int x, y;
301 } output;
302 struct {
303 int x, y;
304 } canvas;
305 Ecore_IMF_Keyboard_Modifiers modifiers; /**< The keyboard modifiers active when the event has been emitted */
306 Ecore_IMF_Keyboard_Locks locks; /**< The keyboard locks active when the event has been emitted */
307 unsigned int timestamp; /**< The timestamp when the event occurred */
308};
309
310struct _Ecore_IMF_Event_Mouse_Out
311{
312 int buttons;
313 struct {
314 int x, y;
315 } output;
316 struct {
317 int x, y;
318 } canvas;
319 Ecore_IMF_Keyboard_Modifiers modifiers; /**< The keyboard modifiers active when the event has been emitted */
320 Ecore_IMF_Keyboard_Locks locks; /**< The keyboard locks active when the event has been emitted */
321 unsigned int timestamp; /**< The timestamp when the event occurred */
322};
323
324struct _Ecore_IMF_Event_Mouse_Move
325{
326 int buttons;
327 struct {
328 struct {
329 int x, y;
330 } output;
331 struct {
332 int x, y;
333 } canvas;
334 } cur, prev;
335 Ecore_IMF_Keyboard_Modifiers modifiers; /**< The keyboard modifiers active when the event has been emitted */
336 Ecore_IMF_Keyboard_Locks locks; /**< The keyboard locks active when the event has been emitted */
337 unsigned int timestamp; /**< The timestamp when the event occurred */
338};
339
340struct _Ecore_IMF_Event_Mouse_Wheel
341{
342 int direction; /* 0 = default up/down wheel */
343 int z; /* ...,-2,-1 = down, 1,2,... = up */
344 struct {
345 int x, y;
346 } output;
347 struct {
348 int x, y;
349 } canvas;
350 Ecore_IMF_Keyboard_Modifiers modifiers; /**< The keyboard modifiers active when the event has been emitted */
351 Ecore_IMF_Keyboard_Locks locks; /**< The keyboard locks active when the event has been emitted */
352 unsigned int timestamp; /**< The timestamp when the event occurred */
353};
354
355struct _Ecore_IMF_Event_Key_Down
356{
357 const char *keyname; /**< The string name of the key pressed */
358 Ecore_IMF_Keyboard_Modifiers modifiers; /**< The keyboard modifiers active when the event has been emitted */
359 Ecore_IMF_Keyboard_Locks locks; /**< The keyboard locks active when the event has been emitted */
360 const char *key; /**< The logical key : (eg shift+1 == exclamation) */
361 const char *string; /**< A UTF8 string if this keystroke has produced a visible string to be ADDED */
362 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 */
363 unsigned int timestamp; /**< The timestamp when the event occurred */
364};
365
366struct _Ecore_IMF_Event_Key_Up
367{
368 const char *keyname; /**< The string name of the key pressed */
369 Ecore_IMF_Keyboard_Modifiers modifiers; /**< The keyboard modifiers active when the event has been emitted */
370 Ecore_IMF_Keyboard_Locks locks; /**< The keyboard locks active when the event has been emitted */
371 const char *key; /**< The logical key : (eg shift+1 == exclamation) */
372 const char *string; /**< A UTF8 string if this keystroke has produced a visible string to be ADDED */
373 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 */
374 unsigned int timestamp; /**< The timestamp when the event occurred */
375};
376
377union _Ecore_IMF_Event
378{
379 Ecore_IMF_Event_Mouse_Down mouse_down;
380 Ecore_IMF_Event_Mouse_Up mouse_up;
381 Ecore_IMF_Event_Mouse_In mouse_in;
382 Ecore_IMF_Event_Mouse_Out mouse_out;
383 Ecore_IMF_Event_Mouse_Move mouse_move;
384 Ecore_IMF_Event_Mouse_Wheel mouse_wheel;
385 Ecore_IMF_Event_Key_Down key_down;
386 Ecore_IMF_Event_Key_Up key_up;
387};
388
389struct _Ecore_IMF_Preedit_Attr
390{
391 Ecore_IMF_Preedit_Type preedit_type; /**< preedit style type */
392 unsigned int start_index; /**< start index of the range (in bytes) */
393 unsigned int end_index; /**< end index of the range (in bytes) */
394};
395
396struct _Ecore_IMF_Context_Class
397{
398 void (*add) (Ecore_IMF_Context *ctx);
399 void (*del) (Ecore_IMF_Context *ctx);
400 void (*client_window_set) (Ecore_IMF_Context *ctx, void *window);
401 void (*client_canvas_set) (Ecore_IMF_Context *ctx, void *canvas);
402 void (*show) (Ecore_IMF_Context *ctx);
403 void (*hide) (Ecore_IMF_Context *ctx);
404 void (*preedit_string_get) (Ecore_IMF_Context *ctx, char **str, int *cursor_pos);
405 void (*focus_in) (Ecore_IMF_Context *ctx);
406 void (*focus_out) (Ecore_IMF_Context *ctx);
407 void (*reset) (Ecore_IMF_Context *ctx);
408 void (*cursor_position_set) (Ecore_IMF_Context *ctx, int cursor_pos);
409 void (*use_preedit_set) (Ecore_IMF_Context *ctx, Eina_Bool use_preedit);
410 void (*input_mode_set) (Ecore_IMF_Context *ctx, Ecore_IMF_Input_Mode input_mode);
411 Eina_Bool (*filter_event) (Ecore_IMF_Context *ctx, Ecore_IMF_Event_Type type, Ecore_IMF_Event *event);
412 void (*preedit_string_with_attributes_get) (Ecore_IMF_Context *ctx, char **str, Eina_List **attrs, int *cursor_pos);
413 void (*prediction_allow_set)(Ecore_IMF_Context *ctx, Eina_Bool prediction);
414 void (*autocapital_type_set)(Ecore_IMF_Context *ctx, Ecore_IMF_Autocapital_Type autocapital_type);
415 void (*control_panel_show) (Ecore_IMF_Context *ctx);
416 void (*control_panel_hide) (Ecore_IMF_Context *ctx);
417 void (*input_panel_layout_set) (Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Layout layout);
418 Ecore_IMF_Input_Panel_Layout (*input_panel_layout_get) (Ecore_IMF_Context *ctx);
419 void (*input_panel_language_set) (Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Lang lang);
420 Ecore_IMF_Input_Panel_Lang (*input_panel_language_get) (Ecore_IMF_Context *ctx);
421 void (*cursor_location_set) (Ecore_IMF_Context *ctx, int x, int y, int w, int h);
422 void (*input_panel_imdata_set)(Ecore_IMF_Context *ctx, const void* data, int len);
423 void (*input_panel_imdata_get)(Ecore_IMF_Context *ctx, void* data, int *len);
424 void (*input_panel_return_key_type_set) (Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Return_Key_Type return_key_type);
425 void (*input_panel_return_key_disabled_set) (Ecore_IMF_Context *ctx, Eina_Bool disabled);
426 void (*input_panel_caps_lock_mode_set) (Ecore_IMF_Context *ctx, Eina_Bool mode);
427};
428
429struct _Ecore_IMF_Context_Info
430{
431 const char *id; /* ID */
432 const char *description; /* Human readable description */
433 const char *default_locales; /* Languages for which this context is the default, separated by : */
434 const char *canvas_type; /* The canvas type used by the input method. Eg.: evas */
435 int canvas_required; /* Whether the canvas usage is required for this input method */
436};
437
438EAPI int ecore_imf_init(void);
439EAPI int ecore_imf_shutdown(void);
440
441EAPI 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));
442
443EAPI Eina_List *ecore_imf_context_available_ids_get(void);
444EAPI Eina_List *ecore_imf_context_available_ids_by_canvas_type_get(const char *canvas_type);
445EAPI const char *ecore_imf_context_default_id_get(void);
446EAPI const char *ecore_imf_context_default_id_by_canvas_type_get(const char *canvas_type);
447EAPI const Ecore_IMF_Context_Info *ecore_imf_context_info_by_id_get(const char *id);
448
449EAPI Ecore_IMF_Context *ecore_imf_context_add(const char *id);
450EAPI const Ecore_IMF_Context_Info *ecore_imf_context_info_get(Ecore_IMF_Context *ctx);
451EAPI void ecore_imf_context_del(Ecore_IMF_Context *ctx);
452EAPI void ecore_imf_context_client_window_set(Ecore_IMF_Context *ctx, void *window);
453EAPI void *ecore_imf_context_client_window_get(Ecore_IMF_Context *ctx);
454EAPI void ecore_imf_context_client_canvas_set(Ecore_IMF_Context *ctx, void *canvas);
455EAPI void *ecore_imf_context_client_canvas_get(Ecore_IMF_Context *ctx);
456EAPI void ecore_imf_context_show(Ecore_IMF_Context *ctx);
457EAPI void ecore_imf_context_hide(Ecore_IMF_Context *ctx);
458EAPI void ecore_imf_context_preedit_string_get(Ecore_IMF_Context *ctx, char **str, int *cursor_pos);
459EAPI void ecore_imf_context_preedit_string_with_attributes_get(Ecore_IMF_Context *ctx, char **str, Eina_List **attrs, int *cursor_pos);
460EAPI void ecore_imf_context_focus_in(Ecore_IMF_Context *ctx);
461EAPI void ecore_imf_context_focus_out(Ecore_IMF_Context *ctx);
462EAPI void ecore_imf_context_reset(Ecore_IMF_Context *ctx);
463EAPI void ecore_imf_context_cursor_position_set(Ecore_IMF_Context *ctx, int cursor_pos);
464EAPI void ecore_imf_context_cursor_location_set(Ecore_IMF_Context *ctx, int x, int y, int w, int h);
465EAPI void ecore_imf_context_use_preedit_set(Ecore_IMF_Context *ctx, Eina_Bool use_preedit);
466EAPI 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);
467EAPI void ecore_imf_context_input_mode_set(Ecore_IMF_Context *ctx, Ecore_IMF_Input_Mode input_mode);
468EAPI Ecore_IMF_Input_Mode ecore_imf_context_input_mode_get(Ecore_IMF_Context *ctx);
469EAPI Eina_Bool ecore_imf_context_filter_event(Ecore_IMF_Context *ctx, Ecore_IMF_Event_Type type, Ecore_IMF_Event *event);
470
471/* plugin specific functions */
472EAPI Ecore_IMF_Context *ecore_imf_context_new(const Ecore_IMF_Context_Class *ctxc);
473EAPI void ecore_imf_context_data_set(Ecore_IMF_Context *ctx, void *data);
474EAPI void *ecore_imf_context_data_get(Ecore_IMF_Context *ctx);
475EAPI Eina_Bool ecore_imf_context_surrounding_get(Ecore_IMF_Context *ctx, char **text, int *cursor_pos);
476EAPI void ecore_imf_context_preedit_start_event_add(Ecore_IMF_Context *ctx);
477EAPI void ecore_imf_context_preedit_end_event_add(Ecore_IMF_Context *ctx);
478EAPI void ecore_imf_context_preedit_changed_event_add(Ecore_IMF_Context *ctx);
479EAPI void ecore_imf_context_commit_event_add(Ecore_IMF_Context *ctx, const char *str);
480EAPI void ecore_imf_context_delete_surrounding_event_add(Ecore_IMF_Context *ctx, int offset, int n_chars);
481EAPI void ecore_imf_context_event_callback_add(Ecore_IMF_Context *ctx, Ecore_IMF_Callback_Type type, Ecore_IMF_Event_Cb func, const void *data);
482EAPI void *ecore_imf_context_event_callback_del(Ecore_IMF_Context *ctx, Ecore_IMF_Callback_Type type, Ecore_IMF_Event_Cb func);
483EAPI void ecore_imf_context_event_callback_call(Ecore_IMF_Context *ctx, Ecore_IMF_Callback_Type type, void *event_info);
484EAPI void ecore_imf_context_prediction_allow_set(Ecore_IMF_Context *ctx, Eina_Bool prediction);
485EAPI Eina_Bool ecore_imf_context_prediction_allow_get(Ecore_IMF_Context *ctx);
486EAPI void ecore_imf_context_autocapital_type_set(Ecore_IMF_Context *ctx, Ecore_IMF_Autocapital_Type autocapital_type);
487EAPI Ecore_IMF_Autocapital_Type ecore_imf_context_autocapital_type_get(Ecore_IMF_Context *ctx);
488
489EAPI void ecore_imf_context_control_panel_show(Ecore_IMF_Context *ctx);
490EAPI void ecore_imf_context_control_panel_hide(Ecore_IMF_Context *ctx);
491
492EAPI void ecore_imf_context_input_panel_show(Ecore_IMF_Context *ctx);
493EAPI void ecore_imf_context_input_panel_hide(Ecore_IMF_Context *ctx);
494EAPI void ecore_imf_context_input_panel_layout_set(Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Layout layout);
495EAPI Ecore_IMF_Input_Panel_Layout ecore_imf_context_input_panel_layout_get(Ecore_IMF_Context *ctx);
496EAPI void ecore_imf_context_input_panel_language_set(Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Lang lang);
497EAPI Ecore_IMF_Input_Panel_Lang ecore_imf_context_input_panel_language_get(Ecore_IMF_Context *ctx);
498EAPI void ecore_imf_context_input_panel_enabled_set(Ecore_IMF_Context *ctx, Eina_Bool enable);
499EAPI Eina_Bool ecore_imf_context_input_panel_enabled_get(Ecore_IMF_Context *ctx);
500EAPI void ecore_imf_context_input_panel_imdata_set(Ecore_IMF_Context *ctx, const void *data, int len);
501EAPI void ecore_imf_context_input_panel_imdata_get(Ecore_IMF_Context *ctx, void *data, int *len);
502EAPI void ecore_imf_context_input_panel_return_key_type_set(Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Return_Key_Type return_key_type);
503EAPI Ecore_IMF_Input_Panel_Return_Key_Type ecore_imf_context_input_panel_return_key_type_get(Ecore_IMF_Context *ctx);
504EAPI void ecore_imf_context_input_panel_return_key_disabled_set(Ecore_IMF_Context *ctx, Eina_Bool disabled);
505EAPI Eina_Bool ecore_imf_context_input_panel_return_key_disabled_get(Ecore_IMF_Context *ctx);
506EAPI void ecore_imf_context_input_panel_caps_lock_mode_set(Ecore_IMF_Context *ctx, Eina_Bool mode);
507EAPI Eina_Bool ecore_imf_context_input_panel_caps_lock_mode_get(Ecore_IMF_Context *ctx);
508
509/* The following entry points must be exported by each input method module
510 */
511
512/*
513 * int imf_module_init (const Ecore_IMF_Context_Info **info);
514 * void imf_module_exit (void);
515 * Ecore_IMF_Context *imf_module_create (void);
516 */
517
518#ifdef __cplusplus
519}
520#endif
521
522#endif
523
524/**
525 * @}
526 */
diff --git a/libraries/ecore/src/lib/ecore_imf/Makefile.am b/libraries/ecore/src/lib/ecore_imf/Makefile.am
deleted file mode 100644
index 10f6c2f..0000000
--- a/libraries/ecore/src/lib/ecore_imf/Makefile.am
+++ /dev/null
@@ -1,28 +0,0 @@
1MAINTAINERCLEANFILES = Makefile.in
2
3AM_CPPFLAGS = \
4-I$(top_srcdir)/src/lib/ecore \
5-DPACKAGE_LIB_DIR=\"$(libdir)\" \
6@EFL_ECORE_IMF_BUILD@ \
7@EVIL_CFLAGS@ \
8@EINA_CFLAGS@
9
10AM_CFLAGS = @WIN32_CFLAGS@
11
12lib_LTLIBRARIES = libecore_imf.la
13includes_HEADERS = Ecore_IMF.h
14includesdir = $(includedir)/ecore-@VMAJ@
15
16libecore_imf_la_SOURCES = \
17ecore_imf.c \
18ecore_imf_context.c \
19ecore_imf_module.c
20
21libecore_imf_la_LIBADD = \
22$(top_builddir)/src/lib/ecore/libecore.la \
23@EINA_LIBS@ \
24@EVIL_LIBS@
25
26libecore_imf_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -version-info @version_info@ @release_info@
27
28EXTRA_DIST = ecore_imf_private.h
diff --git a/libraries/ecore/src/lib/ecore_imf/Makefile.in b/libraries/ecore/src/lib/ecore_imf/Makefile.in
deleted file mode 100644
index 4d71b5d..0000000
--- a/libraries/ecore/src/lib/ecore_imf/Makefile.in
+++ /dev/null
@@ -1,836 +0,0 @@
1# Makefile.in generated by automake 1.11.1 from Makefile.am.
2# @configure_input@
3
4# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
5# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
6# Inc.
7# This Makefile.in is free software; the Free Software Foundation
8# gives unlimited permission to copy and/or distribute it,
9# with or without modifications, as long as this notice is preserved.
10
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
13# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14# PARTICULAR PURPOSE.
15
16@SET_MAKE@
17
18
19VPATH = @srcdir@
20pkgdatadir = $(datadir)/@PACKAGE@
21pkgincludedir = $(includedir)/@PACKAGE@
22pkglibdir = $(libdir)/@PACKAGE@
23pkglibexecdir = $(libexecdir)/@PACKAGE@
24am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
25install_sh_DATA = $(install_sh) -c -m 644
26install_sh_PROGRAM = $(install_sh) -c
27install_sh_SCRIPT = $(install_sh) -c
28INSTALL_HEADER = $(INSTALL_DATA)
29transform = $(program_transform_name)
30NORMAL_INSTALL = :
31PRE_INSTALL = :
32POST_INSTALL = :
33NORMAL_UNINSTALL = :
34PRE_UNINSTALL = :
35POST_UNINSTALL = :
36build_triplet = @build@
37host_triplet = @host@
38subdir = src/lib/ecore_imf
39DIST_COMMON = $(includes_HEADERS) $(srcdir)/Makefile.am \
40 $(srcdir)/Makefile.in
41ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
42am__aclocal_m4_deps = $(top_srcdir)/m4/ac_attribute.m4 \
43 $(top_srcdir)/m4/ac_path_generic.m4 \
44 $(top_srcdir)/m4/check_x_extension.m4 \
45 $(top_srcdir)/m4/ecore_check_module.m4 \
46 $(top_srcdir)/m4/ecore_check_options.m4 \
47 $(top_srcdir)/m4/efl_compiler_flag.m4 \
48 $(top_srcdir)/m4/efl_doxygen.m4 \
49 $(top_srcdir)/m4/efl_examples.m4 \
50 $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \
51 $(top_srcdir)/m4/efl_threads.m4 $(top_srcdir)/m4/gettext.m4 \
52 $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \
53 $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
54 $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \
55 $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
56 $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
57 $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \
58 $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac
59am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
60 $(ACLOCAL_M4)
61mkinstalldirs = $(install_sh) -d
62CONFIG_HEADER = $(top_builddir)/config.h
63CONFIG_CLEAN_FILES =
64CONFIG_CLEAN_VPATH_FILES =
65am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
66am__vpath_adj = case $$p in \
67 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
68 *) f=$$p;; \
69 esac;
70am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
71am__install_max = 40
72am__nobase_strip_setup = \
73 srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
74am__nobase_strip = \
75 for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
76am__nobase_list = $(am__nobase_strip_setup); \
77 for p in $$list; do echo "$$p $$p"; done | \
78 sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
79 $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
80 if (++n[$$2] == $(am__install_max)) \
81 { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
82 END { for (dir in files) print dir, files[dir] }'
83am__base_list = \
84 sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
85 sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
86am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includesdir)"
87LTLIBRARIES = $(lib_LTLIBRARIES)
88libecore_imf_la_DEPENDENCIES = \
89 $(top_builddir)/src/lib/ecore/libecore.la
90am_libecore_imf_la_OBJECTS = ecore_imf.lo ecore_imf_context.lo \
91 ecore_imf_module.lo
92libecore_imf_la_OBJECTS = $(am_libecore_imf_la_OBJECTS)
93AM_V_lt = $(am__v_lt_$(V))
94am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
95am__v_lt_0 = --silent
96libecore_imf_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
97 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
98 $(AM_CFLAGS) $(CFLAGS) $(libecore_imf_la_LDFLAGS) $(LDFLAGS) \
99 -o $@
100DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
101depcomp = $(SHELL) $(top_srcdir)/depcomp
102am__depfiles_maybe = depfiles
103am__mv = mv -f
104COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
105 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
106LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
107 $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
108 $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
109 $(AM_CFLAGS) $(CFLAGS)
110AM_V_CC = $(am__v_CC_$(V))
111am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
112am__v_CC_0 = @echo " CC " $@;
113AM_V_at = $(am__v_at_$(V))
114am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
115am__v_at_0 = @
116CCLD = $(CC)
117LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
118 $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
119 $(AM_LDFLAGS) $(LDFLAGS) -o $@
120AM_V_CCLD = $(am__v_CCLD_$(V))
121am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
122am__v_CCLD_0 = @echo " CCLD " $@;
123AM_V_GEN = $(am__v_GEN_$(V))
124am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
125am__v_GEN_0 = @echo " GEN " $@;
126SOURCES = $(libecore_imf_la_SOURCES)
127DIST_SOURCES = $(libecore_imf_la_SOURCES)
128HEADERS = $(includes_HEADERS)
129ETAGS = etags
130CTAGS = ctags
131DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
132ACLOCAL = @ACLOCAL@
133ALLOCA = @ALLOCA@
134AMTAR = @AMTAR@
135AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
136AR = @AR@
137AS = @AS@
138AUTOCONF = @AUTOCONF@
139AUTOHEADER = @AUTOHEADER@
140AUTOMAKE = @AUTOMAKE@
141AWK = @AWK@
142CARES_CFLAGS = @CARES_CFLAGS@
143CARES_LIBS = @CARES_LIBS@
144CC = @CC@
145CCDEPMODE = @CCDEPMODE@
146CFLAGS = @CFLAGS@
147CHECK_CFLAGS = @CHECK_CFLAGS@
148CHECK_LIBS = @CHECK_LIBS@
149CPP = @CPP@
150CPPFLAGS = @CPPFLAGS@
151CURL_CFLAGS = @CURL_CFLAGS@
152CURL_LIBS = @CURL_LIBS@
153CXX = @CXX@
154CXXCPP = @CXXCPP@
155CXXDEPMODE = @CXXDEPMODE@
156CXXFLAGS = @CXXFLAGS@
157CYGPATH_W = @CYGPATH_W@
158DEFS = @DEFS@
159DEPDIR = @DEPDIR@
160DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@
161DIRECTFB_LIBS = @DIRECTFB_LIBS@
162DLLTOOL = @DLLTOOL@
163DSYMUTIL = @DSYMUTIL@
164DUMPBIN = @DUMPBIN@
165ECHO_C = @ECHO_C@
166ECHO_N = @ECHO_N@
167ECHO_T = @ECHO_T@
168ECORE_XCB_CFLAGS = @ECORE_XCB_CFLAGS@
169ECORE_XCB_LIBS = @ECORE_XCB_LIBS@
170EFL_ECORE_BUILD = @EFL_ECORE_BUILD@
171EFL_ECORE_CON_BUILD = @EFL_ECORE_CON_BUILD@
172EFL_ECORE_EVAS_BUILD = @EFL_ECORE_EVAS_BUILD@
173EFL_ECORE_FILE_BUILD = @EFL_ECORE_FILE_BUILD@
174EFL_ECORE_IMF_BUILD = @EFL_ECORE_IMF_BUILD@
175EFL_ECORE_IMF_EVAS_BUILD = @EFL_ECORE_IMF_EVAS_BUILD@
176EFL_ECORE_INPUT_BUILD = @EFL_ECORE_INPUT_BUILD@
177EFL_ECORE_INPUT_EVAS_BUILD = @EFL_ECORE_INPUT_EVAS_BUILD@
178EFL_ECORE_IPC_BUILD = @EFL_ECORE_IPC_BUILD@
179EFL_ECORE_PSL1GHT_BUILD = @EFL_ECORE_PSL1GHT_BUILD@
180EFL_ECORE_SDL_BUILD = @EFL_ECORE_SDL_BUILD@
181EFL_ECORE_WIN32_BUILD = @EFL_ECORE_WIN32_BUILD@
182EFL_ECORE_WINCE_BUILD = @EFL_ECORE_WINCE_BUILD@
183EFL_PTHREAD_CFLAGS = @EFL_PTHREAD_CFLAGS@
184EFL_PTHREAD_LIBS = @EFL_PTHREAD_LIBS@
185EGREP = @EGREP@
186EINA_CFLAGS = @EINA_CFLAGS@
187EINA_LIBS = @EINA_LIBS@
188ESCAPE_CFLAGS = @ESCAPE_CFLAGS@
189ESCAPE_LIBS = @ESCAPE_LIBS@
190EVAS_CFLAGS = @EVAS_CFLAGS@
191EVAS_LIBS = @EVAS_LIBS@
192EVIL_CFLAGS = @EVIL_CFLAGS@
193EVIL_LIBS = @EVIL_LIBS@
194EXEEXT = @EXEEXT@
195EXOTIC_CFLAGS = @EXOTIC_CFLAGS@
196EXOTIC_LIBS = @EXOTIC_LIBS@
197FGREP = @FGREP@
198GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
199GLIB_CFLAGS = @GLIB_CFLAGS@
200GLIB_LIBS = @GLIB_LIBS@
201GMSGFMT = @GMSGFMT@
202GMSGFMT_015 = @GMSGFMT_015@
203GREP = @GREP@
204INSTALL = @INSTALL@
205INSTALL_DATA = @INSTALL_DATA@
206INSTALL_PROGRAM = @INSTALL_PROGRAM@
207INSTALL_SCRIPT = @INSTALL_SCRIPT@
208INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
209INTLLIBS = @INTLLIBS@
210INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
211KEYSYMDEFS = @KEYSYMDEFS@
212LD = @LD@
213LDFLAGS = @LDFLAGS@
214LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
215LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
216LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@
217LIBICONV = @LIBICONV@
218LIBINTL = @LIBINTL@
219LIBOBJS = @LIBOBJS@
220LIBS = @LIBS@
221LIBTOOL = @LIBTOOL@
222LIPO = @LIPO@
223LN_S = @LN_S@
224LTLIBICONV = @LTLIBICONV@
225LTLIBINTL = @LTLIBINTL@
226LTLIBOBJS = @LTLIBOBJS@
227MAKEINFO = @MAKEINFO@
228MKDIR_P = @MKDIR_P@
229MSGFMT = @MSGFMT@
230MSGFMT_015 = @MSGFMT_015@
231MSGMERGE = @MSGMERGE@
232NM = @NM@
233NMEDIT = @NMEDIT@
234OBJC = @OBJC@
235OBJCDEPMODE = @OBJCDEPMODE@
236OBJCFLAGS = @OBJCFLAGS@
237OBJDUMP = @OBJDUMP@
238OBJEXT = @OBJEXT@
239OTOOL = @OTOOL@
240OTOOL64 = @OTOOL64@
241PACKAGE = @PACKAGE@
242PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
243PACKAGE_NAME = @PACKAGE_NAME@
244PACKAGE_STRING = @PACKAGE_STRING@
245PACKAGE_TARNAME = @PACKAGE_TARNAME@
246PACKAGE_URL = @PACKAGE_URL@
247PACKAGE_VERSION = @PACKAGE_VERSION@
248PATH_SEPARATOR = @PATH_SEPARATOR@
249PIXMAN_CFLAGS = @PIXMAN_CFLAGS@
250PIXMAN_LIBS = @PIXMAN_LIBS@
251PKG_CONFIG = @PKG_CONFIG@
252PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
253PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
254POSUB = @POSUB@
255RANLIB = @RANLIB@
256SCIM_CFLAGS = @SCIM_CFLAGS@
257SCIM_LIBS = @SCIM_LIBS@
258SDL_CFLAGS = @SDL_CFLAGS@
259SDL_CONFIG = @SDL_CONFIG@
260SDL_LIBS = @SDL_LIBS@
261SED = @SED@
262SET_MAKE = @SET_MAKE@
263SHELL = @SHELL@
264SHM_OPEN_LIBS = @SHM_OPEN_LIBS@
265SSL_CFLAGS = @SSL_CFLAGS@
266SSL_LIBS = @SSL_LIBS@
267STRIP = @STRIP@
268TLS2_CFLAGS = @TLS2_CFLAGS@
269TLS2_LIBS = @TLS2_LIBS@
270TLS_CFLAGS = @TLS_CFLAGS@
271TLS_LIBS = @TLS_LIBS@
272TSLIB_CFLAGS = @TSLIB_CFLAGS@
273TSLIB_LIBS = @TSLIB_LIBS@
274USE_NLS = @USE_NLS@
275VERSION = @VERSION@
276VMAJ = @VMAJ@
277WAYLAND_CFLAGS = @WAYLAND_CFLAGS@
278WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@
279WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@
280WAYLAND_LIBS = @WAYLAND_LIBS@
281WIN32_CFLAGS = @WIN32_CFLAGS@
282WIN32_CPPFLAGS = @WIN32_CPPFLAGS@
283WIN32_LIBS = @WIN32_LIBS@
284XCB_COMPOSITE_CFLAGS = @XCB_COMPOSITE_CFLAGS@
285XCB_COMPOSITE_LIBS = @XCB_COMPOSITE_LIBS@
286XCB_CURSOR_CFLAGS = @XCB_CURSOR_CFLAGS@
287XCB_CURSOR_LIBS = @XCB_CURSOR_LIBS@
288XCB_DAMAGE_CFLAGS = @XCB_DAMAGE_CFLAGS@
289XCB_DAMAGE_LIBS = @XCB_DAMAGE_LIBS@
290XCB_DPMS_CFLAGS = @XCB_DPMS_CFLAGS@
291XCB_DPMS_LIBS = @XCB_DPMS_LIBS@
292XCB_RANDR_CFLAGS = @XCB_RANDR_CFLAGS@
293XCB_RANDR_LIBS = @XCB_RANDR_LIBS@
294XCB_RENDER_CFLAGS = @XCB_RENDER_CFLAGS@
295XCB_RENDER_LIBS = @XCB_RENDER_LIBS@
296XCB_SCREENSAVER_CFLAGS = @XCB_SCREENSAVER_CFLAGS@
297XCB_SCREENSAVER_LIBS = @XCB_SCREENSAVER_LIBS@
298XCB_SHAPE_CFLAGS = @XCB_SHAPE_CFLAGS@
299XCB_SHAPE_LIBS = @XCB_SHAPE_LIBS@
300XCB_SYNC_CFLAGS = @XCB_SYNC_CFLAGS@
301XCB_SYNC_LIBS = @XCB_SYNC_LIBS@
302XCB_X11_CFLAGS = @XCB_X11_CFLAGS@
303XCB_X11_LIBS = @XCB_X11_LIBS@
304XCB_XFIXES_CFLAGS = @XCB_XFIXES_CFLAGS@
305XCB_XFIXES_LIBS = @XCB_XFIXES_LIBS@
306XCB_XGESTURE_CFLAGS = @XCB_XGESTURE_CFLAGS@
307XCB_XGESTURE_LIBS = @XCB_XGESTURE_LIBS@
308XCB_XINERAMA_CFLAGS = @XCB_XINERAMA_CFLAGS@
309XCB_XINERAMA_LIBS = @XCB_XINERAMA_LIBS@
310XCB_XINPUT_CFLAGS = @XCB_XINPUT_CFLAGS@
311XCB_XINPUT_LIBS = @XCB_XINPUT_LIBS@
312XCB_XPRINT_CFLAGS = @XCB_XPRINT_CFLAGS@
313XCB_XPRINT_LIBS = @XCB_XPRINT_LIBS@
314XCB_XTEST_CFLAGS = @XCB_XTEST_CFLAGS@
315XCB_XTEST_LIBS = @XCB_XTEST_LIBS@
316XCOMPOSITE_CFLAGS = @XCOMPOSITE_CFLAGS@
317XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@
318XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@
319XDAMAGE_LIBS = @XDAMAGE_LIBS@
320XDPMS_CFLAGS = @XDPMS_CFLAGS@
321XDPMS_LIBS = @XDPMS_LIBS@
322XFIXES_CFLAGS = @XFIXES_CFLAGS@
323XFIXES_LIBS = @XFIXES_LIBS@
324XGESTURE_CFLAGS = @XGESTURE_CFLAGS@
325XGESTURE_LIBS = @XGESTURE_LIBS@
326XGETTEXT = @XGETTEXT@
327XGETTEXT_015 = @XGETTEXT_015@
328XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
329XI2_CFLAGS = @XI2_CFLAGS@
330XI2_LIBS = @XI2_LIBS@
331XINERAMA_CFLAGS = @XINERAMA_CFLAGS@
332XINERAMA_LIBS = @XINERAMA_LIBS@
333XKB_CFLAGS = @XKB_CFLAGS@
334XKB_LIBS = @XKB_LIBS@
335XMKMF = @XMKMF@
336XPRINT_CFLAGS = @XPRINT_CFLAGS@
337XPRINT_LIBS = @XPRINT_LIBS@
338XRANDR_CFLAGS = @XRANDR_CFLAGS@
339XRANDR_LIBS = @XRANDR_LIBS@
340XRENDER_CFLAGS = @XRENDER_CFLAGS@
341XRENDER_LIBS = @XRENDER_LIBS@
342XSS_CFLAGS = @XSS_CFLAGS@
343XSS_LIBS = @XSS_LIBS@
344XTEST_CFLAGS = @XTEST_CFLAGS@
345XTEST_LIBS = @XTEST_LIBS@
346X_CFLAGS = @X_CFLAGS@
347X_EXTRA_LIBS = @X_EXTRA_LIBS@
348X_LIBS = @X_LIBS@
349X_PRE_LIBS = @X_PRE_LIBS@
350Xcursor_cflags = @Xcursor_cflags@
351Xcursor_libs = @Xcursor_libs@
352abs_builddir = @abs_builddir@
353abs_srcdir = @abs_srcdir@
354abs_top_builddir = @abs_top_builddir@
355abs_top_srcdir = @abs_top_srcdir@
356ac_ct_CC = @ac_ct_CC@
357ac_ct_CXX = @ac_ct_CXX@
358ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
359ac_ct_OBJC = @ac_ct_OBJC@
360am__include = @am__include@
361am__leading_dot = @am__leading_dot@
362am__quote = @am__quote@
363am__tar = @am__tar@
364am__untar = @am__untar@
365bindir = @bindir@
366build = @build@
367build_alias = @build_alias@
368build_cpu = @build_cpu@
369build_os = @build_os@
370build_vendor = @build_vendor@
371builddir = @builddir@
372cocoa_ldflags = @cocoa_ldflags@
373datadir = @datadir@
374datarootdir = @datarootdir@
375dlopen_libs = @dlopen_libs@
376docdir = @docdir@
377dvidir = @dvidir@
378ecore_cocoa_cflags = @ecore_cocoa_cflags@
379ecore_cocoa_libs = @ecore_cocoa_libs@
380ecore_con_cflags = @ecore_con_cflags@
381ecore_con_libs = @ecore_con_libs@
382ecore_directfb_cflags = @ecore_directfb_cflags@
383ecore_directfb_libs = @ecore_directfb_libs@
384ecore_evas_cflags = @ecore_evas_cflags@
385ecore_evas_libs = @ecore_evas_libs@
386ecore_fb_cflags = @ecore_fb_cflags@
387ecore_fb_libs = @ecore_fb_libs@
388ecore_file_cflags = @ecore_file_cflags@
389ecore_file_libs = @ecore_file_libs@
390ecore_imf_cflags = @ecore_imf_cflags@
391ecore_imf_evas_cflags = @ecore_imf_evas_cflags@
392ecore_imf_evas_libs = @ecore_imf_evas_libs@
393ecore_imf_libs = @ecore_imf_libs@
394ecore_imf_scim_cflags = @ecore_imf_scim_cflags@
395ecore_imf_scim_libs = @ecore_imf_scim_libs@
396ecore_imf_xim_cflags = @ecore_imf_xim_cflags@
397ecore_imf_xim_libs = @ecore_imf_xim_libs@
398ecore_input_cflags = @ecore_input_cflags@
399ecore_input_evas_cflags = @ecore_input_evas_cflags@
400ecore_input_evas_libs = @ecore_input_evas_libs@
401ecore_input_libs = @ecore_input_libs@
402ecore_ipc_cflags = @ecore_ipc_cflags@
403ecore_ipc_libs = @ecore_ipc_libs@
404ecore_psl1ght_cflags = @ecore_psl1ght_cflags@
405ecore_psl1ght_libs = @ecore_psl1ght_libs@
406ecore_sdl_cflags = @ecore_sdl_cflags@
407ecore_sdl_libs = @ecore_sdl_libs@
408ecore_wayland_cflags = @ecore_wayland_cflags@
409ecore_wayland_libs = @ecore_wayland_libs@
410ecore_win32_cflags = @ecore_win32_cflags@
411ecore_win32_libs = @ecore_win32_libs@
412ecore_wince_cflags = @ecore_wince_cflags@
413ecore_wince_libs = @ecore_wince_libs@
414ecore_x_cflags = @ecore_x_cflags@
415ecore_x_libs = @ecore_x_libs@
416ecore_x_libs_private = @ecore_x_libs_private@
417efl_doxygen = @efl_doxygen@
418efl_have_doxygen = @efl_have_doxygen@
419exec_prefix = @exec_prefix@
420have_ecore_x_xcb_define = @have_ecore_x_xcb_define@
421host = @host@
422host_alias = @host_alias@
423host_cpu = @host_cpu@
424host_os = @host_os@
425host_vendor = @host_vendor@
426htmldir = @htmldir@
427includedir = @includedir@
428infodir = @infodir@
429install_sh = @install_sh@
430libdir = @libdir@
431libexecdir = @libexecdir@
432localedir = @localedir@
433localstatedir = @localstatedir@
434lt_ECHO = @lt_ECHO@
435lt_enable_auto_import = @lt_enable_auto_import@
436mandir = @mandir@
437mkdir_p = @mkdir_p@
438oldincludedir = @oldincludedir@
439pdfdir = @pdfdir@
440pkgconfig_requires_private = @pkgconfig_requires_private@
441prefix = @prefix@
442program_transform_name = @program_transform_name@
443psdir = @psdir@
444release_info = @release_info@
445requirements_ecore = @requirements_ecore@
446requirements_ecore_cocoa = @requirements_ecore_cocoa@
447requirements_ecore_con = @requirements_ecore_con@
448requirements_ecore_directfb = @requirements_ecore_directfb@
449requirements_ecore_evas = @requirements_ecore_evas@
450requirements_ecore_fb = @requirements_ecore_fb@
451requirements_ecore_file = @requirements_ecore_file@
452requirements_ecore_imf = @requirements_ecore_imf@
453requirements_ecore_imf_evas = @requirements_ecore_imf_evas@
454requirements_ecore_imf_scim = @requirements_ecore_imf_scim@
455requirements_ecore_imf_xim = @requirements_ecore_imf_xim@
456requirements_ecore_input = @requirements_ecore_input@
457requirements_ecore_input_evas = @requirements_ecore_input_evas@
458requirements_ecore_ipc = @requirements_ecore_ipc@
459requirements_ecore_psl1ght = @requirements_ecore_psl1ght@
460requirements_ecore_sdl = @requirements_ecore_sdl@
461requirements_ecore_wayland = @requirements_ecore_wayland@
462requirements_ecore_win32 = @requirements_ecore_win32@
463requirements_ecore_wince = @requirements_ecore_wince@
464requirements_ecore_x = @requirements_ecore_x@
465rt_libs = @rt_libs@
466sbindir = @sbindir@
467sharedstatedir = @sharedstatedir@
468srcdir = @srcdir@
469sysconfdir = @sysconfdir@
470target_alias = @target_alias@
471top_build_prefix = @top_build_prefix@
472top_builddir = @top_builddir@
473top_srcdir = @top_srcdir@
474version_info = @version_info@
475x_cflags = @x_cflags@
476x_includes = @x_includes@
477x_libs = @x_libs@
478MAINTAINERCLEANFILES = Makefile.in
479AM_CPPFLAGS = \
480-I$(top_srcdir)/src/lib/ecore \
481-DPACKAGE_LIB_DIR=\"$(libdir)\" \
482@EFL_ECORE_IMF_BUILD@ \
483@EVIL_CFLAGS@ \
484@EINA_CFLAGS@
485
486AM_CFLAGS = @WIN32_CFLAGS@
487lib_LTLIBRARIES = libecore_imf.la
488includes_HEADERS = Ecore_IMF.h
489includesdir = $(includedir)/ecore-@VMAJ@
490libecore_imf_la_SOURCES = \
491ecore_imf.c \
492ecore_imf_context.c \
493ecore_imf_module.c
494
495libecore_imf_la_LIBADD = \
496$(top_builddir)/src/lib/ecore/libecore.la \
497@EINA_LIBS@ \
498@EVIL_LIBS@
499
500libecore_imf_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -version-info @version_info@ @release_info@
501EXTRA_DIST = ecore_imf_private.h
502all: all-am
503
504.SUFFIXES:
505.SUFFIXES: .c .lo .o .obj
506$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
507 @for dep in $?; do \
508 case '$(am__configure_deps)' in \
509 *$$dep*) \
510 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
511 && { if test -f $@; then exit 0; else break; fi; }; \
512 exit 1;; \
513 esac; \
514 done; \
515 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/ecore_imf/Makefile'; \
516 $(am__cd) $(top_srcdir) && \
517 $(AUTOMAKE) --gnu src/lib/ecore_imf/Makefile
518.PRECIOUS: Makefile
519Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
520 @case '$?' in \
521 *config.status*) \
522 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
523 *) \
524 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
525 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
526 esac;
527
528$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
529 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
530
531$(top_srcdir)/configure: $(am__configure_deps)
532 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
533$(ACLOCAL_M4): $(am__aclocal_m4_deps)
534 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
535$(am__aclocal_m4_deps):
536install-libLTLIBRARIES: $(lib_LTLIBRARIES)
537 @$(NORMAL_INSTALL)
538 test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
539 @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
540 list2=; for p in $$list; do \
541 if test -f $$p; then \
542 list2="$$list2 $$p"; \
543 else :; fi; \
544 done; \
545 test -z "$$list2" || { \
546 echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
547 $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
548 }
549
550uninstall-libLTLIBRARIES:
551 @$(NORMAL_UNINSTALL)
552 @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
553 for p in $$list; do \
554 $(am__strip_dir) \
555 echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
556 $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
557 done
558
559clean-libLTLIBRARIES:
560 -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
561 @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
562 dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
563 test "$$dir" != "$$p" || dir=.; \
564 echo "rm -f \"$${dir}/so_locations\""; \
565 rm -f "$${dir}/so_locations"; \
566 done
567libecore_imf.la: $(libecore_imf_la_OBJECTS) $(libecore_imf_la_DEPENDENCIES)
568 $(AM_V_CCLD)$(libecore_imf_la_LINK) -rpath $(libdir) $(libecore_imf_la_OBJECTS) $(libecore_imf_la_LIBADD) $(LIBS)
569
570mostlyclean-compile:
571 -rm -f *.$(OBJEXT)
572
573distclean-compile:
574 -rm -f *.tab.c
575
576@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ecore_imf.Plo@am__quote@
577@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ecore_imf_context.Plo@am__quote@
578@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ecore_imf_module.Plo@am__quote@
579
580.c.o:
581@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
582@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
583@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
584@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
585@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
586@am__fastdepCC_FALSE@ $(COMPILE) -c $<
587
588.c.obj:
589@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
590@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
591@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
592@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
593@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
594@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
595
596.c.lo:
597@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
598@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
599@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
600@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
601@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
602@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
603
604mostlyclean-libtool:
605 -rm -f *.lo
606
607clean-libtool:
608 -rm -rf .libs _libs
609install-includesHEADERS: $(includes_HEADERS)
610 @$(NORMAL_INSTALL)
611 test -z "$(includesdir)" || $(MKDIR_P) "$(DESTDIR)$(includesdir)"
612 @list='$(includes_HEADERS)'; test -n "$(includesdir)" || list=; \
613 for p in $$list; do \
614 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
615 echo "$$d$$p"; \
616 done | $(am__base_list) | \
617 while read files; do \
618 echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includesdir)'"; \
619 $(INSTALL_HEADER) $$files "$(DESTDIR)$(includesdir)" || exit $$?; \
620 done
621
622uninstall-includesHEADERS:
623 @$(NORMAL_UNINSTALL)
624 @list='$(includes_HEADERS)'; test -n "$(includesdir)" || list=; \
625 files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
626 test -n "$$files" || exit 0; \
627 echo " ( cd '$(DESTDIR)$(includesdir)' && rm -f" $$files ")"; \
628 cd "$(DESTDIR)$(includesdir)" && rm -f $$files
629
630ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
631 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
632 unique=`for i in $$list; do \
633 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
634 done | \
635 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
636 END { if (nonempty) { for (i in files) print i; }; }'`; \
637 mkid -fID $$unique
638tags: TAGS
639
640TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
641 $(TAGS_FILES) $(LISP)
642 set x; \
643 here=`pwd`; \
644 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
645 unique=`for i in $$list; do \
646 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
647 done | \
648 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
649 END { if (nonempty) { for (i in files) print i; }; }'`; \
650 shift; \
651 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
652 test -n "$$unique" || unique=$$empty_fix; \
653 if test $$# -gt 0; then \
654 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
655 "$$@" $$unique; \
656 else \
657 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
658 $$unique; \
659 fi; \
660 fi
661ctags: CTAGS
662CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
663 $(TAGS_FILES) $(LISP)
664 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
665 unique=`for i in $$list; do \
666 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
667 done | \
668 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
669 END { if (nonempty) { for (i in files) print i; }; }'`; \
670 test -z "$(CTAGS_ARGS)$$unique" \
671 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
672 $$unique
673
674GTAGS:
675 here=`$(am__cd) $(top_builddir) && pwd` \
676 && $(am__cd) $(top_srcdir) \
677 && gtags -i $(GTAGS_ARGS) "$$here"
678
679distclean-tags:
680 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
681
682distdir: $(DISTFILES)
683 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
684 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
685 list='$(DISTFILES)'; \
686 dist_files=`for file in $$list; do echo $$file; done | \
687 sed -e "s|^$$srcdirstrip/||;t" \
688 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
689 case $$dist_files in \
690 */*) $(MKDIR_P) `echo "$$dist_files" | \
691 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
692 sort -u` ;; \
693 esac; \
694 for file in $$dist_files; do \
695 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
696 if test -d $$d/$$file; then \
697 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
698 if test -d "$(distdir)/$$file"; then \
699 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
700 fi; \
701 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
702 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
703 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
704 fi; \
705 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
706 else \
707 test -f "$(distdir)/$$file" \
708 || cp -p $$d/$$file "$(distdir)/$$file" \
709 || exit 1; \
710 fi; \
711 done
712check-am: all-am
713check: check-am
714all-am: Makefile $(LTLIBRARIES) $(HEADERS)
715installdirs:
716 for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includesdir)"; do \
717 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
718 done
719install: install-am
720install-exec: install-exec-am
721install-data: install-data-am
722uninstall: uninstall-am
723
724install-am: all-am
725 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
726
727installcheck: installcheck-am
728install-strip:
729 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
730 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
731 `test -z '$(STRIP)' || \
732 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
733mostlyclean-generic:
734
735clean-generic:
736
737distclean-generic:
738 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
739 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
740
741maintainer-clean-generic:
742 @echo "This command is intended for maintainers to use"
743 @echo "it deletes files that may require special tools to rebuild."
744 -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
745clean: clean-am
746
747clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
748 mostlyclean-am
749
750distclean: distclean-am
751 -rm -rf ./$(DEPDIR)
752 -rm -f Makefile
753distclean-am: clean-am distclean-compile distclean-generic \
754 distclean-tags
755
756dvi: dvi-am
757
758dvi-am:
759
760html: html-am
761
762html-am:
763
764info: info-am
765
766info-am:
767
768install-data-am: install-includesHEADERS
769
770install-dvi: install-dvi-am
771
772install-dvi-am:
773
774install-exec-am: install-libLTLIBRARIES
775
776install-html: install-html-am
777
778install-html-am:
779
780install-info: install-info-am
781
782install-info-am:
783
784install-man:
785
786install-pdf: install-pdf-am
787
788install-pdf-am:
789
790install-ps: install-ps-am
791
792install-ps-am:
793
794installcheck-am:
795
796maintainer-clean: maintainer-clean-am
797 -rm -rf ./$(DEPDIR)
798 -rm -f Makefile
799maintainer-clean-am: distclean-am maintainer-clean-generic
800
801mostlyclean: mostlyclean-am
802
803mostlyclean-am: mostlyclean-compile mostlyclean-generic \
804 mostlyclean-libtool
805
806pdf: pdf-am
807
808pdf-am:
809
810ps: ps-am
811
812ps-am:
813
814uninstall-am: uninstall-includesHEADERS uninstall-libLTLIBRARIES
815
816.MAKE: install-am install-strip
817
818.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
819 clean-libLTLIBRARIES clean-libtool ctags distclean \
820 distclean-compile distclean-generic distclean-libtool \
821 distclean-tags distdir dvi dvi-am html html-am info info-am \
822 install install-am install-data install-data-am install-dvi \
823 install-dvi-am install-exec install-exec-am install-html \
824 install-html-am install-includesHEADERS install-info \
825 install-info-am install-libLTLIBRARIES install-man install-pdf \
826 install-pdf-am install-ps install-ps-am install-strip \
827 installcheck installcheck-am installdirs maintainer-clean \
828 maintainer-clean-generic mostlyclean mostlyclean-compile \
829 mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
830 tags uninstall uninstall-am uninstall-includesHEADERS \
831 uninstall-libLTLIBRARIES
832
833
834# Tell versions [3.59,3.63) of GNU make to not export all variables.
835# Otherwise a system limit (for SysV at least) may be exceeded.
836.NOEXPORT:
diff --git a/libraries/ecore/src/lib/ecore_imf/ecore_imf.c b/libraries/ecore/src/lib/ecore_imf/ecore_imf.c
deleted file mode 100644
index 7cf8a4a..0000000
--- a/libraries/ecore/src/lib/ecore_imf/ecore_imf.c
+++ /dev/null
@@ -1,73 +0,0 @@
1#ifdef HAVE_CONFIG_H
2# include <config.h>
3#endif
4
5#include <Ecore.h>
6#include <ecore_private.h>
7
8#include "Ecore_IMF.h"
9#include "ecore_imf_private.h"
10
11EAPI int ECORE_IMF_EVENT_PREEDIT_START = 0;
12EAPI int ECORE_IMF_EVENT_PREEDIT_END = 0;
13EAPI int ECORE_IMF_EVENT_PREEDIT_CHANGED = 0;
14EAPI int ECORE_IMF_EVENT_COMMIT = 0;
15EAPI int ECORE_IMF_EVENT_DELETE_SURROUNDING = 0;
16
17int _ecore_imf_log_dom = -1;
18static int _ecore_imf_init_count = 0;
19
20/**
21 * @defgroup Ecore_IMF_Lib_Group Ecore Input Method Library Functions
22 *
23 * Utility functions that set up and shut down the Ecore Input Method
24 * library.
25 */
26
27/**
28 * Initialises the Ecore_IMF library.
29 * @return Number of times the library has been initialised without being
30 * shut down.
31 * @ingroup Ecore_IMF_Lib_Group
32 */
33EAPI int
34ecore_imf_init(void)
35{
36 if (++_ecore_imf_init_count != 1) return _ecore_imf_init_count;
37
38 if (!ecore_init()) return --_ecore_imf_init_count;
39 _ecore_imf_log_dom = eina_log_domain_register
40 ("ecore_imf", ECORE_IMF_DEFAULT_LOG_COLOR);
41 if (_ecore_imf_log_dom < 0)
42 {
43 EINA_LOG_ERR("Impossible to create a log domain for the Ecore IMF module.");
44 ecore_shutdown();
45 return --_ecore_imf_init_count;
46 }
47 ecore_imf_module_init();
48
49 ECORE_IMF_EVENT_PREEDIT_START = ecore_event_type_new();
50 ECORE_IMF_EVENT_PREEDIT_END = ecore_event_type_new();
51 ECORE_IMF_EVENT_PREEDIT_CHANGED = ecore_event_type_new();
52 ECORE_IMF_EVENT_COMMIT = ecore_event_type_new();
53 ECORE_IMF_EVENT_DELETE_SURROUNDING = ecore_event_type_new();
54
55 return _ecore_imf_init_count;
56}
57
58/**
59 * Shuts down the Ecore_IMF library.
60 * @return Number of times the library has been initialised without being
61 * shut down.
62 * @ingroup Ecore_IMF_Lib_Group
63 */
64EAPI int
65ecore_imf_shutdown(void)
66{
67 if (--_ecore_imf_init_count != 0) return _ecore_imf_init_count;
68 ecore_imf_module_shutdown();
69 eina_log_domain_unregister(_ecore_imf_log_dom);
70 _ecore_imf_log_dom = -1;
71 ecore_shutdown();
72 return _ecore_imf_init_count;
73}
diff --git a/libraries/ecore/src/lib/ecore_imf/ecore_imf_context.c b/libraries/ecore/src/lib/ecore_imf/ecore_imf_context.c
deleted file mode 100644
index 423c461..0000000
--- a/libraries/ecore/src/lib/ecore_imf/ecore_imf_context.c
+++ /dev/null
@@ -1,1718 +0,0 @@
1#ifdef HAVE_CONFIG_H
2# include <config.h>
3#endif
4
5#include <stdlib.h>
6#include <string.h>
7#include <locale.h>
8
9#include <Ecore.h>
10#include <ecore_private.h>
11
12#include "Ecore_IMF.h"
13#include "ecore_imf_private.h"
14
15/**
16 * @defgroup Ecore_IMF_Context_Group Ecore Input Method Context Functions
17 *
18 * Functions that operate on Ecore Input Method Context objects.
19 */
20
21/**
22 * Get the list of the available Input Method Context ids.
23 *
24 * Note that the caller is responsible for freeing the Eina_List
25 * when finished with it. There is no need to finish the list strings.
26 *
27 * @return Return an Eina_List of strings;
28 * on failure it returns NULL.
29 * @ingroup Ecore_IMF_Context_Group
30 */
31EAPI Eina_List *
32ecore_imf_context_available_ids_get(void)
33{
34 return ecore_imf_module_context_ids_get();
35}
36
37EAPI Eina_List *
38ecore_imf_context_available_ids_by_canvas_type_get(const char *canvas_type)
39{
40 return ecore_imf_module_context_ids_by_canvas_type_get(canvas_type);
41}
42
43/*
44 * Match @locale against @against.
45 *
46 * 'en_US' against 'en_US' => 4
47 * 'en_US' against 'en' => 3
48 * 'en', 'en_UK' against 'en_US' => 2
49 * all locales, against '*' => 1
50 */
51static int
52_ecore_imf_context_match_locale(const char *locale, const char *against, int against_len)
53{
54 if (strcmp(against, "*") == 0)
55 return 1;
56
57 if (strcasecmp(locale, against) == 0)
58 return 4;
59
60 if (strncasecmp(locale, against, 2) == 0)
61 return (against_len == 2) ? 3 : 2;
62
63 return 0;
64}
65
66/**
67 * Get the id of the default Input Method Context.
68 * The id may to used to create a new instance of an Input Method
69 * Context object.
70 *
71 * @return Return a string containing the id of the default Input
72 * Method Context; on failure it returns NULL.
73 * @ingroup Ecore_IMF_Context_Group
74 */
75EAPI const char *
76ecore_imf_context_default_id_get(void)
77{
78 return ecore_imf_context_default_id_by_canvas_type_get(NULL);
79}
80
81EAPI const char *
82ecore_imf_context_default_id_by_canvas_type_get(const char *canvas_type)
83{
84 const char *id;
85 Eina_List *modules;
86 Ecore_IMF_Module *module;
87 char *locale;
88 char *tmp;
89 int best_goodness = 0;
90
91 id = getenv("ECORE_IMF_MODULE");
92 if (id)
93 {
94 if (strcmp(id, "none") == 0) return NULL;
95 if (ecore_imf_module_get(id)) return id;
96 }
97
98 modules = ecore_imf_module_available_get();
99 if (!modules) return NULL;
100
101 locale = setlocale(LC_CTYPE, NULL);
102 if (!locale) return NULL;
103
104 locale = strdup(locale);
105
106 tmp = strchr(locale, '.');
107 if (tmp) *tmp = '\0';
108 tmp = strchr(locale, '@');
109 if (tmp) *tmp = '\0';
110
111 id = NULL;
112
113 EINA_LIST_FREE(modules, module)
114 {
115 if (canvas_type &&
116 strcmp(module->info->canvas_type, canvas_type) == 0)
117 continue;
118
119 const char *p = module->info->default_locales;
120 while (p)
121 {
122 const char *q = strchr(p, ':');
123 int goodness = _ecore_imf_context_match_locale(locale, p, q ? (size_t)(q - p) : strlen (p));
124
125 if (goodness > best_goodness)
126 {
127 id = module->info->id;
128 best_goodness = goodness;
129 }
130
131 p = q ? q + 1 : NULL;
132 }
133 }
134
135 free(locale);
136 return id;
137}
138
139/**
140 * Retrieve the info for the Input Method Context with @p id.
141 *
142 * @param id The Input Method Context id to query for.
143 * @return Return a #Ecore_IMF_Context_Info for the Input Method Context with @p id;
144 * on failure it returns NULL.
145 * @ingroup Ecore_IMF_Context_Group
146 *
147 * Example
148 * @code
149 *
150 * const char *ctx_id;
151 * const Ecore_IMF_Context_Info *ctx_info;
152 * Ecore_IMF_Context *imf_context;
153 * ctx_id = ecore_imf_context_default_id_get();
154 * if (ctx_id)
155 * {
156 * ctx_info = ecore_imf_context_info_by_id_get(ctx_id);
157 * if (!ctx_info->canvas_type ||
158 * strcmp(ctx_info->canvas_type, "evas") == 0)
159 * {
160 * imf_context = ecore_imf_context_add(ctx_id);
161 * }
162 * else
163 * {
164 * ctx_id = ecore_imf_context_default_id_by_canvas_type_get("evas");
165 * if (ctx_id)
166 * {
167 * imf_context = ecore_imf_context_add(ctx_id);
168 * }
169 * }
170 * }
171 * @endcode
172 */
173EAPI const Ecore_IMF_Context_Info *
174ecore_imf_context_info_by_id_get(const char *id)
175{
176 Ecore_IMF_Module *module;
177
178 if (!id) return NULL;
179 module = ecore_imf_module_get(id);
180 if (!module) return NULL;
181 return module->info;
182}
183
184/**
185 * Create a new Input Method Context defined by the given id.
186 *
187 * @param id The Input Method Context id.
188 * @return A newly allocated Input Method Context;
189 * on failure it returns NULL.
190 * @ingroup Ecore_IMF_Context_Group
191 */
192EAPI Ecore_IMF_Context *
193ecore_imf_context_add(const char *id)
194{
195 Ecore_IMF_Context *ctx;
196
197 if (!id) return NULL;
198 ctx = ecore_imf_module_context_create(id);
199 if (!ctx || !ctx->klass) return NULL;
200 if (ctx->klass->add) ctx->klass->add(ctx);
201 /* default use_preedit is EINA_TRUE, so let's make sure it's
202 * set on the immodule */
203 ecore_imf_context_use_preedit_set(ctx, EINA_TRUE);
204
205 /* default prediction is EINA_TRUE, so let's make sure it's
206 * set on the immodule */
207 ecore_imf_context_prediction_allow_set(ctx, EINA_TRUE);
208
209 /* default autocapital type is SENTENCE type, so let's make sure it's
210 * set on the immodule */
211 ecore_imf_context_autocapital_type_set(ctx, ECORE_IMF_AUTOCAPITAL_TYPE_SENTENCE);
212
213 /* default input panel enabled status is EINA_TRUE, so let's make sure it's
214 * set on the immodule */
215 ecore_imf_context_input_panel_enabled_set(ctx, EINA_TRUE);
216
217 /* default input panel layout type is NORMAL type, so let's make sure it's
218 * set on the immodule */
219 ecore_imf_context_input_panel_layout_set(ctx, ECORE_IMF_INPUT_PANEL_LAYOUT_NORMAL);
220
221 /* default input_mode is ECORE_IMF_INPUT_MODE_FULL, so let's make sure it's
222 * set on the immodule */
223 ecore_imf_context_input_mode_set(ctx, ECORE_IMF_INPUT_MODE_FULL);
224 return ctx;
225}
226
227/**
228 * Retrieve the info for the given Input Method Context.
229 *
230 * @param ctx An #Ecore_IMF_Context.
231 * @return Return a #Ecore_IMF_Context_Info for the given Input Method Context;
232 * on failure it returns NULL.
233 * @ingroup Ecore_IMF_Context_Group
234 */
235EAPI const Ecore_IMF_Context_Info *
236ecore_imf_context_info_get(Ecore_IMF_Context *ctx)
237{
238 if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
239 {
240 ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
241 "ecore_imf_context_info_get");
242 return NULL;
243 }
244 return ctx->module->info;
245}
246
247/**
248 * Delete the given Input Method Context and free its memory.
249 *
250 * @param ctx An #Ecore_IMF_Context.
251 * @ingroup Ecore_IMF_Context_Group
252 */
253EAPI void
254ecore_imf_context_del(Ecore_IMF_Context *ctx)
255{
256 Ecore_IMF_Func_Node *fn;
257
258 if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
259 {
260 ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
261 "ecore_imf_context_del");
262 return;
263 }
264 if (ctx->klass->del) ctx->klass->del(ctx);
265
266 if (ctx->callbacks)
267 {
268 EINA_LIST_FREE(ctx->callbacks, fn)
269 free(fn);
270 }
271
272 ECORE_MAGIC_SET(ctx, ECORE_MAGIC_NONE);
273 free(ctx);
274}
275
276/**
277 * Set the client window for the Input Method Context; this is the
278 * Ecore_X_Window when using X11, Ecore_Win32_Window when using Win32, etc.
279 * This window is used in order to correctly position status windows, and may
280 * also be used for purposes internal to the Input Method Context.
281 *
282 * @param ctx An #Ecore_IMF_Context.
283 * @param window The client window. This may be NULL to indicate
284 * that the previous client window no longer exists.
285 * @ingroup Ecore_IMF_Context_Group
286 */
287EAPI void
288ecore_imf_context_client_window_set(Ecore_IMF_Context *ctx, void *window)
289{
290 if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
291 {
292 ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
293 "ecore_imf_context_client_window_set");
294 return;
295 }
296 if (ctx->klass->client_window_set) ctx->klass->client_window_set(ctx, window);
297 ctx->window = window;
298}
299
300/**
301 * Get the client window of the Input Method Context
302 *
303 * See @ref ecore_imf_context_client_window_set for more details.
304 *
305 * @param ctx An #Ecore_IMF_Context.
306 * @return Return the client window.
307 * @ingroup Ecore_IMF_Context_Group
308 * @since 1.1.0
309 */
310EAPI void *
311ecore_imf_context_client_window_get(Ecore_IMF_Context *ctx)
312{
313 if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
314 {
315 ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
316 "ecore_imf_context_client_window_get");
317 return NULL;
318 }
319 return ctx->window;
320}
321
322/**
323 * Set the client canvas for the Input Method Context; this is the
324 * canvas in which the input appears.
325 * The canvas type can be determined by using the context canvas type.
326 * Actually only canvas with type "evas" (Evas *) is supported.
327 * This canvas may be used in order to correctly position status windows, and may
328 * also be used for purposes internal to the Input Method Context.
329 *
330 * @param ctx An #Ecore_IMF_Context.
331 * @param canvas The client canvas. This may be NULL to indicate
332 * that the previous client canvas no longer exists.
333 * @ingroup Ecore_IMF_Context_Group
334 */
335EAPI void
336ecore_imf_context_client_canvas_set(Ecore_IMF_Context *ctx, void *canvas)
337{
338 if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
339 {
340 ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
341 "ecore_imf_context_client_canvas_set");
342 return;
343 }
344 if (ctx->klass->client_canvas_set) ctx->klass->client_canvas_set(ctx, canvas);
345 ctx->client_canvas = canvas;
346}
347
348/**
349 * Get the client canvas of the Input Method Context.
350 *
351 * See @ref ecore_imf_context_client_canvas_set for more details.
352 *
353 * @param ctx An #Ecore_IMF_Context.
354 * @return Return the client canvas.
355 * @ingroup Ecore_IMF_Context_Group
356 * @since 1.1.0
357 */
358EAPI void *
359ecore_imf_context_client_canvas_get(Ecore_IMF_Context *ctx)
360{
361 if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
362 {
363 ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
364 "ecore_imf_context_client_canvas_get");
365 return NULL;
366 }
367 return ctx->client_canvas;
368}
369
370/**
371 * Ask the Input Method Context to show itself.
372 *
373 * @param ctx An #Ecore_IMF_Context.
374 * @ingroup Ecore_IMF_Context_Group
375 */
376EAPI void
377ecore_imf_context_show(Ecore_IMF_Context *ctx)
378{
379 if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
380 {
381 ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
382 "ecore_imf_context_show");
383 return;
384 }
385 if (ctx->klass->show) ctx->klass->show(ctx);
386}
387
388/**
389 * Ask the Input Method Context to hide itself.
390 *
391 * @param ctx An #Ecore_IMF_Context.
392 * @ingroup Ecore_IMF_Context_Group
393 */
394EAPI void
395ecore_imf_context_hide(Ecore_IMF_Context *ctx)
396{
397 if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
398 {
399 ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
400 "ecore_imf_context_hide");
401 return;
402 }
403 if (ctx->klass->hide) ctx->klass->hide(ctx);
404}
405
406/**
407 * Retrieve the current preedit string and cursor position
408 * for the Input Method Context.
409 *
410 * @param ctx An #Ecore_IMF_Context.
411 * @param str Location to store the retrieved string. The
412 * string retrieved must be freed with free().
413 * @param cursor_pos Location to store position of cursor (in characters)
414 * within the preedit string.
415 * @ingroup Ecore_IMF_Context_Group
416 */
417EAPI void
418ecore_imf_context_preedit_string_get(Ecore_IMF_Context *ctx, char **str, int *cursor_pos)
419{
420 if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
421 {
422 ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
423 "ecore_imf_context_preedit_string_get");
424 return;
425 }
426 if (ctx->klass->preedit_string_get)
427 ctx->klass->preedit_string_get(ctx, str, cursor_pos);
428 else
429 {
430 if (str) *str = strdup("");
431 if (cursor_pos) *cursor_pos = 0;
432 }
433}
434
435/**
436 * Retrieve the current preedit string, attributes and
437 * cursor position for the Input Method Context.
438 *
439 * @param ctx An #Ecore_IMF_Context.
440 * @param str Location to store the retrieved string. The
441 * string retrieved must be freed with free().
442 * @param attrs an Eina_List of attributes
443 * @param cursor_pos Location to store position of cursor (in characters)
444 * within the preedit string.
445 * @ingroup Ecore_IMF_Context_Group
446 *
447 * Example
448 * @code
449 * char *preedit_string;
450 * int cursor_pos;
451 * Eina_List *attrs = NULL, *l = NULL;
452 * Ecore_IMF_Preedit_Attr *attr;
453 *
454 * ecore_imf_context_preedit_string_with_attributes_get(imf_context,
455 * &preedit_string,
456 * &attrs, &cursor_pos);
457 * if (!preedit_string) return;
458 *
459 * if (strlen(preedit_string) > 0)
460 * {
461 * if (attrs)
462 * {
463 * EINA_LIST_FOREACH(attrs, l, attr)
464 * {
465 * if (attr->preedit_type == ECORE_IMF_PREEDIT_TYPE_SUB1)
466 * {
467 * // Something to do
468 * }
469 * else if (attr->preedit_type == ECORE_IMF_PREEDIT_TYPE_SUB2)
470 * {
471 * // Something to do
472 * }
473 * else if (attr->preedit_type == ECORE_IMF_PREEDIT_TYPE_SUB3)
474 * {
475 * // Something to do
476 * }
477 * }
478 * }
479 * }
480 *
481 * // delete attribute list
482 * if (attrs)
483 * {
484 * EINA_LIST_FREE(attrs, attr) free(attr);
485 * }
486 *
487 * free(preedit_string);
488 * @endcode
489 * @since 1.1.0
490 */
491EAPI void
492ecore_imf_context_preedit_string_with_attributes_get(Ecore_IMF_Context *ctx, char **str, Eina_List **attrs, int *cursor_pos)
493{
494 if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
495 {
496 ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
497 "ecore_imf_context_preedit_string_with_attributes_get");
498 return;
499 }
500 if (ctx->klass->preedit_string_with_attributes_get)
501 ctx->klass->preedit_string_with_attributes_get(ctx, str, attrs, cursor_pos);
502 else
503 {
504 if (str) *str = strdup("");
505 if (attrs) *attrs = NULL;
506 if (cursor_pos) *cursor_pos = 0;
507 }
508}
509
510/**
511 * Notify the Input Method Context that the widget to which its
512 * correspond has gained focus.
513 *
514 * @param ctx An #Ecore_IMF_Context.
515 * @ingroup Ecore_IMF_Context_Group
516 *
517 * Example
518 * @code
519 * static void
520 * _focus_in_cb(void *data, Evas_Object *o, const char *emission, const char *source)
521 * {
522 * ecore_imf_context_reset(imf_context);
523 * ecore_imf_context_focus_in(imf_context);
524 * }
525 *
526 * evas_object_event_callback_add(obj, EVAS_CALLBACK_FOCUS_IN, _focus_in_cb, ed);
527 * @endcode
528 */
529EAPI void
530ecore_imf_context_focus_in(Ecore_IMF_Context *ctx)
531{
532 if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
533 {
534 ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
535 "ecore_imf_context_focus_in");
536 return;
537 }
538 if (ctx->klass->focus_in) ctx->klass->focus_in(ctx);
539}
540
541/**
542 * Notify the Input Method Context that the widget to which its
543 * correspond has lost focus.
544 *
545 * @param ctx An #Ecore_IMF_Context.
546 * @ingroup Ecore_IMF_Context_Group
547 *
548 * Example
549 * @code
550 * static void
551 * _focus_out_cb(void *data, Evas_Object *o, const char *emission, const char *source)
552 * {
553 * ecore_imf_context_reset(imf_context);
554 * ecore_imf_context_focus_out(imf_context);
555 * }
556 *
557 * evas_object_event_callback_add(obj, EVAS_CALLBACK_FOCUS_OUT, _focus_out_cb, ed);
558 * @endcode
559 */
560EAPI void
561ecore_imf_context_focus_out(Ecore_IMF_Context *ctx)
562{
563 if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
564 {
565 ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
566 "ecore_imf_context_focus_out");
567 return;
568 }
569 if (ctx->klass->focus_out) ctx->klass->focus_out(ctx);
570}
571
572/**
573 * Notify the Input Method Context that a change such as a
574 * change in cursor position has been made. This will typically
575 * cause the Input Method Context to clear the preedit state.
576 *
577 * @param ctx An #Ecore_IMF_Context.
578 * @ingroup Ecore_IMF_Context_Group
579 *
580 * Example
581 * @code
582 * static void
583 * _focus_out_cb(void *data, Evas_Object *o, const char *emission, const char *source)
584 * {
585 * ecore_imf_context_reset(imf_context);
586 * ecore_imf_context_focus_out(imf_context);
587 * }
588 *
589 * evas_object_event_callback_add(obj, EVAS_CALLBACK_FOCUS_OUT, _focus_out_cb, ed);
590 * @endcode
591 */
592EAPI void
593ecore_imf_context_reset(Ecore_IMF_Context *ctx)
594{
595 if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
596 {
597 ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
598 "ecore_imf_context_reset");
599 return;
600 }
601 if (ctx->klass->reset) ctx->klass->reset(ctx);
602}
603
604/**
605 * Notify the Input Method Context that a change in the cursor
606 * position has been made.
607 *
608 * @param ctx An #Ecore_IMF_Context.
609 * @param cursor_pos New cursor position in characters.
610 * @ingroup Ecore_IMF_Context_Group
611 */
612EAPI void
613ecore_imf_context_cursor_position_set(Ecore_IMF_Context *ctx, int cursor_pos)
614{
615 if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
616 {
617 ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
618 "ecore_imf_context_cursor_position_set");
619 return;
620 }
621 if (ctx->klass->cursor_position_set) ctx->klass->cursor_position_set(ctx, cursor_pos);
622}
623
624/**
625 * Notify the Input Method Context that a change in the cursor
626 * location has been made. The location is relative to the canvas.
627 * The cursor location can be used to determine the position of
628 * candidate word window in the immodule.
629 *
630 * @param ctx An #Ecore_IMF_Context.
631 * @param x cursor x position.
632 * @param y cursor y position.
633 * @param w cursor width.
634 * @param h cursor height.
635 * @ingroup Ecore_IMF_Context_Group
636 * @since 1.1.0
637 */
638EAPI void
639ecore_imf_context_cursor_location_set(Ecore_IMF_Context *ctx, int x, int y, int w, int h)
640{
641 if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
642 {
643 ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
644 "ecore_imf_context_cursor_location_set");
645 return;
646 }
647 if (ctx->klass->cursor_location_set) ctx->klass->cursor_location_set(ctx, x, y, w, h);
648}
649
650/**
651 * Set whether the IM context should use the preedit string
652 * to display feedback. If @c use_preedit is EINA_FALSE (default
653 * is EINA_TRUE), then the IM context may use some other method to display
654 * feedback, such as displaying it in a child of the root window.
655 *
656 * @param ctx An #Ecore_IMF_Context.
657 * @param use_preedit Whether the IM context should use the preedit string.
658 * @ingroup Ecore_IMF_Context_Group
659 */
660EAPI void
661ecore_imf_context_use_preedit_set(Ecore_IMF_Context *ctx, Eina_Bool use_preedit)
662{
663 if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
664 {
665 ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
666 "ecore_imf_context_use_preedit_set");
667 return;
668 }
669 if (ctx->klass->use_preedit_set) ctx->klass->use_preedit_set(ctx, use_preedit);
670}
671
672/**
673 * Set whether the IM context should allow to use the text prediction.
674 * If @c prediction is EINA_FALSE (default is EINA_TRUE), then the IM context will not display the text prediction window.
675 *
676 * @param ctx An #Ecore_IMF_Context.
677 * @param prediction Whether the IM context should allow to use the text prediction.
678 * @ingroup Ecore_IMF_Context_Group
679 * @since 1.1.0
680 */
681EAPI void
682ecore_imf_context_prediction_allow_set(Ecore_IMF_Context *ctx, Eina_Bool prediction)
683{
684 if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
685 {
686 ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
687 "ecore_imf_context_prediction_allow_set");
688 return;
689 }
690
691 ctx->allow_prediction = prediction;
692
693 if (ctx->klass->prediction_allow_set)
694 ctx->klass->prediction_allow_set(ctx, prediction);
695}
696
697/**
698 * Get whether the IM context should allow to use the text prediction.
699 *
700 * @param ctx An #Ecore_IMF_Context.
701 * @return EINA_TRUE if it allows to use the text prediction, otherwise EINA_FALSE.
702 * @ingroup Ecore_IMF_Context_Group
703 * @since 1.1.0
704 */
705EAPI Eina_Bool
706ecore_imf_context_prediction_allow_get(Ecore_IMF_Context *ctx)
707{
708 if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
709 {
710 ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
711 "ecore_imf_context_prediction_allow_get");
712 return EINA_FALSE;
713 }
714
715 return ctx->allow_prediction;
716}
717
718/**
719 * Set the autocapitalization type on the immodule.
720 *
721 * @param ctx An #Ecore_IMF_Context.
722 * @param autocapital_type the autocapitalization type.
723 * @ingroup Ecore_IMF_Context_Group
724 * @since 1.1.0
725 */
726EAPI void
727ecore_imf_context_autocapital_type_set(Ecore_IMF_Context *ctx, Ecore_IMF_Autocapital_Type autocapital_type)
728{
729 if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
730 {
731 ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
732 "ecore_imf_context_autocapital_type_set");
733 return;
734 }
735
736 ctx->autocapital_type = autocapital_type;
737
738 if (ctx->klass->autocapital_type_set) ctx->klass->autocapital_type_set(ctx, autocapital_type);
739}
740
741/**
742 * Get the autocapitalization type.
743 *
744 * @param ctx An #Ecore_IMF_Context.
745 * @return The autocapital type being used by @p ctx.
746 * @ingroup Ecore_IMF_Context_Group
747 * @since 1.1.0
748 */
749EAPI Ecore_IMF_Autocapital_Type
750ecore_imf_context_autocapital_type_get(Ecore_IMF_Context *ctx)
751{
752 if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
753 {
754 ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
755 "ecore_imf_context_autocapital_allow_get");
756 return ECORE_IMF_AUTOCAPITAL_TYPE_NONE;
757 }
758
759 return ctx->autocapital_type;
760}
761
762/**
763 * Set the callback to be used on get_surrounding request.
764 *
765 * This callback will be called when the Input Method Context
766 * module requests the surrounding context.
767 *
768 * @param ctx An #Ecore_IMF_Context.
769 * @param func The callback to be called.
770 * @param data The data pointer to be passed to @p func
771 * @ingroup Ecore_IMF_Context_Group
772 */
773EAPI void
774ecore_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)
775{
776 if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
777 {
778 ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
779 "ecore_imf_context_retrieve_surrounding_callback_set");
780 return;
781 }
782
783 ctx->retrieve_surrounding_func = func;
784 ctx->retrieve_surrounding_data = (void *) data;
785}
786
787/**
788 * Set the input mode used by the Ecore Input Context.
789 *
790 * The input mode can be one of the input modes defined in
791 * #Ecore_IMF_Input_Mode. The default input mode is
792 * ECORE_IMF_INPUT_MODE_FULL.
793 *
794 * @param ctx An #Ecore_IMF_Context.
795 * @param input_mode The input mode to be used by @p ctx.
796 * @ingroup Ecore_IMF_Context_Group
797 */
798EAPI void
799ecore_imf_context_input_mode_set(Ecore_IMF_Context *ctx, Ecore_IMF_Input_Mode input_mode)
800{
801 if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
802 {
803 ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
804 "ecore_imf_context_input_mode_set");
805 return;
806 }
807 if (ctx->klass->input_mode_set) ctx->klass->input_mode_set(ctx, input_mode);
808 ctx->input_mode = input_mode;
809}
810
811/**
812 * Get the input mode being used by the Ecore Input Context.
813 *
814 * See @ref ecore_imf_context_input_mode_set for more details.
815 *
816 * @param ctx An #Ecore_IMF_Context.
817 * @return The input mode being used by @p ctx.
818 * @ingroup Ecore_IMF_Context_Group
819 */
820EAPI Ecore_IMF_Input_Mode
821ecore_imf_context_input_mode_get(Ecore_IMF_Context *ctx)
822{
823 if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
824 {
825 ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
826 "ecore_imf_context_input_mode_set");
827 return 0;
828 }
829 return ctx->input_mode;
830}
831
832/**
833 * Allow an Ecore Input Context to internally handle an event.
834 * If this function returns EINA_TRUE, then no further processing
835 * should be done for this event.
836 *
837 * Input methods must be able to accept all types of events (simply
838 * returning EINA_FALSE if the event was not handled), but there is no
839 * obligation of any events to be submitted to this function.
840 *
841 * @param ctx An #Ecore_IMF_Context.
842 * @param type The type of event defined by #Ecore_IMF_Event_Type.
843 * @param event The event itself.
844 * @return EINA_TRUE if the event was handled; otherwise EINA_FALSE.
845 * @ingroup Ecore_IMF_Context_Group
846 *
847 * Example
848 * @code
849 * static void
850 * _key_down_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
851 * {
852 * Evas_Event_Key_Down *ev = event_info;
853 * if (!ev->keyname) return;
854 *
855 * if (imf_context)
856 * {
857 * Ecore_IMF_Event_Key_Down ecore_ev;
858 * ecore_imf_evas_event_key_down_wrap(ev, &ecore_ev);
859 * if (ecore_imf_context_filter_event(imf_context,
860 * ECORE_IMF_EVENT_KEY_DOWN,
861 * (Ecore_IMF_Event *)&ecore_ev))
862 * return;
863 * }
864 * }
865 *
866 * evas_object_event_callback_add(obj, EVAS_CALLBACK_KEY_DOWN, _key_down_cb, data);
867 * @endcode
868 */
869EAPI Eina_Bool
870ecore_imf_context_filter_event(Ecore_IMF_Context *ctx, Ecore_IMF_Event_Type type, Ecore_IMF_Event *event)
871{
872 if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
873 {
874 ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
875 "ecore_imf_context_filter_event");
876 return EINA_FALSE;
877 }
878 if (ctx->klass->filter_event) return ctx->klass->filter_event(ctx, type, event);
879 return EINA_FALSE;
880}
881
882/**
883 * @defgroup Ecore_IMF_Context_Module_Group Ecore Input Method Context Module Functions
884 *
885 * Functions that should be used by Ecore Input Method Context modules.
886 */
887
888/**
889 * Creates a new Input Method Context with klass specified by @p ctxc.
890 *
891 * This method should be used by modules implementing the Input
892 * Method Context interface.
893 *
894 * @param ctxc An #Ecore_IMF_Context_Class.
895 * @return A new #Ecore_IMF_Context; on failure it returns NULL.
896 * @ingroup Ecore_IMF_Context_Module_Group
897 */
898EAPI Ecore_IMF_Context *
899ecore_imf_context_new(const Ecore_IMF_Context_Class *ctxc)
900{
901 Ecore_IMF_Context *ctx;
902
903 if (!ctxc) return NULL;
904 ctx = calloc(1, sizeof(Ecore_IMF_Context));
905 if (!ctx) return NULL;
906 ECORE_MAGIC_SET(ctx, ECORE_MAGIC_CONTEXT);
907 ctx->klass = ctxc;
908 ctx->data = NULL;
909 ctx->retrieve_surrounding_func = NULL;
910 ctx->retrieve_surrounding_data = NULL;
911 return ctx;
912}
913
914/**
915 * Set the Input Method Context specific data.
916 *
917 * Note that this method should be used by modules to set
918 * the Input Method Context specific data and it's not meant to
919 * be used by applications to store application specific data.
920 *
921 * @param ctx An #Ecore_IMF_Context.
922 * @param data The Input Method Context specific data.
923 * @return A new #Ecore_IMF_Context; on failure it returns NULL.
924 * @ingroup Ecore_IMF_Context_Module_Group
925 */
926EAPI void
927ecore_imf_context_data_set(Ecore_IMF_Context *ctx, void *data)
928{
929 if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
930 {
931 ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
932 "ecore_imf_context_data_set");
933 return;
934 }
935 ctx->data = data;
936}
937
938/**
939 * Get the Input Method Context specific data.
940 *
941 * See @ref ecore_imf_context_data_set for more details.
942 *
943 * @param ctx An #Ecore_IMF_Context.
944 * @return The Input Method Context specific data.
945 * @ingroup Ecore_IMF_Context_Module_Group
946 */
947EAPI void *ecore_imf_context_data_get(Ecore_IMF_Context *ctx)
948{
949 if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
950 {
951 ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
952 "ecore_imf_context_data_get");
953 return NULL;
954 }
955 return ctx->data;
956}
957
958/**
959 * Retrieve context around insertion point.
960 *
961 * This function is implemented by calling the
962 * Ecore_IMF_Context::retrieve_surrounding_func (
963 * set using #ecore_imf_context_retrieve_surrounding_callback_set).
964 *
965 * There is no obligation for a widget to respond to the
966 * ::retrieve_surrounding_func, so input methods must be prepared
967 * to function without context.
968 *
969 * @param ctx An #Ecore_IMF_Context.
970 * @param text Location to store a UTF-8 encoded string of text
971 * holding context around the insertion point.
972 * If the function returns EINA_TRUE, then you must free
973 * the result stored in this location with free().
974 * @param cursor_pos Location to store the position in characters of
975 * the insertion cursor within @p text.
976 * @return EINA_TRUE if surrounding text was provided; otherwise EINA_FALSE.
977 * @ingroup Ecore_IMF_Context_Module_Group
978 */
979EAPI Eina_Bool
980ecore_imf_context_surrounding_get(Ecore_IMF_Context *ctx, char **text, int *cursor_pos)
981{
982 int result = EINA_FALSE;
983
984 if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
985 {
986 ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
987 "ecore_imf_context_surrounding_get");
988 return EINA_FALSE;
989 }
990
991 if (ctx->retrieve_surrounding_func)
992 {
993 result = ctx->retrieve_surrounding_func(ctx->retrieve_surrounding_data, ctx, text, cursor_pos);
994 if (!result)
995 {
996 if (text) *text = NULL;
997 if (cursor_pos) *cursor_pos = 0;
998 }
999 }
1000 return result;
1001}
1002
1003static void
1004_ecore_imf_event_free_preedit(void *data __UNUSED__, void *event)
1005{
1006 free(event);
1007}
1008
1009/**
1010 * Adds ECORE_IMF_EVENT_PREEDIT_START to the event queue.
1011 *
1012 * ECORE_IMF_EVENT_PREEDIT_START should be added when a new preedit sequence starts.
1013 * It's asynchronous method to put event to the event queue.
1014 * ecore_imf_context_event_callback_call() can be used as synchronous method.
1015 *
1016 * @param ctx An #Ecore_IMF_Context.
1017 * @ingroup Ecore_IMF_Context_Module_Group
1018 */
1019EAPI void
1020ecore_imf_context_preedit_start_event_add(Ecore_IMF_Context *ctx)
1021{
1022 Ecore_IMF_Event_Commit *ev;
1023
1024 if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
1025 {
1026 ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
1027 "ecore_imf_context_preedit_start_event_add");
1028 return;
1029 }
1030
1031 ev = malloc(sizeof(Ecore_IMF_Event_Preedit_Start));
1032 ev->ctx = ctx;
1033 ecore_event_add(ECORE_IMF_EVENT_PREEDIT_START,
1034 ev, _ecore_imf_event_free_preedit, NULL);
1035}
1036
1037/**
1038 * Adds ECORE_IMF_EVENT_PREEDIT_END to the event queue.
1039 *
1040 * ECORE_IMF_EVENT_PREEDIT_END should be added when a new preedit sequence has been completed or canceled.
1041 * It's asynchronous method to put event to the event queue.
1042 * ecore_imf_context_event_callback_call() can be used as synchronous method.
1043 *
1044 * @param ctx An #Ecore_IMF_Context.
1045 * @ingroup Ecore_IMF_Context_Module_Group
1046 */
1047EAPI void
1048ecore_imf_context_preedit_end_event_add(Ecore_IMF_Context *ctx)
1049{
1050 Ecore_IMF_Event_Commit *ev;
1051
1052 if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
1053 {
1054 ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
1055 "ecore_imf_context_preedit_end_event_add");
1056 return;
1057 }
1058
1059 ev = malloc(sizeof(Ecore_IMF_Event_Preedit_End));
1060 ev->ctx = ctx;
1061 ecore_event_add(ECORE_IMF_EVENT_PREEDIT_END,
1062 ev, _ecore_imf_event_free_preedit, NULL);
1063}
1064
1065/**
1066 * Adds ECORE_IMF_EVENT_PREEDIT_CHANGED to the event queue.
1067 *
1068 * It's asynchronous method to put event to the event queue.
1069 * ecore_imf_context_event_callback_call() can be used as synchronous method.
1070 *
1071 * @param ctx An #Ecore_IMF_Context.
1072 * @ingroup Ecore_IMF_Context_Module_Group
1073 */
1074EAPI void
1075ecore_imf_context_preedit_changed_event_add(Ecore_IMF_Context *ctx)
1076{
1077 Ecore_IMF_Event_Commit *ev;
1078
1079 if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
1080 {
1081 ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
1082 "ecore_imf_context_preedit_changed_event_add");
1083 return;
1084 }
1085
1086 ev = malloc(sizeof(Ecore_IMF_Event_Preedit_Changed));
1087 ev->ctx = ctx;
1088 ecore_event_add(ECORE_IMF_EVENT_PREEDIT_CHANGED,
1089 ev, _ecore_imf_event_free_preedit, NULL);
1090}
1091
1092static void
1093_ecore_imf_event_free_commit(void *data __UNUSED__, void *event)
1094{
1095 Ecore_IMF_Event_Commit *ev;
1096
1097 ev = event;
1098 if (ev->str) free(ev->str);
1099 free(ev);
1100}
1101
1102/**
1103 * Adds ECORE_IMF_EVENT_COMMIT to the event queue.
1104 *
1105 * It's asynchronous method to put event to the event queue.
1106 * ecore_imf_context_event_callback_call() can be used as synchronous method.
1107 *
1108 * @param ctx An #Ecore_IMF_Context.
1109 * @param str The committed string.
1110 * @ingroup Ecore_IMF_Context_Module_Group
1111 */
1112EAPI void
1113ecore_imf_context_commit_event_add(Ecore_IMF_Context *ctx, const char *str)
1114{
1115 Ecore_IMF_Event_Commit *ev;
1116
1117 if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
1118 {
1119 ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
1120 "ecore_imf_context_commit_event_add");
1121 return;
1122 }
1123
1124 ev = malloc(sizeof(Ecore_IMF_Event_Commit));
1125 ev->ctx = ctx;
1126 ev->str = str ? strdup(str) : NULL;
1127 ecore_event_add(ECORE_IMF_EVENT_COMMIT,
1128 ev, _ecore_imf_event_free_commit, NULL);
1129
1130}
1131
1132static void
1133_ecore_imf_event_free_delete_surrounding(void *data __UNUSED__, void *event)
1134{
1135 free(event);
1136}
1137
1138/**
1139 * Adds ECORE_IMF_EVENT_DELETE_SURROUNDING to the event queue.
1140 *
1141 * Asks the widget that the input context is attached to to delete characters around the cursor position
1142 * by adding the ECORE_IMF_EVENT_DELETE_SURROUNDING to the event queue.
1143 * Note that offset and n_chars are in characters not in bytes.
1144 *
1145 * It's asynchronous method to put ECORE_IMF_EVENT_DELETE_SURROUNDING event to the event queue.
1146 * ecore_imf_context_event_callback_call() can be used as synchronous method.
1147 *
1148 * @param ctx An #Ecore_IMF_Context.
1149 * @param offset The start offset of surrounding to be deleted.
1150 * @param n_chars The number of characters to be deleted.
1151 * @ingroup Ecore_IMF_Context_Module_Group
1152 */
1153EAPI void
1154ecore_imf_context_delete_surrounding_event_add(Ecore_IMF_Context *ctx, int offset, int n_chars)
1155{
1156 Ecore_IMF_Event_Delete_Surrounding *ev;
1157
1158 if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
1159 {
1160 ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
1161 "ecore_imf_context_delete_surrounding_event_add");
1162 return;
1163 }
1164
1165 ev = malloc(sizeof(Ecore_IMF_Event_Delete_Surrounding));
1166 ev->ctx = ctx;
1167 ev->offset = offset;
1168 ev->n_chars = n_chars;
1169 ecore_event_add(ECORE_IMF_EVENT_DELETE_SURROUNDING,
1170 ev, _ecore_imf_event_free_delete_surrounding, NULL);
1171}
1172
1173/**
1174 * Add (register) a callback function to a given context event.
1175 *
1176 * This function adds a function callback to the context @p ctx when the
1177 * event of type @p type occurs on it. The function pointer is @p
1178 * func.
1179 *
1180 * The event type @p type to trigger the function may be one of
1181 * #ECORE_IMF_CALLBACK_PREEDIT_START, #ECORE_IMF_CALLBACK_PREEDIT_END,
1182 * #ECORE_IMF_CALLBACK_PREEDIT_CHANGED, #ECORE_IMF_CALLBACK_COMMIT and
1183 * #ECORE_IMF_CALLBACK_DELETE_SURROUNDING.
1184 *
1185 * @param ctx Ecore_IMF_Context to attach a callback to.
1186 * @param type The type of event that will trigger the callback
1187 * @param func The (callback) function to be called when the event is
1188 * triggered
1189 * @param data The data pointer to be passed to @p func
1190 * @ingroup Ecore_IMF_Context_Group
1191 * @since 1.2.0
1192 *
1193 * Example
1194 * @code
1195 * static void
1196 * _imf_event_commit_cb(void *data, Ecore_IMF_Context *ctx, void *event_info)
1197 * {
1198 * char *commit_str = event_info;
1199 * // something to do
1200 * }
1201 *
1202 * ecore_imf_context_event_callback_add(en->imf_context, ECORE_IMF_CALLBACK_COMMIT, _imf_event_commit_cb, data);
1203 * @endcode
1204 */
1205EAPI void
1206ecore_imf_context_event_callback_add(Ecore_IMF_Context *ctx, Ecore_IMF_Callback_Type type, Ecore_IMF_Event_Cb func, const void *data)
1207{
1208 Ecore_IMF_Func_Node *fn = NULL;
1209
1210 if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
1211 {
1212 ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
1213 "ecore_imf_context_event_callback_add");
1214 return;
1215 }
1216
1217 if (!func) return;
1218
1219 fn = calloc(1, sizeof (Ecore_IMF_Func_Node));
1220 if (!fn) return;
1221
1222 fn->func = func;
1223 fn->data = data;
1224 fn->type = type;
1225
1226 ctx->callbacks = eina_list_append(ctx->callbacks, fn);
1227}
1228
1229/**
1230 * Delete (unregister) a callback function registered to a given
1231 * context event.
1232 *
1233 * This function removes a function callback from the context @p ctx when the
1234 * event of type @p type occurs on it. The function pointer is @p
1235 * func.
1236 *
1237 * @see ecore_imf_context_event_callback_add() for more details
1238 *
1239 * @param ctx Ecore_IMF_Context to remove a callback from.
1240 * @param type The type of event that was triggering the callback
1241 * @param func The (callback) function that was to be called when the event was triggered
1242 * @return the data pointer
1243 * @ingroup Ecore_IMF_Context_Group
1244 * @since 1.2.0
1245 */
1246EAPI void *
1247ecore_imf_context_event_callback_del(Ecore_IMF_Context *ctx, Ecore_IMF_Callback_Type type, Ecore_IMF_Event_Cb func)
1248{
1249 Eina_List *l = NULL;
1250 Eina_List *l_next = NULL;
1251 Ecore_IMF_Func_Node *fn = NULL;
1252
1253 if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
1254 {
1255 ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
1256 "ecore_imf_context_event_callback_del");
1257 return NULL;
1258 }
1259
1260 if (!func) return NULL;
1261 if (!ctx->callbacks) return NULL;
1262
1263 EINA_LIST_FOREACH_SAFE(ctx->callbacks, l, l_next, fn)
1264 {
1265 if ((fn) && (fn->func == func) && (fn->type == type))
1266 {
1267 void *tmp = (void *)fn->data;
1268 free(fn);
1269 ctx->callbacks = eina_list_remove_list(ctx->callbacks, l);
1270 return tmp;
1271 }
1272 }
1273 return NULL;
1274}
1275
1276/**
1277 * Call a given callback on the context @p ctx.
1278 *
1279 * ecore_imf_context_preedit_start_event_add, ecore_imf_context_preedit_end_event_add,
1280 * ecore_imf_context_preedit_changed_event_add, ecore_imf_context_commit_event_add and
1281 * ecore_imf_context_delete_surrounding_event_add APIs are asynchronous
1282 * because those API adds each event to the event queue.
1283 *
1284 * This API provides the way to call each callback function immediately.
1285 *
1286 * @param ctx Ecore_IMF_Context.
1287 * @param type The type of event that will trigger the callback
1288 * @param event_info The pointer to event specific struct or information to
1289 * pass to the callback functions registered on this event
1290 * @ingroup Ecore_IMF_Context_Module_Group
1291 * @since 1.2.0
1292 */
1293EAPI void
1294ecore_imf_context_event_callback_call(Ecore_IMF_Context *ctx, Ecore_IMF_Callback_Type type, void *event_info)
1295{
1296 Ecore_IMF_Func_Node *fn = NULL;
1297 Eina_List *l = NULL;
1298
1299 if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
1300 {
1301 ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
1302 "ecore_imf_context_event_callback_call");
1303 return;
1304 }
1305
1306 EINA_LIST_FOREACH(ctx->callbacks, l, fn)
1307 {
1308 if ((fn) && (fn->type == type) && (fn->func))
1309 fn->func(fn->data, ctx, event_info);
1310 }
1311}
1312
1313/**
1314 * Ask the Input Method Context to show the control panel of using Input Method.
1315 *
1316 * @param ctx An #Ecore_IMF_Context.
1317 * @ingroup Ecore_IMF_Context_Group
1318 * @since 1.1.0
1319 */
1320EAPI void
1321ecore_imf_context_control_panel_show(Ecore_IMF_Context *ctx)
1322{
1323 if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
1324 {
1325 ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
1326 "ecore_imf_context_control_panel_show");
1327 return;
1328 }
1329
1330 if (ctx->klass->control_panel_show) ctx->klass->control_panel_show(ctx);
1331}
1332
1333/**
1334 * Ask the Input Method Context to hide the control panel of using Input Method.
1335 *
1336 * @param ctx An #Ecore_IMF_Context.
1337 * @ingroup Ecore_IMF_Context_Group
1338 * @since 1.1.0
1339 */
1340EAPI void
1341ecore_imf_context_control_panel_hide(Ecore_IMF_Context *ctx)
1342{
1343 if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
1344 {
1345 ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
1346 "ecore_imf_context_control_panel_hide");
1347 return;
1348 }
1349
1350 if (ctx->klass->control_panel_hide) ctx->klass->control_panel_hide(ctx);
1351}
1352
1353/**
1354 * Ask the Input Method Context to show the input panel (virtual keyboard).
1355 *
1356 * @param ctx An #Ecore_IMF_Context.
1357 * @ingroup Ecore_IMF_Context_Group
1358 * @since 1.1.0
1359 */
1360EAPI void
1361ecore_imf_context_input_panel_show(Ecore_IMF_Context *ctx)
1362{
1363 if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
1364 {
1365 ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
1366 "ecore_imf_context_input_panel_show");
1367 return;
1368 }
1369
1370 if (ctx->klass->show) ctx->klass->show(ctx);
1371}
1372
1373/**
1374 * Ask the Input Method Context to hide the input panel.
1375 *
1376 * @param ctx An #Ecore_IMF_Context.
1377 * @ingroup Ecore_IMF_Context_Group
1378 * @since 1.1.0
1379 */
1380EAPI void
1381ecore_imf_context_input_panel_hide(Ecore_IMF_Context *ctx)
1382{
1383 if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
1384 {
1385 ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
1386 "ecore_imf_context_input_panel_hide");
1387 return;
1388 }
1389
1390 if (ctx->klass->hide) ctx->klass->hide(ctx);
1391}
1392
1393/**
1394 * Set the layout of the input panel.
1395 *
1396 * @param ctx An #Ecore_IMF_Context.
1397 * @param layout see #Ecore_IMF_Input_Panel_Layout
1398 * @ingroup Ecore_IMF_Context_Group
1399 * @since 1.1.0
1400 */
1401EAPI void
1402ecore_imf_context_input_panel_layout_set(Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Layout layout)
1403{
1404 if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
1405 {
1406 ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
1407 "ecore_imf_context_input_panel_layout_set");
1408 return;
1409 }
1410
1411 if (ctx->klass->input_panel_layout_set)
1412 ctx->klass->input_panel_layout_set(ctx, layout);
1413
1414 ctx->input_panel_layout = layout;
1415}
1416
1417/**
1418 * Get the layout of the current active input panel.
1419 *
1420 * @param ctx An #Ecore_IMF_Context.
1421 * @return layout see #Ecore_IMF_Input_Panel_Layout
1422 * @ingroup Ecore_IMF_Context_Group
1423 * @since 1.1.0
1424 */
1425EAPI Ecore_IMF_Input_Panel_Layout
1426ecore_imf_context_input_panel_layout_get(Ecore_IMF_Context *ctx)
1427{
1428 if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
1429 {
1430 ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
1431 "ecore_imf_context_input_panel_layout_get");
1432 return ECORE_IMF_INPUT_PANEL_LAYOUT_INVALID;
1433 }
1434
1435 if (ctx->klass->input_panel_layout_get)
1436 return ctx->input_panel_layout;
1437 else
1438 return ECORE_IMF_INPUT_PANEL_LAYOUT_INVALID;
1439}
1440
1441/**
1442 * Set the language of the input panel.
1443 * This API can be used when you want to show the English keyboard.
1444 *
1445 * @param ctx An #Ecore_IMF_Context.
1446 * @param lang the language to be set to the input panel.
1447 * @ingroup Ecore_IMF_Context_Group
1448 * @since 1.1.0
1449 */
1450EAPI void
1451ecore_imf_context_input_panel_language_set(Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Lang lang)
1452{
1453 if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
1454 {
1455 ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
1456 "ecore_imf_context_input_panel_language_set");
1457 return;
1458 }
1459
1460 if (ctx->klass->input_panel_language_set) ctx->klass->input_panel_language_set(ctx, lang);
1461 ctx->input_panel_lang = lang;
1462}
1463
1464/**
1465 * Get the language of the input panel.
1466 *
1467 * See @ref ecore_imf_context_input_panel_language_set for more details.
1468 *
1469 * @param ctx An #Ecore_IMF_Context.
1470 * @return Ecore_IMF_Input_Panel_Lang
1471 * @ingroup Ecore_IMF_Context_Group
1472 * @since 1.1.0
1473 */
1474EAPI Ecore_IMF_Input_Panel_Lang
1475ecore_imf_context_input_panel_language_get(Ecore_IMF_Context *ctx)
1476{
1477 if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
1478 {
1479 ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
1480 "ecore_imf_context_input_panel_language_get");
1481 return ECORE_IMF_INPUT_PANEL_LANG_AUTOMATIC;
1482 }
1483
1484 return ctx->input_panel_lang;
1485}
1486
1487/**
1488 * Set whether the Input Method Context should request to show the input panel automatically
1489 * when the widget has focus.
1490 *
1491 * @param ctx An #Ecore_IMF_Context.
1492 * @param enabled If true, the input panel will be shown when the widget is clicked or has focus.
1493 * @ingroup Ecore_IMF_Context_Group
1494 * @since 1.1.0
1495 */
1496EAPI void
1497ecore_imf_context_input_panel_enabled_set(Ecore_IMF_Context *ctx,
1498 Eina_Bool enabled)
1499{
1500 if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
1501 {
1502 ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
1503 "ecore_imf_context_input_panel_enabled_set");
1504 return;
1505 }
1506
1507 ctx->input_panel_enabled = enabled;
1508}
1509
1510/**
1511 * Get whether the Input Method Context requests to show the input panel automatically.
1512 *
1513 * @param ctx An #Ecore_IMF_Context.
1514 * @return Return the attribute to show the input panel automatically
1515 * @ingroup Ecore_IMF_Context_Group
1516 * @since 1.1.0
1517 */
1518EAPI Eina_Bool
1519ecore_imf_context_input_panel_enabled_get(Ecore_IMF_Context *ctx)
1520{
1521 if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
1522 {
1523 ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
1524 "ecore_imf_context_input_panel_enabled_get");
1525 return EINA_FALSE;
1526 }
1527
1528 return ctx->input_panel_enabled;
1529}
1530
1531/**
1532 * Set the input panel-specific data to deliver to the input panel.
1533 * This API is used by applications to deliver specific data to the input panel.
1534 * The data format MUST be negotiated by both application and the input panel.
1535 * The size and format of data are defined by the input panel.
1536 *
1537 * @param ctx An #Ecore_IMF_Context.
1538 * @param data The specific data to be set to the input panel.
1539 * @param len the length of data, in bytes, to send to the input panel
1540 * @ingroup Ecore_IMF_Context_Group
1541 * @since 1.2.0
1542 */
1543EAPI void
1544ecore_imf_context_input_panel_imdata_set(Ecore_IMF_Context *ctx, const void *data, int len)
1545{
1546 if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
1547 {
1548 ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
1549 "ecore_imf_context_input_panel_imdata_set");
1550 return;
1551 }
1552
1553 if (!data) return;
1554
1555 if (ctx->klass->input_panel_imdata_set)
1556 ctx->klass->input_panel_imdata_set(ctx, data, len);
1557}
1558
1559/**
1560 * Get the specific data of the current active input panel.
1561 *
1562 * @param ctx An #Ecore_IMF_Context.
1563 * @param data The specific data to be got from the input panel
1564 * @param len The length of data
1565 * @ingroup Ecore_IMF_Context_Group
1566 * @since 1.2.0
1567 */
1568EAPI void
1569ecore_imf_context_input_panel_imdata_get(Ecore_IMF_Context *ctx, void *data, int *len)
1570{
1571 if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
1572 {
1573 ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
1574 "ecore_imf_context_input_panel_imdata_get");
1575 return;
1576 }
1577
1578 if (!data) return;
1579
1580 if (ctx->klass->input_panel_imdata_get)
1581 ctx->klass->input_panel_imdata_get(ctx, data, len);
1582}
1583
1584/**
1585 * Set the "return" key type. This type is used to set string or icon on the "return" key of the input panel.
1586 *
1587 * An input panel displays the string or icon associated with this type
1588 *
1589 * @param ctx An #Ecore_IMF_Context.
1590 * @param return_key_type The type of "return" key on the input panel
1591 * @ingroup Ecore_IMF_Context_Group
1592 * @since 1.2.0
1593 */
1594EAPI void
1595ecore_imf_context_input_panel_return_key_type_set(Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Return_Key_Type return_key_type)
1596{
1597 if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
1598 {
1599 ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
1600 "ecore_imf_context_input_panel_return_key_type_set");
1601 return;
1602 }
1603
1604 ctx->input_panel_return_key_type = return_key_type;
1605 if (ctx->klass->input_panel_return_key_type_set) ctx->klass->input_panel_return_key_type_set(ctx, return_key_type);
1606}
1607
1608/**
1609 * Get the "return" key type.
1610 *
1611 * @see ecore_imf_context_input_panel_return_key_type_set() for more details
1612 *
1613 * @param ctx An #Ecore_IMF_Context.
1614 * @return The type of "return" key on the input panel
1615 * @ingroup Ecore_IMF_Context_Group
1616 * @since 1.2.0
1617 */
1618EAPI Ecore_IMF_Input_Panel_Return_Key_Type
1619ecore_imf_context_input_panel_return_key_type_get(Ecore_IMF_Context *ctx)
1620{
1621 if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
1622 {
1623 ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
1624 "ecore_imf_context_input_panel_return_key_type_get");
1625 return EINA_FALSE;
1626 }
1627
1628 return ctx->input_panel_return_key_type;
1629}
1630
1631/**
1632 * Set the return key on the input panel to be disabled.
1633 *
1634 * @param ctx An #Ecore_IMF_Context.
1635 * @param disabled The state
1636 * @ingroup Ecore_IMF_Context_Group
1637 * @since 1.2.0
1638 */
1639EAPI void
1640ecore_imf_context_input_panel_return_key_disabled_set(Ecore_IMF_Context *ctx, Eina_Bool disabled)
1641{
1642 if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
1643 {
1644 ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
1645 "ecore_imf_context_input_panel_return_key_disabled_set");
1646 return;
1647 }
1648
1649 ctx->input_panel_return_key_disabled = disabled;
1650 if (ctx->klass->input_panel_return_key_disabled_set) ctx->klass->input_panel_return_key_disabled_set(ctx, disabled);
1651}
1652
1653/**
1654 * Get whether the return key on the input panel should be disabled or not.
1655 *
1656 * @param ctx An #Ecore_IMF_Context.
1657 * @return EINA_TRUE if it should be disabled
1658 * @ingroup Ecore_IMF_Context_Group
1659 * @since 1.2.0
1660 */
1661EAPI Eina_Bool
1662ecore_imf_context_input_panel_return_key_disabled_get(Ecore_IMF_Context *ctx)
1663{
1664 if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
1665 {
1666 ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
1667 "ecore_imf_context_input_panel_return_key_disabled_get");
1668 return EINA_FALSE;
1669 }
1670
1671 return ctx->input_panel_return_key_disabled;
1672}
1673
1674/**
1675 * Set the caps lock mode on the input panel.
1676 *
1677 * @param ctx An #Ecore_IMF_Context.
1678 * @param mode Turn on caps lock on the input panel if EINA_TRUE
1679 * @ingroup Ecore_IMF_Context_Group
1680 * @since 1.2.0
1681 */
1682EAPI void
1683ecore_imf_context_input_panel_caps_lock_mode_set(Ecore_IMF_Context *ctx, Eina_Bool mode)
1684{
1685 if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
1686 {
1687 ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
1688 "ecore_imf_context_input_panel_caps_lock_mode_set");
1689 return;
1690 }
1691
1692 if (ctx->klass->input_panel_caps_lock_mode_set)
1693 ctx->klass->input_panel_caps_lock_mode_set(ctx, mode);
1694
1695 ctx->input_panel_caps_lock_mode = mode;
1696}
1697
1698/**
1699 * Get the caps lock mode on the input panel.
1700 *
1701 * @param ctx An #Ecore_IMF_Context.
1702 * @return EINA_TRUE if the caps lock is turned on.
1703 * @ingroup Ecore_IMF_Context_Group
1704 * @since 1.2.0
1705 */
1706EAPI Eina_Bool
1707ecore_imf_context_input_panel_caps_lock_mode_get(Ecore_IMF_Context *ctx)
1708{
1709 if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
1710 {
1711 ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
1712 "ecore_imf_context_input_panel_caps_lock_mode_get");
1713 return EINA_FALSE;
1714 }
1715
1716 return ctx->input_panel_caps_lock_mode;
1717}
1718
diff --git a/libraries/ecore/src/lib/ecore_imf/ecore_imf_module.c b/libraries/ecore/src/lib/ecore_imf/ecore_imf_module.c
deleted file mode 100644
index 946f5bc..0000000
--- a/libraries/ecore/src/lib/ecore_imf/ecore_imf_module.c
+++ /dev/null
@@ -1,212 +0,0 @@
1#ifdef HAVE_CONFIG_H
2# include <config.h>
3#endif
4
5#include <stdio.h>
6#include <stdlib.h>
7#include <string.h>
8#include <limits.h>
9
10#include <Ecore.h>
11#include <ecore_private.h>
12
13#include "Ecore_IMF.h"
14#include "ecore_imf_private.h"
15
16static void _ecore_imf_module_free(Ecore_IMF_Module *module);
17static int _ecore_imf_modules_exists(const char *ctx_id);
18
19typedef struct _Ecore_IMF_Selector
20{
21 const char *toselect;
22 void *selected;
23} Ecore_IMF_Selector;
24
25static Eina_Hash *modules = NULL;
26static Eina_Array *module_list = NULL;
27
28void
29ecore_imf_module_init(void)
30{
31 char *homedir;
32
33 module_list = eina_module_list_get(NULL, PACKAGE_LIB_DIR "/ecore/immodules", 0, NULL, NULL);
34 homedir = eina_module_environment_path_get("HOME", "/.ecore/immodules");
35 if (homedir)
36 {
37 module_list = eina_module_list_get(module_list, homedir, 0, NULL, NULL);
38 free(homedir);
39 }
40 eina_module_list_load(module_list);
41}
42
43void
44ecore_imf_module_shutdown(void)
45{
46 if (modules)
47 {
48 eina_hash_free(modules);
49 modules = NULL;
50 }
51 if (module_list)
52 {
53 eina_module_list_free(module_list);
54 eina_array_free(module_list);
55 module_list = NULL;
56 }
57}
58
59static Eina_Bool
60_hash_module_available_get(const Eina_Hash *hash __UNUSED__, int *data, void *list)
61{
62 *(Eina_List**)list = eina_list_append(*(Eina_List**)list, data);
63 return EINA_TRUE;
64}
65
66Eina_List *
67ecore_imf_module_available_get(void)
68{
69 Eina_List *values = NULL;
70 Eina_Iterator *it = NULL;
71
72 if (!modules) return NULL;
73
74 it = eina_hash_iterator_data_new(modules);
75 if (!it)
76 return NULL;
77
78 eina_iterator_foreach(it, EINA_EACH_CB(_hash_module_available_get), &values);
79 eina_iterator_free(it);
80
81 return values;
82}
83
84Ecore_IMF_Module *
85ecore_imf_module_get(const char *ctx_id)
86{
87 if (!modules) return NULL;
88 return eina_hash_find(modules, ctx_id);
89}
90
91Ecore_IMF_Context *
92ecore_imf_module_context_create(const char *ctx_id)
93{
94 Ecore_IMF_Module *module;
95 Ecore_IMF_Context *ctx = NULL;
96
97 if (!modules) return NULL;
98 module = eina_hash_find(modules, ctx_id);
99 if (module)
100 {
101 ctx = module->create();
102 if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
103 {
104 ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
105 "ecore_imf_module_context_create");
106 return NULL;
107 }
108 ctx->module = module;
109 }
110 return ctx;
111}
112
113static Eina_Bool
114_hash_ids_get(const Eina_Hash *hash __UNUSED__, const char *key, void *list)
115{
116 *(Eina_List**)list = eina_list_append(*(Eina_List**)list, key);
117 return EINA_TRUE;
118}
119
120Eina_List *
121ecore_imf_module_context_ids_get(void)
122{
123 Eina_List *l = NULL;
124 Eina_Iterator *it = NULL;
125
126 if (!modules) return NULL;
127
128 it = eina_hash_iterator_key_new(modules);
129 if (!it)
130 return NULL;
131
132 eina_iterator_foreach(it, EINA_EACH_CB(_hash_ids_get), &l);
133 eina_iterator_free(it);
134
135 return l;
136}
137
138static Eina_Bool
139_hash_ids_by_canvas_type_get(const Eina_Hash *hash __UNUSED__, void *data, void *fdata)
140{
141 Ecore_IMF_Module *module = data;
142 Ecore_IMF_Selector *selector = fdata;
143
144 if (!strcmp(module->info->canvas_type, selector->toselect))
145 selector->selected = eina_list_append(selector->selected, (void *)module->info->id);
146
147 return EINA_TRUE;
148}
149
150Eina_List *
151ecore_imf_module_context_ids_by_canvas_type_get(const char *canvas_type)
152{
153 Ecore_IMF_Selector selector;
154 Eina_List *values = NULL;
155 Eina_Iterator *it = NULL;
156
157 if (!modules) return NULL;
158
159 if (!canvas_type)
160 return ecore_imf_module_context_ids_get();
161
162 it = eina_hash_iterator_data_new(modules);
163 if (!it)
164 return NULL;
165
166 selector.toselect = canvas_type;
167 selector.selected = values;
168 eina_iterator_foreach(it, EINA_EACH_CB(_hash_ids_by_canvas_type_get), &selector);
169 eina_iterator_free(it);
170
171 return values;
172}
173
174EAPI void
175ecore_imf_module_register(const Ecore_IMF_Context_Info *info,
176 Ecore_IMF_Context *(*imf_module_create)(void),
177 Ecore_IMF_Context *(*imf_module_exit)(void))
178{
179 Ecore_IMF_Module *module;
180
181 if (_ecore_imf_modules_exists(info->id)) return;
182
183 if (!modules)
184 modules = eina_hash_string_superfast_new(EINA_FREE_CB(_ecore_imf_module_free));
185
186 module = malloc(sizeof(Ecore_IMF_Module));
187 module->info = info;
188 /* cache imf_module_create as it may be used several times */
189 module->create = imf_module_create;
190 module->exit = imf_module_exit;
191
192 eina_hash_add(modules, info->id, module);
193}
194
195static void
196_ecore_imf_module_free(Ecore_IMF_Module *module)
197{
198 if (module->exit) module->exit();
199 free(module);
200}
201
202static int
203_ecore_imf_modules_exists(const char *ctx_id)
204{
205 if (!modules) return 0;
206 if (!ctx_id) return 0;
207
208 if (eina_hash_find(modules, ctx_id))
209 return 1;
210
211 return 0;
212}
diff --git a/libraries/ecore/src/lib/ecore_imf/ecore_imf_private.h b/libraries/ecore/src/lib/ecore_imf/ecore_imf_private.h
deleted file mode 100644
index b4ff0f2..0000000
--- a/libraries/ecore/src/lib/ecore_imf/ecore_imf_private.h
+++ /dev/null
@@ -1,84 +0,0 @@
1#ifndef _ECORE_IMF_PRIVATE_H
2#define _ECORE_IMF_PRIVATE_H
3
4#define ECORE_MAGIC_CONTEXT 0x56c1b39a
5
6#ifdef ECORE_IMF_DEFAULT_LOG_COLOR
7#undef ECORE_IMF_DEFAULT_LOG_COLOR
8#endif
9#define ECORE_IMF_DEFAULT_LOG_COLOR EINA_COLOR_BLUE
10
11extern int _ecore_imf_log_dom;
12#ifdef ERR
13# undef ERR
14#endif
15#define ERR(...) EINA_LOG_DOM_ERR(_ecore_imf_log_dom, __VA_ARGS__)
16
17#ifdef DBG
18# undef DBG
19#endif
20#define DBG(...) EINA_LOG_DOM_DBG(_ecore_imf_log_dom, __VA_ARGS__)
21
22#ifdef INF
23# undef INF
24#endif
25#define INF(...) EINA_LOG_DOM_INFO(_ecore_imf_log_dom, __VA_ARGS__)
26
27#ifdef WRN
28# undef WRN
29#endif
30#define WRN(...) EINA_LOG_DOM_WARN(_ecore_imf_log_dom, __VA_ARGS__)
31
32#ifdef CRIT
33# undef CRIT
34#endif
35#define CRIT(...) EINA_LOG_DOM_CRIT(_ecore_imf_log_dom, __VA_ARGS__)
36
37typedef struct _Ecore_IMF_Module Ecore_IMF_Module;
38typedef struct _Ecore_IMF_Func_Node Ecore_IMF_Func_Node;
39
40struct _Ecore_IMF_Context
41{
42 ECORE_MAGIC;
43 const Ecore_IMF_Module *module;
44 const Ecore_IMF_Context_Class *klass;
45 void *data;
46 int input_mode;
47 void *window;
48 void *client_canvas;
49 Eina_Bool (*retrieve_surrounding_func)(void *data, Ecore_IMF_Context *ctx, char **text, int *cursor_pos);
50 void *retrieve_surrounding_data;
51 Eina_List *callbacks;
52 Ecore_IMF_Autocapital_Type autocapital_type;
53 Ecore_IMF_Input_Panel_Layout input_panel_layout;
54 Ecore_IMF_Input_Panel_Lang input_panel_lang;
55 Ecore_IMF_Input_Panel_Return_Key_Type input_panel_return_key_type;
56 Eina_Bool allow_prediction : 1;
57 Eina_Bool input_panel_enabled : 1;
58 Eina_Bool input_panel_return_key_disabled : 1;
59 Eina_Bool input_panel_caps_lock_mode : 1;
60};
61
62struct _Ecore_IMF_Module
63{
64 const Ecore_IMF_Context_Info *info;
65 Ecore_IMF_Context *(*create)(void);
66 Ecore_IMF_Context *(*exit)(void);
67};
68
69struct _Ecore_IMF_Func_Node
70{
71 void (*func) ();
72 const void *data;
73 Ecore_IMF_Callback_Type type;
74};
75
76void ecore_imf_module_init(void);
77void ecore_imf_module_shutdown(void);
78Eina_List *ecore_imf_module_available_get(void);
79Ecore_IMF_Module *ecore_imf_module_get(const char *ctx_id);
80Ecore_IMF_Context *ecore_imf_module_context_create(const char *ctx_id);
81Eina_List *ecore_imf_module_context_ids_get(void);
82Eina_List *ecore_imf_module_context_ids_by_canvas_type_get(const char *canvas_type);
83
84#endif