jihoon pushed a commit to branch master.

commit 6265365ddc5dffa2fd372e229571f1ff4bce7668
Author: Jihoon Kim <[email protected]>
Date:   Wed Mar 27 10:15:42 2013 +0900

    ecore_imf: Add ecore_imf_context_input_panel_layout_variation_set/get API
---
 ChangeLog                             |  5 +++++
 NEWS                                  |  1 +
 src/lib/ecore_imf/Ecore_IMF.h         | 29 +++++++++++++++++++++++++++++
 src/lib/ecore_imf/ecore_imf_context.c | 26 ++++++++++++++++++++++++++
 src/lib/ecore_imf/ecore_imf_private.h |  1 +
 5 files changed, 62 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 2442e7b..731b5f9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-03-27  Jihoon Kim
+
+       * Add ecore_imf_context_input_panel_variation_set/get API.
+
+
 2013-03-25  Cedric Bail
 
        * Eina: add portable eina_file_mkstemp().
diff --git a/NEWS b/NEWS
index c1931ab..84c205f 100644
--- a/NEWS
+++ b/NEWS
@@ -81,6 +81,7 @@ Additions:
     * Eeze: Add a dummy libmount replacement for when libmount is not there.
     * Ecore_Con: Add systemd socket activation support 
(ECORE_CON_SOCKET_ACTIVATE).
     * Ecore: notify systemd that we are ready as soon as the main loop is 
running.
+    * ecore_imf: Add ecore_imf_context_input_panel_layout_variation_set/get API
 
 Deprecations:
     * ecore_x:
diff --git a/src/lib/ecore_imf/Ecore_IMF.h b/src/lib/ecore_imf/Ecore_IMF.h
index 37a859d..012c29e 100644
--- a/src/lib/ecore_imf/Ecore_IMF.h
+++ b/src/lib/ecore_imf/Ecore_IMF.h
@@ -299,6 +299,14 @@ typedef enum
    ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_SIGNIN   /**< Sign-in @since 1.8 */
 } Ecore_IMF_Input_Panel_Return_Key_Type;
 
+enum
+{
+   ECORE_IMF_INPUT_PANEL_LAYOUT_NUMBERONLY_VARIATION_NORMAL,
+   ECORE_IMF_INPUT_PANEL_LAYOUT_NUMBERONLY_VARIATION_SIGNED,
+   ECORE_IMF_INPUT_PANEL_LAYOUT_NUMBERONLY_VARIATION_DECIMAL,
+   ECORE_IMF_INPUT_PANEL_LAYOUT_NUMBERONLY_VARIATION_SIGNED_AND_DECIMAL
+};
+
 struct _Ecore_IMF_Event_Preedit_Start
 {
    Ecore_IMF_Context *ctx;
@@ -1256,6 +1264,27 @@ 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);
 
 /**
+ * Set the layout variation of the current active input panel.
+ *
+ * @param ctx An #Ecore_IMF_Context.
+ * @param variation the layout variation
+ * @note Default layout variation type is NORMAL.
+ * @ingroup Ecore_IMF_Context_Group
+ * @since 1.8.0
+ */
+EAPI void                          
ecore_imf_context_input_panel_layout_variation_set(Ecore_IMF_Context *ctx, int 
variation);
+
+/**
+ * Get the layout variation of the current active input panel.
+ *
+ * @param ctx An #Ecore_IMF_Context.
+ * @return the layout variation
+ * @ingroup Ecore_IMF_Context_Group
+ * @since 1.8.0
+ */
+EAPI int                           
ecore_imf_context_input_panel_layout_variation_get(Ecore_IMF_Context *ctx);
+
+/**
  * Set the language of the input panel.
  * This API can be used when you want to show the English keyboard.
  *
diff --git a/src/lib/ecore_imf/ecore_imf_context.c 
b/src/lib/ecore_imf/ecore_imf_context.c
index 8f6efa6..41a84b2 100644
--- a/src/lib/ecore_imf/ecore_imf_context.c
+++ b/src/lib/ecore_imf/ecore_imf_context.c
@@ -821,6 +821,32 @@ ecore_imf_context_input_panel_layout_get(Ecore_IMF_Context 
*ctx)
 }
 
 EAPI void
+ecore_imf_context_input_panel_layout_variation_set(Ecore_IMF_Context *ctx, int 
variation)
+{
+   if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
+     {
+        ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
+                         "ecore_imf_context_input_panel_layout_variation_set");
+        return;
+     }
+
+   ctx->input_panel_layout_variation = variation;
+}
+
+EAPI int
+ecore_imf_context_input_panel_layout_variation_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_layout_variation_get");
+        return 0;
+     }
+
+   return ctx->input_panel_layout_variation;
+}
+
+EAPI void
 ecore_imf_context_input_panel_language_set(Ecore_IMF_Context *ctx, 
Ecore_IMF_Input_Panel_Lang lang)
 {
    if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
diff --git a/src/lib/ecore_imf/ecore_imf_private.h 
b/src/lib/ecore_imf/ecore_imf_private.h
index b4ff0f2..7452bd7 100644
--- a/src/lib/ecore_imf/ecore_imf_private.h
+++ b/src/lib/ecore_imf/ecore_imf_private.h
@@ -53,6 +53,7 @@ struct _Ecore_IMF_Context
    Ecore_IMF_Input_Panel_Layout   input_panel_layout;
    Ecore_IMF_Input_Panel_Lang     input_panel_lang;
    Ecore_IMF_Input_Panel_Return_Key_Type input_panel_return_key_type;
+   int                            input_panel_layout_variation;
    Eina_Bool                      allow_prediction : 1;
    Eina_Bool                      input_panel_enabled : 1;
    Eina_Bool                      input_panel_return_key_disabled : 1;

-- 

------------------------------------------------------------------------------
Own the Future-Intel&reg; Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game 
on Steam. $5K grand prize plus 10 genre and skill prizes. 
Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d

Reply via email to