diff options
author | David Walter Seikel | 2013-01-13 17:29:19 +1000 |
---|---|---|
committer | David Walter Seikel | 2013-01-13 17:29:19 +1000 |
commit | 07274513e984f0b5544586c74508ccd16e7dcafa (patch) | |
tree | b32ff2a9136fbc1a4a6a0ed1e4d79cde0f5f16d9 /libraries/ecore/src/lib/ecore_imf/Ecore_IMF.h | |
parent | Added Irrlicht 1.8, but without all the Windows binaries. (diff) | |
download | SledjHamr-07274513e984f0b5544586c74508ccd16e7dcafa.zip SledjHamr-07274513e984f0b5544586c74508ccd16e7dcafa.tar.gz SledjHamr-07274513e984f0b5544586c74508ccd16e7dcafa.tar.bz2 SledjHamr-07274513e984f0b5544586c74508ccd16e7dcafa.tar.xz |
Remove EFL, since it's been released now.
Diffstat (limited to 'libraries/ecore/src/lib/ecore_imf/Ecore_IMF.h')
-rw-r--r-- | libraries/ecore/src/lib/ecore_imf/Ecore_IMF.h | 526 |
1 files changed, 0 insertions, 526 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 | ||
33 | extern "C" { | ||
34 | #endif | ||
35 | |||
36 | /** | ||
37 | * @addtogroup Ecore_IMF_Context_Group | ||
38 | * | ||
39 | * @{ | ||
40 | */ | ||
41 | |||
42 | /* Events sent by the Input Method */ | ||
43 | typedef struct _Ecore_IMF_Event_Preedit_Start Ecore_IMF_Event_Preedit_Start; | ||
44 | typedef struct _Ecore_IMF_Event_Preedit_End Ecore_IMF_Event_Preedit_End; | ||
45 | typedef struct _Ecore_IMF_Event_Preedit_Changed Ecore_IMF_Event_Preedit_Changed; | ||
46 | typedef struct _Ecore_IMF_Event_Commit Ecore_IMF_Event_Commit; | ||
47 | typedef struct _Ecore_IMF_Event_Delete_Surrounding Ecore_IMF_Event_Delete_Surrounding; | ||
48 | |||
49 | /* Events to filter */ | ||
50 | typedef struct _Ecore_IMF_Event_Mouse_Down Ecore_IMF_Event_Mouse_Down; | ||
51 | typedef struct _Ecore_IMF_Event_Mouse_Up Ecore_IMF_Event_Mouse_Up; | ||
52 | typedef struct _Ecore_IMF_Event_Mouse_In Ecore_IMF_Event_Mouse_In; | ||
53 | typedef struct _Ecore_IMF_Event_Mouse_Out Ecore_IMF_Event_Mouse_Out; | ||
54 | typedef struct _Ecore_IMF_Event_Mouse_Move Ecore_IMF_Event_Mouse_Move; | ||
55 | typedef struct _Ecore_IMF_Event_Mouse_Wheel Ecore_IMF_Event_Mouse_Wheel; | ||
56 | typedef struct _Ecore_IMF_Event_Key_Down Ecore_IMF_Event_Key_Down; | ||
57 | typedef struct _Ecore_IMF_Event_Key_Up Ecore_IMF_Event_Key_Up; | ||
58 | typedef union _Ecore_IMF_Event Ecore_IMF_Event; | ||
59 | |||
60 | typedef struct _Ecore_IMF_Context Ecore_IMF_Context; /**< An Input Method Context */ | ||
61 | typedef struct _Ecore_IMF_Context_Class Ecore_IMF_Context_Class; /**< An Input Method Context class */ | ||
62 | typedef struct _Ecore_IMF_Context_Info Ecore_IMF_Context_Info; /**< An Input Method Context info */ | ||
63 | |||
64 | /* Preedit attribute info */ | ||
65 | typedef struct _Ecore_IMF_Preedit_Attr Ecore_IMF_Preedit_Attr; | ||
66 | |||
67 | EAPI extern int ECORE_IMF_EVENT_PREEDIT_START; | ||
68 | EAPI extern int ECORE_IMF_EVENT_PREEDIT_END; | ||
69 | EAPI extern int ECORE_IMF_EVENT_PREEDIT_CHANGED; | ||
70 | EAPI extern int ECORE_IMF_EVENT_COMMIT; | ||
71 | EAPI extern int ECORE_IMF_EVENT_DELETE_SURROUNDING; | ||
72 | |||
73 | typedef void (*Ecore_IMF_Event_Cb) (void *data, Ecore_IMF_Context *ctx, void *event_info); | ||
74 | |||
75 | /** | ||
76 | * @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 | */ | ||
83 | typedef 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 | */ | ||
100 | typedef 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 | |||
112 | typedef 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 | |||
121 | typedef 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 | |||
129 | typedef 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 | |||
136 | typedef 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 | */ | ||
156 | typedef 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 | */ | ||
172 | typedef 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 | */ | ||
188 | typedef 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 | */ | ||
212 | typedef 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 | */ | ||
226 | typedef 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 | |||
238 | struct _Ecore_IMF_Event_Preedit_Start | ||
239 | { | ||
240 | Ecore_IMF_Context *ctx; | ||
241 | }; | ||
242 | |||
243 | struct _Ecore_IMF_Event_Preedit_End | ||
244 | { | ||
245 | Ecore_IMF_Context *ctx; | ||
246 | }; | ||
247 | |||
248 | struct _Ecore_IMF_Event_Preedit_Changed | ||
249 | { | ||
250 | Ecore_IMF_Context *ctx; | ||
251 | }; | ||
252 | |||
253 | struct _Ecore_IMF_Event_Commit | ||
254 | { | ||
255 | Ecore_IMF_Context *ctx; | ||
256 | char *str; | ||
257 | }; | ||
258 | |||
259 | struct _Ecore_IMF_Event_Delete_Surrounding | ||
260 | { | ||
261 | Ecore_IMF_Context *ctx; | ||
262 | int offset; | ||
263 | int n_chars; | ||
264 | }; | ||
265 | |||
266 | struct _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 | |||
281 | struct _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 | |||
296 | struct _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 | |||
310 | struct _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 | |||
324 | struct _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 | |||
340 | struct _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 | |||
355 | struct _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 | |||
366 | struct _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 | |||
377 | union _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 | |||
389 | struct _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 | |||
396 | struct _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 | |||
429 | struct _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 | |||
438 | EAPI int ecore_imf_init(void); | ||
439 | EAPI int ecore_imf_shutdown(void); | ||
440 | |||
441 | EAPI void ecore_imf_module_register(const Ecore_IMF_Context_Info *info, Ecore_IMF_Context *(*imf_module_create)(void), Ecore_IMF_Context *(*imf_module_exit)(void)); | ||
442 | |||
443 | EAPI Eina_List *ecore_imf_context_available_ids_get(void); | ||
444 | EAPI Eina_List *ecore_imf_context_available_ids_by_canvas_type_get(const char *canvas_type); | ||
445 | EAPI const char *ecore_imf_context_default_id_get(void); | ||
446 | EAPI const char *ecore_imf_context_default_id_by_canvas_type_get(const char *canvas_type); | ||
447 | EAPI const Ecore_IMF_Context_Info *ecore_imf_context_info_by_id_get(const char *id); | ||
448 | |||
449 | EAPI Ecore_IMF_Context *ecore_imf_context_add(const char *id); | ||
450 | EAPI const Ecore_IMF_Context_Info *ecore_imf_context_info_get(Ecore_IMF_Context *ctx); | ||
451 | EAPI void ecore_imf_context_del(Ecore_IMF_Context *ctx); | ||
452 | EAPI void ecore_imf_context_client_window_set(Ecore_IMF_Context *ctx, void *window); | ||
453 | EAPI void *ecore_imf_context_client_window_get(Ecore_IMF_Context *ctx); | ||
454 | EAPI void ecore_imf_context_client_canvas_set(Ecore_IMF_Context *ctx, void *canvas); | ||
455 | EAPI void *ecore_imf_context_client_canvas_get(Ecore_IMF_Context *ctx); | ||
456 | EAPI void ecore_imf_context_show(Ecore_IMF_Context *ctx); | ||
457 | EAPI void ecore_imf_context_hide(Ecore_IMF_Context *ctx); | ||
458 | EAPI void ecore_imf_context_preedit_string_get(Ecore_IMF_Context *ctx, char **str, int *cursor_pos); | ||
459 | EAPI void ecore_imf_context_preedit_string_with_attributes_get(Ecore_IMF_Context *ctx, char **str, Eina_List **attrs, int *cursor_pos); | ||
460 | EAPI void ecore_imf_context_focus_in(Ecore_IMF_Context *ctx); | ||
461 | EAPI void ecore_imf_context_focus_out(Ecore_IMF_Context *ctx); | ||
462 | EAPI void ecore_imf_context_reset(Ecore_IMF_Context *ctx); | ||
463 | EAPI void ecore_imf_context_cursor_position_set(Ecore_IMF_Context *ctx, int cursor_pos); | ||
464 | EAPI void ecore_imf_context_cursor_location_set(Ecore_IMF_Context *ctx, int x, int y, int w, int h); | ||
465 | EAPI void ecore_imf_context_use_preedit_set(Ecore_IMF_Context *ctx, Eina_Bool use_preedit); | ||
466 | EAPI void ecore_imf_context_retrieve_surrounding_callback_set(Ecore_IMF_Context *ctx, Eina_Bool (*func)(void *data, Ecore_IMF_Context *ctx, char **text, int *cursor_pos), const void *data); | ||
467 | EAPI void ecore_imf_context_input_mode_set(Ecore_IMF_Context *ctx, Ecore_IMF_Input_Mode input_mode); | ||
468 | EAPI Ecore_IMF_Input_Mode ecore_imf_context_input_mode_get(Ecore_IMF_Context *ctx); | ||
469 | EAPI 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 */ | ||
472 | EAPI Ecore_IMF_Context *ecore_imf_context_new(const Ecore_IMF_Context_Class *ctxc); | ||
473 | EAPI void ecore_imf_context_data_set(Ecore_IMF_Context *ctx, void *data); | ||
474 | EAPI void *ecore_imf_context_data_get(Ecore_IMF_Context *ctx); | ||
475 | EAPI Eina_Bool ecore_imf_context_surrounding_get(Ecore_IMF_Context *ctx, char **text, int *cursor_pos); | ||
476 | EAPI void ecore_imf_context_preedit_start_event_add(Ecore_IMF_Context *ctx); | ||
477 | EAPI void ecore_imf_context_preedit_end_event_add(Ecore_IMF_Context *ctx); | ||
478 | EAPI void ecore_imf_context_preedit_changed_event_add(Ecore_IMF_Context *ctx); | ||
479 | EAPI void ecore_imf_context_commit_event_add(Ecore_IMF_Context *ctx, const char *str); | ||
480 | EAPI void ecore_imf_context_delete_surrounding_event_add(Ecore_IMF_Context *ctx, int offset, int n_chars); | ||
481 | EAPI void ecore_imf_context_event_callback_add(Ecore_IMF_Context *ctx, Ecore_IMF_Callback_Type type, Ecore_IMF_Event_Cb func, const void *data); | ||
482 | EAPI void *ecore_imf_context_event_callback_del(Ecore_IMF_Context *ctx, Ecore_IMF_Callback_Type type, Ecore_IMF_Event_Cb func); | ||
483 | EAPI void ecore_imf_context_event_callback_call(Ecore_IMF_Context *ctx, Ecore_IMF_Callback_Type type, void *event_info); | ||
484 | EAPI void ecore_imf_context_prediction_allow_set(Ecore_IMF_Context *ctx, Eina_Bool prediction); | ||
485 | EAPI Eina_Bool ecore_imf_context_prediction_allow_get(Ecore_IMF_Context *ctx); | ||
486 | EAPI void ecore_imf_context_autocapital_type_set(Ecore_IMF_Context *ctx, Ecore_IMF_Autocapital_Type autocapital_type); | ||
487 | EAPI Ecore_IMF_Autocapital_Type ecore_imf_context_autocapital_type_get(Ecore_IMF_Context *ctx); | ||
488 | |||
489 | EAPI void ecore_imf_context_control_panel_show(Ecore_IMF_Context *ctx); | ||
490 | EAPI void ecore_imf_context_control_panel_hide(Ecore_IMF_Context *ctx); | ||
491 | |||
492 | EAPI void ecore_imf_context_input_panel_show(Ecore_IMF_Context *ctx); | ||
493 | EAPI void ecore_imf_context_input_panel_hide(Ecore_IMF_Context *ctx); | ||
494 | EAPI void ecore_imf_context_input_panel_layout_set(Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Layout layout); | ||
495 | EAPI Ecore_IMF_Input_Panel_Layout ecore_imf_context_input_panel_layout_get(Ecore_IMF_Context *ctx); | ||
496 | EAPI void ecore_imf_context_input_panel_language_set(Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Lang lang); | ||
497 | EAPI Ecore_IMF_Input_Panel_Lang ecore_imf_context_input_panel_language_get(Ecore_IMF_Context *ctx); | ||
498 | EAPI void ecore_imf_context_input_panel_enabled_set(Ecore_IMF_Context *ctx, Eina_Bool enable); | ||
499 | EAPI Eina_Bool ecore_imf_context_input_panel_enabled_get(Ecore_IMF_Context *ctx); | ||
500 | EAPI void ecore_imf_context_input_panel_imdata_set(Ecore_IMF_Context *ctx, const void *data, int len); | ||
501 | EAPI void ecore_imf_context_input_panel_imdata_get(Ecore_IMF_Context *ctx, void *data, int *len); | ||
502 | EAPI void ecore_imf_context_input_panel_return_key_type_set(Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Return_Key_Type return_key_type); | ||
503 | EAPI Ecore_IMF_Input_Panel_Return_Key_Type ecore_imf_context_input_panel_return_key_type_get(Ecore_IMF_Context *ctx); | ||
504 | EAPI void ecore_imf_context_input_panel_return_key_disabled_set(Ecore_IMF_Context *ctx, Eina_Bool disabled); | ||
505 | EAPI Eina_Bool ecore_imf_context_input_panel_return_key_disabled_get(Ecore_IMF_Context *ctx); | ||
506 | EAPI void ecore_imf_context_input_panel_caps_lock_mode_set(Ecore_IMF_Context *ctx, Eina_Bool mode); | ||
507 | EAPI 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 | */ | ||