diff options
Diffstat (limited to 'src/lib/ecore_imf')
-rw-r--r-- | src/lib/ecore_imf/Ecore_IMF.h | 12 | ||||
-rw-r--r-- | src/lib/ecore_imf/ecore_imf_context.c | 16 |
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 | */ |
1862 | EAPI Ecore_IMF_BiDi_Direction ecore_imf_context_bidi_direction_get(Ecore_IMF_Context *ctx); | 1863 | EAPI 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 | */ | ||
1874 | EAPI 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 | ||
1394 | EAPI Ecore_IMF_Input_Panel_Keyboard_Mode | ||
1395 | ecore_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 | } | ||