From: Shinwoo Kim Date: Sat, 25 May 2013 06:27:33 +0000 (+0900) Subject: [plug][access] add access action callback - READ, MOUSE X-Git-Tag: accepted/tizen/20130927.071315^2~103 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b5f4b9ed6913f4a12587c3448b339fd5ab9524a5;p=profile%2Fmobile%2Felementary.git [plug][access] add access action callback - READ, MOUSE Change-Id: I2aa1fa0098c7084dca374588f34ded0fb8db1e22 --- diff --git a/src/lib/elm_plug.c b/src/lib/elm_plug.c index 1c5d498..d2dfc5f 100644 --- a/src/lib/elm_plug.c +++ b/src/lib/elm_plug.c @@ -245,10 +245,11 @@ _access_action_highlight_next_cb(void *data __UNUSED__, } static Eina_Bool -_access_action_highlight_cb(void *data __UNUSED__, - Evas_Object *obj, - Elm_Access_Action_Info *action_info) +_access_action_cb(void *data __UNUSED__, + Evas_Object *obj, + Elm_Access_Action_Info *action_info) { + Evas_Coord_Point pos = {0, 0}; Ecore_Evas *ee = NULL; ee = _elm_plug_ecore_evas_get(obj); @@ -261,6 +262,13 @@ _access_action_highlight_cb(void *data __UNUSED__, elm_access_action_cb_set(obj, ELM_ACCESS_ACTION_HIGHLIGHT_PREV, _access_action_highlight_next_cb, NULL); } + else if (action_info->action_type == ELM_ACCESS_ACTION_READ) + { + evas_object_geometry_get(obj, &pos.x, &pos.y, NULL, NULL); + ERR("%d, %d, %d, %d\n", action_info->x, action_info->y, pos.x, pos.y); + action_info->x = action_info->x - pos.x; + action_info->y = action_info->y - pos.y; + } ecore_evas_msg_parent_send(ee, MSG_DOMAIN_CONTROL_ACCESS, action_info->action_type, @@ -286,9 +294,13 @@ elm_plug_add(Evas_Object *parent) _elm_access_object_register(obj, ELM_WIDGET_DATA(sd)->resize_obj); elm_access_action_cb_set(obj, ELM_ACCESS_ACTION_HIGHLIGHT, - _access_action_highlight_cb, NULL); + _access_action_cb, NULL); elm_access_action_cb_set(obj, ELM_ACCESS_ACTION_UNHIGHLIGHT, - _access_action_highlight_cb, NULL); + _access_action_cb, NULL); + elm_access_action_cb_set(obj, ELM_ACCESS_ACTION_READ, + _access_action_cb, NULL); + elm_access_action_cb_set(obj, ELM_ACCESS_ACTION_MOUSE, + _access_action_cb, NULL); return obj; }