summaryrefslogtreecommitdiff
path: root/src/lib/ecore_imf
diff options
context:
space:
mode:
authorJihoon Kim <jihoon48.kim@samsung.com>2013-08-13 15:27:29 +0900
committerJihoon Kim <jihoon48.kim@samsung.com>2013-08-13 15:27:29 +0900
commitfe05d358eae261fedb4c9af9b532a9df2df15e6a (patch)
tree9d8a2c53911d06c63818ab52a7e361b3e3d75855 /src/lib/ecore_imf
parent3e5bd813d3978558c5e164c7819b18f51e810ec2 (diff)
downloadefl-fe05d358eae261fedb4c9af9b532a9df2df15e6a.tar.gz
Add ecore_imf_context_input_panel_on_demand_set/get API
Diffstat (limited to 'src/lib/ecore_imf')
-rw-r--r--src/lib/ecore_imf/Ecore_IMF.h21
-rw-r--r--src/lib/ecore_imf/ecore_imf_context.c26
-rw-r--r--src/lib/ecore_imf/ecore_imf_private.h1
3 files changed, 48 insertions, 0 deletions
diff --git a/src/lib/ecore_imf/Ecore_IMF.h b/src/lib/ecore_imf/Ecore_IMF.h
index 669e39a9e0..df37a4dc01 100644
--- a/src/lib/ecore_imf/Ecore_IMF.h
+++ b/src/lib/ecore_imf/Ecore_IMF.h
@@ -1523,6 +1523,27 @@ EAPI void ecore_imf_context_input_panel_language_locale
*/
EAPI void ecore_imf_context_candidate_panel_geometry_get(Ecore_IMF_Context *ctx, int *x, int *y, int *w, int *h);
+/**
+ * Set whether the Input Method Context should request to show the input panel in case of only an user's explicit Mouse Up event.
+ * It doesn't request to show the input panel even though the Input Method Context has focus.
+ *
+ * @param ctx An #Ecore_IMF_Context.
+ * @param ondemand If true, the input panel will be shown in case of only Mouse up event. (Focus event will be ignored.)
+ * @ingroup Ecore_IMF_Context_Group
+ * @since 1.8.0
+ */
+EAPI void ecore_imf_context_input_panel_show_on_demand_set(Ecore_IMF_Context *ctx, Eina_Bool ondemand);
+
+/**
+ * Get whether the Input Method Context should request to show the input panel in case of only an user's explicit Mouse Up event.
+ *
+ * @param ctx An #Ecore_IMF_Context.
+ * @return @c EINA_TRUE if the input panel will be shown in case of only Mouse up event.
+ * @ingroup Ecore_IMF_Context_Group
+ * @since 1.8.0
+ */
+EAPI Eina_Bool ecore_imf_context_input_panel_show_on_demand_get(Ecore_IMF_Context *ctx);
+
/* The following entry points must be exported by each input method module
*/
diff --git a/src/lib/ecore_imf/ecore_imf_context.c b/src/lib/ecore_imf/ecore_imf_context.c
index 272a04be66..6b243d6447 100644
--- a/src/lib/ecore_imf/ecore_imf_context.c
+++ b/src/lib/ecore_imf/ecore_imf_context.c
@@ -1207,3 +1207,29 @@ ecore_imf_context_candidate_panel_geometry_get(Ecore_IMF_Context *ctx, int *x, i
ctx->klass->candidate_panel_geometry_get(ctx, x, y, w, h);
}
+EAPI void
+ecore_imf_context_input_panel_show_on_demand_set(Ecore_IMF_Context *ctx, Eina_Bool ondemand)
+{
+ if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
+ {
+ ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
+ "ecore_imf_context_input_panel_show_on_demand_set");
+ return;
+ }
+
+ ctx->input_panel_show_on_demand = ondemand;
+}
+
+EAPI Eina_Bool
+ecore_imf_context_input_panel_show_on_demand_get(Ecore_IMF_Context *ctx)
+{
+ if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
+ {
+ ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
+ "ecore_imf_context_input_panel_show_on_demand_get");
+ return EINA_FALSE;
+ }
+
+ return ctx->input_panel_show_on_demand;
+}
+
diff --git a/src/lib/ecore_imf/ecore_imf_private.h b/src/lib/ecore_imf/ecore_imf_private.h
index b63500afec..5c62cfd291 100644
--- a/src/lib/ecore_imf/ecore_imf_private.h
+++ b/src/lib/ecore_imf/ecore_imf_private.h
@@ -60,6 +60,7 @@ struct _Ecore_IMF_Context
Eina_Bool input_panel_enabled : 1;
Eina_Bool input_panel_return_key_disabled : 1;
Eina_Bool input_panel_caps_lock_mode : 1;
+ Eina_Bool input_panel_show_on_demand : 1;
};
struct _Ecore_IMF_Module