}
static Eext_Object_Event *
-_eext_find_event_target(Eina_List *candidates, Evas_Object *parent, Eext_Callback_Type type)
+_eext_find_event_target(Eina_List *candidates, Evas_Object *parent)
{
Eext_Object_Event *obj_event = NULL;
- Eina_List *l, *ll;
+ Eina_List *l;
Evas_Object *obj;
Eina_List *members = NULL;
- Eext_Event_Callback *callback;
- if (eo_isa(parent, EVAS_OBJECT_SMART_CLASS))
+ //FIXME: when eo api is opened, we should use
+ // eo_isa(parent, evas_object_smart_class_get)
+ const char *type = evas_object_type_get(parent);
+ if (strcmp(type, "rectangle") && strcmp(type, "line") && strcmp(type, "polygon")
+ && strcmp(type, "text") && strcmp(type, "textblock") && strcmp(type, "image"))
members = evas_object_smart_members_get(parent);
-
if (members)
{
EINA_LIST_REVERSE_FOREACH(members, l, obj)
{
- obj_event = _eext_find_event_target(candidates, obj, type);
+ obj_event = _eext_find_event_target(candidates, obj);
//got you!
if (obj_event)
{
- EINA_LIST_FOREACH(obj_event->callbacks, ll, callback)
- {
- if (callback->type == type)
- {
- eina_list_free(members);
- return obj_event;
- }
- }
+ eina_list_free(members);
+ return obj_event;
}
}
eina_list_free(members);
EINA_LIST_REVERSE_FOREACH(candidates, l, obj_event)
{
//got you!
- if (parent == obj_event->obj)
- {
- EINA_LIST_FOREACH(obj_event->callbacks, ll, callback)
- {
- if (callback->type == type)
- return obj_event;
- }
- }
+ if (parent == obj_event->obj) return obj_event;
}
return NULL;
}
static Eext_Object_Event *
-_eext_top_obj_event_find(Eext_Event_Mgr *event_mgr, Eext_Callback_Type type)
+_eext_top_obj_event_find(Eext_Event_Mgr *event_mgr)
{
Eext_Object_Event *obj_event = NULL;
Eina_List *l, *l_next;
if (eina_list_count(candidates) == 1) goto found;
//4. find the target in this parent tree.
- obj_event = _eext_find_event_target(candidates, parent, type);
+ obj_event = _eext_find_event_target(candidates, parent);
eina_list_free(candidates);
return obj_event;
Eext_Callback_Type type;
Eina_List *l;
+ obj_event = _eext_top_obj_event_find(event_mgr);
+ if (!obj_event) return;
+
if (!strcmp(ev->keyname, EEXT_KEY_BACK))
type = EEXT_CALLBACK_BACK;
else if (!strcmp(ev->keyname, EEXT_KEY_MENU))
type = EEXT_CALLBACK_MORE;
else return;
- obj_event = _eext_top_obj_event_find(event_mgr, type);
- if (!obj_event) return;
-
obj_event->on_callback = EINA_TRUE;
EINA_LIST_FOREACH(obj_event->callbacks, l, callback)
{
if (count >= 2) w1 = EEXT_SCALE_SIZE(FLOATINGBUTTON_2BTN_WIDTH, obj);
else w1 = EEXT_SCALE_SIZE(FLOATINGBUTTON_1BTN_WIDTH, obj);
- sd->pos_table[EEXT_FLOATINGBUTTON_LEFT] = (w1 - EEXT_SCALE_SIZE(FLOATINGBUTTON_LR_WIDTH, obj)) / (double)(w - w1);
- sd->pos_table[EEXT_FLOATINGBUTTON_RIGHT] = (w - w1 * 2 + EEXT_SCALE_SIZE(FLOATINGBUTTON_LR_WIDTH, obj)) / (double)(w - w1);
+ sd->pos_table[EEXT_FLOATINGBUTTON_LEFT] = (w1 - EEXT_SCALE_SIZE(50, obj)) / (double)(w - w1);
+ sd->pos_table[EEXT_FLOATINGBUTTON_RIGHT] = (w - w1 * 2 + EEXT_SCALE_SIZE(50, obj)) / (double)(w - w1);
}
static void
evas_vg_shape_shape_reset(fbd->base_shape);
evas_vg_shape_shape_append_rect(fbd->base_shape, 0, 0, w, h,
- EEXT_SCALE_SIZE(FLOATINGBUTTON_LAYOUT_LR_WIDTH, fbd->obj),
+ EEXT_SCALE_SIZE(FLOATINGBUTTON_LR_WIDTH, fbd->obj),
(EEXT_SCALE_SIZE(FLOATINGBUTTON_HEIGHT, fbd->obj)/2));
}