summaryrefslogtreecommitdiff
path: root/src/lib/ecore_imf
diff options
context:
space:
mode:
authorJihoon Kim <jihoon48.kim@samsung.com>2013-03-27 10:15:42 +0900
committerJihoon Kim <jihoon48.kim@samsung.com>2013-03-27 10:15:42 +0900
commit6265365ddc5dffa2fd372e229571f1ff4bce7668 (patch)
tree8b2c59a8863e5263a6242570db8c62113673953b /src/lib/ecore_imf
parent19561c611250352df5bc571e0ec2fa88972e4bdd (diff)
ecore_imf: Add ecore_imf_context_input_panel_layout_variation_set/get API
Diffstat (limited to 'src/lib/ecore_imf')
-rw-r--r--src/lib/ecore_imf/Ecore_IMF.h29
-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, 56 insertions, 0 deletions
diff --git a/src/lib/ecore_imf/Ecore_IMF.h b/src/lib/ecore_imf/Ecore_IMF.h
index 37a859d8bc..012c29e0bf 100644
--- a/src/lib/ecore_imf/Ecore_IMF.h
+++ b/src/lib/ecore_imf/Ecore_IMF.h
@@ -299,6 +299,14 @@ typedef enum
299 ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_SIGNIN /**< Sign-in @since 1.8 */ 299 ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_SIGNIN /**< Sign-in @since 1.8 */
300} Ecore_IMF_Input_Panel_Return_Key_Type; 300} Ecore_IMF_Input_Panel_Return_Key_Type;
301 301
302enum
303{
304 ECORE_IMF_INPUT_PANEL_LAYOUT_NUMBERONLY_VARIATION_NORMAL,
305 ECORE_IMF_INPUT_PANEL_LAYOUT_NUMBERONLY_VARIATION_SIGNED,
306 ECORE_IMF_INPUT_PANEL_LAYOUT_NUMBERONLY_VARIATION_DECIMAL,
307 ECORE_IMF_INPUT_PANEL_LAYOUT_NUMBERONLY_VARIATION_SIGNED_AND_DECIMAL
308};
309
302struct _Ecore_IMF_Event_Preedit_Start 310struct _Ecore_IMF_Event_Preedit_Start
303{ 311{
304 Ecore_IMF_Context *ctx; 312 Ecore_IMF_Context *ctx;
@@ -1256,6 +1264,27 @@ EAPI void ecore_imf_context_input_panel_layout_set(Ecor
1256EAPI Ecore_IMF_Input_Panel_Layout ecore_imf_context_input_panel_layout_get(Ecore_IMF_Context *ctx); 1264EAPI Ecore_IMF_Input_Panel_Layout ecore_imf_context_input_panel_layout_get(Ecore_IMF_Context *ctx);
1257 1265
1258/** 1266/**
1267 * Set the layout variation of the current active input panel.
1268 *
1269 * @param ctx An #Ecore_IMF_Context.
1270 * @param variation the layout variation
1271 * @note Default layout variation type is NORMAL.
1272 * @ingroup Ecore_IMF_Context_Group
1273 * @since 1.8.0
1274 */
1275EAPI void ecore_imf_context_input_panel_layout_variation_set(Ecore_IMF_Context *ctx, int variation);
1276
1277/**
1278 * Get the layout variation of the current active input panel.
1279 *
1280 * @param ctx An #Ecore_IMF_Context.
1281 * @return the layout variation
1282 * @ingroup Ecore_IMF_Context_Group
1283 * @since 1.8.0
1284 */
1285EAPI int ecore_imf_context_input_panel_layout_variation_get(Ecore_IMF_Context *ctx);
1286
1287/**
1259 * Set the language of the input panel. 1288 * Set the language of the input panel.
1260 * This API can be used when you want to show the English keyboard. 1289 * This API can be used when you want to show the English keyboard.
1261 * 1290 *
diff --git a/src/lib/ecore_imf/ecore_imf_context.c b/src/lib/ecore_imf/ecore_imf_context.c
index 8f6efa623a..41a84b2cee 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)
821} 821}
822 822
823EAPI void 823EAPI void
824ecore_imf_context_input_panel_layout_variation_set(Ecore_IMF_Context *ctx, int variation)
825{
826 if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
827 {
828 ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
829 "ecore_imf_context_input_panel_layout_variation_set");
830 return;
831 }
832
833 ctx->input_panel_layout_variation = variation;
834}
835
836EAPI int
837ecore_imf_context_input_panel_layout_variation_get(Ecore_IMF_Context *ctx)
838{
839 if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
840 {
841 ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
842 "ecore_imf_context_input_panel_layout_variation_get");
843 return 0;
844 }
845
846 return ctx->input_panel_layout_variation;
847}
848
849EAPI void
824ecore_imf_context_input_panel_language_set(Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Lang lang) 850ecore_imf_context_input_panel_language_set(Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Lang lang)
825{ 851{
826 if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT)) 852 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 b4ff0f2ee0..7452bd784f 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
53 Ecore_IMF_Input_Panel_Layout input_panel_layout; 53 Ecore_IMF_Input_Panel_Layout input_panel_layout;
54 Ecore_IMF_Input_Panel_Lang input_panel_lang; 54 Ecore_IMF_Input_Panel_Lang input_panel_lang;
55 Ecore_IMF_Input_Panel_Return_Key_Type input_panel_return_key_type; 55 Ecore_IMF_Input_Panel_Return_Key_Type input_panel_return_key_type;
56 int input_panel_layout_variation;
56 Eina_Bool allow_prediction : 1; 57 Eina_Bool allow_prediction : 1;
57 Eina_Bool input_panel_enabled : 1; 58 Eina_Bool input_panel_enabled : 1;
58 Eina_Bool input_panel_return_key_disabled : 1; 59 Eina_Bool input_panel_return_key_disabled : 1;