[ecore_imf] add ecore_imf_context_input_panel_enabled_set,get API
authorJihoon Kim <jihoon48.kim@samsung.com>
Sat, 25 Jun 2011 06:19:14 +0000 (15:19 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Sat, 25 Jun 2011 06:19:14 +0000 (15:19 +0900)
Change-Id: I3d640cf2490c50a6e683884942e0be01b3c91e68

debian/changelog
src/lib/ecore_imf/Ecore_IMF.h
src/lib/ecore_imf/ecore_imf_context.c
src/lib/ecore_imf/ecore_imf_private.h

index 50e340c..87374f2 100644 (file)
@@ -1,3 +1,11 @@
+ecore (1.0.0.001+svn.60286slp2+build02) unstable; urgency=low
+
+  * [ecore_imf] add ecore_imf_context_input_panel_enalbed_set, get API
+  * Git: 165.213.180.234:slp/pkgs/e/ecore
+  * Tag: ecore_1.0.0.001+svn.60286slp2+build02
+
+ -- Jihoon Kim <jihoon48.kim@samsung.com>  Sat, 25 Jun 2011 15:11:35 +0900
+
 ecore (1.0.0.001+svn.60286slp2+build01) unstable; urgency=low
 
   * [SVN EFL Migration] ecore in SLP is merged with SVN r60286
index 418abce..50c608f 100644 (file)
@@ -520,6 +520,8 @@ EAPI void                          ecore_imf_context_input_panel_layout_set(Ecor
 EAPI Ecore_IMF_Input_Panel_Layout  ecore_imf_context_input_panel_layout_get(Ecore_IMF_Context *ctx);
 EAPI void                          ecore_imf_context_input_panel_language_set(Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Lang lang);
 EAPI Ecore_IMF_Input_Panel_Lang    ecore_imf_context_input_panel_language_get(Ecore_IMF_Context *ctx);
+EAPI void                          ecore_imf_context_input_panel_enabled_set(Ecore_IMF_Context *ctx, Eina_Bool enable);
+EAPI Eina_Bool                     ecore_imf_context_input_panel_enabled_get(Ecore_IMF_Context *ctx);
 EAPI void                          ecore_imf_context_input_panel_imdata_set(Ecore_IMF_Context *ctx, const char *data, int len);
 EAPI void                          ecore_imf_context_input_panel_imdata_get(Ecore_IMF_Context *ctx, char *data, int *len);
 EAPI void                          ecore_imf_context_input_panel_use_effect_set(Ecore_IMF_Context *ctx, Eina_Bool use_effect);
index 4b8e5bd..0ccdf2c 100644 (file)
@@ -184,6 +184,10 @@ ecore_imf_context_add(const char *id)
     * set on the immodule */
 //   ecore_imf_context_autocapital_type_set(ctx, ECORE_IMF_AUTOCAPITAL_TYPE_SENTENCE);
 
+   /* default input panel enabled status is EINA_TRUE, so let's make sure it's
+    * set on the immodule */
+   ecore_imf_context_input_panel_enabled_set(ctx, EINA_TRUE);
+
    /* default input_mode is ECORE_IMF_INPUT_MODE_FULL, so let's make sure it's
     * set on the immodule */
    ecore_imf_context_input_mode_set(ctx, ECORE_IMF_INPUT_MODE_FULL);
@@ -1006,10 +1010,8 @@ ecore_imf_context_delete_surrounding_event_add(Ecore_IMF_Context *ctx, int offse
                    ev, _ecore_imf_event_free_delete_surrounding, NULL);
 }
 
-/*** ImControl Related APIs */
-
 /**
- * Show the current active input panel (virtual keyboard).
+ * Ask the Input Method Context to show the input panel (virtual keyboard).
  *
  * @param ctx An #Ecore_IMF_Context.
  * @ingroup Ecore_IMF_Context_IMControl_Group
@@ -1029,7 +1031,7 @@ ecore_imf_context_input_panel_show(Ecore_IMF_Context *ctx)
 }
 
 /**
- * Hide the current active input panel.
+ * Ask the Input Method Context to hide the input panel.
  *
  * @param ctx An #Ecore_IMF_Context.
  * @ingroup Ecore_IMF_Context_IMControl_Group
@@ -1135,6 +1137,50 @@ ecore_imf_context_input_panel_language_get (Ecore_IMF_Context *ctx)
 }
 
 /**
+ * Set whether the Input Method Context should request to show the input panel automatically
+ * when the widget has focus.
+ *
+ * @param ctx An #Ecore_IMF_Context.
+ * @param enabled If true, the input panel will be shown when the widget is clicked or has focus.
+ * @ingroup Ecore_IMF_Context_Group
+ * @since 1.1.0
+ */
+EAPI void
+ecore_imf_context_input_panel_enabled_set (Ecore_IMF_Context *ctx,
+                                           Eina_Bool enabled)
+{
+   if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
+     {
+        ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
+                         "ecore_imf_context_input_panel_enabled_set");
+        return;
+     }
+
+   ctx->input_panel_enabled = enabled;
+}
+
+/**
+ * Get whether the Input Method Context requests to show the input panel automatically.
+ *
+ * @param ctx An #Ecore_IMF_Context.
+ * @return Return the attribute to show the input panel automatically
+ * @ingroup Ecore_IMF_Context_Group
+ * @since 1.1.0
+ */
+EAPI Eina_Bool
+ecore_imf_context_input_panel_enabled_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_enabled_get");
+        return EINA_FALSE;
+     }
+
+   return ctx->input_panel_enabled;
+}
+
+/**
  * Get ISE Language of given ISE. -- Not supported for now --
  * @ingroup Ecore_IMF_Context_IMControl_Group
  */
index 39a4fe2..2dc5cf7 100644 (file)
@@ -57,6 +57,7 @@ struct _Ecore_IMF_Context
    Eina_List                     *disabled_key_list;
    Eina_List                     *private_key_list;
    Eina_Bool                      allow_prediction : 1;
+   Eina_Bool                      input_panel_enabled : 1;
    Eina_Bool                      use_effect : 1;
 };