summaryrefslogtreecommitdiff
path: root/legacy/ecore/src/lib/ecore_imf/ecore_imf_context.c
diff options
context:
space:
mode:
authorJihoon Kim <jihoon48.kim@samsung.com>2011-06-20 07:17:24 +0000
committerCarsten Haitzler <raster@rasterman.com>2011-06-20 07:17:24 +0000
commita889ae4997bbc921a2277ba292bbe02af5d8a357 (patch)
treef0b40974ebb867c74ed50bb7e0912dfaca304a2b /legacy/ecore/src/lib/ecore_imf/ecore_imf_context.c
parent46cdaea3cbe69b4e2bde30d936598815034bfb7e (diff)
From: Jihoon Kim <jihoon48.kim@samsung.com>
Subject: [E-devel] [PATCH] Add Ecore_IMF API to set the attirbute of input panel For supporting virtual keyboard, I'd like to add ecore_imf_context_input_panel_enabled_set/get APIs. The detail description of each API is included in the patch file as doxygen format. If input panel is in 'enabled' status, the immodule will request to show the input panel automatically When the input widget such as entry is clicked or has focus. In some case, application programmers want to control the input panel manually (not automatically), so I implement this API. SVN revision: 60504
Diffstat (limited to '')
-rw-r--r--legacy/ecore/src/lib/ecore_imf/ecore_imf_context.c48
1 files changed, 48 insertions, 0 deletions
diff --git a/legacy/ecore/src/lib/ecore_imf/ecore_imf_context.c b/legacy/ecore/src/lib/ecore_imf/ecore_imf_context.c
index 0fe7f3d78a..382bf6a789 100644
--- a/legacy/ecore/src/lib/ecore_imf/ecore_imf_context.c
+++ b/legacy/ecore/src/lib/ecore_imf/ecore_imf_context.c
@@ -184,6 +184,10 @@ ecore_imf_context_add(const char *id)
184 * set on the immodule */ 184 * set on the immodule */
185 ecore_imf_context_autocapital_type_set(ctx, ECORE_IMF_AUTOCAPITAL_TYPE_SENTENCE); 185 ecore_imf_context_autocapital_type_set(ctx, ECORE_IMF_AUTOCAPITAL_TYPE_SENTENCE);
186 186
187 /* default input panel enabled status is EINA_TRUE, so let's make sure it's
188 * set on the immodule */
189 ecore_imf_context_input_panel_enabled_set(ctx, EINA_TRUE);
190
187 /* default input_mode is ECORE_IMF_INPUT_MODE_FULL, so let's make sure it's 191 /* default input_mode is ECORE_IMF_INPUT_MODE_FULL, so let's make sure it's
188 * set on the immodule */ 192 * set on the immodule */
189 ecore_imf_context_input_mode_set(ctx, ECORE_IMF_INPUT_MODE_FULL); 193 ecore_imf_context_input_mode_set(ctx, ECORE_IMF_INPUT_MODE_FULL);
@@ -1073,3 +1077,47 @@ ecore_imf_context_input_panel_language_get (Ecore_IMF_Context *ctx)
1073 return ctx->input_panel_lang; 1077 return ctx->input_panel_lang;
1074} 1078}
1075 1079
1080/**
1081 * Set whether the Input Method Context should request to show the input panel automatically
1082 * when the widget has focus.
1083 *
1084 * @param ctx An #Ecore_IMF_Context.
1085 * @param enabled If true, the input panel will be shown when the widget is clicked or has focus.
1086 * @ingroup Ecore_IMF_Context_Group
1087 * @since 1.1.0
1088 */
1089EAPI void
1090ecore_imf_context_input_panel_enabled_set (Ecore_IMF_Context *ctx,
1091 Eina_Bool enabled)
1092{
1093 if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
1094 {
1095 ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
1096 "ecore_imf_context_input_panel_enabled_set");
1097 return;
1098 }
1099
1100 ctx->input_panel_enabled = enabled;
1101}
1102
1103/**
1104 * Get whether the Input Method Context requests to show the input panel automatically.
1105 *
1106 * @param ctx An #Ecore_IMF_Context.
1107 * @return Return the attribute to show the input panel automatically
1108 * @ingroup Ecore_IMF_Context_Group
1109 * @since 1.1.0
1110 */
1111EAPI Eina_Bool
1112ecore_imf_context_input_panel_enabled_get (Ecore_IMF_Context *ctx)
1113{
1114 if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
1115 {
1116 ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
1117 "ecore_imf_context_input_panel_enabled_get");
1118 return EINA_FALSE;
1119 }
1120
1121 return ctx->input_panel_enabled;
1122}
1123