summaryrefslogtreecommitdiff
path: root/src/lib/ecore_imf/Ecore_IMF.h
diff options
context:
space:
mode:
authorJihoon Kim <jihoon48.kim@samsung.com>2014-01-23 10:44:00 +0900
committerJihoon Kim <jihoon48.kim@samsung.com>2014-01-23 10:44:00 +0900
commitfa165f09022d2d002ed0ccdf05cc7ee00735c4a3 (patch)
treef32e88fb5879b4a765e0c56ca99b278c977e2f32 /src/lib/ecore_imf/Ecore_IMF.h
parent1c2da046dccd68f606504bc2029e3e6425293390 (diff)
Add ecore_imf_context_selection_get API to allow Input Method to get the selected text.
Diffstat (limited to 'src/lib/ecore_imf/Ecore_IMF.h')
-rw-r--r--src/lib/ecore_imf/Ecore_IMF.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/lib/ecore_imf/Ecore_IMF.h b/src/lib/ecore_imf/Ecore_IMF.h
index ee1c24919d..2d96a22ab0 100644
--- a/src/lib/ecore_imf/Ecore_IMF.h
+++ b/src/lib/ecore_imf/Ecore_IMF.h
@@ -908,6 +908,20 @@ EAPI void ecore_imf_context_use_preedit_set(Ecore_IMF_C
908EAPI 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); 908EAPI 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);
909 909
910/** 910/**
911 * Set the callback to be used on selection_get request.
912 *
913 * This callback will be called when the Input Method Context
914 * module requests the selection context.
915 *
916 * @param ctx An #Ecore_IMF_Context.
917 * @param func The callback to be called.
918 * @param data The data pointer to be passed to @p func
919 * @ingroup Ecore_IMF_Context_Group
920 * @since 1.9.0
921 */
922EAPI void ecore_imf_context_retrieve_selection_callback_set(Ecore_IMF_Context *ctx, Eina_Bool (*func)(void *data, Ecore_IMF_Context *ctx, char **text), const void *data);
923
924/**
911 * Set the input mode used by the Ecore Input Context. 925 * Set the input mode used by the Ecore Input Context.
912 * 926 *
913 * The input mode can be one of the input modes defined in 927 * The input mode can be one of the input modes defined in
@@ -1044,6 +1058,28 @@ EAPI void *ecore_imf_context_data_get(Ecore_IMF_Context
1044EAPI Eina_Bool ecore_imf_context_surrounding_get(Ecore_IMF_Context *ctx, char **text, int *cursor_pos); 1058EAPI Eina_Bool ecore_imf_context_surrounding_get(Ecore_IMF_Context *ctx, char **text, int *cursor_pos);
1045 1059
1046/** 1060/**
1061 * Retrieve the selected text.
1062 *
1063 * This function is implemented by calling the
1064 * Ecore_IMF_Context::retrieve_selection_func (
1065 * set using #ecore_imf_context_retrieve_selection_callback_set).
1066 *
1067 * There is no obligation for a widget to respond to the
1068 * retrieve_surrounding_func, so input methods must be prepared
1069 * to function without context.
1070 *
1071 * @param ctx An #Ecore_IMF_Context.
1072 * @param text Location to store a UTF-8 encoded string of the selected text.
1073 * If the function returns @c EINA_TRUE, then you must free
1074 * the result stored in this location with free().
1075 * @return @c EINA_TRUE if selected text was provided; otherwise
1076 * @c EINA_FALSE.
1077 * @ingroup Ecore_IMF_Context_Module_Group
1078 * @since 1.9.0
1079 */
1080EAPI Eina_Bool ecore_imf_context_selection_get(Ecore_IMF_Context *ctx, char **text);
1081
1082/**
1047 * Adds ECORE_IMF_EVENT_PREEDIT_START to the event queue. 1083 * Adds ECORE_IMF_EVENT_PREEDIT_START to the event queue.
1048 * 1084 *
1049 * ECORE_IMF_EVENT_PREEDIT_START should be added when a new preedit sequence starts. 1085 * ECORE_IMF_EVENT_PREEDIT_START should be added when a new preedit sequence starts.