summaryrefslogtreecommitdiff
path: root/src/lib/ecore_imf
diff options
context:
space:
mode:
authorInHong Han <inhong1.han@samsung.com>2017-09-14 10:39:03 +0900
committerJihoon Kim <jihoon48.kim@samsung.com>2017-09-14 10:49:03 +0900
commit9f068c55dbf1ce1017492d4d84133d0acbd903c8 (patch)
tree24960404e37482206d075f0f5c58a1609f6d9b7e /src/lib/ecore_imf
parentcacd374e4121f5e91db51cf7b228f243d04d3193 (diff)
ecore_imf: Add ecore_imf_context_input_panel_position_set API
Summary: Sets the x,y coordinates of the input panel Test Plan: Tested in Tizen device Reviewers: woohyun, id213sin, jihoon, cedric Subscribers: jpeg, jihoon, cedric Differential Revision: https://phab.enlightenment.org/D5193
Diffstat (limited to 'src/lib/ecore_imf')
-rw-r--r--src/lib/ecore_imf/Ecore_IMF.h14
-rw-r--r--src/lib/ecore_imf/ecore_imf_context.c16
2 files changed, 30 insertions, 0 deletions
diff --git a/src/lib/ecore_imf/Ecore_IMF.h b/src/lib/ecore_imf/Ecore_IMF.h
index 53fc118..af6cd4e 100644
--- a/src/lib/ecore_imf/Ecore_IMF.h
+++ b/src/lib/ecore_imf/Ecore_IMF.h
@@ -729,6 +729,7 @@ struct _Ecore_IMF_Context_Class
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 void (*mime_type_accept_set) (Ecore_IMF_Context *ctx, const char *mime_type); /**< Set the MIME type to the input panel */
732 void (*input_panel_position_set) (Ecore_IMF_Context *ctx, int x, int y); /**< Set the position of the input panel */
732}; 733};
733 734
734/** 735/**
@@ -1934,6 +1935,19 @@ EAPI void ecore_imf_context_prediction_hint_set(Ecore_I
1934 */ 1935 */
1935EAPI void ecore_imf_context_mime_type_accept_set(Ecore_IMF_Context *ctx, const char *mime_type); 1936EAPI void ecore_imf_context_mime_type_accept_set(Ecore_IMF_Context *ctx, const char *mime_type);
1936 1937
1938/**
1939 * @ingroup Ecore_IMF_Context_Group
1940 * @brief Sets the x,y coordinates of the input panel.
1941 * This API can be used in floating mode.
1942 *
1943 * @since 1.21.0
1944 *
1945 * @param[in] ctx An #Ecore_IMF_Context
1946 * @param x top-left x coordinate of the input panel
1947 * @param y top-left y coordinate of the input panel
1948 */
1949EAPI void ecore_imf_context_input_panel_position_set(Ecore_IMF_Context *ctx, int x, int y);
1950
1937/* The following entry points must be exported by each input method module 1951/* The following entry points must be exported by each input method module
1938 */ 1952 */
1939 1953
diff --git a/src/lib/ecore_imf/ecore_imf_context.c b/src/lib/ecore_imf/ecore_imf_context.c
index caa2d59..1b34e0c 100644
--- a/src/lib/ecore_imf/ecore_imf_context.c
+++ b/src/lib/ecore_imf/ecore_imf_context.c
@@ -1445,3 +1445,19 @@ ecore_imf_context_mime_type_accept_set(Ecore_IMF_Context *ctx, const char *mime_
1445 if (ctx->klass->mime_type_accept_set) 1445 if (ctx->klass->mime_type_accept_set)
1446 ctx->klass->mime_type_accept_set(ctx, mime_type); 1446 ctx->klass->mime_type_accept_set(ctx, mime_type);
1447} 1447}
1448
1449EAPI void
1450ecore_imf_context_input_panel_position_set(Ecore_IMF_Context *ctx, int x, int y)
1451{
1452 if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
1453 {
1454 ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
1455 "ecore_imf_context_input_panel_position_set");
1456 return;
1457 }
1458
1459 if (x < 0 || y < 0) return;
1460
1461 if (ctx->klass->input_panel_position_set)
1462 ctx->klass->input_panel_position_set(ctx, x, y);
1463} \ No newline at end of file