diff options
author | David Walter Seikel | 2012-01-23 23:30:42 +1000 |
---|---|---|
committer | David Walter Seikel | 2012-01-23 23:30:42 +1000 |
commit | 825a3d837a33f226c879cd02ad15c3fba57e8b2c (patch) | |
tree | 75f57bd9c4253508d338dc79ba8e57a7abc42255 /libraries/ecore/src/lib/ecore_imf | |
parent | Add ability to disable the test harness, or the Lua compile test. (diff) | |
download | SledjHamr-825a3d837a33f226c879cd02ad15c3fba57e8b2c.zip SledjHamr-825a3d837a33f226c879cd02ad15c3fba57e8b2c.tar.gz SledjHamr-825a3d837a33f226c879cd02ad15c3fba57e8b2c.tar.bz2 SledjHamr-825a3d837a33f226c879cd02ad15c3fba57e8b2c.tar.xz |
Update the EFL to what I'm actually using, coz I'm using some stuff not yet released.
Diffstat (limited to 'libraries/ecore/src/lib/ecore_imf')
-rw-r--r-- | libraries/ecore/src/lib/ecore_imf/Ecore_IMF.h | 19 | ||||
-rw-r--r-- | libraries/ecore/src/lib/ecore_imf/Makefile.in | 14 | ||||
-rw-r--r-- | libraries/ecore/src/lib/ecore_imf/ecore_imf_context.c | 141 | ||||
-rw-r--r-- | libraries/ecore/src/lib/ecore_imf/ecore_imf_private.h | 9 |
4 files changed, 178 insertions, 5 deletions
diff --git a/libraries/ecore/src/lib/ecore_imf/Ecore_IMF.h b/libraries/ecore/src/lib/ecore_imf/Ecore_IMF.h index 21df2a0..adea35d 100644 --- a/libraries/ecore/src/lib/ecore_imf/Ecore_IMF.h +++ b/libraries/ecore/src/lib/ecore_imf/Ecore_IMF.h | |||
@@ -64,6 +64,17 @@ EAPI extern int ECORE_IMF_EVENT_PREEDIT_CHANGED; | |||
64 | EAPI extern int ECORE_IMF_EVENT_COMMIT; | 64 | EAPI extern int ECORE_IMF_EVENT_COMMIT; |
65 | EAPI extern int ECORE_IMF_EVENT_DELETE_SURROUNDING; | 65 | EAPI extern int ECORE_IMF_EVENT_DELETE_SURROUNDING; |
66 | 66 | ||
67 | typedef void (*Ecore_IMF_Event_Cb) (void *data, Ecore_IMF_Context *ctx, void *event_info); | ||
68 | |||
69 | typedef enum | ||
70 | { | ||
71 | ECORE_IMF_CALLBACK_PREEDIT_START, | ||
72 | ECORE_IMF_CALLBACK_PREEDIT_END, | ||
73 | ECORE_IMF_CALLBACK_PREEDIT_CHANGED, | ||
74 | ECORE_IMF_CALLBACK_COMMIT, | ||
75 | ECORE_IMF_CALLBACK_DELETE_SURROUNDING | ||
76 | } Ecore_IMF_Callback_Type; | ||
77 | |||
67 | typedef enum | 78 | typedef enum |
68 | { | 79 | { |
69 | ECORE_IMF_EVENT_MOUSE_DOWN, | 80 | ECORE_IMF_EVENT_MOUSE_DOWN, |
@@ -138,7 +149,10 @@ typedef enum | |||
138 | ECORE_IMF_INPUT_PANEL_LAYOUT_IP, /**< IP layout */ | 149 | ECORE_IMF_INPUT_PANEL_LAYOUT_IP, /**< IP layout */ |
139 | ECORE_IMF_INPUT_PANEL_LAYOUT_MONTH, /**< Month layout */ | 150 | ECORE_IMF_INPUT_PANEL_LAYOUT_MONTH, /**< Month layout */ |
140 | ECORE_IMF_INPUT_PANEL_LAYOUT_NUMBERONLY, /**< Number Only layout */ | 151 | ECORE_IMF_INPUT_PANEL_LAYOUT_NUMBERONLY, /**< Number Only layout */ |
141 | ECORE_IMF_INPUT_PANEL_LAYOUT_INVALID | 152 | ECORE_IMF_INPUT_PANEL_LAYOUT_INVALID, /**< Never use this */ |
153 | ECORE_IMF_INPUT_PANEL_LAYOUT_HEX, /**< Hexadecimal layout @since 1.2 */ | ||
154 | ECORE_IMF_INPUT_PANEL_LAYOUT_TERMINAL, /**< Command-line terminal layout @since 1.2 */ | ||
155 | ECORE_IMF_INPUT_PANEL_LAYOUT_PASSWORD /**< Like normal, but no auto-correct, no auto-capitalization etc. @since 1.2 */ | ||
142 | } Ecore_IMF_Input_Panel_Layout; | 156 | } Ecore_IMF_Input_Panel_Layout; |
143 | 157 | ||
144 | typedef enum | 158 | typedef enum |
@@ -385,6 +399,9 @@ EAPI void ecore_imf_context_preedit_end_event_add(Ecore | |||
385 | EAPI void ecore_imf_context_preedit_changed_event_add(Ecore_IMF_Context *ctx); | 399 | EAPI void ecore_imf_context_preedit_changed_event_add(Ecore_IMF_Context *ctx); |
386 | EAPI void ecore_imf_context_commit_event_add(Ecore_IMF_Context *ctx, const char *str); | 400 | EAPI void ecore_imf_context_commit_event_add(Ecore_IMF_Context *ctx, const char *str); |
387 | EAPI void ecore_imf_context_delete_surrounding_event_add(Ecore_IMF_Context *ctx, int offset, int n_chars); | 401 | EAPI void ecore_imf_context_delete_surrounding_event_add(Ecore_IMF_Context *ctx, int offset, int n_chars); |
402 | 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); | ||
403 | EAPI void *ecore_imf_context_event_callback_del(Ecore_IMF_Context *ctx, Ecore_IMF_Callback_Type type, Ecore_IMF_Event_Cb func); | ||
404 | EAPI void ecore_imf_context_event_callback_call(Ecore_IMF_Context *ctx, Ecore_IMF_Callback_Type type, void *event_info); | ||
388 | EAPI void ecore_imf_context_prediction_allow_set(Ecore_IMF_Context *ctx, Eina_Bool prediction); | 405 | EAPI void ecore_imf_context_prediction_allow_set(Ecore_IMF_Context *ctx, Eina_Bool prediction); |
389 | EAPI Eina_Bool ecore_imf_context_prediction_allow_get(Ecore_IMF_Context *ctx); | 406 | EAPI Eina_Bool ecore_imf_context_prediction_allow_get(Ecore_IMF_Context *ctx); |
390 | EAPI void ecore_imf_context_autocapital_type_set(Ecore_IMF_Context *ctx, Ecore_IMF_Autocapital_Type autocapital_type); | 407 | EAPI void ecore_imf_context_autocapital_type_set(Ecore_IMF_Context *ctx, Ecore_IMF_Autocapital_Type autocapital_type); |
diff --git a/libraries/ecore/src/lib/ecore_imf/Makefile.in b/libraries/ecore/src/lib/ecore_imf/Makefile.in index adf8dea..9f91360 100644 --- a/libraries/ecore/src/lib/ecore_imf/Makefile.in +++ b/libraries/ecore/src/lib/ecore_imf/Makefile.in | |||
@@ -248,10 +248,10 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ | |||
248 | PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ | 248 | PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ |
249 | PIXMAN_LIBS = @PIXMAN_LIBS@ | 249 | PIXMAN_LIBS = @PIXMAN_LIBS@ |
250 | PKG_CONFIG = @PKG_CONFIG@ | 250 | PKG_CONFIG = @PKG_CONFIG@ |
251 | PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ | ||
252 | PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ | ||
253 | POSUB = @POSUB@ | 251 | POSUB = @POSUB@ |
254 | RANLIB = @RANLIB@ | 252 | RANLIB = @RANLIB@ |
253 | SCIM_CFLAGS = @SCIM_CFLAGS@ | ||
254 | SCIM_LIBS = @SCIM_LIBS@ | ||
255 | SDL_CFLAGS = @SDL_CFLAGS@ | 255 | SDL_CFLAGS = @SDL_CFLAGS@ |
256 | SDL_CONFIG = @SDL_CONFIG@ | 256 | SDL_CONFIG = @SDL_CONFIG@ |
257 | SDL_LIBS = @SDL_LIBS@ | 257 | SDL_LIBS = @SDL_LIBS@ |
@@ -270,6 +270,10 @@ TSLIB_LIBS = @TSLIB_LIBS@ | |||
270 | USE_NLS = @USE_NLS@ | 270 | USE_NLS = @USE_NLS@ |
271 | VERSION = @VERSION@ | 271 | VERSION = @VERSION@ |
272 | VMAJ = @VMAJ@ | 272 | VMAJ = @VMAJ@ |
273 | WAYLAND_CFLAGS = @WAYLAND_CFLAGS@ | ||
274 | WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ | ||
275 | WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ | ||
276 | WAYLAND_LIBS = @WAYLAND_LIBS@ | ||
273 | WIN32_CFLAGS = @WIN32_CFLAGS@ | 277 | WIN32_CFLAGS = @WIN32_CFLAGS@ |
274 | WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ | 278 | WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ |
275 | WIN32_LIBS = @WIN32_LIBS@ | 279 | WIN32_LIBS = @WIN32_LIBS@ |
@@ -383,6 +387,8 @@ ecore_imf_cflags = @ecore_imf_cflags@ | |||
383 | ecore_imf_evas_cflags = @ecore_imf_evas_cflags@ | 387 | ecore_imf_evas_cflags = @ecore_imf_evas_cflags@ |
384 | ecore_imf_evas_libs = @ecore_imf_evas_libs@ | 388 | ecore_imf_evas_libs = @ecore_imf_evas_libs@ |
385 | ecore_imf_libs = @ecore_imf_libs@ | 389 | ecore_imf_libs = @ecore_imf_libs@ |
390 | ecore_imf_scim_cflags = @ecore_imf_scim_cflags@ | ||
391 | ecore_imf_scim_libs = @ecore_imf_scim_libs@ | ||
386 | ecore_imf_xim_cflags = @ecore_imf_xim_cflags@ | 392 | ecore_imf_xim_cflags = @ecore_imf_xim_cflags@ |
387 | ecore_imf_xim_libs = @ecore_imf_xim_libs@ | 393 | ecore_imf_xim_libs = @ecore_imf_xim_libs@ |
388 | ecore_input_cflags = @ecore_input_cflags@ | 394 | ecore_input_cflags = @ecore_input_cflags@ |
@@ -395,6 +401,8 @@ ecore_psl1ght_cflags = @ecore_psl1ght_cflags@ | |||
395 | ecore_psl1ght_libs = @ecore_psl1ght_libs@ | 401 | ecore_psl1ght_libs = @ecore_psl1ght_libs@ |
396 | ecore_sdl_cflags = @ecore_sdl_cflags@ | 402 | ecore_sdl_cflags = @ecore_sdl_cflags@ |
397 | ecore_sdl_libs = @ecore_sdl_libs@ | 403 | ecore_sdl_libs = @ecore_sdl_libs@ |
404 | ecore_wayland_cflags = @ecore_wayland_cflags@ | ||
405 | ecore_wayland_libs = @ecore_wayland_libs@ | ||
398 | ecore_win32_cflags = @ecore_win32_cflags@ | 406 | ecore_win32_cflags = @ecore_win32_cflags@ |
399 | ecore_win32_libs = @ecore_win32_libs@ | 407 | ecore_win32_libs = @ecore_win32_libs@ |
400 | ecore_wince_cflags = @ecore_wince_cflags@ | 408 | ecore_wince_cflags = @ecore_wince_cflags@ |
@@ -439,12 +447,14 @@ requirements_ecore_fb = @requirements_ecore_fb@ | |||
439 | requirements_ecore_file = @requirements_ecore_file@ | 447 | requirements_ecore_file = @requirements_ecore_file@ |
440 | requirements_ecore_imf = @requirements_ecore_imf@ | 448 | requirements_ecore_imf = @requirements_ecore_imf@ |
441 | requirements_ecore_imf_evas = @requirements_ecore_imf_evas@ | 449 | requirements_ecore_imf_evas = @requirements_ecore_imf_evas@ |
450 | requirements_ecore_imf_scim = @requirements_ecore_imf_scim@ | ||
442 | requirements_ecore_imf_xim = @requirements_ecore_imf_xim@ | 451 | requirements_ecore_imf_xim = @requirements_ecore_imf_xim@ |
443 | requirements_ecore_input = @requirements_ecore_input@ | 452 | requirements_ecore_input = @requirements_ecore_input@ |
444 | requirements_ecore_input_evas = @requirements_ecore_input_evas@ | 453 | requirements_ecore_input_evas = @requirements_ecore_input_evas@ |
445 | requirements_ecore_ipc = @requirements_ecore_ipc@ | 454 | requirements_ecore_ipc = @requirements_ecore_ipc@ |
446 | requirements_ecore_psl1ght = @requirements_ecore_psl1ght@ | 455 | requirements_ecore_psl1ght = @requirements_ecore_psl1ght@ |
447 | requirements_ecore_sdl = @requirements_ecore_sdl@ | 456 | requirements_ecore_sdl = @requirements_ecore_sdl@ |
457 | requirements_ecore_wayland = @requirements_ecore_wayland@ | ||
448 | requirements_ecore_win32 = @requirements_ecore_win32@ | 458 | requirements_ecore_win32 = @requirements_ecore_win32@ |
449 | requirements_ecore_wince = @requirements_ecore_wince@ | 459 | requirements_ecore_wince = @requirements_ecore_wince@ |
450 | requirements_ecore_x = @requirements_ecore_x@ | 460 | requirements_ecore_x = @requirements_ecore_x@ |
diff --git a/libraries/ecore/src/lib/ecore_imf/ecore_imf_context.c b/libraries/ecore/src/lib/ecore_imf/ecore_imf_context.c index 417fad3..b65ee26 100644 --- a/libraries/ecore/src/lib/ecore_imf/ecore_imf_context.c +++ b/libraries/ecore/src/lib/ecore_imf/ecore_imf_context.c | |||
@@ -223,6 +223,8 @@ ecore_imf_context_info_get(Ecore_IMF_Context *ctx) | |||
223 | EAPI void | 223 | EAPI void |
224 | ecore_imf_context_del(Ecore_IMF_Context *ctx) | 224 | ecore_imf_context_del(Ecore_IMF_Context *ctx) |
225 | { | 225 | { |
226 | Ecore_IMF_Func_Node *fn; | ||
227 | |||
226 | if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT)) | 228 | if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT)) |
227 | { | 229 | { |
228 | ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT, | 230 | ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT, |
@@ -230,6 +232,13 @@ ecore_imf_context_del(Ecore_IMF_Context *ctx) | |||
230 | return; | 232 | return; |
231 | } | 233 | } |
232 | if (ctx->klass->del) ctx->klass->del(ctx); | 234 | if (ctx->klass->del) ctx->klass->del(ctx); |
235 | |||
236 | if (ctx->callbacks) | ||
237 | { | ||
238 | EINA_LIST_FREE(ctx->callbacks, fn) | ||
239 | free(fn); | ||
240 | } | ||
241 | |||
233 | ECORE_MAGIC_SET(ctx, ECORE_MAGIC_NONE); | 242 | ECORE_MAGIC_SET(ctx, ECORE_MAGIC_NONE); |
234 | free(ctx); | 243 | free(ctx); |
235 | } | 244 | } |
@@ -529,7 +538,7 @@ ecore_imf_context_cursor_location_set(Ecore_IMF_Context *ctx, int x, int y, int | |||
529 | 538 | ||
530 | /** | 539 | /** |
531 | * Set whether the IM context should use the preedit string | 540 | * Set whether the IM context should use the preedit string |
532 | * to display feedback. If @use_preedit is EINA_FALSE (default | 541 | * to display feedback. If @c use_preedit is EINA_FALSE (default |
533 | * is EINA_TRUE), then the IM context may use some other method to display | 542 | * is EINA_TRUE), then the IM context may use some other method to display |
534 | * feedback, such as displaying it in a child of the root window. | 543 | * feedback, such as displaying it in a child of the root window. |
535 | * | 544 | * |
@@ -551,7 +560,7 @@ ecore_imf_context_use_preedit_set(Ecore_IMF_Context *ctx, Eina_Bool use_preedit) | |||
551 | 560 | ||
552 | /** | 561 | /** |
553 | * Set whether the IM context should allow to use the text prediction. | 562 | * Set whether the IM context should allow to use the text prediction. |
554 | * If @prediction is EINA_FALSE (default is EINA_TRUE), then the IM context will not display the text prediction window. | 563 | * If @c prediction is EINA_FALSE (default is EINA_TRUE), then the IM context will not display the text prediction window. |
555 | * | 564 | * |
556 | * @param ctx An #Ecore_IMF_Context. | 565 | * @param ctx An #Ecore_IMF_Context. |
557 | * @param prediction Whether the IM context should allow to use the text prediction. | 566 | * @param prediction Whether the IM context should allow to use the text prediction. |
@@ -1016,6 +1025,134 @@ ecore_imf_context_delete_surrounding_event_add(Ecore_IMF_Context *ctx, int offse | |||
1016 | } | 1025 | } |
1017 | 1026 | ||
1018 | /** | 1027 | /** |
1028 | * Add (register) a callback function to a given context event. | ||
1029 | * | ||
1030 | * This function adds a function callback to the context @p ctx when the | ||
1031 | * event of type @p type occurs on it. The function pointer is @p | ||
1032 | * func. | ||
1033 | * | ||
1034 | * The event type @p type to trigger the function may be one of | ||
1035 | * #ECORE_IMF_CALLBACK_PREEDIT_START, #ECORE_IMF_CALLBACK_PREEDIT_END, | ||
1036 | * #ECORE_IMF_CALLBACK_PREEDIT_CHANGED, #ECORE_IMF_CALLBACK_COMMIT and | ||
1037 | * #ECORE_IMF_CALLBACK_DELETE_SURROUNDING. | ||
1038 | * | ||
1039 | * @param ctx Ecore_IMF_Context to attach a callback to. | ||
1040 | * @param type The type of event that will trigger the callback | ||
1041 | * @param func The (callback) function to be called when the event is | ||
1042 | * triggered | ||
1043 | * @param data The data pointer to be passed to @p func | ||
1044 | * @ingroup Ecore_IMF_Context_Module_Group | ||
1045 | * @since 1.2.0 | ||
1046 | */ | ||
1047 | EAPI void | ||
1048 | ecore_imf_context_event_callback_add(Ecore_IMF_Context *ctx, Ecore_IMF_Callback_Type type, Ecore_IMF_Event_Cb func, const void *data) | ||
1049 | { | ||
1050 | Ecore_IMF_Func_Node *fn = NULL; | ||
1051 | |||
1052 | if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT)) | ||
1053 | { | ||
1054 | ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT, | ||
1055 | "ecore_imf_context_event_callback_add"); | ||
1056 | return; | ||
1057 | } | ||
1058 | |||
1059 | if (!func) return; | ||
1060 | |||
1061 | fn = calloc(1, sizeof (Ecore_IMF_Func_Node)); | ||
1062 | if (!fn) return; | ||
1063 | |||
1064 | fn->func = func; | ||
1065 | fn->data = data; | ||
1066 | fn->type = type; | ||
1067 | |||
1068 | ctx->callbacks = eina_list_append(ctx->callbacks, fn); | ||
1069 | } | ||
1070 | |||
1071 | /** | ||
1072 | * Delete (unregister) a callback function registered to a given | ||
1073 | * context event. | ||
1074 | * | ||
1075 | * This function removes a function callback from the context @p ctx when the | ||
1076 | * event of type @p type occurs on it. The function pointer is @p | ||
1077 | * func. | ||
1078 | * | ||
1079 | * @see ecore_imf_context_event_callback_add() for more details | ||
1080 | * | ||
1081 | * @param ctx Ecore_IMF_Context to remove a callback from. | ||
1082 | * @param type The type of event that was trigerring the callback | ||
1083 | * @param func The (callback) function that was to be called when the event was triggered | ||
1084 | * @return the data pointer | ||
1085 | * @ingroup Ecore_IMF_Context_Module_Group | ||
1086 | * @since 1.2.0 | ||
1087 | */ | ||
1088 | EAPI void * | ||
1089 | ecore_imf_context_event_callback_del(Ecore_IMF_Context *ctx, Ecore_IMF_Callback_Type type, Ecore_IMF_Event_Cb func) | ||
1090 | { | ||
1091 | Eina_List *l = NULL; | ||
1092 | Eina_List *l_next = NULL; | ||
1093 | Ecore_IMF_Func_Node *fn = NULL; | ||
1094 | |||
1095 | if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT)) | ||
1096 | { | ||
1097 | ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT, | ||
1098 | "ecore_imf_context_event_callback_del"); | ||
1099 | return; | ||
1100 | } | ||
1101 | |||
1102 | if (!func) return NULL; | ||
1103 | if (!ctx->callbacks) return NULL; | ||
1104 | |||
1105 | EINA_LIST_FOREACH_SAFE(ctx->callbacks, l, l_next, fn) | ||
1106 | { | ||
1107 | if ((fn) && (fn->func == func) && (fn->type == type)) | ||
1108 | { | ||
1109 | void *tmp = fn->data; | ||
1110 | free(fn); | ||
1111 | ctx->callbacks = eina_list_remove_list(ctx->callbacks, l); | ||
1112 | return tmp; | ||
1113 | } | ||
1114 | } | ||
1115 | return NULL; | ||
1116 | } | ||
1117 | |||
1118 | /** | ||
1119 | * Call a given callback on the context @p ctx. | ||
1120 | * | ||
1121 | * ecore_imf_context_preedit_start_event_add, ecore_imf_context_preedit_end_event_add, | ||
1122 | * ecore_imf_context_preedit_changed_event_add, ecore_imf_context_commit_event_add and | ||
1123 | * ecore_imf_context_delete_surrounding_event_add APIs are asynchronous | ||
1124 | * because those API adds each event to the event queue. | ||
1125 | * | ||
1126 | * This API provides the way to call each callback function immediately. | ||
1127 | * | ||
1128 | * @param ctx Ecore_IMF_Context. | ||
1129 | * @param type The type of event that will trigger the callback | ||
1130 | * @param event_info The pointer to event specific struct or information to | ||
1131 | * pass to the callback functions registered on this event | ||
1132 | * @ingroup Ecore_IMF_Context_Module_Group | ||
1133 | * @since 1.2.0 | ||
1134 | */ | ||
1135 | EAPI void | ||
1136 | ecore_imf_context_event_callback_call(Ecore_IMF_Context *ctx, Ecore_IMF_Callback_Type type, void *event_info) | ||
1137 | { | ||
1138 | Ecore_IMF_Func_Node *fn = NULL; | ||
1139 | Eina_List *l = NULL; | ||
1140 | |||
1141 | if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT)) | ||
1142 | { | ||
1143 | ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT, | ||
1144 | "ecore_imf_context_event_callback_call"); | ||
1145 | return; | ||
1146 | } | ||
1147 | |||
1148 | EINA_LIST_FOREACH(ctx->callbacks, l, fn) | ||
1149 | { | ||
1150 | if ((fn) && (fn->type == type) && (fn->func)) | ||
1151 | fn->func(fn->data, ctx, event_info); | ||
1152 | } | ||
1153 | } | ||
1154 | |||
1155 | /** | ||
1019 | * Ask the Input Method Context to show the control panel of using Input Method. | 1156 | * Ask the Input Method Context to show the control panel of using Input Method. |
1020 | * | 1157 | * |
1021 | * @param ctx An #Ecore_IMF_Context. | 1158 | * @param ctx An #Ecore_IMF_Context. |
diff --git a/libraries/ecore/src/lib/ecore_imf/ecore_imf_private.h b/libraries/ecore/src/lib/ecore_imf/ecore_imf_private.h index 07a5b09..d9dae80 100644 --- a/libraries/ecore/src/lib/ecore_imf/ecore_imf_private.h +++ b/libraries/ecore/src/lib/ecore_imf/ecore_imf_private.h | |||
@@ -35,6 +35,7 @@ extern int _ecore_imf_log_dom; | |||
35 | #define CRIT(...) EINA_LOG_DOM_CRIT(_ecore_imf_log_dom, __VA_ARGS__) | 35 | #define CRIT(...) EINA_LOG_DOM_CRIT(_ecore_imf_log_dom, __VA_ARGS__) |
36 | 36 | ||
37 | typedef struct _Ecore_IMF_Module Ecore_IMF_Module; | 37 | typedef struct _Ecore_IMF_Module Ecore_IMF_Module; |
38 | typedef struct _Ecore_IMF_Func_Node Ecore_IMF_Func_Node; | ||
38 | 39 | ||
39 | struct _Ecore_IMF_Context | 40 | struct _Ecore_IMF_Context |
40 | { | 41 | { |
@@ -47,6 +48,7 @@ struct _Ecore_IMF_Context | |||
47 | void *client_canvas; | 48 | void *client_canvas; |
48 | Eina_Bool (*retrieve_surrounding_func)(void *data, Ecore_IMF_Context *ctx, char **text, int *cursor_pos); | 49 | Eina_Bool (*retrieve_surrounding_func)(void *data, Ecore_IMF_Context *ctx, char **text, int *cursor_pos); |
49 | void *retrieve_surrounding_data; | 50 | void *retrieve_surrounding_data; |
51 | Eina_List *callbacks; | ||
50 | Ecore_IMF_Autocapital_Type autocapital_type; | 52 | Ecore_IMF_Autocapital_Type autocapital_type; |
51 | Ecore_IMF_Input_Panel_Layout input_panel_layout; | 53 | Ecore_IMF_Input_Panel_Layout input_panel_layout; |
52 | Ecore_IMF_Input_Panel_Lang input_panel_lang; | 54 | Ecore_IMF_Input_Panel_Lang input_panel_lang; |
@@ -61,6 +63,13 @@ struct _Ecore_IMF_Module | |||
61 | Ecore_IMF_Context *(*exit)(void); | 63 | Ecore_IMF_Context *(*exit)(void); |
62 | }; | 64 | }; |
63 | 65 | ||
66 | struct _Ecore_IMF_Func_Node | ||
67 | { | ||
68 | void (*func) (); | ||
69 | const void *data; | ||
70 | Ecore_IMF_Callback_Type type; | ||
71 | }; | ||
72 | |||
64 | void ecore_imf_module_init(void); | 73 | void ecore_imf_module_init(void); |
65 | void ecore_imf_module_shutdown(void); | 74 | void ecore_imf_module_shutdown(void); |
66 | Eina_List *ecore_imf_module_available_get(void); | 75 | Eina_List *ecore_imf_module_available_get(void); |