aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJihoon Kim <jihoon48.kim@samsung.com>2013-02-23 18:01:10 +0900
committerJihoon Kim <jihoon48.kim@samsung.com>2013-02-23 18:01:10 +0900
commit161a78466b5e3b1545ca2290a2e0e1b6c5ccf69e (patch)
tree620c4bf0659508eb26777c12e14c64a67b30ef09 /src
parent2ea7ddfdcbaff15db5564b892110e42b501fcf93 (diff)
downloadefl-161a78466b5e3b1545ca2290a2e0e1b6c5ccf69e.tar.gz
efl-161a78466b5e3b1545ca2290a2e0e1b6c5ccf69e.tar.xz
efl-161a78466b5e3b1545ca2290a2e0e1b6c5ccf69e.zip
ecore_imf_example: call ecore_imf_context_filter_event in mouse up/down event
Diffstat (limited to 'src')
-rw-r--r--src/examples/ecore/ecore_imf_example.c31
1 files changed, 29 insertions, 2 deletions
diff --git a/src/examples/ecore/ecore_imf_example.c b/src/examples/ecore/ecore_imf_example.c
index f4099ce99..406dcc66d 100644
--- a/src/examples/ecore/ecore_imf_example.c
+++ b/src/examples/ecore/ecore_imf_example.c
@@ -36,11 +36,21 @@ static void
_mouse_down_cb(void *data, Evas *e, Evas_Object *o, void *event_info)
{
Entry *en = data;
+ Evas_Event_Mouse_Down *ev = event_info;
if (!en) return;
- // ecore_imf_context_reset should be called before calculating new cursor position
if (en->imf_context)
- ecore_imf_context_reset(en->imf_context);
+ {
+ Ecore_IMF_Event_Mouse_Down ecore_ev;
+ ecore_imf_evas_event_mouse_down_wrap(ev, &ecore_ev);
+ if (ecore_imf_context_filter_event(en->imf_context,
+ ECORE_IMF_EVENT_MOUSE_DOWN,
+ (Ecore_IMF_Event *)&ecore_ev))
+ return;
+
+ // ecore_imf_context_reset should be called before calculating new cursor position
+ ecore_imf_context_reset(en->imf_context);
+ }
// calculate new cursor position
}
@@ -49,8 +59,25 @@ static void
_mouse_up_cb(void *data, Evas *e, Evas_Object *o, void *event_info)
{
Entry *en = data;
+ Evas_Event_Mouse_Up *ev = event_info;
if (!en) return;
+ if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD)
+ {
+ _imf_cursor_info_set(en);
+ return;
+ }
+
+ if (en->imf_context)
+ {
+ Ecore_IMF_Event_Mouse_Up ecore_ev;
+ ecore_imf_evas_event_mouse_up_wrap(ev, &ecore_ev);
+ if (ecore_imf_context_filter_event(en->imf_context,
+ ECORE_IMF_EVENT_MOUSE_UP,
+ (Ecore_IMF_Event *)&ecore_ev))
+ return;
+ }
+
if (evas_object_focus_get(en->rect))
{
// notify cursor information