summaryrefslogtreecommitdiff
path: root/legacy/ecore/src/lib/ecore_imf
diff options
context:
space:
mode:
authorJihoon Kim <jihoon48.kim@samsung.com>2011-07-07 06:23:46 +0000
committerCarsten Haitzler <raster@rasterman.com>2011-07-07 06:23:46 +0000
commitfe041aca5fb967a25a9b2d872b8b2ba1cf9ff5ff (patch)
tree890807d51ba4f30a8cd8161b342d1f4f0857fe78 /legacy/ecore/src/lib/ecore_imf
parent72bcec17b9db773d183c8020176e21cc37c5a72e (diff)
From: Jihoon Kim <jihoon48.kim@samsung.com>
Subject: [E-devel] [PATCH] add ecore_imf_context_cursor_location_set API In this patch, it will add ecore_imf_context_cursor_location_set API in Ecore_IMF. The cursor location can be used to determine the position of candidate word window in immodule. SVN revision: 61105
Diffstat (limited to '')
-rw-r--r--legacy/ecore/src/lib/ecore_imf/Ecore_IMF.h2
-rw-r--r--legacy/ecore/src/lib/ecore_imf/ecore_imf_context.c23
2 files changed, 25 insertions, 0 deletions
diff --git a/legacy/ecore/src/lib/ecore_imf/Ecore_IMF.h b/legacy/ecore/src/lib/ecore_imf/Ecore_IMF.h
index 7afee2cf96..21df2a09ab 100644
--- a/legacy/ecore/src/lib/ecore_imf/Ecore_IMF.h
+++ b/legacy/ecore/src/lib/ecore_imf/Ecore_IMF.h
@@ -330,6 +330,7 @@ struct _Ecore_IMF_Context_Class
330 Ecore_IMF_Input_Panel_Layout (*input_panel_layout_get) (Ecore_IMF_Context *ctx); 330 Ecore_IMF_Input_Panel_Layout (*input_panel_layout_get) (Ecore_IMF_Context *ctx);
331 void (*input_panel_language_set) (Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Lang lang); 331 void (*input_panel_language_set) (Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Lang lang);
332 Ecore_IMF_Input_Panel_Lang (*input_panel_language_get) (Ecore_IMF_Context *ctx); 332 Ecore_IMF_Input_Panel_Lang (*input_panel_language_get) (Ecore_IMF_Context *ctx);
333 void (*cursor_location_set) (Ecore_IMF_Context *ctx, int x, int y, int w, int h);
333}; 334};
334 335
335struct _Ecore_IMF_Context_Info 336struct _Ecore_IMF_Context_Info
@@ -367,6 +368,7 @@ EAPI void ecore_imf_context_focus_in(Ecore_IMF_Context
367EAPI void ecore_imf_context_focus_out(Ecore_IMF_Context *ctx); 368EAPI void ecore_imf_context_focus_out(Ecore_IMF_Context *ctx);
368EAPI void ecore_imf_context_reset(Ecore_IMF_Context *ctx); 369EAPI void ecore_imf_context_reset(Ecore_IMF_Context *ctx);
369EAPI void ecore_imf_context_cursor_position_set(Ecore_IMF_Context *ctx, int cursor_pos); 370EAPI void ecore_imf_context_cursor_position_set(Ecore_IMF_Context *ctx, int cursor_pos);
371EAPI void ecore_imf_context_cursor_location_set(Ecore_IMF_Context *ctx, int x, int y, int w, int h);
370EAPI void ecore_imf_context_use_preedit_set(Ecore_IMF_Context *ctx, Eina_Bool use_preedit); 372EAPI void ecore_imf_context_use_preedit_set(Ecore_IMF_Context *ctx, Eina_Bool use_preedit);
371EAPI void ecore_imf_context_retrieve_surrounding_callback_set(Ecore_IMF_Context *ctx, Eina_Bool (*func)(void *data, Ecore_IMF_Context *ctx, char **text, int *cursor_pos), const void *data); 373EAPI void ecore_imf_context_retrieve_surrounding_callback_set(Ecore_IMF_Context *ctx, Eina_Bool (*func)(void *data, Ecore_IMF_Context *ctx, char **text, int *cursor_pos), const void *data);
372EAPI void ecore_imf_context_input_mode_set(Ecore_IMF_Context *ctx, Ecore_IMF_Input_Mode input_mode); 374EAPI void ecore_imf_context_input_mode_set(Ecore_IMF_Context *ctx, Ecore_IMF_Input_Mode input_mode);
diff --git a/legacy/ecore/src/lib/ecore_imf/ecore_imf_context.c b/legacy/ecore/src/lib/ecore_imf/ecore_imf_context.c
index 382bf6a789..c1ecd1eca3 100644
--- a/legacy/ecore/src/lib/ecore_imf/ecore_imf_context.c
+++ b/legacy/ecore/src/lib/ecore_imf/ecore_imf_context.c
@@ -504,6 +504,29 @@ ecore_imf_context_cursor_position_set(Ecore_IMF_Context *ctx, int cursor_pos)
504} 504}
505 505
506/** 506/**
507 * Notify the Input Method Context that a change in the cursor
508 * location has been made. The location is relative to the canvas.
509 *
510 * @param ctx An #Ecore_IMF_Context.
511 * @param x cursor x position.
512 * @param x cursor y position.
513 * @param w cursor width.
514 * @param h cursor height.
515 * @ingroup Ecore_IMF_Context_Group
516 */
517EAPI void
518ecore_imf_context_cursor_location_set(Ecore_IMF_Context *ctx, int x, int y, int w, int h)
519{
520 if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
521 {
522 ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
523 "ecore_imf_context_cursor_position_set");
524 return;
525 }
526 if (ctx->klass->cursor_location_set) ctx->klass->cursor_location_set(ctx, x, y, w, h);
527}
528
529/**
507 * Set whether the IM context should use the preedit string 530 * Set whether the IM context should use the preedit string
508 * to display feedback. If @use_preedit is EINA_FALSE (default 531 * to display feedback. If @use_preedit is EINA_FALSE (default
509 * is EINA_TRUE), then the IM context may use some other method to display 532 * is EINA_TRUE), then the IM context may use some other method to display