From: Jihoon Kim Date: Tue, 26 Mar 2013 12:09:49 +0000 (+0900) Subject: [ecore_imf] Add ecore_imf_context_input_panel_layout_variation_set X-Git-Tag: accepted/tizen_2.1/20130425.024948~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a7bf9d3d6f4d373eeae1633c0dab103ec59aade9;p=framework%2Fuifw%2Fecore.git [ecore_imf] Add ecore_imf_context_input_panel_layout_variation_set Change-Id: Ifa7646e561a33fe4f1c89d34bce57a041b422089 --- diff --git a/src/lib/ecore_imf/Ecore_IMF.h b/src/lib/ecore_imf/Ecore_IMF.h index 3bca101..f367fbb 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; @@ -1258,6 +1266,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 e77a6ef..7c95765 100644 --- a/src/lib/ecore_imf/ecore_imf_context.c +++ b/src/lib/ecore_imf/ecore_imf_context.c @@ -859,6 +859,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 59ceddb..b63500a 100644 --- a/src/lib/ecore_imf/ecore_imf_private.h +++ b/src/lib/ecore_imf/ecore_imf_private.h @@ -55,6 +55,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;