#sbs-git:slp/pkgs/e/elementary elementary 1.0.0+svn.70492slp2+build11
Name: elementary
Summary: EFL toolkit for small touchscreens
-Version: 1.7.1+svn.77535slp2+build73r01
+Version: 1.7.1+svn.77535slp2+build76r01
Release: 1
Group: System/Libraries
License: LGPLv2.1
if (!sd)
return EINA_FALSE;
- if (!elm_widget_focus_next_get(sd->box, dir, next))
+ if (eina_list_count(sd->items))
{
- elm_widget_focused_object_clear(sd->box);
- elm_widget_focus_next_get(sd->box, dir, next);
- }
-
- EINA_LIST_FOREACH(sd->items, elist, it)
- items = eina_list_append(items, it->base.access_obj);
+ EINA_LIST_FOREACH(sd->items, elist, it)
+ items = eina_list_append(items, it->base.access_obj);
- return elm_widget_focus_list_next_get
- (obj, items, eina_list_data_get, dir, next);
+ return elm_widget_focus_list_next_get
+ (obj, items, eina_list_data_get, dir, next);
+ }
+ else
+ {
+ return elm_widget_focus_next_get(sd->box, dir, next);
+ }
}
static Eina_Bool
if (evas_object_data_get(VIEW(nit), "out_of_list"))
goto end;
- if (nit->content && !sd->on_deletion)
+ if (!sd->on_deletion)
{
- nit->content_unfocusable =
- elm_widget_tree_unfocusable_get(nit->content);
- elm_widget_tree_unfocusable_set(nit->content, EINA_TRUE);
+ nit->unfocusable = elm_widget_tree_unfocusable_get(VIEW(nit));
+ elm_widget_tree_unfocusable_set(VIEW(nit), EINA_TRUE);
}
if (sd->stack->last->prev)
evas_object_hide(VIEW(it));
- if (it->content)
- elm_widget_tree_unfocusable_set(it->content, it->content_unfocusable);
+ elm_widget_tree_unfocusable_set(VIEW(it), it->unfocusable);
if (sd->freeze_events)
evas_object_freeze_events_set(VIEW(it), EINA_FALSE);
ELM_NAVIFRAME_DATA_GET(WIDGET(it), sd);
- if (sd->preserve && it->content)
- elm_widget_tree_unfocusable_set(it->content, it->content_unfocusable);
+ if (sd->preserve)
+ elm_widget_tree_unfocusable_set(VIEW(it), it->unfocusable);
sd->popping = eina_list_remove(sd->popping, it);
elm_widget_item_del(data);
const char *source __UNUSED__)
{
Elm_Naviframe_Item *it = data;
+ unsigned int order = 0;
+ Evas_Object *newest;
ELM_NAVIFRAME_DATA_GET(WIDGET(it), sd);
elm_object_signal_emit(VIEW(it), "elm,state,visible", "elm");
- elm_widget_tree_unfocusable_set(it->content, it->content_unfocusable);
+ elm_widget_tree_unfocusable_set(VIEW(it), it->unfocusable);
+
+ newest = elm_widget_newest_focus_order_get(VIEW(it), &order, EINA_TRUE);
+ if (newest)
+ elm_object_focus_set(newest, EINA_TRUE);
+ else
+ elm_object_focus_set(VIEW(it), EINA_TRUE);
if (sd->freeze_events)
evas_object_freeze_events_set(VIEW(it), EINA_FALSE);
Eina_Bool ret;
Eina_List *l = NULL;
Elm_Naviframe_Item *top_it;
- Elm_Naviframe_Content_Item_Pair *content_pair = NULL;
void *(*list_data_get)(const Eina_List *list);
top_it = (Elm_Naviframe_Item *)elm_naviframe_top_item_get(obj);
if (!top_it) return EINA_FALSE;
- if (!top_it->title_visible)
- {
- return elm_widget_focus_next_get(top_it->content, dir, next);
- }
-
list_data_get = eina_list_data_get;
+ l = eina_list_append(l, VIEW(top_it));
+
/* access */
if (_elm_config->access_mode)
{
if (ao) l = eina_list_append(l, ao);
}
- /* icon would be able to have an widget. ex: segment control */
- if ((top_it->title_icon) &&
- (elm_widget_can_focus_get(top_it->title_icon) ||
- elm_widget_child_can_focus_get(top_it->title_icon)))
- l = eina_list_append(l, top_it->title_icon);
-
- if (top_it->title_prev_btn)
- l = eina_list_append(l, top_it->title_prev_btn);
- if (top_it->title_next_btn)
- l = eina_list_append(l, top_it->title_next_btn);
- if (top_it->content)
- l = eina_list_append(l, top_it->content);
- EINA_INLIST_FOREACH(top_it->content_list, content_pair)
- {
- if (elm_object_part_content_get(VIEW(top_it), content_pair->part))
- l = eina_list_append(l, elm_object_part_content_get(VIEW(top_it),
- content_pair->part));
- }
- l = eina_list_append(l, VIEW(top_it));
-
ret = elm_widget_focus_list_next_get(obj, l, list_data_get, dir, next);
eina_list_free(l);
return ret;
}
+static Eina_Bool
+_elm_naviframe_smart_focus_direction(const Evas_Object *obj,
+ const Evas_Object *base,
+ double degree,
+ Evas_Object **direction,
+ double *weight)
+{
+ Eina_Bool ret;
+ Eina_List *l = NULL;
+ Elm_Naviframe_Item *top_it;
+ void *(*list_data_get)(const Eina_List *list);
+
+ top_it = (Elm_Naviframe_Item *)elm_naviframe_top_item_get(obj);
+ if (!top_it) return EINA_FALSE;
+
+ list_data_get = eina_list_data_get;
+
+ l = eina_list_append(l, VIEW(top_it));
+ ret = elm_widget_focus_list_direction_get
+ (obj, base, l, list_data_get, degree, direction, weight);
+ eina_list_free(l);
+
+ return ret;
+}
+
static void
_elm_naviframe_smart_add(Evas_Object *obj)
{
ELM_WIDGET_CLASS(sc)->theme = _elm_naviframe_smart_theme;
ELM_WIDGET_CLASS(sc)->focus_next = _elm_naviframe_smart_focus_next;
+ ELM_WIDGET_CLASS(sc)->focus_direction = _elm_naviframe_smart_focus_direction;
ELM_WIDGET_CLASS(sc)->access = _elm_naviframe_smart_access;
ELM_WIDGET_CLASS(sc)->event = _elm_naviframe_smart_event;
evas_object_show(VIEW(it));
elm_widget_resize_object_set(obj, VIEW(it));
+ if (prev_it)
+ elm_widget_sub_object_add(obj, VIEW(prev_it));
evas_object_smart_member_add(sd->dummy_edje, obj);
if (prev_it)
edje_object_message_signal_process(elm_layout_edje_get(VIEW(prev_it)));
edje_object_message_signal_process(elm_layout_edje_get(VIEW(it)));
- if (prev_it->content)
- {
- prev_it->content_unfocusable =
- elm_widget_tree_unfocusable_get(prev_it->content);
- elm_widget_tree_unfocusable_set(prev_it->content, EINA_TRUE);
- }
+ prev_it->unfocusable = elm_widget_tree_unfocusable_get(VIEW(prev_it));
+ elm_widget_tree_unfocusable_set(VIEW(prev_it), EINA_TRUE);
it->animator = ecore_animator_add(_push_transition_cb, it);
}
+ else
+ elm_object_focus_set(VIEW(it), EINA_TRUE);
sd->stack = eina_inlist_append(sd->stack, EINA_INLIST_GET(it));
evas_object_raise(VIEW(it));
if (top_inserted)
{
elm_widget_resize_object_set(obj, VIEW(it));
+ elm_widget_sub_object_add(obj, VIEW(after));
evas_object_smart_member_add(sd->dummy_edje, obj);
evas_object_show(VIEW(it));
evas_object_hide(VIEW(after));
+ elm_object_focus_set(VIEW(it), EINA_TRUE);
}
/* access */
evas_object_data_set(VIEW(it), "out_of_list", (void *)1);
- if (it->content)
- {
- it->content_unfocusable = elm_widget_tree_unfocusable_get(it->content);
- elm_widget_tree_unfocusable_set(it->content, EINA_TRUE);
- }
+ it->unfocusable = elm_widget_tree_unfocusable_get(VIEW(it));
+ elm_widget_tree_unfocusable_set(VIEW(it), EINA_TRUE);
if (sd->stack->last->prev)
prev_it = EINA_INLIST_CONTAINER_GET
EAPI void
elm_naviframe_item_promote(Elm_Object_Item *it)
{
+ Elm_Object_Item *prev_top;
Elm_Naviframe_Item *nit;
Elm_Naviframe_Item *prev_it;
nit = (Elm_Naviframe_Item *)it;
ELM_NAVIFRAME_DATA_GET(WIDGET(nit), sd);
- if (it == elm_naviframe_top_item_get(WIDGET(nit))) return;
+ prev_top = elm_naviframe_top_item_get(WIDGET(nit));
+ if (it == prev_top) return;
/* remember, last is 1st on the naviframe, push it to last pos. */
sd->stack = eina_inlist_demote(sd->stack, EINA_INLIST_GET(nit));
elm_widget_resize_object_set(WIDGET(it), VIEW(nit));
+ elm_widget_sub_object_add(WIDGET(it), VIEW(prev_top));
evas_object_smart_member_add(sd->dummy_edje, WIDGET(it));
/* this was the previous top one */
/* re-add as smart member */
evas_object_smart_member_add(VIEW(prev_it), WIDGET(it));
- if (prev_it->content)
- {
- prev_it->content_unfocusable =
- elm_widget_tree_unfocusable_get(prev_it->content);
- elm_widget_tree_unfocusable_set(prev_it->content, EINA_TRUE);
- }
+ prev_it->unfocusable = elm_widget_tree_unfocusable_get(VIEW(prev_it));
+ elm_widget_tree_unfocusable_set(prev_it->content, EINA_TRUE);
if (sd->freeze_events)
{
Evas_Coord vw = 0, vh = 0;
Elm_Gen_Item *it;
+#if GENGRID_FX_SUPPORT
+ if (sd->fx_first_captured) return;
+#endif
evas_object_geometry_get(sd->pan_obj, NULL, NULL, &cvw, &cvh);
if ((cvw != 0) && (cvh != 0))
if ((!GG_IT(it)->wsd->fx_mode) || (GG_IT(it)->wsd->gengrid_clearing))
#endif
{
- _elm_gengrid_item_del_common(it);
+ GG_IT(it)->wsd->items = eina_inlist_remove
+ (GG_IT(it)->wsd->items, EINA_INLIST_GET(it));
+
}
+
+ _elm_gengrid_item_del_common(it);
free(it->item);
it->item = NULL;
}
if (!eina_list_data_find(GG_IT(it)->wsd->pending_del_items, it))
GG_IT(it)->wsd->pending_del_items = eina_list_append(GG_IT(it)->wsd->pending_del_items, it);
- evas_event_freeze(evas_object_evas_get(obj));
- GG_IT(it)->wsd->selected = eina_list_remove(GG_IT(it)->wsd->selected, it);
+ evas_object_event_callback_del_full
+ (VIEW(it), EVAS_CALLBACK_MOUSE_DOWN, _item_mouse_down_cb, it);
+ evas_object_event_callback_del_full
+ (VIEW(it), EVAS_CALLBACK_MOUSE_UP, _item_mouse_up_cb, it);
+ evas_object_event_callback_del_full
+ (VIEW(it), EVAS_CALLBACK_MOUSE_MOVE, _item_mouse_move_cb, it);
- _elm_gengrid_item_del_common(it);
- evas_event_thaw(evas_object_evas_get(obj));
- evas_event_thaw_eval(evas_object_evas_get(obj));
+ GG_IT(it)->wsd->items = eina_inlist_remove
+ (GG_IT(it)->wsd->items, EINA_INLIST_GET(it));
+
+ if (GG_IT(it)->wsd->calc_job) ecore_job_del(GG_IT(it)->wsd->calc_job);
+ GG_IT(it)->wsd->calc_job =
+ ecore_job_add(GG_IT(it)->wsd->calc_cb, GG_IT(it)->wsd);
}
#endif
EINA_LIST_FREE(sd->capture_before_items, pi)
{
+ if (pi->proxy) evas_object_smart_member_del(pi->proxy);
if (pi->proxy) evas_object_del(pi->proxy);
free(pi);
}
EINA_LIST_FREE(sd->capture_after_items, pi)
{
+ if (pi->proxy) evas_object_smart_member_del(pi->proxy);
if (pi->proxy) evas_object_del(pi->proxy);
free(pi);
}
free(fi);
}
EINA_LIST_FREE (sd->pending_unrealized_items, it)
- _elm_gengrid_item_unrealize(it, EINA_FALSE);
+ {
+ if ((it) && (GG_IT(it))) GG_IT(it)->has_proxy_it = EINA_FALSE;
+ _elm_gengrid_item_unrealize(it, EINA_FALSE);
+ }
EINA_LIST_FREE (sd->pending_del_items, it)
{
_item_del(it);
(evas_object_evas_get(ELM_WIDGET_DATA(GG_IT(it)->wsd)->obj));
if (!pi->proxy) return EINA_FALSE;
evas_object_clip_set(pi->proxy, evas_object_clip_get(GG_IT(it)->wsd->pan_obj));
-
+ evas_object_smart_member_add(pi->proxy, GG_IT(it)->wsd->pan_obj);
+ evas_object_hide(pi->proxy);
evas_object_image_source_set(pi->proxy, VIEW(it));
GG_IT(it)->has_proxy_it = EINA_TRUE;
sd->fx_first_captured = EINA_TRUE;
EINA_LIST_FREE(sd->capture_before_items, pi)
{
+ if (pi->proxy) evas_object_smart_member_del(pi->proxy);
if (pi->proxy) evas_object_del(pi->proxy);
free(pi);
}
{
EINA_LIST_FREE(sd->capture_after_items, pi)
{
+ if (pi->proxy) evas_object_smart_member_del(pi->proxy);
if (pi->proxy) evas_object_del(pi->proxy);
free(pi);
}
{
Elm_Gen_FX_Item *fx_done_it = data;
Elm_Gen_Item *it = NULL;
+ Proxy_Item *pi = NULL;
+ Eina_List *l;
Elm_Gengrid_Smart_Data *sd = GG_IT(fx_done_it->it)->wsd;
if ((!fx_done_it) || (!fx_done_it->it) || (!sd)) return;
_item_del(it);
_elm_widget_item_free((Elm_Widget_Item *)it);
}
+ EINA_LIST_FOREACH(sd->capture_before_items, l, pi)
+ evas_object_hide(pi->proxy);
+ EINA_LIST_FOREACH(sd->capture_after_items, l, pi)
+ evas_object_hide(pi->proxy);
sd->fx_playing = EINA_FALSE;
sd->fx_first_captured = EINA_FALSE;
Elm_Genlist_Smart_Data *sd = GL_IT(it)->wsd;
Item_Cache *ic = NULL;
+#if GENLIST_FX_SUPPORT
+ if (sd->pending_del_items) return;
+#endif
+
if (sd->item_cache_count >= sd->item_cache_max)
{
ic = EINA_INLIST_CONTAINER_GET(sd->item_cache->last, Item_Cache);
{
Elm_Gen_Item *it;
it = (Elm_Gen_Item *)item;
- if ((!it) || (IS_ROOT_PARENT_IT(it))) return NULL;
+ if (!it) return NULL;
+ if (GL_IT(it)->wsd->pinch_zoom_mode) return NULL;
while (it)
{
EINA_LIST_FOREACH(sd->fx_items, l, fi)
{
- if (IS_ROOT_PARENT_IT(fi->it))
+ if ((GL_IT(fi->it)->items) && (GL_IT(fi->it)->expanded_depth == 0))
{
#if GENLIST_PINCH_ZOOM_SUPPORT
if (sd->pinch_zoom_mode == ELM_GEN_PINCH_ZOOM_CONTRACT)
{
if (sd->realized_top_item)
{
-
if (fi->num <= sd->realized_top_item->item->num)
fi->to.y = oy - fi->from.h;
else
}
}
-static Evas_Object *
-_newest_focus_order_get(Evas_Object *obj,
- unsigned int *newest_focus_order,
- Eina_Bool can_focus_only)
-{
- const Eina_List *l;
- Evas_Object *child, *ret, *best;
-
- API_ENTRY return NULL;
-
- if (!evas_object_visible_get(obj)
- || (elm_widget_disabled_get(obj))
- || (elm_widget_tree_unfocusable_get(obj)))
- return NULL;
-
- best = NULL;
- if (*newest_focus_order < sd->focus_order)
- {
- *newest_focus_order = sd->focus_order;
- best = obj;
- }
- EINA_LIST_FOREACH(sd->subobjs, l, child)
- {
- ret = _newest_focus_order_get
- (child, newest_focus_order, can_focus_only);
- if (!ret) continue;
- best = ret;
- }
- if (can_focus_only)
- {
- if ((!best) || (!elm_widget_can_focus_get(best)))
- return NULL;
- }
- return best;
-}
static void
_if_focused_revert(Evas_Object *obj,
top = elm_widget_top_get(sd->parent_obj);
if (top)
{
- newest = _newest_focus_order_get
- (top, &newest_focus_order, can_focus_only);
+ newest = elm_widget_newest_focus_order_get
+ (top, &newest_focus_order, can_focus_only);
if (newest)
{
elm_object_focus_set(newest, EINA_FALSE);
unsigned int newest_focus_order = 0;
API_ENTRY return;
- newest = _newest_focus_order_get(obj, &newest_focus_order, EINA_TRUE);
+ newest = elm_widget_newest_focus_order_get(obj, &newest_focus_order, EINA_TRUE);
if (newest)
{
elm_object_focus_set(newest, EINA_FALSE);
return sd->focus_order;
}
+EAPI Evas_Object *
+elm_widget_newest_focus_order_get(const Evas_Object *obj,
+ unsigned int *newest_focus_order,
+ Eina_Bool can_focus_only)
+{
+ const Eina_List *l;
+ Evas_Object *child, *ret, *best;
+
+ API_ENTRY return NULL;
+
+ if (!evas_object_visible_get(obj)
+ || (elm_widget_disabled_get(obj))
+ || (elm_widget_tree_unfocusable_get(obj)))
+ return NULL;
+
+ best = NULL;
+ if (*newest_focus_order < sd->focus_order)
+ {
+ *newest_focus_order = sd->focus_order;
+ best = (Evas_Object *)obj;
+ }
+ EINA_LIST_FOREACH(sd->subobjs, l, child)
+ {
+ ret = elm_widget_newest_focus_order_get
+ (child, newest_focus_order, can_focus_only);
+ if (!ret) continue;
+ best = ret;
+ }
+ if (can_focus_only)
+ {
+ if ((!best) || (!elm_widget_can_focus_get(best)))
+ return NULL;
+ }
+ return best;
+}
+
EAPI void
elm_widget_activate(Evas_Object *obj, Elm_Activate act)
{
EAPI void elm_widget_focus_tree_unfocusable_handle(Evas_Object *obj);
EAPI void elm_widget_focus_disabled_handle(Evas_Object *obj);
EAPI unsigned int elm_widget_focus_order_get(const Evas_Object *obj);
+EAPI Evas_Object *elm_widget_newest_focus_order_get(const Evas_Object *obj, unsigned int *newest_focus_order, Eina_Bool can_focus_only);
EAPI void elm_widget_activate(Evas_Object *obj, Elm_Activate act);
EAPI void elm_widget_text_part_set(Evas_Object *obj, const char *part, const char *label);
EAPI const char *elm_widget_text_part_get(const Evas_Object *obj, const char *part);
Evas_Coord minh;
Eina_Bool title_visible : 1;
- Eina_Bool content_unfocusable : 1;
+ Eina_Bool unfocusable : 1;
};
typedef struct _Elm_Naviframe_Content_Item_Pair Elm_Naviframe_Content_Item_Pair;
} shot;
int resize_location;
int *autodel_clear, rot;
- int show_count;
struct
{
int x, y;
{
Elm_Win_Smart_Data *sd = _elm_win_associate_get(ee);
Evas_Object *obj;
+ unsigned int order = 0;
EINA_SAFETY_ON_NULL_RETURN(sd);
obj = ELM_WIDGET_DATA(sd)->obj;
_elm_widget_top_win_focused_set(obj, EINA_TRUE);
- if (!elm_widget_focus_order_get(obj))
+ if (!elm_widget_focus_order_get(obj)
+ || (obj == elm_widget_newest_focus_order_get(obj, &order, EINA_TRUE)))
{
elm_widget_focus_steal(obj);
- sd->show_count++;
}
else
elm_widget_focus_restore(obj);
TRAP(sd, show);
- if (!sd->show_count) sd->show_count++;
if (sd->shot.info) _shot_handle(sd);
}
}
static void
-_ctxpopup_dismissed_cb(void *data, Evas_Object *o __UNUSED__, void *event_info __UNUSED__)
+_ctxpopup_dismissed_cb(void *data, Evas_Object *obj, void *event_info __UNUSED__)
{
+ Elm_Ctxpopup_Direction dir;
if (!ext_mod) return;
+ dir = elm_ctxpopup_direction_get(obj);
+ //clear selection if ctxpopup is dismissed by clicking (not parent resizing)
+ if (dir != ELM_CTXPOPUP_DIRECTION_UNKNOWN)
+ {
+ elm_entry_select_none(data);
+ }
+
//elm_object_scroll_freeze_pop(ext_mod->popup);
}
{
ext_mod->popup = elm_ctxpopup_add(top);
elm_object_tree_focus_allow_set(ext_mod->popup, EINA_FALSE);
- evas_object_smart_callback_add(ext_mod->popup, "dismissed", _ctxpopup_dismissed_cb, NULL);
+ evas_object_smart_callback_add(ext_mod->popup, "dismissed", _ctxpopup_dismissed_cb, obj);
evas_object_event_callback_add(obj, EVAS_CALLBACK_DEL, _entry_del_cb, ext_mod->popup);
evas_object_event_callback_add(obj, EVAS_CALLBACK_HIDE, _entry_hide_cb, ext_mod->popup);
}