From: InHong Han Date: Mon, 12 Jun 2017 04:36:33 +0000 (+0900) Subject: ecore_imf: Added ecore_imf_context_input_panel_position_set API X-Git-Tag: accepted/tizen/unified/20170630.083318~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dee514c2497f3c6619636005bd14ad75f57d1bc5;p=platform%2Fupstream%2Fefl.git ecore_imf: Added ecore_imf_context_input_panel_position_set API Change-Id: I30d444f72914e7ad6983287d33209f340bdf674b --- diff --git a/src/lib/ecore_imf/Ecore_IMF.h b/src/lib/ecore_imf/Ecore_IMF.h index 3be648c..afae45e 100644 --- a/src/lib/ecore_imf/Ecore_IMF.h +++ b/src/lib/ecore_imf/Ecore_IMF.h @@ -732,6 +732,7 @@ struct _Ecore_IMF_Context_Class Ecore_IMF_Input_Panel_Keyboard_Mode (*keyboard_mode_get) (Ecore_IMF_Context *ctx); /**< Return the current keyboard mode of the input panel */ void (*prediction_hint_set) (Ecore_IMF_Context *ctx, const char *prediction_hint); /**< Set the prediction hint to the input panel */ void (*mime_type_accept_set) (Ecore_IMF_Context *ctx, const char *mime_type); /**< Set the MIME type to the input panel */ + void (*input_panel_position_set) (Ecore_IMF_Context *ctx, int x, int y); /**< Set the position of the input panel */ }; /** @@ -2274,6 +2275,21 @@ EAPI void ecore_imf_context_prediction_hint_set(Ecore_IM */ EAPI void ecore_imf_context_mime_type_accept_set(Ecore_IMF_Context *ctx, const char *mime_type); +/** + * @ingroup Ecore_IMF_Context_Group + * @brief Sets the x,y coordinates of the input panel. + * This API can be used in floating mode. + * + * @since 1.20.0 + * + * @param[in] ctx An #Ecore_IMF_Context + * @param x top-left x coordinate of the input panel + * @param y top-left y coordinate of the input panel + * + * @since_tizen 4.0 + */ +EAPI void ecore_imf_context_input_panel_position_set(Ecore_IMF_Context *ctx, int x, int y); + /* The following entry points must be exported by each input method module */ diff --git a/src/lib/ecore_imf/ecore_imf_context.c b/src/lib/ecore_imf/ecore_imf_context.c index fca290a..d0708e1 100644 --- a/src/lib/ecore_imf/ecore_imf_context.c +++ b/src/lib/ecore_imf/ecore_imf_context.c @@ -1426,4 +1426,20 @@ ecore_imf_context_mime_type_accept_set(Ecore_IMF_Context *ctx, const char *mime_ if (ctx->klass->mime_type_accept_set) ctx->klass->mime_type_accept_set(ctx, mime_type); +} + +EAPI void +ecore_imf_context_input_panel_position_set(Ecore_IMF_Context *ctx, int x, int y) +{ + if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT)) + { + ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT, + "ecore_imf_context_input_panel_position_set"); + return; + } + + if (x < 0 || y < 0) return; + + if (ctx->klass->input_panel_position_set) + ctx->klass->input_panel_position_set(ctx, x, y); } \ No newline at end of file