summaryrefslogtreecommitdiff
path: root/legacy/ecore/src/lib/ecore_imf/ecore_imf_context.c
diff options
context:
space:
mode:
authorJihoon Kim <jihoon48.kim@samsung.com>2011-06-02 07:56:58 +0000
committerCarsten Haitzler <raster@rasterman.com>2011-06-02 07:56:58 +0000
commit156fb16ab2888fcdc6a385deaaa18e9f38126e8d (patch)
treeafb8f3f9a7d54c162f9fab845ea3c2b2a89c9659 /legacy/ecore/src/lib/ecore_imf/ecore_imf_context.c
parenta9a76f8012edf8de34d58e95a7803194c907fee1 (diff)
From: Jihoon Kim <jihoon48.kim@samsung.com>
Subject: [E-devel] [PATCH] Add some APIs for supporting virtual keyboard in Ecore_IMF For supporting virtual keyboard, I'd like to add some APIs. The detail description of each API is included in the patch file as doxygen format. In the attached patch, the reason why we add the subprefix 'input_panel_' related to virtual keyboard is that input method can be soft keyboard or voice input or image captured by camera. SVN revision: 59894
Diffstat (limited to '')
-rw-r--r--legacy/ecore/src/lib/ecore_imf/ecore_imf_context.c87
1 files changed, 87 insertions, 0 deletions
diff --git a/legacy/ecore/src/lib/ecore_imf/ecore_imf_context.c b/legacy/ecore/src/lib/ecore_imf/ecore_imf_context.c
index 50b6a874c2..0fe7f3d78a 100644
--- a/legacy/ecore/src/lib/ecore_imf/ecore_imf_context.c
+++ b/legacy/ecore/src/lib/ecore_imf/ecore_imf_context.c
@@ -986,3 +986,90 @@ ecore_imf_context_delete_surrounding_event_add(Ecore_IMF_Context *ctx, int offse
986 ecore_event_add(ECORE_IMF_EVENT_DELETE_SURROUNDING, 986 ecore_event_add(ECORE_IMF_EVENT_DELETE_SURROUNDING,
987 ev, _ecore_imf_event_free_delete_surrounding, NULL); 987 ev, _ecore_imf_event_free_delete_surrounding, NULL);
988} 988}
989
990/**
991 * Ask the Input Method Context to show the control panel of using Input Method.
992 *
993 * @param ctx An #Ecore_IMF_Context.
994 * @ingroup Ecore_IMF_Context_IMControl_Group
995 * @since 1.1.0
996 */
997EAPI void
998ecore_imf_context_control_panel_show (Ecore_IMF_Context *ctx)
999{
1000 if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
1001 {
1002 ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
1003 "ecore_imf_context_control_panel_show");
1004 return;
1005 }
1006
1007 if (ctx->klass->control_panel_show) ctx->klass->control_panel_show(ctx);
1008}
1009
1010/**
1011 * Ask the Input Method Context to hide the control panel of using Input Method.
1012 *
1013 * @param ctx An #Ecore_IMF_Context.
1014 * @ingroup Ecore_IMF_Context_IMControl_Group
1015 * @since 1.1.0
1016 */
1017EAPI void
1018ecore_imf_context_control_panel_hide (Ecore_IMF_Context *ctx)
1019{
1020 if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
1021 {
1022 ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
1023 "ecore_imf_context_control_panel_hide");
1024 return;
1025 }
1026
1027 if (ctx->klass->control_panel_hide) ctx->klass->control_panel_hide(ctx);
1028}
1029
1030/**
1031 * Set the language of the input panel.
1032 * This API can be used when you want to show the English keyboard.
1033 *
1034 * @param ctx An #Ecore_IMF_Context.
1035 * @param lang the language to be set to the input panel.
1036 * @ingroup Ecore_IMF_Context_IMControl_Group
1037 * @since 1.1.0
1038 */
1039EAPI void
1040ecore_imf_context_input_panel_language_set (Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Lang lang)
1041{
1042 if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
1043 {
1044 ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
1045 "ecore_imf_context_input_panel_language_set");
1046 return;
1047 }
1048
1049 if (ctx->klass->input_panel_language_set) ctx->klass->input_panel_language_set(ctx, lang);
1050 ctx->input_panel_lang = lang;
1051}
1052
1053/**
1054 * Get the language of the input panel.
1055 *
1056 * See @ref ecore_imf_context_input_panel_language_set for more details.
1057 *
1058 * @param ctx An #Ecore_IMF_Context.
1059 * @return Ecore_IMF_Input_Panel_Lang
1060 * @ingroup Ecore_IMF_Context_IMControl_Group
1061 * @since 1.1.0
1062 */
1063EAPI Ecore_IMF_Input_Panel_Lang
1064ecore_imf_context_input_panel_language_get (Ecore_IMF_Context *ctx)
1065{
1066 if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
1067 {
1068 ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
1069 "ecore_imf_context_input_panel_language_get");
1070 return ECORE_IMF_INPUT_PANEL_LANG_AUTOMATIC;
1071 }
1072
1073 return ctx->input_panel_lang;
1074}
1075