diff options
-rw-r--r-- | src/lib/ecore_imf/Ecore_IMF.h | 21 | ||||
-rw-r--r-- | src/lib/ecore_imf/ecore_imf_context.c | 16 |
2 files changed, 37 insertions, 0 deletions
diff --git a/src/lib/ecore_imf/Ecore_IMF.h b/src/lib/ecore_imf/Ecore_IMF.h index 08ae0e8dd6..9a27c20f52 100644 --- a/src/lib/ecore_imf/Ecore_IMF.h +++ b/src/lib/ecore_imf/Ecore_IMF.h | |||
@@ -728,6 +728,7 @@ struct _Ecore_IMF_Context_Class | |||
728 | void (*bidi_direction_set) (Ecore_IMF_Context *ctx, Ecore_IMF_BiDi_Direction direction); /**< Set bidirectionality at the cursor position */ | 728 | void (*bidi_direction_set) (Ecore_IMF_Context *ctx, Ecore_IMF_BiDi_Direction direction); /**< Set bidirectionality at the cursor position */ |
729 | Ecore_IMF_Input_Panel_Keyboard_Mode (*keyboard_mode_get) (Ecore_IMF_Context *ctx); /**< Return the current keyboard mode of the input panel */ | 729 | Ecore_IMF_Input_Panel_Keyboard_Mode (*keyboard_mode_get) (Ecore_IMF_Context *ctx); /**< Return the current keyboard mode of the input panel */ |
730 | void (*prediction_hint_set) (Ecore_IMF_Context *ctx, const char *prediction_hint); /**< Set the prediction hint to the input panel */ | 730 | void (*prediction_hint_set) (Ecore_IMF_Context *ctx, const char *prediction_hint); /**< Set the prediction hint to the input panel */ |
731 | void (*mime_type_accept_set) (Ecore_IMF_Context *ctx, const char *mime_type); /**< Set the MIME type to the input panel */ | ||
731 | }; | 732 | }; |
732 | 733 | ||
733 | /** | 734 | /** |
@@ -1916,6 +1917,26 @@ EAPI Ecore_IMF_Input_Panel_Keyboard_Mode ecore_imf_context_keyboard_mode_get(Eco | |||
1916 | */ | 1917 | */ |
1917 | EAPI void ecore_imf_context_prediction_hint_set(Ecore_IMF_Context *ctx, const char *prediction_hint); | 1918 | EAPI void ecore_imf_context_prediction_hint_set(Ecore_IMF_Context *ctx, const char *prediction_hint); |
1918 | 1919 | ||
1920 | /** | ||
1921 | * @ingroup Ecore_IMF_Context_Group | ||
1922 | * @brief Sets the allowed MIME type to deliver to the input panel. | ||
1923 | * | ||
1924 | * @since 1.20.0 | ||
1925 | * | ||
1926 | * @param[in] ctx An #Ecore_IMF_Context | ||
1927 | * @param[in] mime_type The allowed MIME type in entry | ||
1928 | * | ||
1929 | * Example | ||
1930 | * @code | ||
1931 | * const char *mime_type = "text/plain,image/png,application/pdf"; | ||
1932 | * ecore_imf_context_mime_type_accept_set(imf_context, mime_type); | ||
1933 | * @endcode | ||
1934 | * | ||
1935 | * @since_tizen 4.0 | ||
1936 | * @endif | ||
1937 | */ | ||
1938 | EAPI void ecore_imf_context_mime_type_accept_set(Ecore_IMF_Context *ctx, const char *mime_type); | ||
1939 | |||
1919 | /* The following entry points must be exported by each input method module | 1940 | /* The following entry points must be exported by each input method module |
1920 | */ | 1941 | */ |
1921 | 1942 | ||
diff --git a/src/lib/ecore_imf/ecore_imf_context.c b/src/lib/ecore_imf/ecore_imf_context.c index e7f1f67d68..2ac7d59e7f 100644 --- a/src/lib/ecore_imf/ecore_imf_context.c +++ b/src/lib/ecore_imf/ecore_imf_context.c | |||
@@ -1420,4 +1420,20 @@ ecore_imf_context_prediction_hint_set(Ecore_IMF_Context *ctx, const char *predic | |||
1420 | 1420 | ||
1421 | if (ctx->klass->prediction_hint_set) | 1421 | if (ctx->klass->prediction_hint_set) |
1422 | ctx->klass->prediction_hint_set(ctx, prediction_hint); | 1422 | ctx->klass->prediction_hint_set(ctx, prediction_hint); |
1423 | } | ||
1424 | |||
1425 | EAPI void | ||
1426 | ecore_imf_context_mime_type_accept_set(Ecore_IMF_Context *ctx, const char *mime_type) | ||
1427 | { | ||
1428 | if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT)) | ||
1429 | { | ||
1430 | ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT, | ||
1431 | "ecore_imf_context_mime_type_accept_set"); | ||
1432 | return; | ||
1433 | } | ||
1434 | |||
1435 | if (!mime_type) return; | ||
1436 | |||
1437 | if (ctx->klass->mime_type_accept_set) | ||
1438 | ctx->klass->mime_type_accept_set(ctx, mime_type); | ||
1423 | } \ No newline at end of file | 1439 | } \ No newline at end of file |