forked from enlightenment/efl
elementary / menu, notify, list, panes, module, map, pager, panel, mapbuf - removed white spaces
SVN revision: 58251
This commit is contained in:
parent
711b428aae
commit
160084626b
|
@ -25,7 +25,7 @@ struct _Widget_Data
|
|||
int walking;
|
||||
int movements;
|
||||
struct {
|
||||
Evas_Coord x, y;
|
||||
Evas_Coord x, y;
|
||||
} history[SWIPE_MOVES];
|
||||
Eina_Bool swipe : 1;
|
||||
Eina_Bool fix_pending : 1;
|
||||
|
@ -85,32 +85,32 @@ static Eina_Bool _event_hook(Evas_Object *obj, Evas_Object *src,
|
|||
static Eina_Bool _deselect_all_items(Widget_Data *wd);
|
||||
|
||||
#define ELM_LIST_ITEM_CHECK_DELETED_RETURN(it, ...) \
|
||||
ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(it, __VA_ARGS__); \
|
||||
if (it->deleted) \
|
||||
{ \
|
||||
ERR("ERROR: "#it" has been DELETED.\n"); \
|
||||
return __VA_ARGS__; \
|
||||
}
|
||||
ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(it, __VA_ARGS__); \
|
||||
if (it->deleted) \
|
||||
{ \
|
||||
ERR("ERROR: "#it" has been DELETED.\n"); \
|
||||
return __VA_ARGS__; \
|
||||
}
|
||||
|
||||
static inline void
|
||||
_elm_list_item_free(Elm_List_Item *it)
|
||||
{
|
||||
evas_object_event_callback_del_full
|
||||
(it->base.view, EVAS_CALLBACK_MOUSE_DOWN, _mouse_down, it);
|
||||
(it->base.view, EVAS_CALLBACK_MOUSE_DOWN, _mouse_down, it);
|
||||
evas_object_event_callback_del_full
|
||||
(it->base.view, EVAS_CALLBACK_MOUSE_UP, _mouse_up, it);
|
||||
(it->base.view, EVAS_CALLBACK_MOUSE_UP, _mouse_up, it);
|
||||
evas_object_event_callback_del_full
|
||||
(it->base.view, EVAS_CALLBACK_MOUSE_MOVE, _mouse_move, it);
|
||||
(it->base.view, EVAS_CALLBACK_MOUSE_MOVE, _mouse_move, it);
|
||||
|
||||
if (it->icon)
|
||||
evas_object_event_callback_del_full
|
||||
(it->icon, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
|
||||
_changed_size_hints, it->base.widget);
|
||||
(it->icon, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
|
||||
_changed_size_hints, it->base.widget);
|
||||
|
||||
if (it->end)
|
||||
evas_object_event_callback_del_full
|
||||
(it->end, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
|
||||
_changed_size_hints, it->base.widget);
|
||||
(it->end, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
|
||||
_changed_size_hints, it->base.widget);
|
||||
|
||||
eina_stringshare_del(it->label);
|
||||
|
||||
|
@ -259,9 +259,9 @@ _event_hook(Evas_Object *obj, Evas_Object *src __UNUSED__, Evas_Callback_Type ty
|
|||
}
|
||||
else if (!strcmp(ev->keyname, "Escape"))
|
||||
{
|
||||
if (!_deselect_all_items(wd)) return EINA_FALSE;
|
||||
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
|
||||
return EINA_TRUE;
|
||||
if (!_deselect_all_items(wd)) return EINA_FALSE;
|
||||
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
|
||||
return EINA_TRUE;
|
||||
}
|
||||
else return EINA_FALSE;
|
||||
|
||||
|
@ -383,8 +383,8 @@ _elm_list_walk(Widget_Data *wd)
|
|||
{
|
||||
if (wd->walking < 0)
|
||||
{
|
||||
ERR("ERROR: walking was negative. fixed!\n");
|
||||
wd->walking = 0;
|
||||
ERR("ERROR: walking was negative. fixed!\n");
|
||||
wd->walking = 0;
|
||||
}
|
||||
wd->walking++;
|
||||
}
|
||||
|
@ -395,8 +395,8 @@ _elm_list_unwalk(Widget_Data *wd)
|
|||
wd->walking--;
|
||||
if (wd->walking < 0)
|
||||
{
|
||||
ERR("ERROR: walking became negative. fixed!\n");
|
||||
wd->walking = 0;
|
||||
ERR("ERROR: walking became negative. fixed!\n");
|
||||
wd->walking = 0;
|
||||
}
|
||||
|
||||
if (wd->walking)
|
||||
|
@ -531,8 +531,8 @@ _signal_callback_del_hook(Evas_Object *obj, const char *emission, const char *so
|
|||
{
|
||||
Widget_Data *wd = elm_widget_data_get(obj);
|
||||
edje_object_signal_callback_del_full(
|
||||
elm_smart_scroller_edje_object_get(wd->scr),
|
||||
emission, source, func_cb, data);
|
||||
elm_smart_scroller_edje_object_get(wd->scr),
|
||||
emission, source, func_cb, data);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -568,7 +568,7 @@ _theme_hook(Evas_Object *obj)
|
|||
|
||||
elm_smart_scroller_object_theme_set(obj, wd->scr, "list", "base",
|
||||
elm_widget_style_get(obj));
|
||||
// edje_object_scale_set(wd->scr, elm_widget_scale_get(obj) * _elm_config->scale);
|
||||
// edje_object_scale_set(wd->scr, elm_widget_scale_get(obj) * _elm_config->scale);
|
||||
edj = elm_smart_scroller_edje_object_get(wd->scr);
|
||||
str = edje_object_data_get(edj, "focus_highlight");
|
||||
if ((str) && (!strcmp(str, "on")))
|
||||
|
@ -636,8 +636,8 @@ _sub_del(void *data __UNUSED__, Evas_Object *obj, void *event_info)
|
|||
if (it->icon == sub) it->icon = NULL;
|
||||
if (it->end == sub) it->end = NULL;
|
||||
evas_object_event_callback_del_full
|
||||
(sub, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _changed_size_hints,
|
||||
obj);
|
||||
(sub, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _changed_size_hints,
|
||||
obj);
|
||||
if (!wd->walking)
|
||||
{
|
||||
_fix_items(obj);
|
||||
|
@ -691,7 +691,7 @@ _item_select(Elm_List_Item *it)
|
|||
it->selected = EINA_TRUE;
|
||||
wd->selected = eina_list_append(wd->selected, it);
|
||||
|
||||
call:
|
||||
call:
|
||||
evas_object_ref(obj);
|
||||
_elm_list_walk(wd);
|
||||
|
||||
|
@ -723,7 +723,7 @@ _item_unselect(Elm_List_Item *it)
|
|||
if ((selectraise) && (!strcmp(selectraise, "on")))
|
||||
{
|
||||
if ((stacking) && (!strcmp(stacking, "below")))
|
||||
evas_object_lower(it->base.view);
|
||||
evas_object_lower(it->base.view);
|
||||
}
|
||||
it->hilighted = EINA_FALSE;
|
||||
if (it->selected)
|
||||
|
@ -783,9 +783,9 @@ _mouse_move(void *data, Evas *evas __UNUSED__, Evas_Object *obj __UNUSED__, void
|
|||
wd->history[wd->movements].x = ev->cur.canvas.x;
|
||||
wd->history[wd->movements].y = ev->cur.canvas.y;
|
||||
if (abs((wd->history[wd->movements].x - wd->history[0].x)) > 40)
|
||||
wd->swipe = EINA_TRUE;
|
||||
wd->swipe = EINA_TRUE;
|
||||
else
|
||||
wd->movements++;
|
||||
wd->movements++;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -837,7 +837,7 @@ _long_press(void *data)
|
|||
wd->longpressed = EINA_TRUE;
|
||||
evas_object_smart_callback_call(it->base.widget, "longpressed", it);
|
||||
|
||||
end:
|
||||
end:
|
||||
return ECORE_CALLBACK_CANCEL;
|
||||
}
|
||||
|
||||
|
@ -954,7 +954,7 @@ _mouse_up(void *data, Evas *evas __UNUSED__, Evas_Object *obj __UNUSED__, void *
|
|||
if (!it->selected)
|
||||
{
|
||||
while (wd->selected)
|
||||
_item_unselect(wd->selected->data);
|
||||
_item_unselect(wd->selected->data);
|
||||
_item_hilight(it);
|
||||
_item_select(it);
|
||||
}
|
||||
|
@ -1100,109 +1100,109 @@ _fix_items(Evas_Object *obj)
|
|||
i = 0;
|
||||
EINA_LIST_FOREACH(wd->items, l, it)
|
||||
{
|
||||
if (it->deleted)
|
||||
if (it->deleted)
|
||||
continue;
|
||||
|
||||
it->even = i & 0x1;
|
||||
if ((it->even != it->is_even) || (!it->fixed) || (redo))
|
||||
{
|
||||
const char *stacking;
|
||||
it->even = i & 0x1;
|
||||
if ((it->even != it->is_even) || (!it->fixed) || (redo))
|
||||
{
|
||||
const char *stacking;
|
||||
|
||||
/* FIXME: separators' themes seem to be b0rked */
|
||||
if (it->is_separator)
|
||||
_elm_theme_object_set(obj, it->base.view, "separator",
|
||||
if (it->is_separator)
|
||||
_elm_theme_object_set(obj, it->base.view, "separator",
|
||||
wd->h_mode ? "horizontal" : "vertical",
|
||||
style);
|
||||
else if (wd->mode == ELM_LIST_COMPRESS)
|
||||
{
|
||||
if (it->even)
|
||||
_elm_theme_object_set(obj, it->base.view, "list",
|
||||
else if (wd->mode == ELM_LIST_COMPRESS)
|
||||
{
|
||||
if (it->even)
|
||||
_elm_theme_object_set(obj, it->base.view, "list",
|
||||
it_compress, style);
|
||||
else
|
||||
_elm_theme_object_set(obj, it->base.view, "list",
|
||||
else
|
||||
_elm_theme_object_set(obj, it->base.view, "list",
|
||||
it_compress_odd, style);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (it->even)
|
||||
_elm_theme_object_set(obj, it->base.view, "list", it_plain,
|
||||
}
|
||||
else
|
||||
{
|
||||
if (it->even)
|
||||
_elm_theme_object_set(obj, it->base.view, "list", it_plain,
|
||||
style);
|
||||
else
|
||||
_elm_theme_object_set(obj, it->base.view, "list", it_odd,
|
||||
else
|
||||
_elm_theme_object_set(obj, it->base.view, "list", it_odd,
|
||||
style);
|
||||
}
|
||||
stacking = edje_object_data_get(it->base.view, "stacking");
|
||||
if (stacking)
|
||||
{
|
||||
if (!strcmp(stacking, "below"))
|
||||
evas_object_lower(it->base.view);
|
||||
else if (!strcmp(stacking, "above"))
|
||||
evas_object_raise(it->base.view);
|
||||
}
|
||||
edje_object_part_text_set(it->base.view, "elm.text", it->label);
|
||||
}
|
||||
stacking = edje_object_data_get(it->base.view, "stacking");
|
||||
if (stacking)
|
||||
{
|
||||
if (!strcmp(stacking, "below"))
|
||||
evas_object_lower(it->base.view);
|
||||
else if (!strcmp(stacking, "above"))
|
||||
evas_object_raise(it->base.view);
|
||||
}
|
||||
edje_object_part_text_set(it->base.view, "elm.text", it->label);
|
||||
|
||||
if ((!it->icon) && (minh[0] > 0))
|
||||
{
|
||||
it->icon = evas_object_rectangle_add(evas_object_evas_get(it->base.view));
|
||||
evas_object_color_set(it->icon, 0, 0, 0, 0);
|
||||
it->dummy_icon = EINA_TRUE;
|
||||
}
|
||||
if ((!it->end) && (minh[1] > 0))
|
||||
{
|
||||
it->end = evas_object_rectangle_add(evas_object_evas_get(it->base.view));
|
||||
evas_object_color_set(it->end, 0, 0, 0, 0);
|
||||
it->dummy_end = EINA_TRUE;
|
||||
}
|
||||
if (it->icon)
|
||||
{
|
||||
evas_object_size_hint_min_set(it->icon, minw[0], minh[0]);
|
||||
evas_object_size_hint_max_set(it->icon, 99999, 99999);
|
||||
edje_object_part_swallow(it->base.view, "elm.swallow.icon", it->icon);
|
||||
}
|
||||
if (it->end)
|
||||
{
|
||||
evas_object_size_hint_min_set(it->end, minw[1], minh[1]);
|
||||
evas_object_size_hint_max_set(it->end, 99999, 99999);
|
||||
edje_object_part_swallow(it->base.view, "elm.swallow.end", it->end);
|
||||
}
|
||||
if (!it->fixed)
|
||||
{
|
||||
// this may call up user and it may modify the list item
|
||||
// but we're safe as we're flagged as walking.
|
||||
// just don't process further
|
||||
edje_object_message_signal_process(it->base.view);
|
||||
if (it->deleted)
|
||||
continue;
|
||||
mw = mh = -1;
|
||||
elm_coords_finger_size_adjust(1, &mw, 1, &mh);
|
||||
edje_object_size_min_restricted_calc(it->base.view, &mw, &mh, mw, mh);
|
||||
elm_coords_finger_size_adjust(1, &mw, 1, &mh);
|
||||
evas_object_size_hint_min_set(it->base.view, mw, mh);
|
||||
evas_object_show(it->base.view);
|
||||
}
|
||||
if ((it->selected) || (it->hilighted))
|
||||
{
|
||||
const char *selectraise;
|
||||
if ((!it->icon) && (minh[0] > 0))
|
||||
{
|
||||
it->icon = evas_object_rectangle_add(evas_object_evas_get(it->base.view));
|
||||
evas_object_color_set(it->icon, 0, 0, 0, 0);
|
||||
it->dummy_icon = EINA_TRUE;
|
||||
}
|
||||
if ((!it->end) && (minh[1] > 0))
|
||||
{
|
||||
it->end = evas_object_rectangle_add(evas_object_evas_get(it->base.view));
|
||||
evas_object_color_set(it->end, 0, 0, 0, 0);
|
||||
it->dummy_end = EINA_TRUE;
|
||||
}
|
||||
if (it->icon)
|
||||
{
|
||||
evas_object_size_hint_min_set(it->icon, minw[0], minh[0]);
|
||||
evas_object_size_hint_max_set(it->icon, 99999, 99999);
|
||||
edje_object_part_swallow(it->base.view, "elm.swallow.icon", it->icon);
|
||||
}
|
||||
if (it->end)
|
||||
{
|
||||
evas_object_size_hint_min_set(it->end, minw[1], minh[1]);
|
||||
evas_object_size_hint_max_set(it->end, 99999, 99999);
|
||||
edje_object_part_swallow(it->base.view, "elm.swallow.end", it->end);
|
||||
}
|
||||
if (!it->fixed)
|
||||
{
|
||||
// this may call up user and it may modify the list item
|
||||
// but we're safe as we're flagged as walking.
|
||||
// just don't process further
|
||||
edje_object_message_signal_process(it->base.view);
|
||||
if (it->deleted)
|
||||
continue;
|
||||
mw = mh = -1;
|
||||
elm_coords_finger_size_adjust(1, &mw, 1, &mh);
|
||||
edje_object_size_min_restricted_calc(it->base.view, &mw, &mh, mw, mh);
|
||||
elm_coords_finger_size_adjust(1, &mw, 1, &mh);
|
||||
evas_object_size_hint_min_set(it->base.view, mw, mh);
|
||||
evas_object_show(it->base.view);
|
||||
}
|
||||
if ((it->selected) || (it->hilighted))
|
||||
{
|
||||
const char *selectraise;
|
||||
|
||||
// this may call up user and it may modify the list item
|
||||
// but we're safe as we're flagged as walking.
|
||||
// just don't process further
|
||||
edje_object_signal_emit(it->base.view, "elm,state,selected", "elm");
|
||||
if (it->deleted)
|
||||
continue;
|
||||
// this may call up user and it may modify the list item
|
||||
// but we're safe as we're flagged as walking.
|
||||
// just don't process further
|
||||
edje_object_signal_emit(it->base.view, "elm,state,selected", "elm");
|
||||
if (it->deleted)
|
||||
continue;
|
||||
|
||||
selectraise = edje_object_data_get(it->base.view, "selectraise");
|
||||
if ((selectraise) && (!strcmp(selectraise, "on")))
|
||||
evas_object_raise(it->base.view);
|
||||
}
|
||||
selectraise = edje_object_data_get(it->base.view, "selectraise");
|
||||
if ((selectraise) && (!strcmp(selectraise, "on")))
|
||||
evas_object_raise(it->base.view);
|
||||
}
|
||||
if (it->disabled)
|
||||
edje_object_signal_emit(it->base.view, "elm,state,disabled",
|
||||
"elm");
|
||||
|
||||
it->fixed = EINA_TRUE;
|
||||
it->is_even = it->even;
|
||||
}
|
||||
i++;
|
||||
it->fixed = EINA_TRUE;
|
||||
it->is_even = it->even;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
|
||||
mw = 0; mh = 0;
|
||||
|
@ -1873,13 +1873,13 @@ elm_list_item_selected_set(Elm_List_Item *it, Eina_Bool selected)
|
|||
if (!wd->multi)
|
||||
{
|
||||
while (wd->selected)
|
||||
_item_unselect(wd->selected->data);
|
||||
_item_unselect(wd->selected->data);
|
||||
}
|
||||
_item_hilight(it);
|
||||
_item_select(it);
|
||||
}
|
||||
else
|
||||
_item_unselect(it);
|
||||
_item_unselect(it);
|
||||
|
||||
_elm_list_unwalk(wd);
|
||||
evas_object_unref(obj);
|
||||
|
@ -2487,8 +2487,8 @@ elm_list_scroller_policy_set(Evas_Object *obj, Elm_Scroller_Policy policy_h, Elm
|
|||
if (!wd) return;
|
||||
if ((policy_h >= ELM_SCROLLER_POLICY_LAST) ||
|
||||
(policy_v >= ELM_SCROLLER_POLICY_LAST))
|
||||
if (wd->scr)
|
||||
elm_smart_scroller_policy_set(wd->scr, policy_h, policy_v);
|
||||
if (wd->scr)
|
||||
elm_smart_scroller_policy_set(wd->scr, policy_h, policy_v);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -72,10 +72,10 @@ _sub_del(void *data __UNUSED__, Evas_Object *obj, void *event_info)
|
|||
if (!wd) return;
|
||||
if (sub == wd->content)
|
||||
{
|
||||
evas_object_event_callback_del_full(sub, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
|
||||
evas_object_event_callback_del_full(sub, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
|
||||
_changed_size_hints, obj);
|
||||
wd->content = NULL;
|
||||
_sizing_eval(obj);
|
||||
wd->content = NULL;
|
||||
_sizing_eval(obj);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -121,17 +121,17 @@ _configure(Evas_Object *obj)
|
|||
if ((x != x2) || (y != y2))
|
||||
{
|
||||
if (!wd->enabled)
|
||||
evas_object_move(wd->content, x, y);
|
||||
evas_object_move(wd->content, x, y);
|
||||
else
|
||||
{
|
||||
|
||||
Evas *e = evas_object_evas_get(obj);
|
||||
evas_smart_objects_calculate(e);
|
||||
evas_nochange_push(e);
|
||||
// printf("x-------------------- %i %i\n", x, y);
|
||||
// printf("x-------------------- %i %i\n", x, y);
|
||||
evas_object_move(wd->content, x, y);
|
||||
evas_smart_objects_calculate(e);
|
||||
// printf("y--------------------\n");
|
||||
// printf("y--------------------\n");
|
||||
evas_nochange_pop(e);
|
||||
}
|
||||
}
|
||||
|
@ -220,13 +220,13 @@ elm_mapbuf_content_set(Evas_Object *obj, Evas_Object *content)
|
|||
if (content)
|
||||
{
|
||||
evas_object_data_set(content, "_elm_leaveme", (void *)1);
|
||||
elm_widget_sub_object_add(content, obj);
|
||||
evas_object_smart_member_add(content, obj);
|
||||
elm_widget_sub_object_add(content, obj);
|
||||
evas_object_smart_member_add(content, obj);
|
||||
evas_object_clip_set(content, wd->clip);
|
||||
evas_object_color_set(wd->clip, 255, 255, 255, 255);
|
||||
evas_object_event_callback_add(content,
|
||||
evas_object_event_callback_add(content,
|
||||
EVAS_CALLBACK_CHANGED_SIZE_HINTS,
|
||||
_changed_size_hints, obj);
|
||||
_changed_size_hints, obj);
|
||||
}
|
||||
else
|
||||
evas_object_color_set(wd->clip, 0, 0, 0, 0);
|
||||
|
|
|
@ -79,7 +79,7 @@ _del_pre_hook(Evas_Object *obj)
|
|||
evas_object_event_callback_del_full(wd->parent, EVAS_CALLBACK_DEL, _parent_del, wd);
|
||||
|
||||
EINA_LIST_FREE(wd->items, item)
|
||||
_del_item(item);
|
||||
_del_item(item);
|
||||
|
||||
if (wd->hv) evas_object_del(wd->hv);
|
||||
if (wd->location) evas_object_del(wd->location);
|
||||
|
@ -103,38 +103,38 @@ _theme_hook(Evas_Object *obj)
|
|||
ll = eina_list_append(ll, wd->items);
|
||||
EINA_LIST_FOREACH(ll, _ll, l)
|
||||
{
|
||||
EINA_LIST_FOREACH(l, _l, item)
|
||||
{
|
||||
EINA_LIST_FOREACH(l, _l, item)
|
||||
{
|
||||
edje_object_mirrored_set(item->base.view, elm_widget_mirrored_get(obj));
|
||||
ll = eina_list_append(ll, item->submenu.items);
|
||||
if (item->separator)
|
||||
_elm_theme_object_set(obj, item->base.view, "menu", "separator",
|
||||
ll = eina_list_append(ll, item->submenu.items);
|
||||
if (item->separator)
|
||||
_elm_theme_object_set(obj, item->base.view, "menu", "separator",
|
||||
elm_widget_style_get(obj));
|
||||
else if (item->submenu.bx)
|
||||
{
|
||||
_elm_theme_object_set
|
||||
(obj, item->base.view, "menu", "item_with_submenu",
|
||||
elm_widget_style_get(obj));
|
||||
elm_menu_item_label_set(item, item->label);
|
||||
elm_menu_item_icon_set(item, item->icon_str);
|
||||
}
|
||||
else
|
||||
{
|
||||
_elm_theme_object_set(obj, item->base.view, "menu", "item",
|
||||
else if (item->submenu.bx)
|
||||
{
|
||||
_elm_theme_object_set
|
||||
(obj, item->base.view, "menu", "item_with_submenu",
|
||||
elm_widget_style_get(obj));
|
||||
elm_menu_item_label_set(item, item->label);
|
||||
elm_menu_item_icon_set(item, item->icon_str);
|
||||
}
|
||||
else
|
||||
{
|
||||
_elm_theme_object_set(obj, item->base.view, "menu", "item",
|
||||
elm_widget_style_get(obj));
|
||||
elm_menu_item_label_set(item, item->label);
|
||||
elm_menu_item_icon_set(item, item->icon_str);
|
||||
}
|
||||
if (item->disabled)
|
||||
edje_object_signal_emit
|
||||
(item->base.view, "elm,state,disabled", "elm");
|
||||
else
|
||||
edje_object_signal_emit
|
||||
(item->base.view, "elm,state,enabled", "elm");
|
||||
edje_object_message_signal_process(item->base.view);
|
||||
edje_object_scale_set(item->base.view, elm_widget_scale_get(obj) *
|
||||
elm_menu_item_label_set(item, item->label);
|
||||
elm_menu_item_icon_set(item, item->icon_str);
|
||||
}
|
||||
if (item->disabled)
|
||||
edje_object_signal_emit
|
||||
(item->base.view, "elm,state,disabled", "elm");
|
||||
else
|
||||
edje_object_signal_emit
|
||||
(item->base.view, "elm,state,enabled", "elm");
|
||||
edje_object_message_signal_process(item->base.view);
|
||||
edje_object_scale_set(item->base.view, elm_widget_scale_get(obj) *
|
||||
_elm_config->scale);
|
||||
}
|
||||
}
|
||||
}
|
||||
_sizing_eval(obj);
|
||||
}
|
||||
|
@ -173,7 +173,7 @@ _sizing_eval(Evas_Object *obj)
|
|||
|
||||
EINA_LIST_FOREACH(wd->items,l,item)
|
||||
{
|
||||
if (item->submenu.open) _submenu_sizing_eval(item);
|
||||
if (item->submenu.open) _submenu_sizing_eval(item);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -220,8 +220,8 @@ _submenu_sizing_eval(Elm_Menu_Item *parent)
|
|||
|
||||
EINA_LIST_FOREACH(parent->submenu.items, l, item)
|
||||
{
|
||||
if (item->submenu.open)
|
||||
_submenu_sizing_eval(item);
|
||||
if (item->submenu.open)
|
||||
_submenu_sizing_eval(item);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -284,7 +284,7 @@ _menu_hide(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
|||
|
||||
EINA_LIST_FOREACH(wd->items, l, item2)
|
||||
{
|
||||
if (item2->submenu.open) _submenu_hide(item2);
|
||||
if (item2->submenu.open) _submenu_hide(item2);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -297,7 +297,7 @@ _submenu_hide(Elm_Menu_Item *item)
|
|||
item->submenu.open = EINA_FALSE;
|
||||
EINA_LIST_FOREACH(item->submenu.items, l, item2)
|
||||
{
|
||||
if (item2->submenu.open) _submenu_hide(item2);
|
||||
if (item2->submenu.open) _submenu_hide(item2);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -307,8 +307,8 @@ _menu_item_select(void *data, Evas_Object *obj __UNUSED__, const char *emission
|
|||
Elm_Menu_Item *item = data;
|
||||
if (item->submenu.items)
|
||||
{
|
||||
if (!item->submenu.open) _submenu_open(item, NULL, NULL, NULL);
|
||||
else _submenu_hide(item);
|
||||
if (!item->submenu.open) _submenu_open(item, NULL, NULL, NULL);
|
||||
else _submenu_hide(item);
|
||||
}
|
||||
else
|
||||
_menu_hide(item->base.widget, NULL, NULL);
|
||||
|
@ -325,18 +325,18 @@ _menu_item_activate(void *data, Evas_Object *obj __UNUSED__, const char *emissio
|
|||
item->selected = 1;
|
||||
if (item->parent)
|
||||
{
|
||||
EINA_LIST_FOREACH(item->parent->submenu.items, l, item2)
|
||||
{
|
||||
if (item2 != item) elm_menu_item_selected_set(item2, 0);
|
||||
}
|
||||
EINA_LIST_FOREACH(item->parent->submenu.items, l, item2)
|
||||
{
|
||||
if (item2 != item) elm_menu_item_selected_set(item2, 0);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Widget_Data *wd = elm_widget_data_get(item->base.widget);
|
||||
EINA_LIST_FOREACH(wd->items, l, item2)
|
||||
{
|
||||
if (item2 != item) elm_menu_item_selected_set(item2, 0);
|
||||
}
|
||||
Widget_Data *wd = elm_widget_data_get(item->base.widget);
|
||||
EINA_LIST_FOREACH(wd->items, l, item2)
|
||||
{
|
||||
if (item2 != item) elm_menu_item_selected_set(item2, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -503,28 +503,28 @@ elm_menu_parent_set(Evas_Object *obj, Evas_Object *parent)
|
|||
if (wd->parent == parent) return;
|
||||
if (wd->parent)
|
||||
{
|
||||
evas_object_event_callback_del_full(wd->parent, EVAS_CALLBACK_RESIZE, _parent_resize, wd->obj);
|
||||
evas_object_event_callback_del_full(wd->parent, EVAS_CALLBACK_DEL, _parent_del, wd);
|
||||
evas_object_event_callback_del_full(wd->parent, EVAS_CALLBACK_RESIZE, _parent_resize, wd->obj);
|
||||
evas_object_event_callback_del_full(wd->parent, EVAS_CALLBACK_DEL, _parent_del, wd);
|
||||
}
|
||||
wd->parent = parent;
|
||||
if (wd->parent)
|
||||
{
|
||||
evas_object_event_callback_add(wd->parent, EVAS_CALLBACK_RESIZE, _parent_resize, wd->obj);
|
||||
evas_object_event_callback_add(wd->parent, EVAS_CALLBACK_DEL, _parent_del, wd);
|
||||
evas_object_event_callback_add(wd->parent, EVAS_CALLBACK_RESIZE, _parent_resize, wd->obj);
|
||||
evas_object_event_callback_add(wd->parent, EVAS_CALLBACK_DEL, _parent_del, wd);
|
||||
}
|
||||
elm_hover_parent_set(wd->hv, parent);
|
||||
|
||||
ll = eina_list_append(ll, wd->items);
|
||||
EINA_LIST_FOREACH(ll, _ll, l)
|
||||
{
|
||||
EINA_LIST_FOREACH(l, _l, item)
|
||||
{
|
||||
if (item->submenu.hv)
|
||||
{
|
||||
elm_hover_parent_set(item->submenu.hv, parent);
|
||||
ll = eina_list_append(ll, item->submenu.items);
|
||||
}
|
||||
}
|
||||
EINA_LIST_FOREACH(l, _l, item)
|
||||
{
|
||||
if (item->submenu.hv)
|
||||
{
|
||||
elm_hover_parent_set(item->submenu.hv, parent);
|
||||
ll = eina_list_append(ll, item->submenu.items);
|
||||
}
|
||||
}
|
||||
}
|
||||
_sizing_eval(obj);
|
||||
}
|
||||
|
@ -603,9 +603,9 @@ _item_clone(Evas_Object *obj, Elm_Menu_Item *parent, Elm_Menu_Item *item)
|
|||
Eina_List *iter;
|
||||
|
||||
if (item->separator)
|
||||
new_item = elm_menu_item_separator_add(obj, parent);
|
||||
new_item = elm_menu_item_separator_add(obj, parent);
|
||||
else
|
||||
new_item = elm_menu_item_add(obj, parent, item->icon_str, item->label, item->func, item->base.data);
|
||||
new_item = elm_menu_item_add(obj, parent, item->icon_str, item->label, item->func, item->base.data);
|
||||
elm_menu_item_disabled_set(new_item, item->disabled);
|
||||
|
||||
EINA_LIST_FOREACH(item->submenu.items, iter, subitem)
|
||||
|
@ -669,14 +669,14 @@ elm_menu_item_add(Evas_Object *obj, Elm_Menu_Item *parent, const char *icon, con
|
|||
|
||||
if (parent)
|
||||
{
|
||||
if (!parent->submenu.bx) _item_submenu_obj_create(parent);
|
||||
elm_box_pack_end(parent->submenu.bx, subitem->base.view);
|
||||
parent->submenu.items = eina_list_append(parent->submenu.items, subitem);
|
||||
if (!parent->submenu.bx) _item_submenu_obj_create(parent);
|
||||
elm_box_pack_end(parent->submenu.bx, subitem->base.view);
|
||||
parent->submenu.items = eina_list_append(parent->submenu.items, subitem);
|
||||
}
|
||||
else
|
||||
{
|
||||
elm_box_pack_end(wd->bx, subitem->base.view);
|
||||
wd->items = eina_list_append(wd->items, subitem);
|
||||
elm_box_pack_end(wd->bx, subitem->base.view);
|
||||
wd->items = eina_list_append(wd->items, subitem);
|
||||
}
|
||||
|
||||
_sizing_eval(obj);
|
||||
|
@ -744,7 +744,7 @@ elm_menu_item_icon_set(Elm_Menu_Item *item, const char *icon)
|
|||
(elm_icon_standard_set(item->icon, icon_tmp)))
|
||||
{
|
||||
eina_stringshare_replace(&item->icon_str, icon);
|
||||
edje_object_signal_emit(item->base.view, "elm,state,icon,visible", "elm");
|
||||
edje_object_signal_emit(item->base.view, "elm,state,icon,visible", "elm");
|
||||
}
|
||||
else
|
||||
edje_object_signal_emit(item->base.view, "elm,state,icon,hidden", "elm");
|
||||
|
@ -822,14 +822,14 @@ elm_menu_item_separator_add(Evas_Object *obj, Elm_Menu_Item *parent)
|
|||
_item_separator_obj_create(subitem);
|
||||
if (!parent)
|
||||
{
|
||||
elm_box_pack_end(wd->bx, subitem->base.view);
|
||||
wd->items = eina_list_append(wd->items, subitem);
|
||||
elm_box_pack_end(wd->bx, subitem->base.view);
|
||||
wd->items = eina_list_append(wd->items, subitem);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!parent->submenu.bx) _item_submenu_obj_create(parent);
|
||||
elm_box_pack_end(parent->submenu.bx, subitem->base.view);
|
||||
parent->submenu.items = eina_list_append(parent->submenu.items, subitem);
|
||||
if (!parent->submenu.bx) _item_submenu_obj_create(parent);
|
||||
elm_box_pack_end(parent->submenu.bx, subitem->base.view);
|
||||
parent->submenu.items = eina_list_append(parent->submenu.items, subitem);
|
||||
}
|
||||
_sizing_eval(obj);
|
||||
return subitem;
|
||||
|
@ -902,11 +902,11 @@ elm_menu_item_del(Elm_Menu_Item *item)
|
|||
if (item->submenu.location) evas_object_del(item->submenu.location);
|
||||
|
||||
if (item->parent)
|
||||
item->parent->submenu.items = eina_list_remove(item->parent->submenu.items, item);
|
||||
item->parent->submenu.items = eina_list_remove(item->parent->submenu.items, item);
|
||||
else
|
||||
{
|
||||
Widget_Data *wd = elm_widget_data_get(item->base.widget);
|
||||
wd->items = eina_list_remove(wd->items, item);
|
||||
Widget_Data *wd = elm_widget_data_get(item->base.widget);
|
||||
wd->items = eina_list_remove(wd->items, item);
|
||||
}
|
||||
|
||||
elm_widget_item_del(item);
|
||||
|
|
|
@ -101,7 +101,7 @@ _elm_module_find_as(const char *as)
|
|||
if (!_elm_module_load(m))
|
||||
{
|
||||
_elm_module_del(m);
|
||||
return NULL;
|
||||
return NULL;
|
||||
}
|
||||
return m;
|
||||
}
|
||||
|
|
|
@ -44,9 +44,9 @@ static void _resize(void *data, Evas *e, Evas_Object *obj, void *event_info);
|
|||
static const char SIG_BLOCK_CLICKED[] = "block,clicked";
|
||||
static const char SIG_TIMEOUT[] = "timeout";
|
||||
static const Evas_Smart_Cb_Description _signals[] = {
|
||||
{SIG_BLOCK_CLICKED, ""},
|
||||
{SIG_TIMEOUT, ""},
|
||||
{NULL, NULL}
|
||||
{SIG_BLOCK_CLICKED, ""},
|
||||
{SIG_TIMEOUT, ""},
|
||||
{NULL, NULL}
|
||||
};
|
||||
|
||||
static void
|
||||
|
@ -67,8 +67,8 @@ _del_hook(Evas_Object *obj)
|
|||
elm_notify_repeat_events_set(obj, EINA_TRUE);
|
||||
if (wd->timer)
|
||||
{
|
||||
ecore_timer_del(wd->timer);
|
||||
wd->timer = NULL;
|
||||
ecore_timer_del(wd->timer);
|
||||
wd->timer = NULL;
|
||||
}
|
||||
free(wd);
|
||||
}
|
||||
|
@ -129,34 +129,34 @@ _notify_theme_apply(Evas_Object *obj)
|
|||
switch (wd->orient)
|
||||
{
|
||||
case ELM_NOTIFY_ORIENT_TOP:
|
||||
_elm_theme_object_set(obj, wd->notify, "notify", "top", style);
|
||||
break;
|
||||
_elm_theme_object_set(obj, wd->notify, "notify", "top", style);
|
||||
break;
|
||||
case ELM_NOTIFY_ORIENT_CENTER:
|
||||
_elm_theme_object_set(obj, wd->notify, "notify", "center", style);
|
||||
break;
|
||||
_elm_theme_object_set(obj, wd->notify, "notify", "center", style);
|
||||
break;
|
||||
case ELM_NOTIFY_ORIENT_BOTTOM:
|
||||
_elm_theme_object_set(obj, wd->notify, "notify", "bottom", style);
|
||||
break;
|
||||
_elm_theme_object_set(obj, wd->notify, "notify", "bottom", style);
|
||||
break;
|
||||
case ELM_NOTIFY_ORIENT_LEFT:
|
||||
_elm_theme_object_set(obj, wd->notify, "notify", "left", style);
|
||||
break;
|
||||
_elm_theme_object_set(obj, wd->notify, "notify", "left", style);
|
||||
break;
|
||||
case ELM_NOTIFY_ORIENT_RIGHT:
|
||||
_elm_theme_object_set(obj, wd->notify, "notify", "right", style);
|
||||
break;
|
||||
_elm_theme_object_set(obj, wd->notify, "notify", "right", style);
|
||||
break;
|
||||
case ELM_NOTIFY_ORIENT_TOP_LEFT:
|
||||
_elm_theme_object_set(obj, wd->notify, "notify", "top_left", style);
|
||||
break;
|
||||
_elm_theme_object_set(obj, wd->notify, "notify", "top_left", style);
|
||||
break;
|
||||
case ELM_NOTIFY_ORIENT_TOP_RIGHT:
|
||||
_elm_theme_object_set(obj, wd->notify, "notify", "top_right", style);
|
||||
break;
|
||||
_elm_theme_object_set(obj, wd->notify, "notify", "top_right", style);
|
||||
break;
|
||||
case ELM_NOTIFY_ORIENT_BOTTOM_LEFT:
|
||||
_elm_theme_object_set(obj, wd->notify, "notify", "bottom_left", style);
|
||||
break;
|
||||
_elm_theme_object_set(obj, wd->notify, "notify", "bottom_left", style);
|
||||
break;
|
||||
case ELM_NOTIFY_ORIENT_BOTTOM_RIGHT:
|
||||
_elm_theme_object_set(obj, wd->notify, "notify", "bottom_right", style);
|
||||
break;
|
||||
_elm_theme_object_set(obj, wd->notify, "notify", "bottom_right", style);
|
||||
break;
|
||||
case ELM_NOTIFY_ORIENT_LAST:
|
||||
break;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -280,11 +280,11 @@ _sub_del(void *data __UNUSED__, Evas_Object *obj, void *event_info)
|
|||
|
||||
if (sub == wd->content)
|
||||
{
|
||||
evas_object_event_callback_del_full(sub, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
|
||||
_changed_size_hints, obj);
|
||||
evas_object_event_callback_del_full(sub, EVAS_CALLBACK_RESIZE,
|
||||
_content_resize, obj);
|
||||
wd->content = NULL;
|
||||
evas_object_event_callback_del_full(sub, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
|
||||
_changed_size_hints, obj);
|
||||
evas_object_event_callback_del_full(sub, EVAS_CALLBACK_RESIZE,
|
||||
_content_resize, obj);
|
||||
wd->content = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -325,7 +325,7 @@ _calc(Evas_Object *obj)
|
|||
_notify_move_to_orientation(obj);
|
||||
evas_object_resize(wd->notify, minw, minh);
|
||||
}
|
||||
_sizing_eval(obj);
|
||||
_sizing_eval(obj);
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
|
@ -345,8 +345,8 @@ _timer_init(Evas_Object *obj, Widget_Data *wd)
|
|||
{
|
||||
if (wd->timer)
|
||||
{
|
||||
ecore_timer_del(wd->timer);
|
||||
wd->timer = NULL;
|
||||
ecore_timer_del(wd->timer);
|
||||
wd->timer = NULL;
|
||||
}
|
||||
if ((evas_object_visible_get(obj)) && (wd->timeout > 0.0))
|
||||
wd->timer = ecore_timer_add(wd->timeout, _timer_cb, obj);
|
||||
|
@ -374,8 +374,8 @@ _hide(void *data __UNUSED__, Evas *e __UNUSED__, Evas_Object *obj, void *event_i
|
|||
evas_object_hide(wd->block_events);
|
||||
if (wd->timer)
|
||||
{
|
||||
ecore_timer_del(wd->timer);
|
||||
wd->timer = NULL;
|
||||
ecore_timer_del(wd->timer);
|
||||
wd->timer = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -484,12 +484,12 @@ elm_notify_content_set(Evas_Object *obj, Evas_Object *content)
|
|||
|
||||
if (content)
|
||||
{
|
||||
elm_widget_sub_object_add(obj, content);
|
||||
evas_object_event_callback_add(content, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
|
||||
_changed_size_hints, obj);
|
||||
evas_object_event_callback_add(content, EVAS_CALLBACK_RESIZE,
|
||||
_content_resize, obj);
|
||||
edje_object_part_swallow(wd->notify, "elm.swallow.content", content);
|
||||
elm_widget_sub_object_add(obj, content);
|
||||
evas_object_event_callback_add(content, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
|
||||
_changed_size_hints, obj);
|
||||
evas_object_event_callback_add(content, EVAS_CALLBACK_RESIZE,
|
||||
_content_resize, obj);
|
||||
edje_object_part_swallow(wd->notify, "elm.swallow.content", content);
|
||||
}
|
||||
_sizing_eval(obj);
|
||||
_calc(obj);
|
||||
|
@ -557,36 +557,36 @@ elm_notify_parent_set(Evas_Object *obj, Evas_Object *parent)
|
|||
if (!wd) return;
|
||||
if (wd->parent)
|
||||
{
|
||||
evas_object_event_callback_del_full(wd->parent,
|
||||
evas_object_event_callback_del_full(wd->parent,
|
||||
EVAS_CALLBACK_CHANGED_SIZE_HINTS,
|
||||
_changed_size_hints, obj);
|
||||
evas_object_event_callback_del_full(wd->parent, EVAS_CALLBACK_RESIZE,
|
||||
evas_object_event_callback_del_full(wd->parent, EVAS_CALLBACK_RESIZE,
|
||||
_changed_size_hints, obj);
|
||||
evas_object_event_callback_del_full(wd->parent, EVAS_CALLBACK_MOVE,
|
||||
evas_object_event_callback_del_full(wd->parent, EVAS_CALLBACK_MOVE,
|
||||
_changed_size_hints, obj);
|
||||
evas_object_event_callback_del_full(wd->parent, EVAS_CALLBACK_DEL,
|
||||
evas_object_event_callback_del_full(wd->parent, EVAS_CALLBACK_DEL,
|
||||
_parent_del, obj);
|
||||
evas_object_event_callback_del_full(wd->parent, EVAS_CALLBACK_HIDE,
|
||||
evas_object_event_callback_del_full(wd->parent, EVAS_CALLBACK_HIDE,
|
||||
_parent_hide, obj);
|
||||
wd->parent = NULL;
|
||||
wd->parent = NULL;
|
||||
}
|
||||
|
||||
if (parent)
|
||||
{
|
||||
wd->parent = parent;
|
||||
evas_object_event_callback_add(parent,
|
||||
wd->parent = parent;
|
||||
evas_object_event_callback_add(parent,
|
||||
EVAS_CALLBACK_CHANGED_SIZE_HINTS,
|
||||
_changed_size_hints, obj);
|
||||
evas_object_event_callback_add(parent, EVAS_CALLBACK_RESIZE,
|
||||
evas_object_event_callback_add(parent, EVAS_CALLBACK_RESIZE,
|
||||
_changed_size_hints, obj);
|
||||
evas_object_event_callback_add(parent, EVAS_CALLBACK_MOVE,
|
||||
evas_object_event_callback_add(parent, EVAS_CALLBACK_MOVE,
|
||||
_changed_size_hints, obj);
|
||||
evas_object_event_callback_add(parent, EVAS_CALLBACK_DEL,
|
||||
_parent_del, obj);
|
||||
evas_object_event_callback_add(parent, EVAS_CALLBACK_HIDE,
|
||||
evas_object_event_callback_add(parent, EVAS_CALLBACK_DEL,
|
||||
_parent_del, obj);
|
||||
evas_object_event_callback_add(parent, EVAS_CALLBACK_HIDE,
|
||||
_parent_hide, obj);
|
||||
edje_object_part_swallow(wd->notify, "elm.swallow.parent", parent);
|
||||
_sizing_eval(obj);
|
||||
edje_object_part_swallow(wd->notify, "elm.swallow.parent", parent);
|
||||
_sizing_eval(obj);
|
||||
}
|
||||
_calc(obj);
|
||||
}
|
||||
|
@ -703,10 +703,10 @@ elm_notify_repeat_events_set(Evas_Object *obj, Eina_Bool repeat)
|
|||
wd->repeat_events = repeat;
|
||||
if (!repeat)
|
||||
{
|
||||
wd->block_events = edje_object_add(evas_object_evas_get(obj));
|
||||
_block_events_theme_apply(obj);
|
||||
wd->block_events = edje_object_add(evas_object_evas_get(obj));
|
||||
_block_events_theme_apply(obj);
|
||||
elm_widget_resize_object_set(obj, wd->block_events);
|
||||
edje_object_signal_callback_add(wd->block_events, "elm,action,clicked",
|
||||
edje_object_signal_callback_add(wd->block_events, "elm,action,clicked",
|
||||
"elm", _signal_block_clicked, obj);
|
||||
}
|
||||
else
|
||||
|
|
|
@ -61,7 +61,7 @@ _mirrored_set(Evas_Object *obj, Eina_Bool rtl)
|
|||
Item *it;
|
||||
if (!wd) return;
|
||||
EINA_LIST_FOREACH(wd->stack, l, it)
|
||||
edje_object_mirrored_set(it->base, rtl);
|
||||
edje_object_mirrored_set(it->base, rtl);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -108,8 +108,8 @@ _sizing_eval(Evas_Object *obj)
|
|||
if (!wd) return;
|
||||
EINA_LIST_FOREACH(wd->stack, l, it)
|
||||
{
|
||||
if (it->minw > minw) minw = it->minw;
|
||||
if (it->minh > minh) minh = it->minh;
|
||||
if (it->minw > minw) minw = it->minw;
|
||||
if (it->minh > minh) minh = it->minh;
|
||||
}
|
||||
evas_object_size_hint_min_set(obj, minw, minh);
|
||||
evas_object_size_hint_max_set(obj, -1, -1);
|
||||
|
@ -138,27 +138,27 @@ _eval_top(Evas_Object *obj)
|
|||
ittop = eina_list_last(wd->stack)->data;
|
||||
if (ittop != wd->top)
|
||||
{
|
||||
Evas_Object *o;
|
||||
const char *onshow, *onhide;
|
||||
Evas_Object *o;
|
||||
const char *onshow, *onhide;
|
||||
|
||||
if (wd->top)
|
||||
{
|
||||
o = wd->top->base;
|
||||
if (wd->top->popme)
|
||||
edje_object_signal_emit(o, "elm,action,pop", "elm");
|
||||
else
|
||||
edje_object_signal_emit(o, "elm,action,hide", "elm");
|
||||
onhide = edje_object_data_get(o, "onhide");
|
||||
if (onhide)
|
||||
{
|
||||
if (!strcmp(onhide, "raise")) evas_object_raise(o);
|
||||
else if (!strcmp(onhide, "lower")) evas_object_lower(o);
|
||||
}
|
||||
}
|
||||
wd->oldtop = wd->top;
|
||||
wd->top = ittop;
|
||||
o = wd->top->base;
|
||||
evas_object_show(o);
|
||||
if (wd->top)
|
||||
{
|
||||
o = wd->top->base;
|
||||
if (wd->top->popme)
|
||||
edje_object_signal_emit(o, "elm,action,pop", "elm");
|
||||
else
|
||||
edje_object_signal_emit(o, "elm,action,hide", "elm");
|
||||
onhide = edje_object_data_get(o, "onhide");
|
||||
if (onhide)
|
||||
{
|
||||
if (!strcmp(onhide, "raise")) evas_object_raise(o);
|
||||
else if (!strcmp(onhide, "lower")) evas_object_lower(o);
|
||||
}
|
||||
}
|
||||
wd->oldtop = wd->top;
|
||||
wd->top = ittop;
|
||||
o = wd->top->base;
|
||||
evas_object_show(o);
|
||||
if (wd->oldtop)
|
||||
{
|
||||
if (elm_object_focus_get(wd->oldtop->content))
|
||||
|
@ -170,12 +170,12 @@ _eval_top(Evas_Object *obj)
|
|||
}
|
||||
else
|
||||
edje_object_signal_emit(o, "elm,action,push", "elm");
|
||||
onshow = edje_object_data_get(o, "onshow");
|
||||
if (onshow)
|
||||
{
|
||||
if (!strcmp(onshow, "raise")) evas_object_raise(o);
|
||||
else if (!strcmp(onshow, "lower")) evas_object_lower(o);
|
||||
}
|
||||
onshow = edje_object_data_get(o, "onshow");
|
||||
if (onshow)
|
||||
{
|
||||
if (!strcmp(onshow, "raise")) evas_object_raise(o);
|
||||
else if (!strcmp(onshow, "lower")) evas_object_lower(o);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -189,7 +189,7 @@ _move(void *data, Evas *e __UNUSED__, Evas_Object *obj, void *event_info __UNUSE
|
|||
if (!wd) return;
|
||||
evas_object_geometry_get(obj, &x, &y, NULL, NULL);
|
||||
EINA_LIST_FOREACH(wd->stack, l, it)
|
||||
evas_object_move(it->base, x, y);
|
||||
evas_object_move(it->base, x, y);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -202,16 +202,16 @@ _sub_del(void *data, Evas_Object *obj __UNUSED__, void *event_info)
|
|||
if (!wd) return;
|
||||
EINA_LIST_FOREACH(wd->stack, l, it)
|
||||
{
|
||||
if (it->content == sub)
|
||||
{
|
||||
wd->stack = eina_list_remove_list(wd->stack, l);
|
||||
evas_object_event_callback_del_full
|
||||
(sub, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _changed_size_hints, it);
|
||||
evas_object_del(it->base);
|
||||
_eval_top(it->obj);
|
||||
free(it);
|
||||
return;
|
||||
}
|
||||
if (it->content == sub)
|
||||
{
|
||||
wd->stack = eina_list_remove_list(wd->stack, l);
|
||||
evas_object_event_callback_del_full
|
||||
(sub, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _changed_size_hints, it);
|
||||
evas_object_del(it->base);
|
||||
_eval_top(it->obj);
|
||||
free(it);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -356,28 +356,28 @@ elm_pager_content_pop(Evas_Object *obj)
|
|||
ll = eina_list_last(wd->stack);
|
||||
if (ll)
|
||||
{
|
||||
ll = ll->prev;
|
||||
if (!ll)
|
||||
{
|
||||
Evas_Object *o;
|
||||
const char *onhide;
|
||||
ll = ll->prev;
|
||||
if (!ll)
|
||||
{
|
||||
Evas_Object *o;
|
||||
const char *onhide;
|
||||
|
||||
wd->top = it;
|
||||
o = wd->top->base;
|
||||
edje_object_signal_emit(o, "elm,action,pop", "elm");
|
||||
onhide = edje_object_data_get(o, "onhide");
|
||||
if (onhide)
|
||||
{
|
||||
if (!strcmp(onhide, "raise")) evas_object_raise(o);
|
||||
else if (!strcmp(onhide, "lower")) evas_object_lower(o);
|
||||
}
|
||||
wd->top = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
it = ll->data;
|
||||
elm_pager_content_promote(obj, it->content);
|
||||
}
|
||||
wd->top = it;
|
||||
o = wd->top->base;
|
||||
edje_object_signal_emit(o, "elm,action,pop", "elm");
|
||||
onhide = edje_object_data_get(o, "onhide");
|
||||
if (onhide)
|
||||
{
|
||||
if (!strcmp(onhide, "raise")) evas_object_raise(o);
|
||||
else if (!strcmp(onhide, "lower")) evas_object_lower(o);
|
||||
}
|
||||
wd->top = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
it = ll->data;
|
||||
elm_pager_content_promote(obj, it->content);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -403,13 +403,13 @@ elm_pager_content_promote(Evas_Object *obj, Evas_Object *content)
|
|||
if (!wd) return;
|
||||
EINA_LIST_FOREACH(wd->stack, l, it)
|
||||
{
|
||||
if (it->content == content)
|
||||
{
|
||||
wd->stack = eina_list_remove_list(wd->stack, l);
|
||||
wd->stack = eina_list_append(wd->stack, it);
|
||||
_eval_top(obj);
|
||||
return;
|
||||
}
|
||||
if (it->content == content)
|
||||
{
|
||||
wd->stack = eina_list_remove_list(wd->stack, l);
|
||||
wd->stack = eina_list_append(wd->stack, it);
|
||||
_eval_top(obj);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -106,7 +106,7 @@ _elm_panel_focus_next_hook(const Evas_Object *obj, Elm_Focus_Direction dir, Evas
|
|||
|
||||
/* Try Focus cycle in subitem */
|
||||
if (!wd->hidden)
|
||||
return elm_widget_focus_next_get(cur, dir, next);
|
||||
return elm_widget_focus_next_get(cur, dir, next);
|
||||
|
||||
/* Return */
|
||||
*next = (Evas_Object *)obj;
|
||||
|
@ -119,7 +119,7 @@ _signal_emit_hook(Evas_Object *obj, const char *emission, const char *source)
|
|||
Widget_Data *wd = elm_widget_data_get(obj);
|
||||
if (!wd) return;
|
||||
edje_object_signal_emit(elm_smart_scroller_edje_object_get(wd->scr),
|
||||
emission, source);
|
||||
emission, source);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -128,7 +128,7 @@ _signal_callback_add_hook(Evas_Object *obj, const char *emission, const char *so
|
|||
Widget_Data *wd = elm_widget_data_get(obj);
|
||||
if (!wd) return;
|
||||
edje_object_signal_callback_add(elm_smart_scroller_edje_object_get(wd->scr),
|
||||
emission, source, func_cb, data);
|
||||
emission, source, func_cb, data);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -136,8 +136,8 @@ _signal_callback_del_hook(Evas_Object *obj, const char *emission, const char *so
|
|||
{
|
||||
Widget_Data *wd = elm_widget_data_get(obj);
|
||||
edje_object_signal_callback_del_full(
|
||||
elm_smart_scroller_edje_object_get(wd->scr), emission, source,
|
||||
func_cb, data);
|
||||
elm_smart_scroller_edje_object_get(wd->scr), emission, source,
|
||||
func_cb, data);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -323,24 +323,24 @@ elm_panel_orient_set(Evas_Object *obj, Elm_Panel_Orient orient)
|
|||
wd->orient = orient;
|
||||
switch (orient)
|
||||
{
|
||||
case ELM_PANEL_ORIENT_TOP:
|
||||
elm_smart_scroller_object_theme_set(obj, wd->scr, "panel", "base", "top");
|
||||
break;
|
||||
case ELM_PANEL_ORIENT_BOTTOM:
|
||||
elm_smart_scroller_object_theme_set(obj, wd->scr, "panel", "base", "bottom");
|
||||
break;
|
||||
case ELM_PANEL_ORIENT_LEFT:
|
||||
if (!elm_widget_mirrored_get(obj))
|
||||
elm_smart_scroller_object_theme_set(obj, wd->scr, "panel", "base", "left");
|
||||
else
|
||||
elm_smart_scroller_object_theme_set(obj, wd->scr, "panel", "base", "right");
|
||||
break;
|
||||
case ELM_PANEL_ORIENT_RIGHT:
|
||||
if (!elm_widget_mirrored_get(obj))
|
||||
elm_smart_scroller_object_theme_set(obj, wd->scr, "panel", "base", "right");
|
||||
else
|
||||
elm_smart_scroller_object_theme_set(obj, wd->scr, "panel", "base", "left");
|
||||
break;
|
||||
case ELM_PANEL_ORIENT_TOP:
|
||||
elm_smart_scroller_object_theme_set(obj, wd->scr, "panel", "base", "top");
|
||||
break;
|
||||
case ELM_PANEL_ORIENT_BOTTOM:
|
||||
elm_smart_scroller_object_theme_set(obj, wd->scr, "panel", "base", "bottom");
|
||||
break;
|
||||
case ELM_PANEL_ORIENT_LEFT:
|
||||
if (!elm_widget_mirrored_get(obj))
|
||||
elm_smart_scroller_object_theme_set(obj, wd->scr, "panel", "base", "left");
|
||||
else
|
||||
elm_smart_scroller_object_theme_set(obj, wd->scr, "panel", "base", "right");
|
||||
break;
|
||||
case ELM_PANEL_ORIENT_RIGHT:
|
||||
if (!elm_widget_mirrored_get(obj))
|
||||
elm_smart_scroller_object_theme_set(obj, wd->scr, "panel", "base", "right");
|
||||
else
|
||||
elm_smart_scroller_object_theme_set(obj, wd->scr, "panel", "base", "left");
|
||||
break;
|
||||
}
|
||||
|
||||
_sizing_eval(obj);
|
||||
|
@ -387,8 +387,8 @@ elm_panel_content_set(Evas_Object *obj, Evas_Object *content)
|
|||
wd->content = content;
|
||||
if (content)
|
||||
{
|
||||
evas_object_box_append(wd->bx, wd->content);
|
||||
evas_object_show(wd->content);
|
||||
evas_object_box_append(wd->bx, wd->content);
|
||||
evas_object_show(wd->content);
|
||||
}
|
||||
_sizing_eval(obj);
|
||||
}
|
||||
|
|
|
@ -14,15 +14,15 @@ struct _Widget_Data
|
|||
|
||||
struct
|
||||
{
|
||||
Evas_Object *left;
|
||||
Evas_Object *right;
|
||||
Evas_Object *left;
|
||||
Evas_Object *right;
|
||||
} contents;
|
||||
|
||||
struct
|
||||
{
|
||||
int x_diff;
|
||||
int y_diff;
|
||||
Eina_Bool move;
|
||||
int x_diff;
|
||||
int y_diff;
|
||||
Eina_Bool move;
|
||||
} move;
|
||||
|
||||
Eina_Bool clicked_double;
|
||||
|
@ -148,17 +148,17 @@ _sub_del(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __
|
|||
if (!wd) return;
|
||||
if (sub == wd->contents.left)
|
||||
{
|
||||
evas_object_event_callback_del_full(sub, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
|
||||
evas_object_event_callback_del_full(sub, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
|
||||
_changed_size_hints, obj);
|
||||
wd->contents.left = NULL;
|
||||
_sizing_eval(obj);
|
||||
wd->contents.left = NULL;
|
||||
_sizing_eval(obj);
|
||||
}
|
||||
else if (sub == wd->contents.right)
|
||||
{
|
||||
evas_object_event_callback_del_full(sub, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
|
||||
evas_object_event_callback_del_full(sub, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
|
||||
_changed_size_hints, obj);
|
||||
wd->contents.right= NULL;
|
||||
_sizing_eval(obj);
|
||||
wd->contents.right= NULL;
|
||||
_sizing_eval(obj);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -190,8 +190,8 @@ _unpress(void *data, Evas_Object *obj __UNUSED__ , const char *emission __UNUSED
|
|||
|
||||
if (wd->clicked_double)
|
||||
{
|
||||
evas_object_smart_callback_call(data, "clicked,double", NULL);
|
||||
wd->clicked_double = EINA_FALSE;
|
||||
evas_object_smart_callback_call(data, "clicked,double", NULL);
|
||||
wd->clicked_double = EINA_FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -266,14 +266,14 @@ elm_panes_content_left_set(Evas_Object *obj, Evas_Object *content)
|
|||
Widget_Data *wd = elm_widget_data_get(obj);
|
||||
if (wd->contents.left)
|
||||
{
|
||||
evas_object_del(wd->contents.left);
|
||||
wd->contents.left = NULL;
|
||||
evas_object_del(wd->contents.left);
|
||||
wd->contents.left = NULL;
|
||||
}
|
||||
if (content)
|
||||
{
|
||||
wd->contents.left = content;
|
||||
elm_widget_sub_object_add(obj, content);
|
||||
edje_object_part_swallow(wd->panes, "elm.swallow.left", content);
|
||||
wd->contents.left = content;
|
||||
elm_widget_sub_object_add(obj, content);
|
||||
edje_object_part_swallow(wd->panes, "elm.swallow.left", content);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -296,14 +296,14 @@ elm_panes_content_right_set(Evas_Object *obj, Evas_Object *content)
|
|||
Widget_Data *wd = elm_widget_data_get(obj);
|
||||
if (wd->contents.right)
|
||||
{
|
||||
evas_object_del(wd->contents.right);
|
||||
wd->contents.right = NULL;
|
||||
evas_object_del(wd->contents.right);
|
||||
wd->contents.right = NULL;
|
||||
}
|
||||
if (content)
|
||||
{
|
||||
wd->contents.right = content;
|
||||
elm_widget_sub_object_add(obj, content);
|
||||
edje_object_part_swallow(wd->panes, "elm.swallow.right", content);
|
||||
wd->contents.right = content;
|
||||
elm_widget_sub_object_add(obj, content);
|
||||
edje_object_part_swallow(wd->panes, "elm.swallow.right", content);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue