aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/ecore/src/lib/ecore_imf/Ecore_IMF.h
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/ecore/src/lib/ecore_imf/Ecore_IMF.h')
-rw-r--r--libraries/ecore/src/lib/ecore_imf/Ecore_IMF.h143
1 files changed, 117 insertions, 26 deletions
diff --git a/libraries/ecore/src/lib/ecore_imf/Ecore_IMF.h b/libraries/ecore/src/lib/ecore_imf/Ecore_IMF.h
index adea35d..1757d79 100644
--- a/libraries/ecore/src/lib/ecore_imf/Ecore_IMF.h
+++ b/libraries/ecore/src/lib/ecore_imf/Ecore_IMF.h
@@ -33,6 +33,12 @@
33extern "C" { 33extern "C" {
34#endif 34#endif
35 35
36/**
37 * @addtogroup Ecore_IMF_Context_Group
38 *
39 * @{
40 */
41
36/* Events sent by the Input Method */ 42/* Events sent by the Input Method */
37typedef struct _Ecore_IMF_Event_Preedit_Start Ecore_IMF_Event_Preedit_Start; 43typedef struct _Ecore_IMF_Event_Preedit_Start Ecore_IMF_Event_Preedit_Start;
38typedef struct _Ecore_IMF_Event_Preedit_End Ecore_IMF_Event_Preedit_End; 44typedef struct _Ecore_IMF_Event_Preedit_End Ecore_IMF_Event_Preedit_End;
@@ -66,25 +72,41 @@ EAPI extern int ECORE_IMF_EVENT_DELETE_SURROUNDING;
66 72
67typedef void (*Ecore_IMF_Event_Cb) (void *data, Ecore_IMF_Context *ctx, void *event_info); 73typedef void (*Ecore_IMF_Event_Cb) (void *data, Ecore_IMF_Context *ctx, void *event_info);
68 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 */
69typedef enum 83typedef enum
70{ 84{
71 ECORE_IMF_CALLBACK_PREEDIT_START, 85 ECORE_IMF_CALLBACK_PREEDIT_START, /**< "PREEDIT_START" is called when a new preediting sequence starts. */
72 ECORE_IMF_CALLBACK_PREEDIT_END, 86 ECORE_IMF_CALLBACK_PREEDIT_END, /**< "PREEDIT_END" is called when a preediting sequence has been completed or canceled. */
73 ECORE_IMF_CALLBACK_PREEDIT_CHANGED, 87 ECORE_IMF_CALLBACK_PREEDIT_CHANGED, /**< "PREEDIT_CHANGED" is called whenever the preedit sequence currently being entered has changed. */
74 ECORE_IMF_CALLBACK_COMMIT, 88 ECORE_IMF_CALLBACK_COMMIT, /**< "COMMIT" is called when a complete input sequence has been entered by the user */
75 ECORE_IMF_CALLBACK_DELETE_SURROUNDING 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 */
76} Ecore_IMF_Callback_Type; 90} Ecore_IMF_Callback_Type;
77 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 */
78typedef enum 100typedef enum
79{ 101{
80 ECORE_IMF_EVENT_MOUSE_DOWN, 102 ECORE_IMF_EVENT_MOUSE_DOWN, /**< Mouse Down event */
81 ECORE_IMF_EVENT_MOUSE_UP, 103 ECORE_IMF_EVENT_MOUSE_UP, /**< Mouse Up event */
82 ECORE_IMF_EVENT_MOUSE_IN, 104 ECORE_IMF_EVENT_MOUSE_IN, /**< Mouse In event */
83 ECORE_IMF_EVENT_MOUSE_OUT, 105 ECORE_IMF_EVENT_MOUSE_OUT, /**< Mouse Out event */
84 ECORE_IMF_EVENT_MOUSE_MOVE, 106 ECORE_IMF_EVENT_MOUSE_MOVE, /**< Mouse Move event */
85 ECORE_IMF_EVENT_MOUSE_WHEEL, 107 ECORE_IMF_EVENT_MOUSE_WHEEL, /**< Mouse Wheel event */
86 ECORE_IMF_EVENT_KEY_DOWN, 108 ECORE_IMF_EVENT_KEY_DOWN, /**< Key Down event */
87 ECORE_IMF_EVENT_KEY_UP 109 ECORE_IMF_EVENT_KEY_UP /**< Key Up event */
88} Ecore_IMF_Event_Type; 110} Ecore_IMF_Event_Type;
89 111
90typedef enum 112typedef enum
@@ -123,22 +145,46 @@ typedef enum
123 ECORE_IMF_INPUT_MODE_AUTOCAP = 1 << 30 145 ECORE_IMF_INPUT_MODE_AUTOCAP = 1 << 30
124} Ecore_IMF_Input_Mode; 146} Ecore_IMF_Input_Mode;
125 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 */
126typedef enum 156typedef enum
127{ 157{
128 ECORE_IMF_PREEDIT_TYPE_NONE, 158 ECORE_IMF_PREEDIT_TYPE_NONE, /**< None style */
129 ECORE_IMF_PREEDIT_TYPE_SUB1, 159 ECORE_IMF_PREEDIT_TYPE_SUB1, /**< Substring style 1 */
130 ECORE_IMF_PREEDIT_TYPE_SUB2, 160 ECORE_IMF_PREEDIT_TYPE_SUB2, /**< Substring style 2 */
131 ECORE_IMF_PREEDIT_TYPE_SUB3 161 ECORE_IMF_PREEDIT_TYPE_SUB3 /**< Substring style 3 */
132} Ecore_IMF_Preedit_Type; 162} Ecore_IMF_Preedit_Type;
133 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 */
134typedef enum 172typedef enum
135{ 173{
136 ECORE_IMF_AUTOCAPITAL_TYPE_NONE, 174 ECORE_IMF_AUTOCAPITAL_TYPE_NONE, /**< No auto-capitalization when typing */
137 ECORE_IMF_AUTOCAPITAL_TYPE_WORD, 175 ECORE_IMF_AUTOCAPITAL_TYPE_WORD, /**< Autocapitalize each word typed */
138 ECORE_IMF_AUTOCAPITAL_TYPE_SENTENCE, 176 ECORE_IMF_AUTOCAPITAL_TYPE_SENTENCE, /**< Autocapitalize the start of each sentence */
139 ECORE_IMF_AUTOCAPITAL_TYPE_ALLCHARACTER 177 ECORE_IMF_AUTOCAPITAL_TYPE_ALLCHARACTER, /**< Autocapitalize all letters */
140} Ecore_IMF_Autocapital_Type; 178} Ecore_IMF_Autocapital_Type;
141 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 */
142typedef enum 188typedef enum
143{ 189{
144 ECORE_IMF_INPUT_PANEL_LAYOUT_NORMAL, /**< Default layout */ 190 ECORE_IMF_INPUT_PANEL_LAYOUT_NORMAL, /**< Default layout */
@@ -155,12 +201,40 @@ typedef enum
155 ECORE_IMF_INPUT_PANEL_LAYOUT_PASSWORD /**< Like normal, but no auto-correct, no auto-capitalization etc. @since 1.2 */ 201 ECORE_IMF_INPUT_PANEL_LAYOUT_PASSWORD /**< Like normal, but no auto-correct, no auto-capitalization etc. @since 1.2 */
156} Ecore_IMF_Input_Panel_Layout; 202} Ecore_IMF_Input_Panel_Layout;
157 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 */
158typedef enum 212typedef enum
159{ 213{
160 ECORE_IMF_INPUT_PANEL_LANG_AUTOMATIC, /**< Automatic */ 214 ECORE_IMF_INPUT_PANEL_LANG_AUTOMATIC, /**< Automatic @since 1.2 */
161 ECORE_IMF_INPUT_PANEL_LANG_ALPHABET /**< Alphabet */ 215 ECORE_IMF_INPUT_PANEL_LANG_ALPHABET /**< Alphabet @since 1.2 */
162} Ecore_IMF_Input_Panel_Lang; 216} Ecore_IMF_Input_Panel_Lang;
163 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
164struct _Ecore_IMF_Event_Preedit_Start 238struct _Ecore_IMF_Event_Preedit_Start
165{ 239{
166 Ecore_IMF_Context *ctx; 240 Ecore_IMF_Context *ctx;
@@ -314,9 +388,9 @@ union _Ecore_IMF_Event
314 388
315struct _Ecore_IMF_Preedit_Attr 389struct _Ecore_IMF_Preedit_Attr
316{ 390{
317 Ecore_IMF_Preedit_Type preedit_type; 391 Ecore_IMF_Preedit_Type preedit_type; /**< preedit style type */
318 unsigned int start_index; 392 unsigned int start_index; /**< start index of the range (in bytes) */
319 unsigned int end_index; 393 unsigned int end_index; /**< end index of the range (in bytes) */
320}; 394};
321 395
322struct _Ecore_IMF_Context_Class 396struct _Ecore_IMF_Context_Class
@@ -345,6 +419,11 @@ struct _Ecore_IMF_Context_Class
345 void (*input_panel_language_set) (Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Lang lang); 419 void (*input_panel_language_set) (Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Lang lang);
346 Ecore_IMF_Input_Panel_Lang (*input_panel_language_get) (Ecore_IMF_Context *ctx); 420 Ecore_IMF_Input_Panel_Lang (*input_panel_language_get) (Ecore_IMF_Context *ctx);
347 void (*cursor_location_set) (Ecore_IMF_Context *ctx, int x, int y, int w, int h); 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);
348}; 427};
349 428
350struct _Ecore_IMF_Context_Info 429struct _Ecore_IMF_Context_Info
@@ -418,6 +497,14 @@ EAPI void ecore_imf_context_input_panel_language_set(Ec
418EAPI Ecore_IMF_Input_Panel_Lang ecore_imf_context_input_panel_language_get(Ecore_IMF_Context *ctx); 497EAPI Ecore_IMF_Input_Panel_Lang ecore_imf_context_input_panel_language_get(Ecore_IMF_Context *ctx);
419EAPI void ecore_imf_context_input_panel_enabled_set(Ecore_IMF_Context *ctx, Eina_Bool enable); 498EAPI void ecore_imf_context_input_panel_enabled_set(Ecore_IMF_Context *ctx, Eina_Bool enable);
420EAPI Eina_Bool ecore_imf_context_input_panel_enabled_get(Ecore_IMF_Context *ctx); 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);
421 508
422/* The following entry points must be exported by each input method module 509/* The following entry points must be exported by each input method module
423 */ 510 */
@@ -433,3 +520,7 @@ EAPI Eina_Bool ecore_imf_context_input_panel_enabled_get(Eco
433#endif 520#endif
434 521
435#endif 522#endif
523
524/**
525 * @}
526 */