summaryrefslogtreecommitdiff
path: root/src/lib/ecore_imf
diff options
context:
space:
mode:
authorJihoon Kim <jihoon48.kim@samsung.com>2017-04-17 16:53:50 +0900
committerJihoon Kim <jihoon48.kim@samsung.com>2017-04-17 16:53:50 +0900
commit4533eef59b3b84c28ed6cd5814d753291df3f6f1 (patch)
tree6e2c95635f5c2df94de213cf8d62ed1dee668bdd /src/lib/ecore_imf
parent2ea487286984cf54a0db9cb65c1949b470199a6e (diff)
ecore_imf: Add ecore_imf_context_keyboard_mode_get API
Summary: When the keyboard mode state is changed, the keyboard_mode_event_cb will be called, too. But there is no way to get keyboard mode manually. Test Plan: Tested in Tizen device Reviewers: jihoon, woohyun, id213sin Reviewed By: jihoon Subscribers: jpeg, z-wony, jsuya, cedric Differential Revision: https://phab.enlightenment.org/D4786
Diffstat (limited to 'src/lib/ecore_imf')
-rw-r--r--src/lib/ecore_imf/Ecore_IMF.h12
-rw-r--r--src/lib/ecore_imf/ecore_imf_context.c16
2 files changed, 28 insertions, 0 deletions
diff --git a/src/lib/ecore_imf/Ecore_IMF.h b/src/lib/ecore_imf/Ecore_IMF.h
index 6bca58f7ad..8f2fa2a51e 100644
--- a/src/lib/ecore_imf/Ecore_IMF.h
+++ b/src/lib/ecore_imf/Ecore_IMF.h
@@ -700,6 +700,7 @@ struct _Ecore_IMF_Context_Class
700 void (*candidate_panel_geometry_get)(Ecore_IMF_Context *ctx, int *x, int *y, int *w, int *h); /**< Return the candidate panel geometry */ 700 void (*candidate_panel_geometry_get)(Ecore_IMF_Context *ctx, int *x, int *y, int *w, int *h); /**< Return the candidate panel geometry */
701 void (*input_hint_set) (Ecore_IMF_Context *ctx, Ecore_IMF_Input_Hints input_hints); /**< Sets input hint to fine-tune input methods behavior */ 701 void (*input_hint_set) (Ecore_IMF_Context *ctx, Ecore_IMF_Input_Hints input_hints); /**< Sets input hint to fine-tune input methods behavior */
702 void (*bidi_direction_set) (Ecore_IMF_Context *ctx, Ecore_IMF_BiDi_Direction direction); /**< Set bidirectionality at the cursor position */ 702 void (*bidi_direction_set) (Ecore_IMF_Context *ctx, Ecore_IMF_BiDi_Direction direction); /**< Set bidirectionality at the cursor position */
703 Ecore_IMF_Input_Panel_Keyboard_Mode (*keyboard_mode_get) (Ecore_IMF_Context *ctx); /**< Return the current keyboard mode of the input panel */
703}; 704};
704 705
705/** 706/**
@@ -1861,6 +1862,17 @@ EAPI void ecore_imf_context_bidi_direction_set(Ecore_IM
1861 */ 1862 */
1862EAPI Ecore_IMF_BiDi_Direction ecore_imf_context_bidi_direction_get(Ecore_IMF_Context *ctx); 1863EAPI Ecore_IMF_BiDi_Direction ecore_imf_context_bidi_direction_get(Ecore_IMF_Context *ctx);
1863 1864
1865/**
1866 * @ingroup Ecore_IMF_Context_Group
1867 * @brief Get the keyboard mode on the input panel.
1868 *
1869 * @since 1.20.0
1870 *
1871 * @param[in] ctx An #Ecore_IMF_Context
1872 * @return the keyboard mode
1873 */
1874EAPI Ecore_IMF_Input_Panel_Keyboard_Mode ecore_imf_context_keyboard_mode_get(Ecore_IMF_Context *ctx);
1875
1864/* The following entry points must be exported by each input method module 1876/* The following entry points must be exported by each input method module
1865 */ 1877 */
1866 1878
diff --git a/src/lib/ecore_imf/ecore_imf_context.c b/src/lib/ecore_imf/ecore_imf_context.c
index d6fd854035..a7289ba700 100644
--- a/src/lib/ecore_imf/ecore_imf_context.c
+++ b/src/lib/ecore_imf/ecore_imf_context.c
@@ -1391,3 +1391,19 @@ ecore_imf_context_bidi_direction_get(Ecore_IMF_Context *ctx)
1391 return ctx->bidi_direction; 1391 return ctx->bidi_direction;
1392} 1392}
1393 1393
1394EAPI Ecore_IMF_Input_Panel_Keyboard_Mode
1395ecore_imf_context_keyboard_mode_get(Ecore_IMF_Context *ctx)
1396{
1397 Ecore_IMF_Input_Panel_Keyboard_Mode mode = ECORE_IMF_INPUT_PANEL_SW_KEYBOARD_MODE;
1398 if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
1399 {
1400 ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
1401 "ecore_imf_context_keyboard_mode_get");
1402 return ECORE_IMF_INPUT_PANEL_SW_KEYBOARD_MODE;
1403 }
1404
1405 if (ctx->klass->keyboard_mode_get)
1406 mode = ctx->klass->keyboard_mode_get(ctx);
1407
1408 return mode;
1409}