From: Hyoyoung Chang Date: Thu, 8 Mar 2012 06:53:32 +0000 (+0900) Subject: [genlist] merge with upstream X-Git-Tag: REL_F_I9500_20120317_1~18^2~41^2~9^2~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a018bd4ee7becac65eb05fbb90977d8ac983dce6;p=framework%2Fuifw%2Felementary.git [genlist] merge with upstream Change-Id: Ie3adac9c00f3d5ebc63735e6d7cc336feba743f9 --- diff --git a/src/lib/elm_genlist.c b/src/lib/elm_genlist.c index 2223a77..668982d 100644 --- a/src/lib/elm_genlist.c +++ b/src/lib/elm_genlist.c @@ -4,191 +4,6 @@ #include #include "elm_priv.h" #include "els_scroller.h" -<<<<<<< HEAD -//#include "elm_gen_common.h" //upstream - -#define SWIPE_MOVES 12 -#define MAX_ITEMS_PER_BLOCK 32 -#define REORDER_EFFECT_TIME 0.5 - -typedef struct _Widget_Data Widget_Data; -typedef struct _Item_Block Item_Block; -typedef struct _Pan Pan; -typedef struct _Item_Cache Item_Cache; -typedef enum _Elm_Genlist_Item_Move_effect_Mode -{ - ELM_GENLIST_ITEM_MOVE_EFFECT_NONE = 0, - ELM_GENLIST_ITEM_MOVE_EFFECT_EXPAND = (1 << 0), - ELM_GENLIST_ITEM_MOVE_EFFECT_CONTRACT = (1 << 1), - ELM_GENLIST_ITEM_MOVE_EFFECT_DELETE = (1 << 2), -} Elm_Genlist_Item_Move_effect_Mode; - -typedef enum _Elm_Genlist_Item_Scrollto_Type -{ - ELM_GENLIST_ITEM_SCROLLTO_NONE = 0, /**< no scrollto */ - ELM_GENLIST_ITEM_SCROLLTO_IN = (1 << 0), /**< show, bring in */ - ELM_GENLIST_ITEM_SCROLLTO_TOP = (1 << 1), /**< top show, top bring in */ - ELM_GENLIST_ITEM_SCROLLTO_MIDDLE = (1 << 2) /**< middle show, middle bring in */ -} Elm_Genlist_Item_Scrollto_Type; - -struct _Widget_Data -{ - Evas_Object *obj, *scr, *pan_smart; - Eina_Inlist *items, *blocks; - Eina_List *group_items; - Pan *pan; - Evas_Coord pan_x, pan_y, reorder_old_pan_y, w, h, minw, minh, realminw, prev_viewport_w; - Ecore_Job *calc_job, *update_job; - Ecore_Idle_Enterer *queue_idle_enterer; - Ecore_Idler *must_recalc_idler; - Eina_List *queue, *selected; - Elm_Object_Item *last_selected_item; - Elm_Genlist_Item *show_item, *anchor_item, *mode_item, *reorder_it, *reorder_rel, *expanded_item; - Eina_Inlist *item_cache; - Evas_Coord anchor_y, reorder_start_y; - Elm_List_Mode mode; - Ecore_Timer *multi_timer, *scr_hold_timer; - Ecore_Animator *reorder_move_animator; - const char *mode_type; - unsigned int start_time; - Evas_Coord prev_x, prev_y, prev_mx, prev_my; - Evas_Coord cur_x, cur_y, cur_mx, cur_my; - Eina_Bool mouse_down : 1; - Eina_Bool multi_down : 1; - Eina_Bool multi_timeout : 1; - Eina_Bool multitouched : 1; - Eina_Bool on_hold : 1; - Eina_Bool multi : 1; - Eina_Bool always_select : 1; - Eina_Bool longpressed : 1; - Eina_Bool wasselected : 1; - Eina_Bool no_select : 1; - Eina_Bool bring_in : 1; /* a flag to describe the scroll animation. (show, bring in) */ - Eina_Bool compress : 1; - Eina_Bool height_for_width : 1; - Eina_Bool pan_resize : 1; - Eina_Bool homogeneous : 1; - Eina_Bool clear_me : 1; - Eina_Bool swipe : 1; - Eina_Bool reorder_mode : 1; - Eina_Bool reorder_pan_move : 1; - struct - { - Evas_Coord x, y; - } history[SWIPE_MOVES]; - int multi_device; - int item_cache_count; - int item_cache_max; - int movements; - int walking; - int item_width; - int item_height; - int group_item_width; - int group_item_height; - int max_items_per_block; - double longpress_timeout; - int generation; - - // TODO : refactoring - Eina_Bool reorder_deleted : 1; - Eina_Bool effect_mode : 1; - Eina_Bool auto_scroll_enabled : 1; - Eina_Bool pan_changed : 1; - Eina_Bool drag_started : 1; - Eina_Bool check_scroll : 1; /* this flag means genlist is supposed to be scrolled. if this flag is set to EINA_TRUE, genlist checks whether it's ok to scroll genlist now or not. */ - Eina_Bool expanded_move_effect_set : 1; - int edit_mode; - Elm_Genlist_Item_Scrollto_Type scrollto_type; /* a scrollto type which remembers where to scroll ex) in, top, middle */ - Ecore_Animator *item_moving_effect_timer; - Evas_Object *alpha_bg; - Evas_Coord expand_item_end; - Evas_Coord expand_item_gap; - int move_effect_mode; - Ecore_Job *changed_job; - Elm_Genlist_Item *rename_it, *expanded_next_item; -}; - -struct _Elm_Genlist_Item -{ - ELM_WIDGET_ITEM; - EINA_INLIST; - Widget_Data *wd; - Item_Block *block; - Eina_List *items; - Evas_Coord x, y, w, h, minw, minh; - const Elm_Genlist_Item_Class *itc; - Elm_Genlist_Item *parent; - Elm_Genlist_Item *group_item; - Elm_Genlist_Item_Flags flags; - struct - { - Evas_Smart_Cb func; - const void *data; - } func; - - Evas_Object *spacer; - Eina_List *texts, *contents, *states, *content_objs; - Eina_List *mode_texts, *mode_contents, *mode_states, *mode_content_objs; - Ecore_Timer *long_timer; - Ecore_Timer *swipe_timer; - Evas_Coord dx, dy; - Evas_Coord scrl_x, scrl_y; - - Elm_Genlist_Item *rel; - Evas_Object *mode_view; - - struct - { - const void *data; - Elm_Tooltip_Item_Content_Cb content_cb; - Evas_Smart_Cb del_cb; - const char *style; - } tooltip; - - const char *mouse_cursor; - - int relcount; - int walking; - int generation; - int expanded_depth; - int order_num_in; - int position; - - Eina_Bool position_update : 1; - Eina_Bool before : 1; - - Eina_Bool want_unrealize : 1; - Eina_Bool realized : 1; - Eina_Bool selected : 1; - Eina_Bool highlighted : 1; - Eina_Bool expanded : 1; - Eina_Bool display_only : 1; - Eina_Bool mincalcd : 1; - Eina_Bool queued : 1; - Eina_Bool showme : 1; - Eina_Bool down : 1; - Eina_Bool dragging : 1; - Eina_Bool updateme : 1; - Eina_Bool nocache : 1; - Eina_Bool stacking_even : 1; - Eina_Bool nostacking : 1; - Eina_Bool move_effect_enabled : 1; - Eina_Bool defer_unrealize : 1; - Eina_Bool can_focus : 1; - Eina_Bool no_select : 1; - - - // TODO: refactoring - Eina_Bool effect_done : 1; - Eina_Bool reordering : 1; - Eina_Bool renamed : 1; - Eina_Bool effect_item_realized : 1; - Eina_List *edit_content_objs; - Evas_Object *edit_obj; - int num; - Ecore_Animator *item_moving_effect_timer; - Evas_Coord old_scrl_y; -======= #include "elm_gen_common.h" // internally allocated @@ -262,7 +77,6 @@ struct Elm_Gen_Item_Type Eina_Bool move_effect_enabled : 1; Eina_Bool decorate_mode_item_realized : 1; Eina_Bool tree_effect_finished : 1; /* tree effect */ ->>>>>>> remotes/origin/upstream }; struct _Item_Block @@ -282,10 +96,6 @@ struct _Item_Block Eina_Bool realized : 1; Eina_Bool changed : 1; Eina_Bool updateme : 1; -<<<<<<< HEAD - Eina_Bool changeme : 1; -======= ->>>>>>> remotes/origin/upstream Eina_Bool showme : 1; Eina_Bool must_recalc : 1; }; @@ -297,30 +107,11 @@ struct _Item_Cache Evas_Object *base_view, *spacer; const char *item_style; // it->itc->item_style -<<<<<<< HEAD - Eina_Bool tree : 1; // it->flags & ELM_GENLIST_ITEM_SUBITEMS - Eina_Bool compress : 1; // it->wd->compress - - Eina_Bool selected : 1; // it->selected - Eina_Bool disabled : 1; // it->disabled - Eina_Bool expanded : 1; // it->expanded -}; - -#define ELM_GENLIST_ITEM_FROM_INLIST(item) \ - ((item) ? EINA_INLIST_CONTAINER_GET(item, Elm_Genlist_Item) : NULL) - -struct _Pan -{ - Evas_Object_Smart_Clipped_Data __clipped_data; - Widget_Data *wd; - Ecore_Job *resize_job; -======= Eina_Bool tree : 1; // it->group Eina_Bool selected : 1; // it->selected Eina_Bool disabled : 1; // it->disabled Eina_Bool expanded : 1; // it->item->expanded ->>>>>>> remotes/origin/upstream }; static const char *widtype = NULL; @@ -332,27 +123,14 @@ static void _theme_hook(Evas_Object *obj); static void _show_region_hook(void *data, Evas_Object *obj); static void _sizing_eval(Evas_Object *obj); -<<<<<<< HEAD -static void _item_realize(Elm_Genlist_Item *it, - int in, - Eina_Bool calc); -static void _item_unrealize(Elm_Genlist_Item *it, - Eina_Bool calc); -======= static void _item_realize(Elm_Gen_Item *it, int in, Eina_Bool calc); static void _item_unrealize_cb(Elm_Gen_Item *it); ->>>>>>> remotes/origin/upstream static void _item_block_unrealize(Item_Block *itb); static void _calc_job(void *data); static void _on_focus_hook(void *data, Evas_Object *obj); -<<<<<<< HEAD -static void _changed_size_hints(void *data, Evas *e, Evas_Object *obj, void *event_info); -static void _changed_job(void *data); -======= ->>>>>>> remotes/origin/upstream static Eina_Bool _item_multi_select_up(Widget_Data *wd); static Eina_Bool _item_multi_select_down(Widget_Data *wd); static Eina_Bool _item_single_select_up(Widget_Data *wd); @@ -362,49 +140,13 @@ static Eina_Bool _event_hook(Evas_Object *obj, Evas_Callback_Type type, void *event_info); static void _signal_emit_hook(Evas_Object *obj, -<<<<<<< HEAD - const char *emission, - const char *source); -======= const char *emission, const char *source); ->>>>>>> remotes/origin/upstream static Eina_Bool _deselect_all_items(Widget_Data *wd); static void _pan_calculate(Evas_Object *obj); static void _pan_max_get(Evas_Object *obj, Evas_Coord *x, Evas_Coord *y); -<<<<<<< HEAD -static void _item_position(Elm_Genlist_Item *it, - Evas_Object *obj, - Evas_Coord it_x, - Evas_Coord it_y); -static void _mode_item_realize(Elm_Genlist_Item *it); -static void _mode_item_unrealize(Elm_Genlist_Item *it); -static void _item_mode_set(Elm_Genlist_Item *it); -static void _item_mode_unset(Widget_Data *wd); -static void _item_move_after(Elm_Genlist_Item *it, - Elm_Genlist_Item *after); -static void _item_move_before(Elm_Genlist_Item *it, - Elm_Genlist_Item *before); - -// TODO : refactoring -static Evas_Object* _create_tray_alpha_bg(const Evas_Object *obj); -static unsigned int current_time_get(); -static Eina_Bool _item_moving_effect_timer_cb(void *data); -static int _item_flip_effect_show(Elm_Genlist_Item *it); -static void _effect_item_controls(Elm_Genlist_Item *it, int itx, int ity); -static void _effect_item_realize(Elm_Genlist_Item *it, Eina_Bool effect_on); -static void _effect_item_unrealize(Elm_Genlist_Item *it); -static void _item_auto_scroll(Widget_Data *wd); -static void _pan_child_size_get(Evas_Object *obj, - Evas_Coord *w, - Evas_Coord *h); -static void _elm_genlist_clear(Evas_Object *obj, - Eina_Bool standby); -static void _elm_genlist_item_del_serious(Elm_Genlist_Item *it); -static void _elm_genlist_item_del_notserious(Elm_Genlist_Item *it); -======= static void _item_position(Elm_Gen_Item *it, Evas_Object *obj, Evas_Coord it_x, @@ -433,7 +175,6 @@ static int _item_tree_effect_before(Elm_Gen_Item *it); static void _item_tree_effect(Widget_Data *wd, int y); static void _item_tree_effect_finish(Widget_Data *wd); static Eina_Bool _item_moving_effect_timer_cb(void *data); ->>>>>>> remotes/origin/upstream static Evas_Smart_Class _pan_sc = EVAS_SMART_CLASS_INIT_VERSION; @@ -469,13 +210,9 @@ static const char SIG_MULTI_SWIPE_DOWN[] = "multi,swipe,down"; static const char SIG_MULTI_PINCH_OUT[] = "multi,pinch,out"; static const char SIG_MULTI_PINCH_IN[] = "multi,pinch,in"; static const char SIG_SWIPE[] = "swipe"; -<<<<<<< HEAD -static const char SIG_INDEX_UPDATE[] = "index,update"; -======= static const char SIG_MOVED[] = "moved"; static const char SIG_INDEX_UPDATE[] = "index,update"; static const char SIG_TREE_EFFECT_FINISHED [] = "tree,effect,finished"; ->>>>>>> remotes/origin/upstream static const Evas_Smart_Cb_Description _signals[] = { {SIG_CLICKED_DOUBLE, ""}, @@ -510,11 +247,6 @@ static const Evas_Smart_Cb_Description _signals[] = { {SIG_MULTI_PINCH_OUT, ""}, {SIG_MULTI_PINCH_IN, ""}, {SIG_SWIPE, ""}, -<<<<<<< HEAD - {NULL, NULL} -}; - -======= {SIG_MOVED, ""}, {SIG_TREE_EFFECT_FINISHED, ""}, {NULL, NULL} @@ -560,7 +292,6 @@ elm_genlist_type_check(const Evas_Object *obj, return EINA_FALSE; } ->>>>>>> remotes/origin/upstream static Eina_Bool _event_hook(Evas_Object *obj, Evas_Object *src __UNUSED__, @@ -626,24 +357,16 @@ _event_hook(Evas_Object *obj, else if ((!strcmp(ev->keyname, "Home")) || (!strcmp(ev->keyname, "KP_Home"))) { it = elm_genlist_first_item_get(obj); -<<<<<<< HEAD - elm_genlist_item_bring_in(it); -======= elm_genlist_item_bring_in(it, ELM_GENLIST_ITEM_SCROLLTO_IN); elm_genlist_item_selected_set(it, EINA_TRUE); ->>>>>>> remotes/origin/upstream ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD; return EINA_TRUE; } else if ((!strcmp(ev->keyname, "End")) || (!strcmp(ev->keyname, "KP_End"))) { it = elm_genlist_last_item_get(obj); -<<<<<<< HEAD - elm_genlist_item_bring_in(it); -======= elm_genlist_item_bring_in(it, ELM_GENLIST_ITEM_SCROLLTO_IN); elm_genlist_item_selected_set(it, EINA_TRUE); ->>>>>>> remotes/origin/upstream ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD; return EINA_TRUE; } @@ -712,20 +435,12 @@ _item_multi_select_up(Widget_Data *wd) { elm_genlist_item_selected_set(wd->last_selected_item, EINA_FALSE); wd->last_selected_item = prev; -<<<<<<< HEAD - elm_genlist_item_show(wd->last_selected_item); -======= elm_genlist_item_show(wd->last_selected_item, ELM_GENLIST_ITEM_SCROLLTO_IN); ->>>>>>> remotes/origin/upstream } else { elm_genlist_item_selected_set(prev, EINA_TRUE); -<<<<<<< HEAD - elm_genlist_item_show(prev); -======= elm_genlist_item_show(prev, ELM_GENLIST_ITEM_SCROLLTO_IN); ->>>>>>> remotes/origin/upstream } return EINA_TRUE; } @@ -744,20 +459,12 @@ _item_multi_select_down(Widget_Data *wd) { elm_genlist_item_selected_set(wd->last_selected_item, EINA_FALSE); wd->last_selected_item = next; -<<<<<<< HEAD - elm_genlist_item_show(wd->last_selected_item); -======= elm_genlist_item_show(wd->last_selected_item, ELM_GENLIST_ITEM_SCROLLTO_IN); ->>>>>>> remotes/origin/upstream } else { elm_genlist_item_selected_set(next, EINA_TRUE); -<<<<<<< HEAD - elm_genlist_item_show(next); -======= elm_genlist_item_show(next, ELM_GENLIST_ITEM_SCROLLTO_IN); ->>>>>>> remotes/origin/upstream } return EINA_TRUE; } @@ -765,16 +472,6 @@ _item_multi_select_down(Widget_Data *wd) static Eina_Bool _item_single_select_up(Widget_Data *wd) { -<<<<<<< HEAD - Elm_Genlist_Item *prev; - if (!wd->selected) - { - prev = ELM_GENLIST_ITEM_FROM_INLIST(wd->items->last); - while ((prev) && (prev->generation < wd->generation)) - prev = ELM_GENLIST_ITEM_FROM_INLIST(EINA_INLIST_GET(prev)->prev); - } - else prev = (Elm_Genlist_Item *)elm_genlist_item_prev_get(wd->last_selected_item); -======= Elm_Gen_Item *prev; if (!wd->selected) { @@ -783,35 +480,19 @@ _item_single_select_up(Widget_Data *wd) prev = ELM_GEN_ITEM_FROM_INLIST(EINA_INLIST_GET(prev)->prev); } else prev = (Elm_Gen_Item *) elm_genlist_item_prev_get(wd->last_selected_item); ->>>>>>> remotes/origin/upstream if (!prev) return EINA_FALSE; _deselect_all_items(wd); -<<<<<<< HEAD - elm_genlist_item_selected_set((Elm_Object_Item *)prev, EINA_TRUE); - elm_genlist_item_show((Elm_Object_Item *)prev); -======= elm_genlist_item_selected_set((Elm_Object_Item *) prev, EINA_TRUE); elm_genlist_item_show((Elm_Object_Item *) prev, ELM_GENLIST_ITEM_SCROLLTO_IN); ->>>>>>> remotes/origin/upstream return EINA_TRUE; } static Eina_Bool _item_single_select_down(Widget_Data *wd) { -<<<<<<< HEAD - Elm_Genlist_Item *next; - if (!wd->selected) - { - next = ELM_GENLIST_ITEM_FROM_INLIST(wd->items); - while ((next) && (next->generation < wd->generation)) - next = ELM_GENLIST_ITEM_FROM_INLIST(EINA_INLIST_GET(next)->next); - } - else next = (Elm_Genlist_Item *) elm_genlist_item_next_get(wd->last_selected_item); -======= Elm_Gen_Item *next; if (!wd->selected) { @@ -820,18 +501,13 @@ _item_single_select_down(Widget_Data *wd) next = ELM_GEN_ITEM_FROM_INLIST(EINA_INLIST_GET(next)->next); } else next = (Elm_Gen_Item *) elm_genlist_item_next_get(wd->last_selected_item); ->>>>>>> remotes/origin/upstream if (!next) return EINA_FALSE; _deselect_all_items(wd); elm_genlist_item_selected_set((Elm_Object_Item *) next, EINA_TRUE); -<<<<<<< HEAD - elm_genlist_item_show((Elm_Object_Item *) next); -======= elm_genlist_item_show((Elm_Object_Item *) next, ELM_GENLIST_ITEM_SCROLLTO_IN); ->>>>>>> remotes/origin/upstream return EINA_TRUE; } @@ -845,11 +521,7 @@ _on_focus_hook(void *data __UNUSED__, { elm_object_signal_emit(wd->obj, "elm,action,focus", "elm"); evas_object_focus_set(wd->obj, EINA_TRUE); -<<<<<<< HEAD - if ((wd->items) && (wd->selected) && (!wd->last_selected_item)) -======= if ((wd->selected) && (!wd->last_selected_item)) ->>>>>>> remotes/origin/upstream wd->last_selected_item = eina_list_data_get(wd->selected); } else @@ -868,10 +540,6 @@ _del_hook(Evas_Object *obj) if (wd->calc_job) ecore_job_del(wd->calc_job); if (wd->update_job) ecore_job_del(wd->update_job); if (wd->queue_idle_enterer) ecore_idle_enterer_del(wd->queue_idle_enterer); -<<<<<<< HEAD - if (wd->changed_job) ecore_job_del(wd->changed_job); -======= ->>>>>>> remotes/origin/upstream if (wd->must_recalc_idler) ecore_idler_del(wd->must_recalc_idler); if (wd->multi_timer) ecore_timer_del(wd->multi_timer); if (wd->mode_type) eina_stringshare_del(wd->mode_type); @@ -884,11 +552,7 @@ _del_pre_hook(Evas_Object *obj) { Widget_Data *wd = elm_widget_data_get(obj); if (!wd) return; -<<<<<<< HEAD - if (wd->edit_mode) elm_genlist_edit_mode_set(wd->obj, EINA_FALSE); -======= if (wd->decorate_mode) elm_genlist_decorate_mode_set(wd->obj, EINA_FALSE); ->>>>>>> remotes/origin/upstream elm_genlist_clear(obj); evas_object_del(wd->pan_smart); wd->pan_smart = NULL; @@ -916,30 +580,18 @@ _theme_hook(Evas_Object *obj) _mirrored_set(obj, elm_widget_mirrored_get(obj)); elm_smart_scroller_object_theme_set(obj, wd->scr, "genlist", "base", elm_widget_style_get(obj)); -<<<<<<< HEAD - // 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); ->>>>>>> remotes/origin/upstream wd->item_width = wd->item_height = 0; wd->group_item_width = wd->group_item_height = 0; wd->minw = wd->minh = wd->realminw = 0; EINA_INLIST_FOREACH(wd->blocks, itb) { Eina_List *l; -<<<<<<< HEAD - Elm_Genlist_Item *it; - - if (itb->realized) _item_block_unrealize(itb); - EINA_LIST_FOREACH(itb->items, l, it) - it->mincalcd = EINA_FALSE; -======= Elm_Gen_Item *it; if (itb->realized) _item_block_unrealize(itb); EINA_LIST_FOREACH(itb->items, l, it) it->item->mincalcd = EINA_FALSE; ->>>>>>> remotes/origin/upstream itb->changed = EINA_TRUE; } @@ -979,11 +631,7 @@ _sizing_eval(Evas_Object *obj) evas_object_size_hint_min_get(wd->scr, &minw, &minh); evas_object_size_hint_max_get(wd->scr, &maxw, &maxh); minh = -1; -<<<<<<< HEAD - if (wd->height_for_width) -======= if (wd->mode == ELM_LIST_COMPRESS) ->>>>>>> remotes/origin/upstream { Evas_Coord vw, vh; @@ -1001,11 +649,7 @@ _sizing_eval(Evas_Object *obj) wd->calc_job = ecore_job_add(_calc_job, wd); } } -<<<<<<< HEAD - if (wd->mode == ELM_LIST_LIMIT) -======= else if (wd->mode == ELM_LIST_LIMIT) ->>>>>>> remotes/origin/upstream { Evas_Coord vmw, vmh; @@ -1040,13 +684,6 @@ _signal_emit_hook(Evas_Object *obj, } static void -<<<<<<< HEAD -_item_highlight(Elm_Genlist_Item *it) -{ - const char *selectraise; - if ((it->wd->no_select) || (it->no_select) || (it->generation < it->wd->generation) || - (it->highlighted) || elm_widget_item_disabled_get(it) || (it->display_only)) -======= _item_highlight(Elm_Gen_Item *it) { const char *selectraise; @@ -1056,7 +693,6 @@ _item_highlight(Elm_Gen_Item *it) (it->highlighted) || elm_widget_item_disabled_get(it) || (it->select_mode == ELM_OBJECT_SELECT_MODE_NONE) || (it->item->mode_view) || (it->select_mode == ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY)) ->>>>>>> remotes/origin/upstream return; edje_object_signal_emit(VIEW(it), "elm,state,selected", "elm"); if (it->edit_obj) edje_object_signal_emit(it->edit_obj, "elm,state,selected", "elm"); @@ -1065,31 +701,18 @@ _item_highlight(Elm_Gen_Item *it) { if (it->edit_obj) evas_object_raise(it->edit_obj); else evas_object_raise(VIEW(it)); -<<<<<<< HEAD -======= if ((it->item->group_item) && (it->item->group_item->realized)) evas_object_raise(it->item->VIEW(group_item)); ->>>>>>> remotes/origin/upstream } it->highlighted = EINA_TRUE; } static void -<<<<<<< HEAD -_item_unhighlight(Elm_Genlist_Item *it) -======= _item_unhighlight(Elm_Gen_Item *it) ->>>>>>> remotes/origin/upstream { if ((it->generation < it->wd->generation) || (!it->highlighted)) return; edje_object_signal_emit(VIEW(it), "elm,state,unselected", "elm"); if (it->edit_obj) edje_object_signal_emit(it->edit_obj, "elm,state,unselected", "elm"); -<<<<<<< HEAD - if (!it->nostacking) - { - if ((it->order_num_in & 0x1) ^ it->stacking_even) evas_object_lower(VIEW(it)); - else evas_object_raise(VIEW(it)); -======= if (!it->item->nostacking) { if ((it->item->order_num_in & 0x1) ^ it->item->stacking_even) @@ -1102,7 +725,6 @@ _item_unhighlight(Elm_Gen_Item *it) if (it->edit_obj) evas_object_raise(it->edit_obj); else evas_object_raise(VIEW(it)); } ->>>>>>> remotes/origin/upstream } it->highlighted = EINA_FALSE; } @@ -1122,11 +744,7 @@ _item_block_position_update(Eina_Inlist *list, int idx) static void _item_position_update(Eina_List *list, int idx) { -<<<<<<< HEAD - Elm_Genlist_Item *it; -======= Elm_Gen_Item *it; ->>>>>>> remotes/origin/upstream Eina_List *l; EINA_LIST_FOREACH(list, l, it) @@ -1137,42 +755,22 @@ _item_position_update(Eina_List *list, int idx) } static void -<<<<<<< HEAD -_item_block_del(Elm_Genlist_Item *it) -{ - Eina_Inlist *il; - Item_Block *itb = it->block; - Eina_Bool block_changed; -======= _item_block_del(Elm_Gen_Item *it) { Eina_Inlist *il; Item_Block *itb = it->item->block; ->>>>>>> remotes/origin/upstream itb->items = eina_list_remove(itb->items, it); itb->count--; itb->changed = EINA_TRUE; -<<<<<<< HEAD - if (!it->wd->reorder_deleted) - { - if (it->wd->calc_job) ecore_job_del(it->wd->calc_job); - it->wd->calc_job = ecore_job_add(_calc_job, it->wd); - } -======= if (it->wd->calc_job) ecore_job_del(it->wd->calc_job); it->wd->calc_job = ecore_job_add(_calc_job, it->wd); ->>>>>>> remotes/origin/upstream if (itb->count < 1) { il = EINA_INLIST_GET(itb); Item_Block *itbn = (Item_Block *)(il->next); if (it->parent) -<<<<<<< HEAD - it->parent->items = eina_list_remove(it->parent->items, it); -======= it->parent->item->items = eina_list_remove(it->parent->item->items, it); ->>>>>>> remotes/origin/upstream else { _item_block_position_update(il->next, itb->position); @@ -1190,19 +788,11 @@ _item_block_del(Elm_Gen_Item *it) Item_Block *itbn = (Item_Block *)(il->next); if ((itbp) && ((itbp->count + itb->count) < itb->wd->max_items_per_block + itb->wd->max_items_per_block/2)) { -<<<<<<< HEAD - Elm_Genlist_Item *it2; - - EINA_LIST_FREE(itb->items, it2) - { - it2->block = itbp; -======= Elm_Gen_Item *it2; EINA_LIST_FREE(itb->items, it2) { it2->item->block = itbp; ->>>>>>> remotes/origin/upstream itbp->items = eina_list_append(itbp->items, it2); itbp->count++; itbp->changed = EINA_TRUE; @@ -1212,25 +802,15 @@ _item_block_del(Elm_Gen_Item *it) it->wd->blocks = eina_inlist_remove(it->wd->blocks, EINA_INLIST_GET(itb)); free(itb); -<<<<<<< HEAD - block_changed = EINA_TRUE; -======= ->>>>>>> remotes/origin/upstream } else if ((itbn) && ((itbn->count + itb->count) < itb->wd->max_items_per_block + itb->wd->max_items_per_block/2)) { while (itb->items) { Eina_List *last = eina_list_last(itb->items); -<<<<<<< HEAD - Elm_Genlist_Item *it2 = last->data; - - it2->block = itbn; -======= Elm_Gen_Item *it2 = last->data; it2->item->block = itbn; ->>>>>>> remotes/origin/upstream itb->items = eina_list_remove_list(itb->items, last); itbn->items = eina_list_prepend(itbn->items, it2); itbn->count++; @@ -1241,31 +821,6 @@ _item_block_del(Elm_Gen_Item *it) it->wd->blocks = eina_inlist_remove(it->wd->blocks, EINA_INLIST_GET(itb)); free(itb); -<<<<<<< HEAD - block_changed = EINA_TRUE; - } - } - } - if (block_changed) - { - it->wd->pan_changed = EINA_TRUE; - evas_object_smart_changed(it->wd->pan_smart); - if (it->wd->calc_job) ecore_job_del(it->wd->calc_job); - it->wd->calc_job = NULL; - } -} - -static void -_item_subitems_clear(Elm_Genlist_Item *it) -{ - if (!it) return; - Eina_List *tl = NULL, *l; - Elm_Object_Item *it2; - - EINA_LIST_FOREACH(it->items, l, it2) - tl = eina_list_append(tl, it2); - -======= } } } @@ -1280,42 +835,16 @@ _item_subitems_clear(Elm_Gen_Item *it) EINA_LIST_FOREACH(it->item->items, l, it2) tl = eina_list_append(tl, it2); ->>>>>>> remotes/origin/upstream EINA_LIST_FREE(tl, it2) elm_object_item_del(it2); } static void -<<<<<<< HEAD -_item_del(Elm_Genlist_Item *it) -======= _item_del(Elm_Gen_Item *it) ->>>>>>> remotes/origin/upstream { Evas_Object *obj = WIDGET(it); evas_event_freeze(evas_object_evas_get(obj)); -<<<<<<< HEAD - elm_genlist_item_subitems_clear((Elm_Object_Item *) it); - if (it->wd->show_item == it) it->wd->show_item = NULL; - if (it->realized) _item_unrealize(it, EINA_FALSE); - if (it->block) _item_block_del(it); - if (it->effect_item_realized) _effect_item_unrealize(it); - if (it->queued) - it->wd->queue = eina_list_remove(it->wd->queue, it); -#ifdef ANCHOR_ITEM - if (it->wd->anchor_item == it) - { - it->wd->anchor_item = ELM_GENLIST_ITEM_FROM_INLIST(EINA_INLIST_GET(it)->next); - if (!it->wd->anchor_item) - it->wd->anchor_item = ELM_GENLIST_ITEM_FROM_INLIST(EINA_INLIST_GET(it)->prev); - } -#endif - if (it->parent) - it->parent->items = eina_list_remove(it->parent->items, it); - if (it->swipe_timer) ecore_timer_del(it->swipe_timer); - _elm_genlist_item_del_serious(it); -======= elm_genlist_item_subitems_clear((Elm_Object_Item *)it); if (it->wd->show_item == it) it->wd->show_item = NULL; if (it->realized) _elm_genlist_item_unrealize(it, EINA_FALSE); @@ -1335,7 +864,6 @@ _item_del(Elm_Gen_Item *it) if (it->item->swipe_timer) ecore_timer_del(it->item->swipe_timer); _elm_genlist_item_del_serious(it); elm_genlist_item_class_unref((Elm_Genlist_Item_Class *)it->itc); ->>>>>>> remotes/origin/upstream evas_event_thaw(evas_object_evas_get(obj)); evas_event_thaw_eval(evas_object_evas_get(obj)); } @@ -1373,61 +901,7 @@ _clear_cb(Widget_Data *wd) } static void -<<<<<<< HEAD -_item_select(Elm_Genlist_Item *it) -{ - Eina_List *l; - Evas_Object *obj; - - if ((it->wd->no_select) || (it->no_select) || (it->generation < it->wd->generation)) return; - if (!it->selected) - { - it->selected = EINA_TRUE; - it->wd->selected = eina_list_append(it->wd->selected, it); - } - else if (!it->wd->always_select) return; - - evas_object_ref(WIDGET(it)); - it->walking++; - it->wd->walking++; - if (it->wd->last_selected_item && - (it != (Elm_Genlist_Item *) it->wd->last_selected_item)) - { - EINA_LIST_FOREACH(((Elm_Genlist_Item *)it->wd->last_selected_item)->content_objs, l, obj) - { - elm_widget_focused_object_clear(obj); - elm_widget_tree_unfocusable_set(obj, EINA_TRUE); - } - ((Elm_Genlist_Item *)it->wd->last_selected_item)->can_focus = EINA_FALSE; - } - if (it->func.func) it->func.func((void *)it->func.data, WIDGET(it), it); - if (it->generation == it->wd->generation) - evas_object_smart_callback_call(WIDGET(it), SIG_SELECTED, it); - it->walking--; - it->wd->walking--; - if ((it->wd->clear_me) && (!it->wd->walking)) - _elm_genlist_clear(WIDGET(it), EINA_TRUE); - else - { - if ((!it->walking) && (it->generation < it->wd->generation)) - { - if (!it->relcount) - { - _item_del(it); - elm_widget_item_free(it); - } - } - else - it->wd->last_selected_item = (Elm_Object_Item *) it; - } - evas_object_unref(WIDGET(it)); -} - -static void -_item_unselect(Elm_Genlist_Item *it) -======= _item_unselect(Elm_Gen_Item *it) ->>>>>>> remotes/origin/upstream { if ((it->generation < it->wd->generation) || (!it->selected)) return; it->selected = EINA_FALSE; @@ -1441,11 +915,7 @@ _mouse_move(void *data, Evas_Object *obj, void *event_info) { -<<<<<<< HEAD - Elm_Genlist_Item *it = data; -======= Elm_Gen_Item *it = data; ->>>>>>> remotes/origin/upstream Evas_Event_Mouse_Move *ev = event_info; Evas_Coord minw = 0, minh = 0, x, y, dx, dy, adx, ady; Evas_Coord ox, oy, ow, oh, it_scrl_y, y_pos; @@ -1455,11 +925,7 @@ _mouse_move(void *data, if (!it->wd->on_hold) { it->wd->on_hold = EINA_TRUE; -<<<<<<< HEAD - if ((!it->wd->wasselected) && (!it->renamed)) -======= if ((!it->wd->wasselected) && (!it->flipped)) ->>>>>>> remotes/origin/upstream { _item_unhighlight(it); _item_unselect(it); @@ -1506,45 +972,26 @@ _mouse_move(void *data, it_scrl_y = ev->cur.canvas.y - it->wd->reorder_it->dy; if (!it->wd->reorder_start_y) -<<<<<<< HEAD - it->wd->reorder_start_y = it->block->y + it->y; - - if (it_scrl_y < oy) - y_pos = oy; - else if (it_scrl_y + it->wd->reorder_it->h > oy + oh) - y_pos = oy + oh - it->wd->reorder_it->h; -======= it->wd->reorder_start_y = it->item->block->y + it->y; if (it_scrl_y < oy) y_pos = oy; else if (it_scrl_y + it->wd->reorder_it->item->h > oy + oh) y_pos = oy + oh - it->wd->reorder_it->item->h; ->>>>>>> remotes/origin/upstream else y_pos = it_scrl_y; if (it->edit_obj) -<<<<<<< HEAD - _item_position(it, it->edit_obj, it->scrl_x, y_pos); - else - _item_position(it, VIEW(it), it->scrl_x, y_pos); -======= _item_position(it, it->edit_obj, it->item->scrl_x, y_pos); else _item_position(it, VIEW(it), it->item->scrl_x, y_pos); ->>>>>>> remotes/origin/upstream if (it->wd->calc_job) ecore_job_del(it->wd->calc_job); it->wd->calc_job = ecore_job_add(_calc_job, it->wd); } return; } -<<<<<<< HEAD - if (!it->display_only) -======= if (it->select_mode != ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY) ->>>>>>> remotes/origin/upstream elm_coords_finger_size_adjust(1, &minw, 1, &minh); evas_object_geometry_get(obj, &x, &y, NULL, NULL); x = ev->cur.canvas.x - x; @@ -1565,22 +1012,14 @@ _mouse_move(void *data, ecore_timer_del(it->long_timer); it->long_timer = NULL; } -<<<<<<< HEAD - if ((!it->wd->wasselected) && (!it->renamed)) -======= if (!it->wd->wasselected) ->>>>>>> remotes/origin/upstream { _item_unhighlight(it); _item_unselect(it); } if (dy < 0) { -<<<<<<< HEAD - if ((ady > adx) && (!it->wd->drag_started)) -======= if (ady > adx) ->>>>>>> remotes/origin/upstream evas_object_smart_callback_call(WIDGET(it), SIG_DRAG_START_UP, it); else @@ -1595,11 +1034,7 @@ _mouse_move(void *data, } else { -<<<<<<< HEAD - if ((ady > adx) && (!it->wd->drag_started)) -======= if (ady > adx) ->>>>>>> remotes/origin/upstream evas_object_smart_callback_call(WIDGET(it), SIG_DRAG_START_DOWN, it); else @@ -1618,17 +1053,6 @@ _mouse_move(void *data, static Eina_Bool _long_press(void *data) { -<<<<<<< HEAD - Elm_Genlist_Item *it = data, *it_tmp; - Eina_List *list, *l; - - it->long_timer = NULL; - if (elm_widget_item_disabled_get(it) || (it->dragging) || (it->display_only) || (it->wd->rename_it)) - return ECORE_CALLBACK_CANCEL; - it->wd->longpressed = EINA_TRUE; - evas_object_smart_callback_call(WIDGET(it), SIG_LONGPRESSED, it); - if ((it->wd->reorder_mode) && (it->flags != ELM_GENLIST_ITEM_GROUP)) -======= Elm_Gen_Item *it = data, *it_tmp; Eina_List *list, *l; @@ -1639,7 +1063,6 @@ _long_press(void *data) it->wd->longpressed = EINA_TRUE; evas_object_smart_callback_call(WIDGET(it), SIG_LONGPRESSED, it); if ((it->wd->reorder_mode) && (!it->group)) ->>>>>>> remotes/origin/upstream { it->wd->reorder_it = it; it->wd->reorder_start_y = 0; @@ -1656,28 +1079,6 @@ _long_press(void *data) { if (it != it_tmp) _item_unselect(it_tmp); } -<<<<<<< HEAD - if (it->items) - { - EINA_LIST_FOREACH(it->items, l, it_tmp) - { - if (elm_genlist_item_expanded_get((Elm_Object_Item *) it_tmp)) - { - elm_genlist_item_expanded_set((Elm_Object_Item *)it_tmp, - EINA_FALSE); - return ECORE_CALLBACK_RENEW; - } - } - } - if (elm_genlist_item_expanded_get((Elm_Object_Item *) it)) - { - elm_genlist_item_expanded_set((Elm_Object_Item *) it, EINA_FALSE); - return ECORE_CALLBACK_RENEW; - } - if (it->edit_obj) - edje_object_signal_emit(it->edit_obj, "elm,action,item,reorder_start", "elm"); - else -======= if (elm_genlist_item_expanded_get((Elm_Object_Item *)it)) { elm_genlist_item_expanded_set((Elm_Object_Item *)it, EINA_FALSE); @@ -1685,28 +1086,19 @@ _long_press(void *data) } if (!it->wd->decorate_mode) ->>>>>>> remotes/origin/upstream edje_object_signal_emit(VIEW(it), "elm,state,reorder,enabled", "elm"); } return ECORE_CALLBACK_CANCEL; } static void -<<<<<<< HEAD -_swipe(Elm_Genlist_Item *it) -======= _swipe(Elm_Gen_Item *it) ->>>>>>> remotes/origin/upstream { int i, sum = 0; if (!it) return; -<<<<<<< HEAD - if ((it->display_only) || elm_widget_item_disabled_get(it)) return; -======= if ((it->select_mode == ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY) || elm_widget_item_disabled_get(it)) return; ->>>>>>> remotes/origin/upstream it->wd->swipe = EINA_FALSE; for (i = 0; i < it->wd->movements; i++) { @@ -1722,11 +1114,7 @@ _swipe(Elm_Gen_Item *it) static Eina_Bool _swipe_cancel(void *data) { -<<<<<<< HEAD - Elm_Genlist_Item *it = data; -======= Elm_Gen_Item *it = data; ->>>>>>> remotes/origin/upstream if (!it) return ECORE_CALLBACK_CANCEL; it->wd->swipe = EINA_FALSE; @@ -1747,11 +1135,7 @@ _multi_cancel(void *data) static void _multi_touch_gesture_eval(void *data) { -<<<<<<< HEAD - Elm_Genlist_Item *it = data; -======= Elm_Gen_Item *it = data; ->>>>>>> remotes/origin/upstream it->wd->multitouched = EINA_FALSE; if (it->wd->multi_timer) @@ -1816,11 +1200,7 @@ _multi_down(void *data, Evas_Object *obj __UNUSED__, void *event_info) { -<<<<<<< HEAD - Elm_Genlist_Item *it = data; -======= Elm_Gen_Item *it = data; ->>>>>>> remotes/origin/upstream Evas_Event_Multi_Down *ev = event_info; if ((it->wd->multi_device != 0) || (it->wd->multitouched) || (it->wd->multi_timeout)) return; @@ -1846,17 +1226,10 @@ _multi_down(void *data, it->dragging = EINA_FALSE; evas_object_smart_callback_call(WIDGET(it), SIG_DRAG_STOP, it); } -<<<<<<< HEAD - if (it->swipe_timer) - { - ecore_timer_del(it->swipe_timer); - it->swipe_timer = NULL; -======= if (it->item->swipe_timer) { ecore_timer_del(it->item->swipe_timer); it->item->swipe_timer = NULL; ->>>>>>> remotes/origin/upstream } if (it->wd->on_hold) { @@ -1872,11 +1245,7 @@ _multi_up(void *data, Evas_Object *obj __UNUSED__, void *event_info) { -<<<<<<< HEAD - Elm_Genlist_Item *it = data; -======= Elm_Gen_Item *it = data; ->>>>>>> remotes/origin/upstream Evas_Event_Multi_Up *ev = event_info; if (it->wd->multi_device != ev->device) return; @@ -1892,11 +1261,7 @@ _multi_move(void *data, Evas_Object *obj __UNUSED__, void *event_info) { -<<<<<<< HEAD - Elm_Genlist_Item *it = data; -======= Elm_Gen_Item *it = data; ->>>>>>> remotes/origin/upstream Evas_Event_Multi_Move *ev = event_info; if (it->wd->multi_device != ev->device) return; @@ -1910,29 +1275,11 @@ _mouse_down(void *data, Evas_Object *obj, void *event_info) { -<<<<<<< HEAD - Elm_Genlist_Item *it = data; - Evas_Event_Mouse_Down *ev = event_info; - Evas_Coord x, y; - Eina_List *l; - Evas_Object *iobj; - - if (ev->button != 1) return; - if (!it->can_focus) - { - EINA_LIST_FOREACH(it->content_objs, l, iobj) - { - elm_widget_tree_unfocusable_set(iobj, EINA_FALSE); - } - it->can_focus = EINA_TRUE; - } -======= Elm_Gen_Item *it = data; Evas_Event_Mouse_Down *ev = event_info; Evas_Coord x, y; if (ev->button != 1) return; ->>>>>>> remotes/origin/upstream if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) { it->wd->on_hold = EINA_TRUE; @@ -1959,24 +1306,15 @@ _mouse_down(void *data, it->wd->wasselected = it->selected; _item_highlight(it); if (ev->flags & EVAS_BUTTON_DOUBLE_CLICK) -<<<<<<< HEAD - if ((!elm_widget_item_disabled_get(it)) && (!it->display_only)) -======= if ((!elm_widget_item_disabled_get(it)) && (it->select_mode != ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY)) ->>>>>>> remotes/origin/upstream { evas_object_smart_callback_call(WIDGET(it), SIG_CLICKED_DOUBLE, it); evas_object_smart_callback_call(WIDGET(it), SIG_ACTIVATED, it); } if (it->long_timer) ecore_timer_del(it->long_timer); -<<<<<<< HEAD - if (it->swipe_timer) ecore_timer_del(it->swipe_timer); - it->swipe_timer = ecore_timer_add(0.4, _swipe_cancel, it); -======= if (it->item->swipe_timer) ecore_timer_del(it->item->swipe_timer); it->item->swipe_timer = ecore_timer_add(0.4, _swipe_cancel, it); ->>>>>>> remotes/origin/upstream if (it->realized) it->long_timer = ecore_timer_add(it->wd->longpress_timeout, _long_press, it); @@ -1992,11 +1330,7 @@ _mouse_up(void *data, Evas_Object *obj __UNUSED__, void *event_info) { -<<<<<<< HEAD - Elm_Genlist_Item *it = data; -======= Elm_Gen_Item *it = data; ->>>>>>> remotes/origin/upstream Evas_Event_Mouse_Up *ev = event_info; Eina_Bool dragged = EINA_FALSE; @@ -2005,11 +1339,6 @@ _mouse_up(void *data, it->wd->mouse_down = EINA_FALSE; if (it->wd->multitouched) { -<<<<<<< HEAD - // in single selection modes, some multi touching can make multi highlighted items. - // if a item not selected and highlighted, it should be unhighlighted. -======= ->>>>>>> remotes/origin/upstream if ((!it->wd->multi) && (!it->selected) && (it->highlighted)) _item_unhighlight(it); if (it->wd->multi_down) return; _multi_touch_gesture_eval(data); @@ -2028,17 +1357,10 @@ _mouse_up(void *data, evas_object_smart_callback_call(WIDGET(it), SIG_DRAG_STOP, it); dragged = 1; } -<<<<<<< HEAD - if (it->swipe_timer) - { - ecore_timer_del(it->swipe_timer); - it->swipe_timer = NULL; -======= if (it->item->swipe_timer) { ecore_timer_del(it->item->swipe_timer); it->item->swipe_timer = NULL; ->>>>>>> remotes/origin/upstream } if (it->wd->multi_timer) { @@ -2059,11 +1381,7 @@ _mouse_up(void *data, if (it->wd->reorder_rel && (it->wd->reorder_it->parent == it->wd->reorder_rel->parent)) { -<<<<<<< HEAD - if (it_scrl_y <= it->wd->reorder_rel->scrl_y) -======= if (it_scrl_y <= it->wd->reorder_rel->item->scrl_y) ->>>>>>> remotes/origin/upstream _item_move_before(it->wd->reorder_it, it->wd->reorder_rel); else _item_move_after(it->wd->reorder_it, it->wd->reorder_rel); @@ -2073,27 +1391,15 @@ _mouse_up(void *data, if (it->wd->calc_job) ecore_job_del(it->wd->calc_job); it->wd->calc_job = ecore_job_add(_calc_job, it->wd); } -<<<<<<< HEAD - it->wd->reorder_deleted = EINA_FALSE; - edje_object_signal_emit(it->edit_obj, "elm,action,item,reorder_end", "elm"); - it->wd->reorder_it = it->wd->reorder_rel = NULL; - elm_smart_scroller_hold_set(it->wd->scr, EINA_FALSE); - elm_smart_scroller_bounce_allow_set(it->wd->scr, EINA_FALSE, EINA_TRUE); -======= edje_object_signal_emit(VIEW(it), "elm,state,reorder,disabled", "elm"); it->wd->reorder_it = it->wd->reorder_rel = NULL; elm_smart_scroller_hold_set(it->wd->scr, EINA_FALSE); elm_smart_scroller_bounce_allow_set(it->wd->scr, it->wd->h_bounce, it->wd->v_bounce); ->>>>>>> remotes/origin/upstream } if (it->wd->longpressed) { it->wd->longpressed = EINA_FALSE; -<<<<<<< HEAD - if ((!it->wd->wasselected) && (!it->renamed)) -======= if ((!it->wd->wasselected) && (!it->flipped)) ->>>>>>> remotes/origin/upstream { _item_unhighlight(it); _item_unselect(it); @@ -2105,14 +1411,6 @@ _mouse_up(void *data, { if (it->want_unrealize) { -<<<<<<< HEAD - _item_unrealize(it, EINA_FALSE); - if (it->block->want_unrealize) - _item_block_unrealize(it->block); - } - } - if (elm_widget_item_disabled_get(it) || (dragged) || (it->display_only)) -======= _elm_genlist_item_unrealize(it, EINA_FALSE); if (it->item->block->want_unrealize) _item_block_unrealize(it->item->block); @@ -2120,7 +1418,6 @@ _mouse_up(void *data, } if (elm_widget_item_disabled_get(it) || (dragged) || (it->select_mode == ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY)) ->>>>>>> remotes/origin/upstream return; if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return; if (it->wd->multi) @@ -2128,11 +1425,7 @@ _mouse_up(void *data, if (!it->selected) { _item_highlight(it); -<<<<<<< HEAD - _item_select(it); -======= it->sel_cb(it); ->>>>>>> remotes/origin/upstream } else { @@ -2157,11 +1450,7 @@ _mouse_up(void *data, else { const Eina_List *l, *l_next; -<<<<<<< HEAD - Elm_Genlist_Item *it2; -======= Elm_Gen_Item *it2; ->>>>>>> remotes/origin/upstream EINA_LIST_FOREACH_SAFE(it->wd->selected, l, l_next, it2) if (it2 != it) @@ -2173,70 +1462,7 @@ _mouse_up(void *data, //_item_select(it); } _item_highlight(it); -<<<<<<< HEAD - _item_select(it); - } -} - -static void -_mouse_down_scroller(void *data, - Evas *evas __UNUSED__, - Evas_Object *obj __UNUSED__, - void *event_info __UNUSED__) -{ - Widget_Data *wd = elm_widget_data_get(data); - - if (!wd) return; - wd->drag_started = EINA_FALSE; -} - -static void -_mouse_up_scroller(void *data, - Evas *evas __UNUSED__, - Evas_Object *obj __UNUSED__, - void *event_info __UNUSED__) -{ - Widget_Data *wd = elm_widget_data_get(data); - - if (!wd) return; - wd->drag_started = EINA_FALSE; -} - -static void -_mouse_move_scroller(void *data, - Evas *evas __UNUSED__, - Evas_Object *obj __UNUSED__, - void *event_info) -{ - Widget_Data *wd = elm_widget_data_get(data); - Evas_Event_Mouse_Move *ev = event_info; - Evas_Coord minw = 0, minh = 0, dx, dy, adx, ady; - - if (!wd) return; - if (wd->drag_started) return; - - elm_coords_finger_size_adjust(1, &minw, 1, &minh); - dx = ev->cur.canvas.x - ev->prev.canvas.x; - dy = ev->cur.canvas.y - ev->prev.canvas.y; - adx = dx; - ady = dy; - if (adx < 0) adx = -dx; - if (ady < 0) ady = -dy; - if (((ady < minh) && (ady > minh / 2)) && (ady > adx)) - { - if (dy < 0) - { - evas_object_smart_callback_call(data, SIG_DRAG_START_UP, NULL); - wd->drag_started = EINA_TRUE; - } - else - { - evas_object_smart_callback_call(data, SIG_DRAG_START_DOWN, NULL); - wd->drag_started = EINA_TRUE; - } -======= it->sel_cb(it); ->>>>>>> remotes/origin/upstream } } @@ -2246,15 +1472,9 @@ _signal_expand_toggle(void *data, const char *emission __UNUSED__, const char *source __UNUSED__) { -<<<<<<< HEAD - Elm_Genlist_Item *it = data; - - if (it->expanded) -======= Elm_Gen_Item *it = data; if (it->item->expanded) ->>>>>>> remotes/origin/upstream evas_object_smart_callback_call(WIDGET(it), SIG_CONTRACT_REQUEST, it); else evas_object_smart_callback_call(WIDGET(it), SIG_EXPAND_REQUEST, it); @@ -2266,15 +1486,9 @@ _signal_expand(void *data, const char *emission __UNUSED__, const char *source __UNUSED__) { -<<<<<<< HEAD - Elm_Genlist_Item *it = data; - - if (!it->expanded) -======= Elm_Gen_Item *it = data; if (!it->item->expanded) ->>>>>>> remotes/origin/upstream evas_object_smart_callback_call(WIDGET(it), SIG_EXPAND_REQUEST, it); } @@ -2284,15 +1498,9 @@ _signal_contract(void *data, const char *emission __UNUSED__, const char *source __UNUSED__) { -<<<<<<< HEAD - Elm_Genlist_Item *it = data; - - if (it->expanded) -======= Elm_Gen_Item *it = data; if (it->item->expanded) ->>>>>>> remotes/origin/upstream evas_object_smart_callback_call(WIDGET(it), SIG_CONTRACT_REQUEST, it); } @@ -2314,26 +1522,16 @@ _mode_finished_signal_cb(void *data, { if (!data) return; if (!obj) return; -<<<<<<< HEAD - Elm_Genlist_Item *it = data; - if ((it->generation < it->wd->generation) || (!it->realized) || (!it->mode_view)) return; -======= Elm_Gen_Item *it = data; if ((it->generation < it->wd->generation) || (!it->realized) || (!it->item->mode_view)) return; ->>>>>>> remotes/origin/upstream char buf[1024]; Evas *te = evas_object_evas_get(obj); evas_event_freeze(te); -<<<<<<< HEAD - it->nocache = EINA_FALSE; - _mode_item_unrealize(it); -======= it->item->nocache_once = EINA_FALSE; _mode_item_unrealize(it); if (it->item->group_item) evas_object_raise(it->item->VIEW(group_item)); ->>>>>>> remotes/origin/upstream snprintf(buf, sizeof(buf), "elm,state,%s,passive,finished", it->wd->mode_type); edje_object_signal_callback_del_full(obj, buf, "elm", _mode_finished_signal_cb, it); evas_event_thaw(te); @@ -2354,11 +1552,7 @@ _item_cache_clean(Widget_Data *wd) wd->item_cache_count--; if (itc->spacer) evas_object_del(itc->spacer); if (itc->base_view) evas_object_del(itc->base_view); -<<<<<<< HEAD - if (itc->item_style) eina_stringshare_del(itc->item_style); -======= eina_stringshare_del(itc->item_style); ->>>>>>> remotes/origin/upstream free(itc); } evas_event_thaw(evas_object_evas_get(wd->obj)); @@ -2375,11 +1569,7 @@ _item_cache_zero(Widget_Data *wd) } static void -<<<<<<< HEAD -_item_cache_add(Elm_Genlist_Item *it) -======= _item_cache_add(Elm_Gen_Item *it) ->>>>>>> remotes/origin/upstream { Item_Cache *itc; @@ -2409,16 +1599,6 @@ _item_cache_add(Elm_Gen_Item *it) it->spacer = NULL; itc->base_view = VIEW(it); VIEW(it) = NULL; -<<<<<<< HEAD - evas_object_hide(itc->base_view); - evas_object_move(itc->base_view, -9999, -9999); - itc->item_style = eina_stringshare_add(it->itc->item_style); - if (it->flags & ELM_GENLIST_ITEM_SUBITEMS) itc->tree = 1; - itc->compress = (it->wd->compress); - itc->selected = it->selected; - itc->disabled = elm_widget_item_disabled_get(it); - itc->expanded = it->expanded; -======= edje_object_signal_emit(itc->base_view, "elm,state,unselected", "elm"); evas_object_hide(itc->base_view); evas_object_move(itc->base_view, -9999, -9999); @@ -2427,23 +1607,15 @@ _item_cache_add(Elm_Gen_Item *it) itc->selected = it->selected; itc->disabled = elm_widget_item_disabled_get(it); itc->expanded = it->item->expanded; ->>>>>>> remotes/origin/upstream if (it->long_timer) { ecore_timer_del(it->long_timer); it->long_timer = NULL; } -<<<<<<< HEAD - if (it->swipe_timer) - { - ecore_timer_del(it->swipe_timer); - it->swipe_timer = NULL; -======= if (it->item->swipe_timer) { ecore_timer_del(it->item->swipe_timer); it->item->swipe_timer = NULL; ->>>>>>> remotes/origin/upstream } // FIXME: other callbacks? edje_object_signal_callback_del_full(itc->base_view, @@ -2472,33 +1644,20 @@ _item_cache_add(Elm_Gen_Item *it) } static Item_Cache * -<<<<<<< HEAD -_item_cache_find(Elm_Genlist_Item *it) -======= _item_cache_find(Elm_Gen_Item *it) ->>>>>>> remotes/origin/upstream { Item_Cache *itc; Eina_Bool tree = 0; -<<<<<<< HEAD - if (it->flags & ELM_GENLIST_ITEM_SUBITEMS) tree = 1; -======= if (it->item->type & ELM_GENLIST_ITEM_TREE) tree = 1; ->>>>>>> remotes/origin/upstream EINA_INLIST_FOREACH(it->wd->item_cache, itc) { if ((itc->selected) || (itc->disabled) || (itc->expanded)) continue; if ((itc->tree == tree) && -<<<<<<< HEAD - (itc->compress == it->wd->compress) && - (!strcmp(it->itc->item_style, itc->item_style))) -======= (((!it->itc->item_style) && (!itc->item_style)) || (it->itc->item_style && itc->item_style && (!strcmp(it->itc->item_style, itc->item_style))))) ->>>>>>> remotes/origin/upstream { it->wd->item_cache = eina_inlist_remove(it->wd->item_cache, EINA_INLIST_GET(itc)); @@ -2510,15 +1669,9 @@ _item_cache_find(Elm_Gen_Item *it) } static void -<<<<<<< HEAD -_elm_genlist_item_index_update(Elm_Genlist_Item *it) -{ - if (it->position_update || it->block->position_update) -======= _elm_genlist_item_index_update(Elm_Gen_Item *it) { if (it->position_update || it->item->block->position_update) ->>>>>>> remotes/origin/upstream { evas_object_smart_callback_call(WIDGET(it), SIG_INDEX_UPDATE, it); it->position_update = EINA_FALSE; @@ -2526,26 +1679,6 @@ _elm_genlist_item_index_update(Elm_Gen_Item *it) } static void -<<<<<<< HEAD -_elm_genlist_item_odd_even_update(Elm_Genlist_Item *it) -{ - if (!it->nostacking) - { - if ((it->order_num_in & 0x1) ^ it->stacking_even) - evas_object_lower(VIEW(it)); - else - evas_object_raise(VIEW(it)); - } - - if (it->order_num_in & 0x1) - edje_object_signal_emit(VIEW(it), "elm,state,odd", "elm"); - else - edje_object_signal_emit(VIEW(it), "elm,state,even", "elm"); -} - -static void -_elm_genlist_item_state_update(Elm_Genlist_Item *it, Item_Cache *itc) -======= _elm_genlist_item_odd_even_update(Elm_Gen_Item *it) { if (!it->item->nostacking) @@ -2576,53 +1709,22 @@ _elm_genlist_item_odd_even_update(Elm_Gen_Item *it) static void _elm_genlist_item_state_update(Elm_Gen_Item *it, Item_Cache *itc) ->>>>>>> remotes/origin/upstream { if (itc) { if (it->selected != itc->selected) { if (it->selected) -<<<<<<< HEAD - { - edje_object_signal_emit(VIEW(it), - "elm,state,selected", "elm"); - if (it->edit_obj) - edje_object_signal_emit(it->edit_obj, - "elm,state,selected", "elm"); - } -======= edje_object_signal_emit(VIEW(it), "elm,state,selected", "elm"); if (it->edit_obj) edje_object_signal_emit(it->edit_obj, "elm,state,selected", "elm"); ->>>>>>> remotes/origin/upstream } if (elm_widget_item_disabled_get(it) != itc->disabled) { if (elm_widget_item_disabled_get(it)) -<<<<<<< HEAD - { - edje_object_signal_emit(VIEW(it), - "elm,state,disabled", "elm"); - if (it->edit_obj) - edje_object_signal_emit(it->edit_obj, - "elm,state,disabled", "elm"); - } - } - if (it->expanded != itc->expanded) - { - if (it->expanded) - { - edje_object_signal_emit(VIEW(it), - "elm,state,expanded", "elm"); - if (it->edit_obj) - edje_object_signal_emit(it->edit_obj, - "elm,state,expanded", "elm"); - } -======= edje_object_signal_emit(VIEW(it), "elm,state,disabled", "elm"); if (it->edit_obj) @@ -2637,7 +1739,6 @@ _elm_genlist_item_state_update(Elm_Gen_Item *it, Item_Cache *itc) if (it->edit_obj) edje_object_signal_emit(it->edit_obj, "elm,state,expanded", "elm"); ->>>>>>> remotes/origin/upstream } } else @@ -2650,10 +1751,7 @@ _elm_genlist_item_state_update(Elm_Gen_Item *it, Item_Cache *itc) edje_object_signal_emit(it->edit_obj, "elm,state,selected", "elm"); } -<<<<<<< HEAD -======= ->>>>>>> remotes/origin/upstream if (elm_widget_item_disabled_get(it)) { edje_object_signal_emit(VIEW(it), @@ -2662,11 +1760,7 @@ _elm_genlist_item_state_update(Elm_Gen_Item *it, Item_Cache *itc) edje_object_signal_emit(it->edit_obj, "elm,state,disabled", "elm"); } -<<<<<<< HEAD - if (it->expanded) -======= if (it->item->expanded) ->>>>>>> remotes/origin/upstream { edje_object_signal_emit(VIEW(it), "elm,state,expanded", "elm"); @@ -2678,136 +1772,26 @@ _elm_genlist_item_state_update(Elm_Gen_Item *it, Item_Cache *itc) } static void -<<<<<<< HEAD -_content_focused(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +_item_cache_free(Item_Cache *itc) { - Elm_Genlist_Item *it = data; - if (it) it->defer_unrealize = EINA_TRUE; + if (itc->spacer) evas_object_del(itc->spacer); + if (itc->base_view) evas_object_del(itc->base_view); + eina_stringshare_del(itc->item_style); + free(itc); } static void -_content_unfocused(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) -{ - Elm_Genlist_Item *it = data; - if (it) it->defer_unrealize = EINA_FALSE; -} - -static Eina_List * -_item_mode_content_unrealize(Elm_Genlist_Item *it, - Evas_Object *target, - Eina_List **source, - const char *parts, - Eina_List **contents_list) +_item_text_realize(Elm_Gen_Item *it, + Evas_Object *target, + Eina_List **source, + const char *parts) { - Eina_List *res = *contents_list; - - if (it->itc->func.content_get) + if (it->itc->func.text_get) { const Eina_List *l; const char *key; - Evas_Object *ic = NULL; - EINA_LIST_FOREACH(*source, l, key) - { - if (parts && fnmatch(parts, key, FNM_PERIOD)) - continue; - - ic = edje_object_part_swallow_get(target, key); - if (ic) - { - res = eina_list_remove(res, ic); - edje_object_part_unswallow(target, ic); - evas_object_del(ic); - } - } - } - - return res; -} - -static Eina_List * -_item_mode_content_realize(Elm_Genlist_Item *it, - Evas_Object *target, - Eina_List **source, - const char *parts, - Eina_List **contents_list, - const char *contents_part) - -{ - Eina_List *res = NULL; - - if (it->itc->func.content_get) - { - const Eina_List *l; - const char *key; - - *source = elm_widget_stringlist_get(edje_object_data_get(target, contents_part)); - if (parts && (eina_list_count(*source) != eina_list_count(*contents_list))) - res = *contents_list; - EINA_LIST_FOREACH(*source, l, key) - { - if (parts && fnmatch(parts, key, FNM_PERIOD)) - continue; - - Evas_Object *ic = it->itc->func.content_get - ((void *)it->base.data, WIDGET(it), l->data); - - if (ic) - { - res = eina_list_append(res, ic); - edje_object_part_swallow(target, key, ic); - evas_object_show(ic); - elm_widget_sub_object_add(WIDGET(it), ic); - if (it->mode_view || it->wd->edit_mode) - { - if (elm_widget_item_disabled_get(it)) - elm_widget_disabled_set(ic, EINA_TRUE); - } - else if (it->renamed) - { - // FIXME: if entry calcuates its cursor position correctly and conformant works, - // genlist does not need to handle this focus thing. - evas_object_smart_callback_add(ic, "focused", _content_focused, it); - evas_object_smart_callback_add(ic, "unfocused", _content_unfocused, it); - } - } - } - } - - return res; -} - -static void -======= ->>>>>>> remotes/origin/upstream -_item_cache_free(Item_Cache *itc) -{ - if (itc->spacer) evas_object_del(itc->spacer); - if (itc->base_view) evas_object_del(itc->base_view); -<<<<<<< HEAD - if (itc->item_style) eina_stringshare_del(itc->item_style); -======= - eina_stringshare_del(itc->item_style); ->>>>>>> remotes/origin/upstream - free(itc); -} - -static void -<<<<<<< HEAD -_item_text_realize(Elm_Genlist_Item *it, -======= -_item_text_realize(Elm_Gen_Item *it, ->>>>>>> remotes/origin/upstream - Evas_Object *target, - Eina_List **source, - const char *parts) -{ - if (it->itc->func.text_get) - { - const Eina_List *l; - const char *key; - - *source = elm_widget_stringlist_get(edje_object_data_get(target, "texts")); + *source = elm_widget_stringlist_get(edje_object_data_get(target, "texts")); EINA_LIST_FOREACH(*source, l, key) { if (parts && fnmatch(parts, key, FNM_PERIOD)) @@ -2830,17 +1814,10 @@ _item_text_realize(Elm_Gen_Item *it, } static Eina_List * -<<<<<<< HEAD -_item_content_unrealize(Elm_Genlist_Item *it, - Evas_Object *target, - Eina_List **source, - const char *parts) -======= _item_content_unrealize(Elm_Gen_Item *it, Evas_Object *target, Eina_List **source, const char *parts) ->>>>>>> remotes/origin/upstream { Eina_List *res = it->content_objs; @@ -2869,11 +1846,7 @@ _item_content_unrealize(Elm_Gen_Item *it, } static Eina_List * -<<<<<<< HEAD -_item_content_realize(Elm_Genlist_Item *it, -======= _item_content_realize(Elm_Gen_Item *it, ->>>>>>> remotes/origin/upstream Evas_Object *target, Eina_List **source, const char *parts) @@ -2889,11 +1862,7 @@ _item_content_realize(Elm_Gen_Item *it, *source = elm_widget_stringlist_get(edje_object_data_get(target, "contents")); if (parts && (eina_list_count(*source) != eina_list_count(it->content_objs))) -<<<<<<< HEAD - res = it->content_objs; -======= res = it->content_objs; ->>>>>>> remotes/origin/upstream EINA_LIST_FOREACH(*source, l, key) { @@ -2909,10 +1878,6 @@ _item_content_realize(Elm_Gen_Item *it, edje_object_part_swallow(target, key, ic); evas_object_show(ic); elm_widget_sub_object_add(WIDGET(it), ic); -<<<<<<< HEAD - evas_object_event_callback_add(ic, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _changed_size_hints, it); -======= ->>>>>>> remotes/origin/upstream if (elm_widget_item_disabled_get(it)) elm_widget_disabled_set(ic, EINA_TRUE); } @@ -2923,11 +1888,7 @@ _item_content_realize(Elm_Gen_Item *it, } static void -<<<<<<< HEAD -_item_state_realize(Elm_Genlist_Item *it, -======= _item_state_realize(Elm_Gen_Item *it, ->>>>>>> remotes/origin/upstream Evas_Object *target, Eina_List **source, const char *parts) @@ -2961,10 +1922,6 @@ _item_state_realize(Elm_Gen_Item *it, } } -<<<<<<< HEAD -static void -_item_realize(Elm_Genlist_Item *it, -======= static Eina_List * _item_flips_realize(Elm_Gen_Item *it, Evas_Object *target, @@ -3002,7 +1959,6 @@ _item_flips_realize(Elm_Gen_Item *it, static void _item_realize(Elm_Gen_Item *it, ->>>>>>> remotes/origin/upstream int in, Eina_Bool calc) { @@ -3012,38 +1968,16 @@ _item_realize(Elm_Gen_Item *it, Item_Cache *itc = NULL; if (it->generation < it->wd->generation) return; -<<<<<<< HEAD - evas_event_freeze(evas_object_evas_get(it->wd->obj)); - if (it->realized) - { - if (it->order_num_in != in) - { - it->order_num_in = in; -======= //evas_event_freeze(evas_object_evas_get(it->wd->obj)); if (it->realized) { if (it->item->order_num_in != in) { it->item->order_num_in = in; ->>>>>>> remotes/origin/upstream _elm_genlist_item_odd_even_update(it); _elm_genlist_item_state_update(it, NULL); _elm_genlist_item_index_update(it); } -<<<<<<< HEAD - evas_event_thaw(evas_object_evas_get(it->wd->obj)); - evas_event_thaw_eval(evas_object_evas_get(it->wd->obj)); - return; - } - it->order_num_in = in; - if (it->wd->move_effect_mode == ELM_GENLIST_ITEM_MOVE_EFFECT_DELETE) calc = EINA_FALSE; - if ((it->nocache) && (!it->renamed)) - it->nocache = EINA_FALSE; - else - itc = _item_cache_find(it); - if (itc && (!it->wd->effect_mode)) -======= //evas_event_thaw(evas_object_evas_get(it->wd->obj)); //evas_event_thaw_eval(evas_object_evas_get(it->wd->obj)); return; @@ -3055,7 +1989,6 @@ _item_realize(Elm_Gen_Item *it, else if (!it->item->nocache) itc = _item_cache_find(it); if (itc && (!it->wd->tree_effect_enabled)) ->>>>>>> remotes/origin/upstream { VIEW(it) = itc->base_view; itc->base_view = NULL; @@ -3074,40 +2007,21 @@ _item_realize(Elm_Gen_Item *it, evas_object_smart_member_add(VIEW(it), it->wd->pan_smart); elm_widget_sub_object_add(WIDGET(it), VIEW(it)); -<<<<<<< HEAD - if (it->flags & ELM_GENLIST_ITEM_SUBITEMS) - strncpy(buf, "tree", sizeof(buf)); - else strncpy(buf, "item", sizeof(buf)); - if (it->wd->compress) - strncat(buf, "_compress", sizeof(buf) - strlen(buf)); - - strncat(buf, "/", sizeof(buf) - strlen(buf)); - strncat(buf, it->itc->item_style, sizeof(buf) - strlen(buf)); -======= if (it->item->type & ELM_GENLIST_ITEM_TREE) snprintf(buf, sizeof(buf), "tree%s/%s", it->wd->mode == ELM_LIST_COMPRESS ? "_compress" : "", it->itc->item_style ?: "default"); else snprintf(buf, sizeof(buf), "item%s/%s", it->wd->mode == ELM_LIST_COMPRESS ? "_compress" : "", it->itc->item_style ?: "default"); ->>>>>>> remotes/origin/upstream _elm_theme_object_set(WIDGET(it), VIEW(it), "genlist", buf, elm_widget_style_get(WIDGET(it))); stacking_even = edje_object_data_get(VIEW(it), "stacking_even"); if (!stacking_even) stacking_even = "above"; -<<<<<<< HEAD - it->stacking_even = !!strcmp("above", stacking_even); - - stacking = edje_object_data_get(VIEW(it), "stacking"); - if (!stacking) stacking = "yes"; - it->nostacking = !!strcmp("yes", stacking); -======= it->item->stacking_even = !!strcmp("above", stacking_even); stacking = edje_object_data_get(VIEW(it), "stacking"); if (!stacking) stacking = "yes"; it->item->nostacking = !!strcmp("yes", stacking); ->>>>>>> remotes/origin/upstream edje_object_mirrored_set(VIEW(it), elm_widget_mirrored_get(WIDGET(it))); @@ -3122,11 +2036,7 @@ _item_realize(Elm_Gen_Item *it, treesize = edje_object_data_get(VIEW(it), "treesize"); if (treesize) tsize = atoi(treesize); evas_object_size_hint_min_set(it->spacer, -<<<<<<< HEAD - (it->expanded_depth * tsize) * _elm_config->scale, 1); -======= (it->item->expanded_depth * tsize) * _elm_config->scale, 1); ->>>>>>> remotes/origin/upstream edje_object_part_swallow(VIEW(it), "elm.swallow.pad", it->spacer); if (!calc) { @@ -3150,15 +2060,9 @@ _item_realize(Elm_Gen_Item *it, evas_object_event_callback_add(VIEW(it), EVAS_CALLBACK_MULTI_MOVE, _multi_move, it); -<<<<<<< HEAD - if ((!it->edit_obj) &&(it->wd->edit_mode) && - (it->flags != ELM_GENLIST_ITEM_GROUP) && (it->itc->edit_item_style)) - _effect_item_realize(it, EINA_FALSE); -======= if ((it->wd->decorate_mode) && (!it->edit_obj) && (it->item->type != ELM_GENLIST_ITEM_GROUP) && (it->itc->edit_item_style)) _decorate_mode_item_realize(it, EINA_FALSE); ->>>>>>> remotes/origin/upstream _elm_genlist_item_state_update(it, itc); _elm_genlist_item_index_update(it); @@ -3169,21 +2073,6 @@ _item_realize(Elm_Gen_Item *it, ((it->wd->item_width) && (it->wd->group_item_width)))) { /* homogenous genlist shortcut */ -<<<<<<< HEAD - if (!it->mincalcd) - { - if (it->flags & ELM_GENLIST_ITEM_GROUP) - { - it->w = it->minw = it->wd->group_item_width; - it->h = it->minh = it->wd->group_item_height; - } - else - { - it->w = it->minw = it->wd->item_width; - it->h = it->minh = it->wd->item_height; - } - it->mincalcd = EINA_TRUE; -======= if (!it->item->mincalcd) { if (it->group) @@ -3197,61 +2086,10 @@ _item_realize(Elm_Gen_Item *it, it->item->h = it->item->minh = it->wd->item_height; } it->item->mincalcd = EINA_TRUE; ->>>>>>> remotes/origin/upstream } } else { -<<<<<<< HEAD - _item_text_realize(it, VIEW(it), &it->texts, NULL); - it->content_objs = _item_content_realize(it, VIEW(it), &it->contents, NULL); - _item_state_realize(it, VIEW(it), &it->states, NULL); - if (it->itc->func.content_get) // for rename mode - { - const Eina_List *l; - const char *key; - if (it->renamed) - { - edje_object_signal_emit(VIEW(it), "elm,state,rename,enabled", "elm"); - it->contents = - elm_widget_stringlist_get(edje_object_data_get(VIEW(it), "renames")); - EINA_LIST_FOREACH(it->contents, l, key) - { - Evas_Object *ic = it->itc->func.content_get - ((void *)it->base.data, WIDGET(it), l->data); - if (ic) - { - it->content_objs = eina_list_append(it->content_objs, ic); - edje_object_part_swallow(VIEW(it), key, ic); - evas_object_show(ic); - elm_widget_sub_object_add(WIDGET(it), ic); - // FIXME: if entry calcuates its cursor position correctly and conformant works, - // genlist does not need to handle this focus thing. - evas_object_smart_callback_add(ic, "focused", _content_focused, it); - evas_object_smart_callback_add(ic, "unfocused", _content_unfocused, it); - } - } - } - } - if (!it->mincalcd || it->wd->pan_resize || ((it->wd->height_for_width) && (it->w != it->minw))) - { - Evas_Coord mw = -1, mh = -1; - - if (it->wd->height_for_width) mw = it->wd->w; // TODO: Removed this. This was removed from upstream. - - if (!it->display_only) - elm_coords_finger_size_adjust(1, &mw, 1, &mh); - if (it->wd->height_for_width) mw = it->wd->prev_viewport_w; - edje_object_size_min_restricted_calc(VIEW(it), &mw, &mh, mw, - mh); - if (!it->display_only) - elm_coords_finger_size_adjust(1, &mw, 1, &mh); - it->w = it->minw = mw; - it->h = it->minh = mh; - it->mincalcd = EINA_TRUE; - - if ((!it->wd->group_item_width) && (it->flags == ELM_GENLIST_ITEM_GROUP)) -======= /* FIXME: If you see that assert, please notify us and we will clean our mess */ assert(eina_list_count(it->content_objs) == 0); @@ -3281,16 +2119,11 @@ _item_realize(Elm_Gen_Item *it, it->item->mincalcd = EINA_TRUE; if ((!it->wd->group_item_width) && (it->group)) ->>>>>>> remotes/origin/upstream { it->wd->group_item_width = mw; it->wd->group_item_height = mh; } -<<<<<<< HEAD - else if ((!it->wd->item_width) && (it->flags == ELM_GENLIST_ITEM_NONE)) -======= else if ((!it->wd->item_width) && (it->item->type == ELM_GENLIST_ITEM_NONE)) ->>>>>>> remotes/origin/upstream { it->wd->item_width = mw; it->wd->item_height = mh; @@ -3305,11 +2138,7 @@ _item_realize(Elm_Gen_Item *it, it->tooltip.content_cb, it->tooltip.data, NULL); elm_widget_item_tooltip_style_set(it, it->tooltip.style); -<<<<<<< HEAD - //elm_widget_item_tooltip_window_mode_set(it, it->tooltip.free_size); //upstream -======= elm_widget_item_tooltip_window_mode_set(it, it->tooltip.free_size); ->>>>>>> remotes/origin/upstream } if (it->mouse_cursor) @@ -3319,17 +2148,6 @@ _item_realize(Elm_Gen_Item *it, it->want_unrealize = EINA_FALSE; if (itc) _item_cache_free(itc); -<<<<<<< HEAD - evas_event_thaw(evas_object_evas_get(it->wd->obj)); - evas_event_thaw_eval(evas_object_evas_get(it->wd->obj)); - if (!calc) - evas_object_smart_callback_call(WIDGET(it), SIG_REALIZED, it); - if ((!calc) && (it->wd->edit_mode) && (it->flags != ELM_GENLIST_ITEM_GROUP)) - { - if (it->itc->edit_item_style) - { - if (!it->edit_obj) _effect_item_realize(it, EINA_FALSE); -======= //evas_event_thaw(evas_object_evas_get(it->wd->obj)); //evas_event_thaw_eval(evas_object_evas_get(it->wd->obj)); if (!calc) @@ -3340,7 +2158,6 @@ _item_realize(Elm_Gen_Item *it, if (it->itc->edit_item_style) { if (!it->edit_obj) _decorate_mode_item_realize(it, EINA_FALSE); ->>>>>>> remotes/origin/upstream edje_object_message_signal_process(it->edit_obj); } } @@ -3348,29 +2165,9 @@ _item_realize(Elm_Gen_Item *it, } static void -<<<<<<< HEAD -_item_unrealize(Elm_Genlist_Item *it, - Eina_Bool calc) -{ - Evas_Object *content; - - if (!it->realized) return; - if (it->wd->reorder_it == it) return; - if (it->defer_unrealize && !it->updateme) return; - evas_event_freeze(evas_object_evas_get(it->wd->obj)); - if (!calc) - evas_object_smart_callback_call(WIDGET(it), SIG_UNREALIZED, it); - if (it->long_timer) - { - ecore_timer_del(it->long_timer); - it->long_timer = NULL; - } - if (it->nocache) -======= _item_unrealize_cb(Elm_Gen_Item *it) { if (it->item->nocache_once || it->item->nocache) ->>>>>>> remotes/origin/upstream { evas_object_del(VIEW(it)); VIEW(it) = NULL; @@ -3386,29 +2183,12 @@ _item_unrealize_cb(Elm_Gen_Item *it) * _elm_config->scale); _item_cache_add(it); } -<<<<<<< HEAD - elm_widget_stringlist_free(it->texts); - it->texts = NULL; - elm_widget_stringlist_free(it->contents); - it->contents = NULL; - elm_widget_stringlist_free(it->states); - - EINA_LIST_FREE(it->content_objs, content) - evas_object_del(content); -======= ->>>>>>> remotes/origin/upstream _mode_item_unrealize(it); it->states = NULL; it->realized = EINA_FALSE; it->want_unrealize = EINA_FALSE; -<<<<<<< HEAD - evas_event_thaw(evas_object_evas_get(it->wd->obj)); - evas_event_thaw_eval(evas_object_evas_get(it->wd->obj)); - if (it->wd->edit_mode) _effect_item_unrealize(it); -======= if (it->wd->decorate_mode) _decorate_mode_item_unrealize(it); ->>>>>>> remotes/origin/upstream } static Eina_Bool @@ -3417,87 +2197,49 @@ _item_block_recalc(Item_Block *itb, Eina_Bool qadd) { const Eina_List *l; -<<<<<<< HEAD - Elm_Genlist_Item *it; -======= Elm_Gen_Item *it; ->>>>>>> remotes/origin/upstream Evas_Coord minw = 0, minh = 0; Eina_Bool showme = EINA_FALSE, changed = EINA_FALSE; Evas_Coord y = 0; -<<<<<<< HEAD - evas_event_freeze(evas_object_evas_get(itb->wd->obj)); -======= //evas_event_freeze(evas_object_evas_get(itb->wd->obj)); ->>>>>>> remotes/origin/upstream itb->num = in; EINA_LIST_FOREACH(itb->items, l, it) { if (it->generation < it->wd->generation) continue; -<<<<<<< HEAD - showme |= it->showme; -======= showme |= it->item->showme; ->>>>>>> remotes/origin/upstream if (!itb->realized) { if (qadd) { -<<<<<<< HEAD - if (!it->mincalcd) changed = EINA_TRUE; - if (changed) - { - _item_realize(it, in, EINA_TRUE); - _item_unrealize(it, EINA_TRUE); -======= if (!it->item->mincalcd) changed = EINA_TRUE; if (changed) { _item_realize(it, in, EINA_TRUE); _elm_genlist_item_unrealize(it, EINA_TRUE); ->>>>>>> remotes/origin/upstream } } else { _item_realize(it, in, EINA_TRUE); -<<<<<<< HEAD - _item_unrealize(it, EINA_TRUE); -======= _elm_genlist_item_unrealize(it, EINA_TRUE); ->>>>>>> remotes/origin/upstream } } else _item_realize(it, in, EINA_FALSE); -<<<<<<< HEAD - minh += it->minh; - if (minw < it->minw) minw = it->minw; - in++; - it->x = 0; - it->y = y; - y += it->h; -======= minh += it->item->minh; if (minw < it->item->minw) minw = it->item->minw; in++; it->x = 0; it->y = y; y += it->item->h; ->>>>>>> remotes/origin/upstream } itb->minw = minw; itb->minh = minh; itb->changed = EINA_FALSE; itb->position_update = EINA_FALSE; -<<<<<<< HEAD - evas_event_thaw(evas_object_evas_get(itb->wd->obj)); - evas_event_thaw_eval(evas_object_evas_get(itb->wd->obj)); -======= //evas_event_thaw(evas_object_evas_get(itb->wd->obj)); //evas_event_thaw_eval(evas_object_evas_get(itb->wd->obj)); ->>>>>>> remotes/origin/upstream return showme; } @@ -3513,22 +2255,14 @@ static void _item_block_unrealize(Item_Block *itb) { const Eina_List *l; -<<<<<<< HEAD - Elm_Genlist_Item *it; -======= Elm_Gen_Item *it; ->>>>>>> remotes/origin/upstream Eina_Bool dragging = EINA_FALSE; if (!itb->realized) return; evas_event_freeze(evas_object_evas_get(itb->wd->obj)); EINA_LIST_FOREACH(itb->items, l, it) { -<<<<<<< HEAD - if (itb->must_recalc || it->flags != ELM_GENLIST_ITEM_GROUP) -======= if (itb->must_recalc || !it->group) ->>>>>>> remotes/origin/upstream { if (it->dragging) { @@ -3536,11 +2270,7 @@ _item_block_unrealize(Item_Block *itb) it->want_unrealize = EINA_TRUE; } else -<<<<<<< HEAD - _item_unrealize(it, EINA_FALSE); -======= _elm_genlist_item_unrealize(it, EINA_FALSE); ->>>>>>> remotes/origin/upstream } } if (!dragging) @@ -3555,44 +2285,16 @@ _item_block_unrealize(Item_Block *itb) } static int -<<<<<<< HEAD -_get_space_for_reorder_item(Elm_Genlist_Item *it) -{ - Evas_Coord rox, roy, row, roh, oy, oh; - Eina_Bool top = EINA_FALSE; - Elm_Genlist_Item *reorder_it = it->wd->reorder_it; -======= _get_space_for_reorder_item(Elm_Gen_Item *it) { Evas_Coord rox, roy, row, roh, oy, oh; Eina_Bool top = EINA_FALSE; Elm_Gen_Item *reorder_it = it->wd->reorder_it; ->>>>>>> remotes/origin/upstream if (!reorder_it) return 0; evas_object_geometry_get(it->wd->pan_smart, NULL, &oy, NULL, &oh); evas_object_geometry_get(it->wd->VIEW(reorder_it), &rox, &roy, &row, &roh); -<<<<<<< HEAD - if ((it->wd->reorder_start_y < it->block->y) && - (roy - oy + (roh / 2) >= it->block->y - it->wd->pan_y)) - { - it->block->reorder_offset = it->wd->reorder_it->h * -1; - if (it->block->count == 1) - it->wd->reorder_rel = it; - } - else if ((it->wd->reorder_start_y >= it->block->y) && - (roy - oy + (roh / 2) <= it->block->y - it->wd->pan_y)) - { - it->block->reorder_offset = it->wd->reorder_it->h; - } - else - it->block->reorder_offset = 0; - - it->scrl_y += it->block->reorder_offset; - - top = (ELM_RECTS_INTERSECT(it->scrl_x, it->scrl_y, it->w, it->h, -======= if ((it->wd->reorder_start_y < it->item->block->y) && (roy - oy + (roh / 2) >= it->item->block->y - it->wd->pan_y)) { @@ -3611,18 +2313,12 @@ _get_space_for_reorder_item(Elm_Gen_Item *it) it->item->scrl_y += it->item->block->reorder_offset; top = (ELM_RECTS_INTERSECT(it->item->scrl_x, it->item->scrl_y, it->item->w, it->item->h, ->>>>>>> remotes/origin/upstream rox, roy + (roh / 2), row, 1)); if (top) { it->wd->reorder_rel = it; -<<<<<<< HEAD - it->scrl_y += it->wd->reorder_it->h; - return it->wd->reorder_it->h; -======= it->item->scrl_y += it->wd->reorder_it->item->h; return it->wd->reorder_it->item->h; ->>>>>>> remotes/origin/upstream } else return 0; @@ -3631,35 +2327,16 @@ _get_space_for_reorder_item(Elm_Gen_Item *it) static Eina_Bool _reorder_move_animator_cb(void *data) { -<<<<<<< HEAD - Elm_Genlist_Item *it = data; - Eina_Bool down = EINA_FALSE; - double t; - int y, dy = it->h / 10 * _elm_config->scale, diff; -======= Elm_Gen_Item *it = data; Eina_Bool down = EINA_FALSE; double t; int y, dy = it->item->h / 10 * _elm_config->scale, diff; ->>>>>>> remotes/origin/upstream t = ((0.0 > (t = ecore_loop_time_get()-it->wd->start_time)) ? 0.0 : t); if (t <= REORDER_EFFECT_TIME) y = (1 * sin((t / REORDER_EFFECT_TIME) * (M_PI / 2)) * dy); else y = dy; -<<<<<<< HEAD - diff = abs(it->old_scrl_y - it->scrl_y); - if (diff > it->h) y = diff / 2; - if (it->old_scrl_y < it->scrl_y) - { - it->old_scrl_y += y; - down = EINA_TRUE; - } - else if (it->old_scrl_y > it->scrl_y) - { - it->old_scrl_y -= y; -======= diff = abs(it->item->old_scrl_y - it->item->scrl_y); if (diff > it->item->h) y = diff / 2; @@ -3671,22 +2348,10 @@ _reorder_move_animator_cb(void *data) else if (it->item->old_scrl_y > it->item->scrl_y) { it->item->old_scrl_y -= y; ->>>>>>> remotes/origin/upstream down = EINA_FALSE; } if (it->edit_obj) -<<<<<<< HEAD - _item_position(it, it->edit_obj, it->scrl_x, it->old_scrl_y); - else - _item_position(it, VIEW(it), it->scrl_x, it->old_scrl_y); - if ((it->wd->reorder_pan_move) || - (down && it->old_scrl_y >= it->scrl_y) || - (!down && it->old_scrl_y <= it->scrl_y)) - { - it->old_scrl_y = it->scrl_y; - it->move_effect_enabled = EINA_FALSE; -======= _item_position(it, it->edit_obj, it->item->scrl_x, it->item->old_scrl_y); else _item_position(it, VIEW(it), it->item->scrl_x, it->item->old_scrl_y); @@ -3698,7 +2363,6 @@ _reorder_move_animator_cb(void *data) { it->item->old_scrl_y = it->item->scrl_y; it->item->move_effect_enabled = EINA_FALSE; ->>>>>>> remotes/origin/upstream it->wd->reorder_move_animator = NULL; return ECORE_CALLBACK_CANCEL; } @@ -3706,11 +2370,7 @@ _reorder_move_animator_cb(void *data) } static void -<<<<<<< HEAD -_item_position(Elm_Genlist_Item *it, -======= _item_position(Elm_Gen_Item *it, ->>>>>>> remotes/origin/upstream Evas_Object *view, Evas_Coord it_x, Evas_Coord it_y) @@ -3719,11 +2379,7 @@ _item_position(Elm_Gen_Item *it, if (!view) return; evas_event_freeze(evas_object_evas_get(it->wd->obj)); -<<<<<<< HEAD - evas_object_resize(view, it->w, it->h); -======= evas_object_resize(view, it->item->w, it->item->h); ->>>>>>> remotes/origin/upstream evas_object_move(view, it_x, it_y); evas_object_show(view); evas_event_thaw(evas_object_evas_get(it->wd->obj)); @@ -3735,17 +2391,10 @@ _item_block_position(Item_Block *itb, int in) { const Eina_List *l; -<<<<<<< HEAD - Elm_Genlist_Item *it; - Evas_Coord y = 0, ox, oy, ow, oh, cvx, cvy, cvw, cvh; - Evas_Coord minh = 0; - int vis = 0; -======= Elm_Gen_Item *it; Elm_Gen_Item *git; Evas_Coord y = 0, ox, oy, ow, oh, cvx, cvy, cvw, cvh; Eina_Bool vis = EINA_FALSE; ->>>>>>> remotes/origin/upstream evas_event_freeze(evas_object_evas_get(itb->wd->obj)); evas_object_geometry_get(itb->wd->pan_smart, &ox, &oy, &ow, &oh); @@ -3755,80 +2404,6 @@ _item_block_position(Item_Block *itb, { if (it->generation < it->wd->generation) continue; else if (it->wd->reorder_it == it) continue; -<<<<<<< HEAD - - it->x = 0; - it->y = y; - it->w = itb->w; - it->scrl_x = itb->x + it->x - it->wd->pan_x + ox; - it->scrl_y = itb->y + it->y - it->wd->pan_y + oy; - - vis = (ELM_RECTS_INTERSECT(it->scrl_x, it->scrl_y, it->w, it->h, - cvx, cvy, cvw, cvh)); - if ((itb->realized) && (!it->realized)) - { - if (vis) _item_realize(it, in, EINA_FALSE); - } - if (it->realized) - { - if (vis) - { - if (it->wd->reorder_mode) - y += _get_space_for_reorder_item(it); - if ((it->wd->reorder_it) && (it->old_scrl_y != it->scrl_y)) - { - if (!it->move_effect_enabled) - { - it->move_effect_enabled = EINA_TRUE; - it->wd->reorder_move_animator = - ecore_animator_add( - _reorder_move_animator_cb, it); - } - } - if (!it->move_effect_enabled) - if (!it->wd->effect_mode || it->wd->move_effect_mode == ELM_GENLIST_ITEM_MOVE_EFFECT_NONE || ((it->wd->move_effect_mode != ELM_GENLIST_ITEM_MOVE_EFFECT_DELETE) && it->parent == it->wd->expanded_item)) - { - if (it->wd->edit_mode && it->itc->edit_item_style) - { - _item_position(it, it->edit_obj, it->scrl_x, it->scrl_y); - } - else - { - if((!it->wd->effect_mode || it->wd->move_effect_mode == ELM_GENLIST_ITEM_MOVE_EFFECT_NONE) || ((it->wd->move_effect_mode != ELM_GENLIST_ITEM_MOVE_EFFECT_NONE) && (it->old_scrl_y == it->scrl_y))) - { - if (it->mode_view) - _item_position(it, it->mode_view, it->scrl_x, - it->scrl_y); - else - _item_position(it, VIEW(it), it->scrl_x, - it->scrl_y); - } - else - { - evas_object_resize(VIEW(it), it->w, it->h); - evas_object_move(VIEW(it), it->scrl_x, it->scrl_y); - evas_object_hide(VIEW(it)); - } - } - } - } - else - { - if ((!it->dragging && (!it->wd->item_moving_effect_timer)) || - (it->wd->expanded_item && (it->wd->expanded_item->block != itb))) - _item_unrealize(it, EINA_FALSE); - } - } - in++; - if (!it->wd->effect_mode || it->wd->move_effect_mode == ELM_GENLIST_ITEM_MOVE_EFFECT_NONE || ((it->wd->move_effect_mode != ELM_GENLIST_ITEM_MOVE_EFFECT_DELETE) && it->parent == it->wd->expanded_item)) - { - it->old_scrl_y = it->scrl_y; - } - y += it->h; - minh += it->minh; - } - if (!itb->wd->reorder_it) itb->minh = minh; -======= it->x = 0; it->y = y; it->item->w = itb->w; @@ -3900,22 +2475,11 @@ _item_block_position(Item_Block *itb, } y += it->item->h; } ->>>>>>> remotes/origin/upstream evas_event_thaw(evas_object_evas_get(itb->wd->obj)); evas_event_thaw_eval(evas_object_evas_get(itb->wd->obj)); } static void -<<<<<<< HEAD -_changed_size_hints(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) -{ - Elm_Genlist_Item *it = data; - if (!it) return; - it->mincalcd = EINA_FALSE; - it->block->changeme = EINA_TRUE; - if (it->wd->changed_job) ecore_job_del(it->wd->changed_job); - it->wd->changed_job = ecore_job_add(_changed_job, it->wd); -======= _group_items_recalc(void *data) { Widget_Data *wd = data; @@ -3942,7 +2506,6 @@ _group_items_recalc(void *data) } evas_event_thaw(evas_object_evas_get(wd->obj)); evas_event_thaw_eval(evas_object_evas_get(wd->obj)); ->>>>>>> remotes/origin/upstream } static Eina_Bool @@ -3958,17 +2521,6 @@ _must_recalc_idler(void *data) static void _scroll_item(Widget_Data *wd) { -<<<<<<< HEAD - Elm_Genlist_Item *it = NULL; - Evas_Coord ow, oh, dx = 0, dy = 0, dw = 0, dh = 0; - if (!wd->show_item) return; - - evas_object_geometry_get(wd->pan_smart, NULL, NULL, &ow, &oh); - it = wd->show_item; - dx = it->x + it->block->x; - dy = it->y + it->block->y; - dw = it->block->w; -======= Elm_Gen_Item *it = NULL; Evas_Coord gith = 0; Evas_Coord ow, oh, dx = 0, dy = 0, dw = 0, dh = 0; @@ -3978,39 +2530,19 @@ _scroll_item(Widget_Data *wd) dx = it->x + it->item->block->x; dy = it->y + it->item->block->y; dw = it->item->block->w; ->>>>>>> remotes/origin/upstream dh = oh; switch (wd->scrollto_type) { case ELM_GENLIST_ITEM_SCROLLTO_TOP: -<<<<<<< HEAD - break; - case ELM_GENLIST_ITEM_SCROLLTO_MIDDLE: - dy += (it->h / 2 - oh / 2); -======= if (it->item->group_item) gith = it->item->group_item->item->h; dy -= gith; break; case ELM_GENLIST_ITEM_SCROLLTO_MIDDLE: dy += (it->item->h / 2 - oh / 2); ->>>>>>> remotes/origin/upstream break; case ELM_GENLIST_ITEM_SCROLLTO_IN: default: if ((wd->expanded_item) && -<<<<<<< HEAD - ((wd->show_item->y + wd->show_item->block->y + wd->show_item->h) - - (wd->expanded_item->y + wd->expanded_item->block->y) > oh)) - { - it = wd->expanded_item; - dx = it->x + it->block->x; - dy = it->y + it->block->y; - dw = it->block->w; - } - else - { - dh = it->h; -======= ((wd->show_item->y + wd->show_item->item->block->y + wd->show_item->item->h) - (wd->expanded_item->y + wd->expanded_item->item->block->y) > oh)) { @@ -4026,7 +2558,6 @@ _scroll_item(Widget_Data *wd) gith = it->item->group_item->item->h; dy -= gith; dh = it->item->h; ->>>>>>> remotes/origin/upstream } break; } @@ -4035,11 +2566,7 @@ _scroll_item(Widget_Data *wd) else elm_smart_scroller_child_region_show(wd->scr, dx, dy, dw, dh); -<<<<<<< HEAD - it->showme = EINA_FALSE; -======= it->item->showme = EINA_FALSE; ->>>>>>> remotes/origin/upstream wd->show_item = NULL; wd->auto_scroll_enabled = EINA_FALSE; wd->check_scroll = EINA_FALSE; @@ -4053,20 +2580,10 @@ _calc_job(void *data) Evas_Coord minw = -1, minh = 0, y = 0, ow, dy = 0, vw; Evas_Coord pan_w = 0, pan_h = 0; int in = 0; -<<<<<<< HEAD - double t0, t; - Eina_Bool minw_change = EINA_FALSE; - Eina_Bool did_must_recalc = EINA_FALSE; - if (!wd) return; - ELM_CHECK_WIDTYPE(wd->obj,widtype); - - t0 = ecore_time_get(); -======= Eina_Bool minw_change = EINA_FALSE; Eina_Bool did_must_recalc = EINA_FALSE; if (!wd) return; ->>>>>>> remotes/origin/upstream evas_object_geometry_get(wd->pan_smart, NULL, NULL, &ow, &wd->h); elm_smart_scroller_child_viewport_size_get(wd->scr, &vw, NULL); @@ -4090,15 +2607,9 @@ _calc_job(void *data) if (itb->must_recalc) { Eina_List *l; -<<<<<<< HEAD - Elm_Genlist_Item *it; - EINA_LIST_FOREACH(itb->items, l, it) - if (it->mincalcd) it->mincalcd = EINA_FALSE; -======= Elm_Gen_Item *it; EINA_LIST_FOREACH(itb->items, l, it) if (it->item->mincalcd) it->item->mincalcd = EINA_FALSE; ->>>>>>> remotes/origin/upstream itb->changed = EINA_TRUE; if (itb->must_recalc) did_must_recalc = EINA_TRUE; if (itb->realized) _item_block_unrealize(itb); @@ -4125,11 +2636,7 @@ _calc_job(void *data) itb->h = itb->minh; y += itb->h; in += itb->count; -<<<<<<< HEAD - if ((showme) && (wd->show_item) && (!wd->show_item->queued)) -======= if ((showme) && (wd->show_item) && (!wd->show_item->item->queued)) ->>>>>>> remotes/origin/upstream wd->check_scroll = EINA_TRUE; } if (minw_change) @@ -4153,41 +2660,21 @@ _calc_job(void *data) { wd->minw = minw; wd->minh = minh; -<<<<<<< HEAD - if (wd->move_effect_mode != ELM_GENLIST_ITEM_MOVE_EFFECT_DELETE) - evas_object_smart_callback_call(wd->pan_smart, "changed", NULL); - _sizing_eval(wd->obj); -#ifdef ANCHOR_ITEM - if ((wd->anchor_item) && (wd->anchor_item->block) && (!wd->auto_scroll_enabled)) - { - Elm_Genlist_Item *it; -======= evas_object_smart_callback_call(wd->pan_smart, "changed", NULL); _sizing_eval(wd->obj); if ((wd->anchor_item) && (wd->anchor_item->item->block) && (!wd->auto_scroll_enabled)) { Elm_Gen_Item *it; ->>>>>>> remotes/origin/upstream Evas_Coord it_y; it = wd->anchor_item; it_y = wd->anchor_y; elm_smart_scroller_child_pos_set(wd->scr, wd->pan_x, -<<<<<<< HEAD - it->block->y + it->y + it_y); - wd->anchor_item = it; - wd->anchor_y = it_y; - } -#endif - } - t = ecore_time_get(); -======= it->item->block->y + it->y + it_y); wd->anchor_item = it; wd->anchor_y = it_y; } } ->>>>>>> remotes/origin/upstream if (did_must_recalc) { if (!wd->must_recalc_idler) @@ -4211,21 +2698,10 @@ _calc_job(void *data) dy = 0; break; } -<<<<<<< HEAD - - if (wd->show_item) - { - if ((pan_w > (wd->show_item->x + wd->show_item->block->x)) && - (pan_h > (wd->show_item->y + wd->show_item->block->y + dy))) - { - _scroll_item(wd); - } -======= if ((pan_w > (wd->show_item->x + wd->show_item->item->block->x)) && (pan_h > (wd->show_item->y + wd->show_item->item->block->y + dy))) { _scroll_item(wd); ->>>>>>> remotes/origin/upstream } } wd->calc_job = NULL; @@ -4250,11 +2726,7 @@ _update_job(void *data) EINA_INLIST_FOREACH(wd->blocks, itb) { Evas_Coord itminw, itminh; -<<<<<<< HEAD - Elm_Genlist_Item *it; -======= Elm_Gen_Item *it; ->>>>>>> remotes/origin/upstream if (!itb->updateme) { @@ -4267,16 +2739,6 @@ _update_job(void *data) recalc = EINA_FALSE; EINA_LIST_FOREACH(itb->items, l2, it) { -<<<<<<< HEAD - if (it->updateme) - { - itminw = it->minw; - itminh = it->minh; - - if (it->realized) - { - _item_unrealize(it, EINA_FALSE); -======= if (it->item->updateme) { itminw = it->item->minw; @@ -4286,25 +2748,16 @@ _update_job(void *data) if (it->realized) { _elm_genlist_item_unrealize(it, EINA_FALSE); ->>>>>>> remotes/origin/upstream _item_realize(it, num, EINA_FALSE); position = EINA_TRUE; } else { _item_realize(it, num, EINA_TRUE); -<<<<<<< HEAD - _item_unrealize(it, EINA_TRUE); - } - if ((it->minw != itminw) || (it->minh != itminh)) - recalc = EINA_TRUE; - it->updateme = EINA_FALSE; -======= _elm_genlist_item_unrealize(it, EINA_TRUE); } if ((it->item->minw != itminw) || (it->item->minh != itminh)) recalc = EINA_TRUE; ->>>>>>> remotes/origin/upstream } num++; } @@ -4327,139 +2780,33 @@ _update_job(void *data) } static void -<<<<<<< HEAD -_changed_job(void *data) +_pan_set(Evas_Object *obj, + Evas_Coord x, + Evas_Coord y) { - Widget_Data *wd = data; Eina_List *l2; + Pan *sd = evas_object_smart_data_get(obj); Item_Block *itb; - int num, num0, position = 0; - Eina_Bool width_changed = EINA_FALSE, height_changed = EINA_FALSE; - if (!wd) return; - wd->changed_job = NULL; - num = 0; - EINA_INLIST_FOREACH(wd->blocks, itb) - { - Evas_Coord itminw, itminh; - Elm_Genlist_Item *it; - if (!itb->changeme) + if (!sd) return; + // Evas_Coord ow, oh; + // evas_object_geometry_get(obj, NULL, NULL, &ow, &oh); + // ow = sd->wd->minw - ow; + // if (ow < 0) ow = 0; + // oh = sd->wd->minh - oh; + // if (oh < 0) oh = 0; + // if (x < 0) x = 0; + // if (y < 0) y = 0; + // if (x > ow) x = ow; + // if (y > oh) y = oh; + if ((x == sd->wd->pan_x) && (y == sd->wd->pan_y)) return; + sd->wd->pan_x = x; + sd->wd->pan_y = y; + + EINA_INLIST_FOREACH(sd->wd->blocks, itb) + { + if ((itb->y + itb->h) > y) { - num += itb->count; - if (position) - _item_block_position(itb, num); - continue; - } - num0 = num; - width_changed = height_changed = EINA_FALSE; - EINA_LIST_FOREACH(itb->items, l2, it) - { - if ((!it->mincalcd) && (it->realized)) - { - Evas_Coord mw = -1, mh = -1; - itminw = it->minw; - itminh = it->minh; - - if (it->wd->height_for_width) mw = it->wd->w; - if (!it->display_only) - elm_coords_finger_size_adjust(1, &mw, 1, &mh); - if (it->wd->height_for_width) mw = it->wd->prev_viewport_w; - edje_object_size_min_restricted_calc(VIEW(it), &mw, &mh, mw, mh); - if (!it->display_only) - elm_coords_finger_size_adjust(1, &mw, 1, &mh); - if (mw > itb->w) - width_changed = EINA_TRUE; - else - mw = itb->w; - it->w = it->minw = mw; - it->h = it->minh = mh; - it->mincalcd = EINA_TRUE; - - //if ((it->minw != itminw) || (it->minh != itminh)) - //if ((it->minh != itminh)) - // recalc = 1; - if ((it->minw != itminw)) - width_changed = EINA_TRUE; - if ((it->minh != itminh)) - height_changed = EINA_TRUE; - - if ((!it->wd->group_item_width) && (it->flags == ELM_GENLIST_ITEM_GROUP)) - { - it->wd->group_item_width = mw; - it->wd->group_item_height = mh; - } - else if ((!it->wd->item_width) && (it->flags == ELM_GENLIST_ITEM_NONE)) - { - it->wd->item_width = mw; - it->wd->item_height = mh; - } - } - num++; - } - itb->changeme = EINA_FALSE; - // TODO: why this is separated. - if (height_changed) - { - position = 1; - itb->changed = EINA_TRUE; - _item_block_recalc(itb, num0, 0); - _item_block_position(itb, num0); - } - else if (width_changed) - { - _item_block_position(itb, num0); - } - } - if (position) - { - if (wd->calc_job) ecore_job_del(wd->calc_job); - wd->calc_job = ecore_job_add(_calc_job, wd); - } -} - -static void -======= ->>>>>>> remotes/origin/upstream -_pan_set(Evas_Object *obj, - Evas_Coord x, - Evas_Coord y) -{ - Pan *sd = evas_object_smart_data_get(obj); -<<<<<<< HEAD -#ifdef ANCHOR_ITEM - Item_Block *itb; -#endif -======= - Item_Block *itb; ->>>>>>> remotes/origin/upstream - - if (!sd) return; - // Evas_Coord ow, oh; - // evas_object_geometry_get(obj, NULL, NULL, &ow, &oh); - // ow = sd->wd->minw - ow; - // if (ow < 0) ow = 0; - // oh = sd->wd->minh - oh; - // if (oh < 0) oh = 0; - // if (x < 0) x = 0; - // if (y < 0) y = 0; - // if (x > ow) x = ow; - // if (y > oh) y = oh; - if ((x == sd->wd->pan_x) && (y == sd->wd->pan_y)) return; - sd->wd->pan_x = x; - sd->wd->pan_y = y; - -<<<<<<< HEAD -#ifdef ANCHOR_ITEM -======= ->>>>>>> remotes/origin/upstream - EINA_INLIST_FOREACH(sd->wd->blocks, itb) - { - if ((itb->y + itb->h) > y) - { -<<<<<<< HEAD - Elm_Genlist_Item *it; -======= Elm_Gen_Item *it; ->>>>>>> remotes/origin/upstream Eina_List *l2; EINA_LIST_FOREACH(itb->items, l2, it) @@ -4474,10 +2821,6 @@ _pan_set(Evas_Object *obj, } } done: -<<<<<<< HEAD -#endif -======= ->>>>>>> remotes/origin/upstream if (!sd->wd->reorder_move_animator) evas_object_smart_changed(obj); } @@ -4581,15 +2924,9 @@ _pan_resize(Evas_Object *obj, if (!sd) return; evas_object_geometry_get(obj, NULL, NULL, &ow, &oh); if ((ow == w) && (oh == h)) return; -<<<<<<< HEAD - if ((sd->wd->height_for_width) && (ow != w)) - { - sd->wd->pan_resize = EINA_TRUE; -======= if ((sd->wd->mode == ELM_LIST_COMPRESS) && (ow != w)) { /* fix me later */ ->>>>>>> remotes/origin/upstream if (sd->resize_job) ecore_job_del(sd->resize_job); sd->resize_job = ecore_job_add(_pan_resize_job, sd); } @@ -4597,13 +2934,10 @@ _pan_resize(Evas_Object *obj, evas_object_smart_changed(obj); if (sd->wd->calc_job) ecore_job_del(sd->wd->calc_job); sd->wd->calc_job = NULL; -<<<<<<< HEAD -======= /* OLD if (sd->wd->calc_job) ecore_job_del(sd->wd->calc_job); sd->wd->calc_job = ecore_job_add(_calc_job, sd->wd); */ ->>>>>>> remotes/origin/upstream } static void @@ -4613,11 +2947,7 @@ _pan_calculate(Evas_Object *obj) Item_Block *itb; Evas_Coord ox, oy, ow, oh, cvx, cvy, cvw, cvh; int in = 0; -<<<<<<< HEAD - Elm_Genlist_Item *git; -======= Elm_Gen_Item *git; ->>>>>>> remotes/origin/upstream Eina_List *l; if (!sd) return; @@ -4630,16 +2960,11 @@ _pan_calculate(Evas_Object *obj) } evas_object_geometry_get(obj, &ox, &oy, &ow, &oh); -<<<<<<< HEAD - sd->wd->prev_viewport_w = ow; - evas_output_viewport_get(evas_object_evas_get(obj), &cvx, &cvy, &cvw, &cvh); -======= evas_output_viewport_get(evas_object_evas_get(obj), &cvx, &cvy, &cvw, &cvh); EINA_LIST_FOREACH(sd->wd->group_items, l, git) { git->item->want_realize = EINA_FALSE; } ->>>>>>> remotes/origin/upstream EINA_INLIST_FOREACH(sd->wd->blocks, itb) { itb->w = sd->wd->minw; @@ -4649,17 +2974,7 @@ _pan_calculate(Evas_Object *obj) cvx, cvy, cvw, cvh)) { if ((!itb->realized) || (itb->changed)) -<<<<<<< HEAD - { - _item_block_realize(itb); - - if (sd->wd->calc_job) ecore_job_del(sd->wd->calc_job); - sd->wd->calc_job = NULL; - _calc_job(sd->wd); - } -======= _item_block_realize(itb); ->>>>>>> remotes/origin/upstream _item_block_position(itb, in); } else @@ -4668,15 +2983,6 @@ _pan_calculate(Evas_Object *obj) } in += itb->count; } -<<<<<<< HEAD - - if ((sd->wd->reorder_mode) && (sd->wd->reorder_it)) - { - if (sd->wd->pan_y != sd->wd->reorder_old_pan_y) - sd->wd->reorder_pan_move = EINA_TRUE; - else sd->wd->reorder_pan_move = EINA_FALSE; - evas_object_raise(sd->wd->reorder_it->edit_obj); -======= if ((!sd->wd->reorder_it) || (sd->wd->reorder_pan_move)) _group_items_recalc(sd->wd); if ((sd->wd->reorder_mode) && (sd->wd->reorder_it)) @@ -4685,32 +2991,10 @@ _pan_calculate(Evas_Object *obj) sd->wd->reorder_pan_move = EINA_TRUE; else sd->wd->reorder_pan_move = EINA_FALSE; evas_object_raise(sd->wd->VIEW(reorder_it)); ->>>>>>> remotes/origin/upstream sd->wd->reorder_old_pan_y = sd->wd->pan_y; sd->wd->start_time = ecore_loop_time_get(); } -<<<<<<< HEAD - if (sd->wd->effect_mode && - ((sd->wd->move_effect_mode == ELM_GENLIST_ITEM_MOVE_EFFECT_EXPAND) || - (sd->wd->move_effect_mode == ELM_GENLIST_ITEM_MOVE_EFFECT_CONTRACT) || - (sd->wd->move_effect_mode == ELM_GENLIST_ITEM_MOVE_EFFECT_DELETE))) - { - if (!sd->wd->item_moving_effect_timer) - { - if (sd->wd->move_effect_mode != ELM_GENLIST_ITEM_MOVE_EFFECT_DELETE) - _item_flip_effect_show(sd->wd->expanded_item); - - evas_object_raise(sd->wd->alpha_bg); - evas_object_show(sd->wd->alpha_bg); - elm_smart_scroller_bounce_animator_disabled_set(sd->wd->scr, EINA_TRUE); - sd->wd->start_time = current_time_get(); - sd->wd->item_moving_effect_timer = ecore_animator_add(_item_moving_effect_timer_cb, sd->wd); - } - } - else _item_auto_scroll(sd->wd); - sd->wd->pan_resize = EINA_FALSE; -======= if (sd->wd->tree_effect_enabled && (sd->wd->move_effect_mode != ELM_GENLIST_TREE_EFFECT_NONE)) { if (!sd->wd->item_moving_effect_timer) @@ -4725,7 +3009,6 @@ _pan_calculate(Evas_Object *obj) else _item_auto_scroll(sd->wd); ->>>>>>> remotes/origin/upstream evas_event_thaw(evas_object_evas_get(obj)); evas_event_thaw_eval(evas_object_evas_get(obj)); } @@ -4819,13 +3102,8 @@ _scr_drag_stop(void *data, static void _edge_left(void *data, -<<<<<<< HEAD - Evas_Object *scr __UNUSED__, - void *event_info __UNUSED__) -======= Evas_Object *scr __UNUSED__, void *event_info __UNUSED__) ->>>>>>> remotes/origin/upstream { Evas_Object *obj = data; evas_object_smart_callback_call(obj, SIG_EDGE_LEFT, NULL); @@ -4833,13 +3111,8 @@ _edge_left(void *data, static void _edge_right(void *data, -<<<<<<< HEAD - Evas_Object *scr __UNUSED__, - void *event_info __UNUSED__) -======= Evas_Object *scr __UNUSED__, void *event_info __UNUSED__) ->>>>>>> remotes/origin/upstream { Evas_Object *obj = data; evas_object_smart_callback_call(obj, SIG_EDGE_RIGHT, NULL); @@ -4847,13 +3120,8 @@ _edge_right(void *data, static void _edge_top(void *data, -<<<<<<< HEAD - Evas_Object *scr __UNUSED__, - void *event_info __UNUSED__) -======= Evas_Object *scr __UNUSED__, void *event_info __UNUSED__) ->>>>>>> remotes/origin/upstream { Evas_Object *obj = data; evas_object_smart_callback_call(obj, SIG_EDGE_TOP, NULL); @@ -4861,85 +3129,14 @@ _edge_top(void *data, static void _edge_bottom(void *data, -<<<<<<< HEAD - Evas_Object *scr __UNUSED__, - void *event_info __UNUSED__) -======= Evas_Object *scr __UNUSED__, void *event_info __UNUSED__) ->>>>>>> remotes/origin/upstream { Evas_Object *obj = data; evas_object_smart_callback_call(obj, SIG_EDGE_BOTTOM, NULL); } static void -<<<<<<< HEAD -_mode_item_realize(Elm_Genlist_Item *it) -{ - char buf[1024]; - - if ((it->mode_view) || (it->generation < it->wd->generation)) return; - - evas_event_freeze(evas_object_evas_get(it->wd->obj)); - it->mode_view = edje_object_add(evas_object_evas_get(WIDGET(it))); - edje_object_scale_set(it->mode_view, - elm_widget_scale_get(WIDGET(it)) * - _elm_config->scale); - evas_object_smart_member_add(it->mode_view, it->wd->pan_smart); - elm_widget_sub_object_add(WIDGET(it), it->mode_view); - - strncpy(buf, "item", sizeof(buf)); - if (it->wd->compress) - strncat(buf, "_compress", sizeof(buf) - strlen(buf)); - - if (it->order_num_in & 0x1) strncat(buf, "_odd", sizeof(buf) - strlen(buf)); - strncat(buf, "/", sizeof(buf) - strlen(buf)); - strncat(buf, it->itc->mode_item_style, sizeof(buf) - strlen(buf)); - - _elm_theme_object_set(WIDGET(it), it->mode_view, "genlist", buf, - elm_widget_style_get(WIDGET(it))); - edje_object_mirrored_set(it->mode_view, - elm_widget_mirrored_get(WIDGET(it))); - - /* signal callback add */ - evas_object_event_callback_add(it->mode_view, EVAS_CALLBACK_MOUSE_DOWN, - _mouse_down, it); - evas_object_event_callback_add(it->mode_view, EVAS_CALLBACK_MOUSE_UP, - _mouse_up, it); - evas_object_event_callback_add(it->mode_view, EVAS_CALLBACK_MOUSE_MOVE, - _mouse_move, it); - - /* text_get, content_get, state_get */ - _item_text_realize(it, it->mode_view, &it->mode_texts, NULL); - if (it->itc->func.content_get) - { - const Eina_List *l; - const char *key; - - it->mode_contents = - elm_widget_stringlist_get(edje_object_data_get(it->mode_view, - "contents")); - EINA_LIST_FOREACH(it->mode_contents, l, key) - { - Evas_Object *ic = it->itc->func.content_get - ((void *)it->base.data, WIDGET(it), l->data); - - if (ic) - { - it->mode_content_objs = eina_list_append(it->mode_content_objs, ic); - edje_object_part_swallow(it->mode_view, key, ic); - evas_object_show(ic); - elm_widget_sub_object_add(WIDGET(it), ic); - if (elm_widget_item_disabled_get(it)) - elm_widget_disabled_set(ic, EINA_TRUE); - } - } - } - _item_state_realize(it, it->mode_view, &it->mode_states, NULL); - edje_object_part_swallow(it->mode_view, - edje_object_data_get(it->mode_view, "mode_part"), -======= _mode_item_realize(Elm_Gen_Item *it) { char buf[1024]; @@ -4988,7 +3185,6 @@ _mode_item_realize(Elm_Gen_Item *it) edje_object_part_swallow(it->item->mode_view, edje_object_data_get(it->item->mode_view, "mode_part"), ->>>>>>> remotes/origin/upstream VIEW(it)); it->want_unrealize = EINA_FALSE; @@ -4997,28 +3193,6 @@ _mode_item_realize(Elm_Gen_Item *it) } static void -<<<<<<< HEAD -_mode_item_unrealize(Elm_Genlist_Item *it) -{ - Widget_Data *wd = it->wd; - Evas_Object *content; - if (!it->mode_view) return; - - evas_event_freeze(evas_object_evas_get(it->wd->obj)); - elm_widget_stringlist_free(it->mode_texts); - it->mode_texts = NULL; - elm_widget_stringlist_free(it->mode_contents); - it->mode_contents = NULL; - elm_widget_stringlist_free(it->mode_states); - - EINA_LIST_FREE(it->mode_content_objs, content) - evas_object_del(content); - - edje_object_part_unswallow(it->mode_view, VIEW(it)); - evas_object_smart_member_add(VIEW(it), wd->pan_smart); - evas_object_del(it->mode_view); - it->mode_view = NULL; -======= _mode_item_unrealize(Elm_Gen_Item *it) { Widget_Data *wd = it->wd; @@ -5039,7 +3213,6 @@ _mode_item_unrealize(Elm_Gen_Item *it) evas_object_smart_member_add(VIEW(it), wd->pan_smart); evas_object_del(it->item->mode_view); it->item->mode_view = NULL; ->>>>>>> remotes/origin/upstream if (wd->mode_item == it) wd->mode_item = NULL; @@ -5048,11 +3221,7 @@ _mode_item_unrealize(Elm_Gen_Item *it) } static void -<<<<<<< HEAD -_item_mode_set(Elm_Genlist_Item *it) -======= _item_mode_set(Elm_Gen_Item *it) ->>>>>>> remotes/origin/upstream { if (!it) return; Widget_Data *wd = it->wd; @@ -5060,11 +3229,7 @@ _item_mode_set(Elm_Gen_Item *it) char buf[1024]; wd->mode_item = it; -<<<<<<< HEAD - it->nocache = EINA_TRUE; -======= it->item->nocache_once = EINA_TRUE; ->>>>>>> remotes/origin/upstream if (wd->scr_hold_timer) { @@ -5076,24 +3241,14 @@ _item_mode_set(Elm_Gen_Item *it) evas_event_freeze(evas_object_evas_get(it->wd->obj)); _mode_item_realize(it); -<<<<<<< HEAD - if (it->group_item) - evas_object_raise(it->VIEW(group_item)); - _item_position(it, it->mode_view, it->scrl_x, it->scrl_y); -======= if (it->item->group_item) evas_object_raise(it->item->VIEW(group_item)); _item_position(it, it->item->mode_view, it->item->scrl_x, it->item->scrl_y); ->>>>>>> remotes/origin/upstream evas_event_thaw(evas_object_evas_get(it->wd->obj)); evas_event_thaw_eval(evas_object_evas_get(it->wd->obj)); snprintf(buf, sizeof(buf), "elm,state,%s,active", wd->mode_type); -<<<<<<< HEAD - edje_object_signal_emit(it->mode_view, buf, "elm"); -======= edje_object_signal_emit(it->item->mode_view, buf, "elm"); ->>>>>>> remotes/origin/upstream } static void @@ -5102,43 +3257,21 @@ _item_mode_unset(Widget_Data *wd) if (!wd) return; if (!wd->mode_item) return; char buf[1024], buf2[1024]; -<<<<<<< HEAD - Elm_Genlist_Item *it; - - it = wd->mode_item; - it->nocache = EINA_TRUE; -======= Elm_Gen_Item *it; it = wd->mode_item; it->item->nocache_once = EINA_TRUE; ->>>>>>> remotes/origin/upstream snprintf(buf, sizeof(buf), "elm,state,%s,passive", wd->mode_type); snprintf(buf2, sizeof(buf2), "elm,state,%s,passive,finished", wd->mode_type); -<<<<<<< HEAD - edje_object_signal_emit(it->mode_view, buf, "elm"); - edje_object_signal_callback_add(it->mode_view, buf2, "elm", _mode_finished_signal_cb, it); -======= edje_object_signal_emit(it->item->mode_view, buf, "elm"); edje_object_signal_callback_add(it->item->mode_view, buf2, "elm", _mode_finished_signal_cb, it); ->>>>>>> remotes/origin/upstream wd->mode_item = NULL; } static void -<<<<<<< HEAD -_item_auto_scroll(Widget_Data *wd) -{ - if (!wd) return; - Elm_Genlist_Item *tmp_item = NULL; - - if ((wd->expanded_item) && (wd->auto_scroll_enabled)) - { - tmp_item = eina_list_data_get(eina_list_last(wd->expanded_item->items)); -======= _decorate_mode_item_position(Elm_Gen_Item *it, int itx, int ity) { if ((!it) || (!it->wd->decorate_mode)) return; @@ -5267,20 +3400,13 @@ _item_auto_scroll(Widget_Data *wd) if ((wd->expanded_item) && (wd->auto_scroll_enabled)) { tmp_item = eina_list_data_get(eina_list_last(wd->expanded_item->item->items)); ->>>>>>> remotes/origin/upstream if (!tmp_item) return; wd->show_item = tmp_item; wd->bring_in = EINA_TRUE; wd->scrollto_type = ELM_GENLIST_ITEM_SCROLLTO_IN; -<<<<<<< HEAD - if ((wd->show_item->queued) || (!wd->show_item->mincalcd)) - { - wd->show_item->showme = EINA_TRUE; -======= if ((wd->show_item->item->queued) || (!wd->show_item->item->mincalcd)) { wd->show_item->item->showme = EINA_TRUE; ->>>>>>> remotes/origin/upstream wd->auto_scroll_enabled = EINA_FALSE; } else @@ -5316,10 +3442,7 @@ elm_genlist_add(Evas_Object *parent) ELM_WIDGET_STANDARD_SETUP(wd, Widget_Data, parent, e, obj, NULL); ELM_SET_WIDTYPE(widtype, "genlist"); -<<<<<<< HEAD -======= ELM_GEN_SETUP(wd); ->>>>>>> remotes/origin/upstream elm_widget_type_set(obj, "genlist"); elm_widget_sub_object_add(parent, obj); elm_widget_on_focus_hook_set(obj, _on_focus_hook, NULL); @@ -5335,15 +3458,6 @@ elm_genlist_add(Evas_Object *parent) wd->generation = 1; wd->scr = elm_smart_scroller_add(e); -<<<<<<< HEAD - evas_object_event_callback_add(wd->scr, EVAS_CALLBACK_MOUSE_DOWN, - _mouse_down_scroller, obj); - evas_object_event_callback_add(wd->scr, EVAS_CALLBACK_MOUSE_UP, - _mouse_up_scroller, obj); - evas_object_event_callback_add(wd->scr, EVAS_CALLBACK_MOUSE_MOVE, - _mouse_move_scroller, obj); -======= ->>>>>>> remotes/origin/upstream elm_smart_scroller_widget_set(wd->scr, obj); elm_smart_scroller_object_theme_set(obj, wd->scr, "genlist", "base", elm_widget_style_get(obj)); @@ -5365,10 +3479,6 @@ elm_genlist_add(Evas_Object *parent) wd->max_items_per_block = MAX_ITEMS_PER_BLOCK; wd->item_cache_max = wd->max_items_per_block * 2; wd->longpress_timeout = _elm_config->longpress_timeout; -<<<<<<< HEAD - wd->effect_mode = _elm_config->effect_enable; -======= ->>>>>>> remotes/origin/upstream evas_object_smart_callback_add(obj, "scroll-hold-on", _hold_on, obj); evas_object_smart_callback_add(obj, "scroll-hold-off", _hold_off, obj); @@ -5388,20 +3498,12 @@ elm_genlist_add(Evas_Object *parent) evas_object_size_hint_min_set(obj, minw, minh); evas_object_smart_callbacks_descriptions_set(obj, _signals); -<<<<<<< HEAD - -======= ->>>>>>> remotes/origin/upstream _mirrored_set(obj, elm_widget_mirrored_get(obj)); _sizing_eval(obj); return obj; } -<<<<<<< HEAD -static Evas_Object * -_item_content_get_hook(Elm_Genlist_Item *it, const char *part) -======= void _item_select(Elm_Gen_Item *it) { @@ -5443,17 +3545,12 @@ _item_select(Elm_Gen_Item *it) static Evas_Object * _item_content_get_hook(Elm_Gen_Item *it, const char *part) ->>>>>>> remotes/origin/upstream { return edje_object_part_swallow_get(VIEW(it), part); } static void -<<<<<<< HEAD -_item_content_set_hook(Elm_Genlist_Item *it, const char *part, Evas_Object *content) -======= _item_content_set_hook(Elm_Gen_Item *it, const char *part, Evas_Object *content) ->>>>>>> remotes/origin/upstream { if (content && part) { @@ -5463,11 +3560,7 @@ _item_content_set_hook(Elm_Gen_Item *it, const char *part, Evas_Object *content) } static Evas_Object * -<<<<<<< HEAD -_item_content_unset_hook(Elm_Genlist_Item *it, const char *part) -======= _item_content_unset_hook(Elm_Gen_Item *it, const char *part) ->>>>>>> remotes/origin/upstream { Evas_Object *obj; obj = edje_object_part_swallow_get(VIEW(it), part); @@ -5478,11 +3571,7 @@ _item_content_unset_hook(Elm_Gen_Item *it, const char *part) } static const char * -<<<<<<< HEAD -_item_text_hook(Elm_Genlist_Item *it, const char *part) -======= _item_text_hook(Elm_Gen_Item *it, const char *part) ->>>>>>> remotes/origin/upstream { if (!it->itc->func.text_get) return NULL; return edje_object_part_text_get(VIEW(it), part); @@ -5491,16 +3580,9 @@ _item_text_hook(Elm_Gen_Item *it, const char *part) static void _item_disable_hook(Elm_Object_Item *it) { -<<<<<<< HEAD - ELM_OBJ_ITEM_CHECK_OR_RETURN(it); - Eina_List *l; - Evas_Object *obj; - Elm_Genlist_Item *_it = (Elm_Genlist_Item *) it; -======= Eina_List *l; Evas_Object *obj; Elm_Gen_Item *_it = (Elm_Gen_Item *)it; ->>>>>>> remotes/origin/upstream if (_it->generation < _it->wd->generation) return; @@ -5529,41 +3611,24 @@ _item_disable_hook(Elm_Object_Item *it) static Eina_Bool _item_del_pre_hook(Elm_Object_Item *it) { -<<<<<<< HEAD - ELM_OBJ_ITEM_CHECK_OR_RETURN(it, EINA_FALSE); - Elm_Genlist_Item *_it = (Elm_Genlist_Item *) it; -======= Elm_Gen_Item *_it = (Elm_Gen_Item *)it; ->>>>>>> remotes/origin/upstream if ((_it->relcount > 0) || (_it->walking > 0)) { elm_genlist_item_subitems_clear(it); if (_it->wd->show_item == _it) _it->wd->show_item = NULL; _elm_genlist_item_del_notserious(_it); -<<<<<<< HEAD - if (_it->block) - { - if (_it->realized) _item_unrealize(_it, EINA_FALSE); - _it->block->changed = EINA_TRUE; -======= if (_it->item->block) { if (_it->realized) _elm_genlist_item_unrealize(_it, EINA_FALSE); _it->item->block->changed = EINA_TRUE; ->>>>>>> remotes/origin/upstream if (_it->wd->calc_job) ecore_job_del(_it->wd->calc_job); _it->wd->calc_job = ecore_job_add(_calc_job, _it->wd); } if (_it->parent) { -<<<<<<< HEAD - _it->parent->items = - eina_list_remove(_it->parent->items, it); -======= _it->parent->item->items = eina_list_remove(_it->parent->item->items, it); ->>>>>>> remotes/origin/upstream _it->parent = NULL; } return EINA_FALSE; @@ -5572,19 +3637,6 @@ _item_del_pre_hook(Elm_Object_Item *it) return EINA_TRUE; } -<<<<<<< HEAD -Elm_Genlist_Item * -_elm_genlist_item_new(Widget_Data *wd, - const Elm_Genlist_Item_Class *itc, - const void *data, - Elm_Genlist_Item *parent, - Evas_Smart_Cb func, - const void *func_data) -{ - Elm_Genlist_Item *it; - - it = elm_widget_item_new(wd->obj, Elm_Genlist_Item); -======= Elm_Gen_Item * _elm_genlist_item_new(Widget_Data *wd, const Elm_Gen_Item_Class *itc, @@ -5596,15 +3648,11 @@ _elm_genlist_item_new(Widget_Data *wd, Elm_Gen_Item *it; it = elm_widget_item_new(wd->obj, Elm_Gen_Item); ->>>>>>> remotes/origin/upstream if (!it) return NULL; it->wd = wd; it->generation = wd->generation; it->itc = itc; -<<<<<<< HEAD -======= elm_genlist_item_class_ref((Elm_Genlist_Item_Class *)itc); ->>>>>>> remotes/origin/upstream it->base.data = data; it->parent = parent; it->func.func = func; @@ -5612,27 +3660,6 @@ _elm_genlist_item_new(Widget_Data *wd, elm_widget_item_content_get_hook_set(it, _item_content_get_hook); elm_widget_item_content_set_hook_set(it, _item_content_set_hook); elm_widget_item_content_unset_hook_set(it, _item_content_unset_hook); -<<<<<<< HEAD - elm_widget_item_disable_hook_set(it, _item_disable_hook); - elm_widget_item_del_pre_hook_set(it, _item_del_pre_hook); - /* TEMPORARY */ -// it->sel_cb = (Ecore_Cb)_item_select; - - elm_widget_item_text_get_hook_set(it, _item_text_hook); - return it; -} - -static Elm_Genlist_Item * -_item_new(Widget_Data *wd, - const Elm_Genlist_Item_Class *itc, - const void *data, - Elm_Genlist_Item *parent, - Elm_Genlist_Item_Flags flags, - Evas_Smart_Cb func, - const void *func_data) -{ - Elm_Genlist_Item *it, *it2; -======= elm_widget_item_text_get_hook_set(it, _item_text_hook); elm_widget_item_disable_hook_set(it, _item_disable_hook); elm_widget_item_del_pre_hook_set(it, _item_del_pre_hook); @@ -5652,47 +3679,10 @@ _item_new(Widget_Data *wd, const void *func_data) { Elm_Gen_Item *it, *it2; ->>>>>>> remotes/origin/upstream int depth = 0; it = _elm_genlist_item_new(wd, itc, data, parent, func, func_data); if (!it) return NULL; -<<<<<<< HEAD - it->flags = flags; - it->mouse_cursor = NULL; - it->expanded_depth = 0; - it->can_focus = EINA_TRUE; - if (it->parent) - { - if (it->parent->flags & ELM_GENLIST_ITEM_GROUP) - it->group_item = parent; - else if (it->parent->group_item) - it->group_item = it->parent->group_item; - } - for (it2 = it, depth = 0; it2->parent; it2 = it2->parent) - { - if (it2->parent->flags != ELM_GENLIST_ITEM_GROUP) depth += 1; - } - it->expanded_depth = depth; - return it; -} - -static void -_item_block_add(Widget_Data *wd, - Elm_Genlist_Item *it) -{ - Item_Block *itb = NULL; - - if (!it->rel) - { -newblock: - if (it->rel) - { - itb = calloc(1, sizeof(Item_Block)); - if (!itb) return; - itb->wd = wd; - if (!it->rel->block) -======= it->item = ELM_NEW(Elm_Gen_Item_Type); it->item->type = type; if (type & ELM_GENLIST_ITEM_GROUP) it->group++; @@ -5758,7 +3748,6 @@ newblock: if (!itb) return EINA_FALSE; itb->wd = wd; if (!it->item->rel->item->block) ->>>>>>> remotes/origin/upstream { wd->blocks = eina_inlist_append(wd->blocks, EINA_INLIST_GET(itb)); @@ -5780,100 +3769,52 @@ newblock: { Eina_List *tmp; -<<<<<<< HEAD - tmp = eina_list_data_find_list(itb->items, it->rel); - if (it->before) - { - wd->blocks = eina_inlist_prepend_relative - (wd->blocks, EINA_INLIST_GET(itb), - EINA_INLIST_GET(it->rel->block)); -======= tmp = eina_list_data_find_list(itb->items, it->item->rel); if (it->item->before) { wd->blocks = eina_inlist_prepend_relative (wd->blocks, EINA_INLIST_GET(itb), EINA_INLIST_GET(it->item->rel->item->block)); ->>>>>>> remotes/origin/upstream itb->items = eina_list_prepend_relative_list(itb->items, it, tmp); /* Update index from where we prepended */ -<<<<<<< HEAD - _item_position_update(eina_list_prev(tmp), it->rel->position); - _item_block_position_update(EINA_INLIST_GET(itb), - it->rel->block->position); -======= _item_position_update(eina_list_prev(tmp), it->item->rel->position); _item_block_position_update(EINA_INLIST_GET(itb), it->item->rel->item->block->position); ->>>>>>> remotes/origin/upstream } else { wd->blocks = eina_inlist_append_relative (wd->blocks, EINA_INLIST_GET(itb), -<<<<<<< HEAD - EINA_INLIST_GET(it->rel->block)); -======= EINA_INLIST_GET(it->item->rel->item->block)); ->>>>>>> remotes/origin/upstream itb->items = eina_list_append_relative_list(itb->items, it, tmp); /* Update block index from where we appended */ -<<<<<<< HEAD - _item_position_update(eina_list_next(tmp), it->rel->position + 1); - _item_block_position_update(EINA_INLIST_GET(itb), - it->rel->block->position + 1); -======= _item_position_update(eina_list_next(tmp), it->item->rel->position + 1); _item_block_position_update(EINA_INLIST_GET(itb), it->item->rel->item->block->position + 1); ->>>>>>> remotes/origin/upstream } } } else { -<<<<<<< HEAD - if (it->before) -======= if (it->item->before) ->>>>>>> remotes/origin/upstream { if (wd->blocks) { itb = (Item_Block *)(wd->blocks); if (itb->count >= wd->max_items_per_block) { -<<<<<<< HEAD - itb = calloc(1, sizeof(Item_Block)); - if (!itb) return; - itb->wd = wd; - wd->blocks = - eina_inlist_prepend(wd->blocks, - EINA_INLIST_GET(itb)); - _item_block_position_update(wd->blocks, 0); -======= itb = _item_block_new(wd, EINA_TRUE); if (!itb) return EINA_FALSE; ->>>>>>> remotes/origin/upstream } } else { -<<<<<<< HEAD - itb = calloc(1, sizeof(Item_Block)); - if (!itb) return; - itb->wd = wd; - wd->blocks = - eina_inlist_prepend(wd->blocks, EINA_INLIST_GET(itb)); - _item_block_position_update(wd->blocks, 0); -======= itb = _item_block_new(wd, EINA_TRUE); if (!itb) return EINA_FALSE; ->>>>>>> remotes/origin/upstream } itb->items = eina_list_prepend(itb->items, it); @@ -5886,49 +3827,14 @@ newblock: itb = (Item_Block *)(wd->blocks->last); if (itb->count >= wd->max_items_per_block) { -<<<<<<< HEAD - itb = calloc(1, sizeof(Item_Block)); - if (!itb) return; - itb->wd = wd; - wd->blocks = - eina_inlist_append(wd->blocks, - EINA_INLIST_GET(itb)); - itb->position_update = EINA_TRUE; - if (wd->blocks != EINA_INLIST_GET(itb)) - { - itb->position = ((Item_Block *) (EINA_INLIST_GET(itb)->prev))->position + 1; - } - else - { - itb->position = 0; - } -======= itb = _item_block_new(wd, EINA_FALSE); if (!itb) return EINA_FALSE; ->>>>>>> remotes/origin/upstream } } else { -<<<<<<< HEAD - itb = calloc(1, sizeof(Item_Block)); - if (!itb) return; - itb->wd = wd; - wd->blocks = - eina_inlist_append(wd->blocks, EINA_INLIST_GET(itb)); - itb->position_update = EINA_TRUE; - if (wd->blocks != EINA_INLIST_GET(itb)) - { - itb->position = ((Item_Block *) (EINA_INLIST_GET(itb)->prev))->position + 1; - } - else - { - itb->position = 0; - } -======= itb = _item_block_new(wd, EINA_FALSE); if (!itb) return EINA_FALSE; ->>>>>>> remotes/origin/upstream } itb->items = eina_list_append(itb->items, it); it->position = eina_list_count(itb->items); @@ -5939,15 +3845,6 @@ newblock: { Eina_List *tmp; -<<<<<<< HEAD - itb = it->rel->block; - tmp = eina_list_data_find_list(itb->items, it->rel); - if (!itb) goto newblock; - if (it->before) - { - itb->items = eina_list_prepend_relative_list(itb->items, it, tmp); - _item_position_update(eina_list_prev(tmp), it->rel->position); -======= if (it->item->rel->item->queued) { /* NOTE: for a strange reason eina_list and eina_inlist don't have the same property @@ -5968,64 +3865,15 @@ newblock: { itb->items = eina_list_prepend_relative_list(itb->items, it, tmp); _item_position_update(eina_list_prev(tmp), it->item->rel->position); ->>>>>>> remotes/origin/upstream } else { itb->items = eina_list_append_relative_list(itb->items, it, tmp); -<<<<<<< HEAD - _item_position_update(eina_list_next(tmp), it->rel->position + 1); -======= _item_position_update(eina_list_next(tmp), it->item->rel->position + 1); ->>>>>>> remotes/origin/upstream } } itb->count++; itb->changed = EINA_TRUE; -<<<<<<< HEAD - it->block = itb; - if (itb->wd->calc_job) ecore_job_del(itb->wd->calc_job); - itb->wd->calc_job = ecore_job_add(_calc_job, itb->wd); - if (it->rel) - { - it->rel->relcount--; - if ((it->rel->generation < it->wd->generation) && (!it->rel->relcount)) - { - _item_del(it->rel); - elm_widget_item_free(it->rel); - } - - it->rel = NULL; - } - if (itb->count > itb->wd->max_items_per_block) - { - int newc; - Item_Block *itb2; - Elm_Genlist_Item *it2; - - newc = itb->count / 2; - itb2 = calloc(1, sizeof(Item_Block)); - if (!itb2) return; - itb2->wd = wd; - wd->blocks = - eina_inlist_append_relative(wd->blocks, EINA_INLIST_GET(itb2), - EINA_INLIST_GET(itb)); - itb2->changed = EINA_TRUE; - while ((itb->count > newc) && (itb->items)) - { - Eina_List *l; - - l = eina_list_last(itb->items); - it2 = l->data; - itb->items = eina_list_remove_list(itb->items, l); - itb->count--; - - itb2->items = eina_list_prepend(itb2->items, it2); - it2->block = itb2; - itb2->count++; - } - } -======= it->item->block = itb; if (itb->wd->calc_job) ecore_job_del(itb->wd->calc_job); itb->wd->calc_job = ecore_job_add(_calc_job, itb->wd); @@ -6122,7 +3970,6 @@ newblock: } return EINA_TRUE; ->>>>>>> remotes/origin/upstream } static int @@ -6136,21 +3983,6 @@ _queue_process(Widget_Data *wd) //evas_event_freeze(evas_object_evas_get(wd->obj)); for (n = 0; (wd->queue) && (n < 128); n++) { -<<<<<<< HEAD - Elm_Genlist_Item *it; - - it = eina_list_data_get(wd->queue); - wd->queue = eina_list_remove_list(wd->queue, wd->queue); - it->queued = EINA_FALSE; - _item_block_add(wd, it); - if (!wd->blocks) - _item_block_realize(it->block); - t = ecore_time_get(); - if (it->block->changed) - { - showme = _item_block_recalc(it->block, it->block->num, EINA_TRUE); - it->block->changed = 0; -======= Elm_Gen_Item *it; it = eina_list_data_get(wd->queue); @@ -6164,7 +3996,6 @@ _queue_process(Widget_Data *wd) { showme = _item_block_recalc(it->item->block, it->item->block->num, EINA_TRUE); it->item->block->changed = 0; ->>>>>>> remotes/origin/upstream if (wd->pan_changed) { if (wd->calc_job) ecore_job_del(wd->calc_job); @@ -6173,14 +4004,9 @@ _queue_process(Widget_Data *wd) wd->pan_changed = EINA_FALSE; } } -<<<<<<< HEAD - if (showme) it->block->showme = EINA_TRUE; - if (eina_inlist_count(wd->blocks) > 1) -======= if (showme) it->item->block->showme = EINA_TRUE; /* same as eina_inlist_count > 1 */ if (wd->blocks && wd->blocks->next) ->>>>>>> remotes/origin/upstream { if ((t - t0) > (ecore_animator_frametime_get())) break; } @@ -6228,14 +4054,6 @@ _item_idle_enterer(void *data) } static void -<<<<<<< HEAD -_item_queue(Widget_Data *wd, - Elm_Genlist_Item *it) -{ - if (it->queued) return; - it->queued = EINA_TRUE; - wd->queue = eina_list_append(wd->queue, it); -======= _item_queue(Widget_Data *wd, Elm_Gen_Item *it, Eina_Compare_Cb cb) @@ -6246,7 +4064,6 @@ _item_queue(Widget_Data *wd, wd->queue = eina_list_sorted_insert(wd->queue, cb, it); else wd->queue = eina_list_append(wd->queue, it); ->>>>>>> remotes/origin/upstream // FIXME: why does a freeze then thaw here cause some genlist // elm_genlist_item_append() to be much much slower? // evas_event_freeze(evas_object_evas_get(wd->obj)); @@ -6265,53 +4082,6 @@ _item_queue(Widget_Data *wd, wd->queue_idle_enterer = ecore_idle_enterer_add(_item_idle_enterer, wd); } -<<<<<<< HEAD -static void -_item_move_after(Elm_Genlist_Item *it, Elm_Genlist_Item *after) -{ - if (!it) return; - if (!after) return; - Elm_Object_Item *_it = (Elm_Object_Item *) it; - Elm_Object_Item *_after = (Elm_Object_Item *) after; - - it->wd->items = eina_inlist_remove(it->wd->items, EINA_INLIST_GET(it)); - it->wd->reorder_deleted = EINA_TRUE; - _item_block_del(it); - - it->wd->items = eina_inlist_append_relative(it->wd->items, EINA_INLIST_GET(it), EINA_INLIST_GET(after)); - it->rel = after; - it->rel->relcount++; - it->before = EINA_FALSE; - if (after->group_item) it->group_item = after->group_item; - _item_queue(it->wd, it); - - // TODO: change this to smart callback - if (it->itc->func.moved) - it->itc->func.moved(WIDGET(it), _it, _after, EINA_TRUE); -} - -static void -_item_move_before(Elm_Genlist_Item *it, Elm_Genlist_Item *before) -{ - if (!it) return; - if (!before) return; - Elm_Object_Item *_it = (Elm_Object_Item *) it; - Elm_Object_Item *_before = (Elm_Object_Item *) before; - - it->wd->items = eina_inlist_remove(it->wd->items, EINA_INLIST_GET(it)); - it->wd->reorder_deleted = EINA_TRUE; - _item_block_del(it); - it->wd->items = eina_inlist_prepend_relative(it->wd->items, EINA_INLIST_GET(it), EINA_INLIST_GET(before)); - it->rel = before; - it->rel->relcount++; - it->before = EINA_TRUE; - if (before->group_item) it->group_item = before->group_item; - _item_queue(it->wd, it); - - // TODO: change this to smart callback - if (it->itc->func.moved) - it->itc->func.moved(WIDGET(it), _it, _before, EINA_FALSE); -======= static int _elm_genlist_item_compare(const void *data, const void *data1) { @@ -6373,7 +4143,6 @@ elm_genlist_items_count(const Evas_Object *obj) Widget_Data *wd = elm_widget_data_get(obj); if (!wd) return 0; return wd->item_count; ->>>>>>> remotes/origin/upstream } EAPI Elm_Object_Item * @@ -6381,47 +4150,13 @@ elm_genlist_item_append(Evas_Object *obj, const Elm_Genlist_Item_Class *itc, const void *data, Elm_Object_Item *parent, -<<<<<<< HEAD - Elm_Genlist_Item_Flags flags, -======= Elm_Genlist_Item_Type type, ->>>>>>> remotes/origin/upstream Evas_Smart_Cb func, const void *func_data) { ELM_CHECK_WIDTYPE(obj, widtype) NULL; Widget_Data *wd = elm_widget_data_get(obj); if (!wd) return NULL; -<<<<<<< HEAD - Elm_Genlist_Item *it = _item_new(wd, itc, data, (Elm_Genlist_Item *)parent, - flags, func, func_data); - if (!it) return NULL; - if (!it->parent) - { - if (flags & ELM_GENLIST_ITEM_GROUP) - wd->group_items = eina_list_append(wd->group_items, it); - wd->items = eina_inlist_append(wd->items, EINA_INLIST_GET(it)); - it->rel = NULL; - } - else - { - Elm_Genlist_Item *it2 = NULL; - Eina_List *ll = eina_list_last(it->parent->items); - if (ll) it2 = ll->data; - it->parent->items = eina_list_append(it->parent->items, it); - if (!it2) it2 = it->parent; - if (it2->generation < it2->wd->generation) - it2 = (Elm_Genlist_Item *) elm_genlist_item_prev_get((Elm_Object_Item *) it2); - wd->items = - eina_inlist_append_relative(wd->items, EINA_INLIST_GET(it), - EINA_INLIST_GET(it2)); - it->rel = it2; - it->rel->relcount++; - } - it->before = EINA_FALSE; - _item_queue(wd, it); - return (Elm_Object_Item *) it; -======= Elm_Gen_Item *it = _item_new(wd, itc, data, (Elm_Gen_Item *) parent, type, func, func_data); if (!it) return NULL; @@ -6448,7 +4183,6 @@ elm_genlist_item_append(Evas_Object *obj, it->item->before = EINA_FALSE; _item_queue(wd, it, NULL); return (Elm_Object_Item *)it; ->>>>>>> remotes/origin/upstream } EAPI Elm_Object_Item * @@ -6456,75 +4190,39 @@ elm_genlist_item_prepend(Evas_Object *obj, const Elm_Genlist_Item_Class *itc, const void *data, Elm_Object_Item *parent, -<<<<<<< HEAD - Elm_Genlist_Item_Flags flags, -======= Elm_Genlist_Item_Type type, ->>>>>>> remotes/origin/upstream Evas_Smart_Cb func, const void *func_data) { ELM_CHECK_WIDTYPE(obj, widtype) NULL; Widget_Data *wd = elm_widget_data_get(obj); if (!wd) return NULL; -<<<<<<< HEAD - Elm_Genlist_Item *it = _item_new(wd, itc, data, (Elm_Genlist_Item *)parent, - flags, func, func_data); - + Elm_Gen_Item *it = _item_new(wd, itc, data, (Elm_Gen_Item *) parent, type, + func, func_data); if (!it) return NULL; if (!it->parent) { - if (flags & ELM_GENLIST_ITEM_GROUP) + if (it->group) wd->group_items = eina_list_prepend(wd->group_items, it); wd->items = eina_inlist_prepend(wd->items, EINA_INLIST_GET(it)); - it->rel = NULL; + it->item->rel = NULL; } else { - Elm_Genlist_Item *it2 = NULL; - Eina_List *ll = it->parent->items; + Elm_Gen_Item *it2 = NULL; + Eina_List *ll = it->parent->item->items; if (ll) it2 = ll->data; - it->parent->items = eina_list_prepend(it->parent->items, it); + it->parent->item->items = eina_list_prepend(it->parent->item->items, it); if (!it2) it2 = it->parent; - if (it2->generation < it2->wd->generation) - it2 = (Elm_Genlist_Item *) elm_genlist_item_next_get((Elm_Object_Item *) it2); wd->items = eina_inlist_prepend_relative(wd->items, EINA_INLIST_GET(it), EINA_INLIST_GET(it2)); - it->rel = it2; - it->rel->relcount++; - } - it->before = EINA_TRUE; - _item_queue(wd, it); - return (Elm_Object_Item *) it; -======= - Elm_Gen_Item *it = _item_new(wd, itc, data, (Elm_Gen_Item *) parent, type, - func, func_data); - if (!it) return NULL; - if (!it->parent) - { - if (it->group) - wd->group_items = eina_list_prepend(wd->group_items, it); - wd->items = eina_inlist_prepend(wd->items, EINA_INLIST_GET(it)); - it->item->rel = NULL; - } - else - { - Elm_Gen_Item *it2 = NULL; - Eina_List *ll = it->parent->item->items; - if (ll) it2 = ll->data; - it->parent->item->items = eina_list_prepend(it->parent->item->items, it); - if (!it2) it2 = it->parent; - wd->items = - eina_inlist_prepend_relative(wd->items, EINA_INLIST_GET(it), - EINA_INLIST_GET(it2)); - it->item->rel = it2; - it->item->rel->relcount++; + it->item->rel = it2; + it->item->rel->relcount++; } it->item->before = EINA_TRUE; _item_queue(wd, it, NULL); return (Elm_Object_Item *)it; ->>>>>>> remotes/origin/upstream } EAPI Elm_Object_Item * @@ -6533,45 +4231,13 @@ elm_genlist_item_insert_after(Evas_Object *obj, const void *data, Elm_Object_Item *parent, Elm_Object_Item *after, -<<<<<<< HEAD - Elm_Genlist_Item_Flags flags, -======= Elm_Genlist_Item_Type type, ->>>>>>> remotes/origin/upstream Evas_Smart_Cb func, const void *func_data) { ELM_CHECK_WIDTYPE(obj, widtype) NULL; ELM_OBJ_ITEM_CHECK_OR_RETURN(after, NULL); Widget_Data *wd = elm_widget_data_get(obj); -<<<<<<< HEAD - Elm_Genlist_Item *_after = (Elm_Genlist_Item *) after; - if (!wd) return NULL; - EINA_SAFETY_ON_NULL_RETURN_VAL(wd->items, NULL); - - Elm_Genlist_Item *it = _item_new(wd, itc, data, (Elm_Genlist_Item *)parent, - flags, func, func_data); - if (!it) return NULL; - if (!it->parent) - { - if ((flags & ELM_GENLIST_ITEM_GROUP) && - (((Elm_Genlist_Item * )after)->flags & ELM_GENLIST_ITEM_GROUP)) - wd->group_items = eina_list_append_relative(wd->group_items, it, - after); - } - else - { - it->parent->items = eina_list_append_relative(it->parent->items, it, - after); - } - wd->items = eina_inlist_append_relative(wd->items, EINA_INLIST_GET(it), - EINA_INLIST_GET(_after)); - it->rel = _after; - it->rel->relcount++; - it->before = EINA_FALSE; - _item_queue(wd, it); - return (Elm_Object_Item *) it; -======= Elm_Gen_Item *_after = (Elm_Gen_Item *) after; if (!wd) return NULL; /* It makes no sense to insert after in an empty list with after != NULL, something really bad is happening in your app. */ @@ -6598,7 +4264,6 @@ elm_genlist_item_insert_after(Evas_Object *obj, it->item->before = EINA_FALSE; _item_queue(wd, it, NULL); return (Elm_Object_Item *)it; ->>>>>>> remotes/origin/upstream } EAPI Elm_Object_Item * @@ -6607,31 +4272,13 @@ elm_genlist_item_insert_before(Evas_Object *obj, const void *data, Elm_Object_Item *parent, Elm_Object_Item *before, -<<<<<<< HEAD - Elm_Genlist_Item_Flags flags, -======= Elm_Genlist_Item_Type type, ->>>>>>> remotes/origin/upstream Evas_Smart_Cb func, const void *func_data) { ELM_CHECK_WIDTYPE(obj, widtype) NULL; ELM_OBJ_ITEM_CHECK_OR_RETURN(before, NULL); Widget_Data *wd = elm_widget_data_get(obj); -<<<<<<< HEAD - Elm_Genlist_Item *_before = (Elm_Genlist_Item *) before; - if (!wd) return NULL; - - EINA_SAFETY_ON_NULL_RETURN_VAL(wd->items, NULL); - - Elm_Genlist_Item *it = _item_new(wd, itc, data, (Elm_Genlist_Item *)parent, - flags, func, func_data); - if (!it) return NULL; - if (!it->parent) - { - if ((flags & ELM_GENLIST_ITEM_GROUP) && - (_before->flags & ELM_GENLIST_ITEM_GROUP)) -======= Elm_Gen_Item *_before = (Elm_Gen_Item *) before; if (!wd) return NULL; /* It makes no sense to insert before in an empty list with before != NULL, something really bad is happening in your app. */ @@ -6643,24 +4290,11 @@ elm_genlist_item_insert_before(Evas_Object *obj, if (!it->parent) { if (it->group && _before->group) ->>>>>>> remotes/origin/upstream wd->group_items = eina_list_prepend_relative(wd->group_items, it, _before); } else { -<<<<<<< HEAD - it->parent->items = eina_list_prepend_relative(it->parent->items, it, - _before); - } - wd->items = eina_inlist_prepend_relative(wd->items, EINA_INLIST_GET(it), - EINA_INLIST_GET(_before)); - it->rel = _before; - it->rel->relcount++; - it->before = EINA_TRUE; - _item_queue(wd, it); - return (Elm_Object_Item *) it; -======= it->parent->item->items = eina_list_prepend_relative(it->parent->item->items, it, _before); } @@ -6756,7 +4390,6 @@ elm_genlist_item_sorted_insert(Evas_Object *obj, _item_queue(wd, it, _elm_genlist_item_list_compare); return (Elm_Object_Item *)it; ->>>>>>> remotes/origin/upstream } static void @@ -6770,15 +4403,12 @@ _elm_genlist_clear(Evas_Object *obj, Eina_Bool standby) if (!standby) wd->generation++; -<<<<<<< HEAD -======= if (wd->state) { eina_inlist_sorted_state_free(wd->state); wd->state = NULL; } ->>>>>>> remotes/origin/upstream if (wd->walking > 0) { wd->clear_me = EINA_TRUE; @@ -6789,17 +4419,6 @@ _elm_genlist_clear(Evas_Object *obj, Eina_Bool standby) l; l = next, next = next ? next->next : NULL) { -<<<<<<< HEAD - Elm_Genlist_Item *it = ELM_GENLIST_ITEM_FROM_INLIST(l); - - if (it->generation < wd->generation) - { - Elm_Genlist_Item *itn = NULL; - - if (next) itn = ELM_GENLIST_ITEM_FROM_INLIST(next); - if (itn) itn->walking++; /* prevent early death of subitem */ - _item_del(it); -======= Elm_Gen_Item *it = ELM_GEN_ITEM_FROM_INLIST(l); if (it->generation < wd->generation) @@ -6809,7 +4428,6 @@ _elm_genlist_clear(Evas_Object *obj, Eina_Bool standby) if (next) itn = ELM_GEN_ITEM_FROM_INLIST(next); if (itn) itn->walking++; /* prevent early death of subitem */ it->del_cb(it); ->>>>>>> remotes/origin/upstream elm_widget_item_free(it); if (itn) itn->walking--; } @@ -6822,22 +4440,13 @@ _elm_genlist_clear(Evas_Object *obj, Eina_Bool standby) wd->calc_job = NULL; } if (wd->selected) wd->selected = eina_list_free(wd->selected); -<<<<<<< HEAD - _clear_cb(wd); -======= if (wd->clear_cb) wd->clear_cb(wd); ->>>>>>> remotes/origin/upstream wd->pan_x = 0; wd->pan_y = 0; wd->minw = 0; wd->minh = 0; -<<<<<<< HEAD - if (wd->alpha_bg) - evas_object_del(wd->alpha_bg); -======= if (wd->alpha_bg) evas_object_del(wd->alpha_bg); ->>>>>>> remotes/origin/upstream wd->alpha_bg = NULL; if (wd->pan_smart) @@ -6845,11 +4454,7 @@ _elm_genlist_clear(Evas_Object *obj, Eina_Bool standby) evas_object_size_hint_min_set(wd->pan_smart, wd->minw, wd->minh); evas_object_smart_callback_call(wd->pan_smart, "changed", NULL); } -<<<<<<< HEAD - _sizing_eval(obj); -======= if (wd->sizing_cb) wd->sizing_cb(wd->obj); ->>>>>>> remotes/origin/upstream elm_smart_scroller_child_region_show(wd->scr, 0, 0, 0, 0); evas_event_thaw(evas_object_evas_get(wd->obj)); evas_event_thaw_eval(evas_object_evas_get(wd->obj)); @@ -6868,11 +4473,7 @@ elm_genlist_multi_select_set(Evas_Object *obj, ELM_CHECK_WIDTYPE(obj, widtype); Widget_Data *wd = elm_widget_data_get(obj); if (!wd) return; -<<<<<<< HEAD - wd->multi = multi; -======= wd->multi = !!multi; ->>>>>>> remotes/origin/upstream } EAPI Eina_Bool @@ -6917,15 +4518,9 @@ elm_genlist_realized_items_get(const Evas_Object *obj) if (itb->realized) { Eina_List *l; -<<<<<<< HEAD - Elm_Genlist_Item *it; - - done = 1; -======= Elm_Gen_Item *it; done = EINA_TRUE; ->>>>>>> remotes/origin/upstream EINA_LIST_FOREACH(itb->items, l, it) { if (it->realized) list = eina_list_append(list, it); @@ -6956,11 +4551,7 @@ elm_genlist_at_xy_item_get(const Evas_Object *obj, EINA_INLIST_FOREACH(wd->blocks, itb) { Eina_List *l; -<<<<<<< HEAD - Elm_Genlist_Item *it; -======= Elm_Gen_Item *it; ->>>>>>> remotes/origin/upstream if (!ELM_RECTS_INTERSECT(ox + itb->x - itb->wd->pan_x, oy + itb->y - itb->wd->pan_y, @@ -6972,20 +4563,6 @@ elm_genlist_at_xy_item_get(const Evas_Object *obj, itx = ox + itb->x + it->x - itb->wd->pan_x; ity = oy + itb->y + it->y - itb->wd->pan_y; -<<<<<<< HEAD - if (ELM_RECTS_INTERSECT(itx, ity, it->w, it->h, x, y, 1, 1)) - { - if (posret) - { - if (y <= (ity + (it->h / 4))) *posret = -1; - else if (y >= (ity + it->h - (it->h / 4))) - *posret = 1; - else *posret = 0; - } - return (Elm_Object_Item *) it; - } - lasty = ity + it->h; -======= if (ELM_RECTS_INTERSECT(itx, ity, it->item->w, it->item->h, x, y, 1, 1)) { if (posret) @@ -6998,7 +4575,6 @@ elm_genlist_at_xy_item_get(const Evas_Object *obj, return (Elm_Object_Item *)it; } lasty = ity + it->item->h; ->>>>>>> remotes/origin/upstream } } if (posret) @@ -7016,17 +4592,10 @@ elm_genlist_first_item_get(const Evas_Object *obj) Widget_Data *wd = elm_widget_data_get(obj); if (!wd) return NULL; if (!wd->items) return NULL; -<<<<<<< HEAD - Elm_Genlist_Item *it = ELM_GENLIST_ITEM_FROM_INLIST(wd->items); - while ((it) && (it->generation < wd->generation)) - it = ELM_GENLIST_ITEM_FROM_INLIST(EINA_INLIST_GET(it)->next); - return (Elm_Object_Item *) it; -======= Elm_Gen_Item *it = ELM_GEN_ITEM_FROM_INLIST(wd->items); while ((it) && (it->generation < wd->generation)) it = ELM_GEN_ITEM_FROM_INLIST(EINA_INLIST_GET(it)->next); return (Elm_Object_Item *)it; ->>>>>>> remotes/origin/upstream } EAPI Elm_Object_Item * @@ -7036,34 +4605,20 @@ elm_genlist_last_item_get(const Evas_Object *obj) Widget_Data *wd = elm_widget_data_get(obj); if (!wd) return NULL; if (!wd->items) return NULL; -<<<<<<< HEAD - Elm_Genlist_Item *it = ELM_GENLIST_ITEM_FROM_INLIST(wd->items->last); - while ((it) && (it->generation < wd->generation)) - it = ELM_GENLIST_ITEM_FROM_INLIST(EINA_INLIST_GET(it)->prev); - return (Elm_Object_Item *) it; -======= Elm_Gen_Item *it = ELM_GEN_ITEM_FROM_INLIST(wd->items->last); while ((it) && (it->generation < wd->generation)) it = ELM_GEN_ITEM_FROM_INLIST(EINA_INLIST_GET(it)->prev); return (Elm_Object_Item *)it; ->>>>>>> remotes/origin/upstream } EAPI Elm_Object_Item * elm_genlist_item_next_get(const Elm_Object_Item *it) { ELM_OBJ_ITEM_CHECK_OR_RETURN(it, NULL); -<<<<<<< HEAD - Elm_Genlist_Item *_it = (Elm_Genlist_Item *) it; - while (_it) - { - _it = ELM_GENLIST_ITEM_FROM_INLIST(EINA_INLIST_GET(_it)->next); -======= Elm_Gen_Item *_it = (Elm_Gen_Item *)it; while (_it) { _it = ELM_GEN_ITEM_FROM_INLIST(EINA_INLIST_GET(_it)->next); ->>>>>>> remotes/origin/upstream if ((_it) && (_it->generation == _it->wd->generation)) break; } return (Elm_Object_Item *) _it; @@ -7073,21 +4628,6 @@ EAPI Elm_Object_Item * elm_genlist_item_prev_get(const Elm_Object_Item *it) { ELM_OBJ_ITEM_CHECK_OR_RETURN(it, NULL); -<<<<<<< HEAD - Elm_Genlist_Item *_it = (Elm_Genlist_Item *) it; - while (_it) - { - _it = ELM_GENLIST_ITEM_FROM_INLIST(EINA_INLIST_GET(_it)->prev); - if ((_it) && (_it->generation == _it->wd->generation)) break; - } - return (Elm_Object_Item *)_it; -} - -EAPI Evas_Object * -elm_genlist_item_genlist_get(const Elm_Object_Item *it) -{ - return elm_object_item_widget_get(it); -======= Elm_Gen_Item *_it = (Elm_Gen_Item *)it; while (_it) { @@ -7095,18 +4635,13 @@ elm_genlist_item_genlist_get(const Elm_Object_Item *it) if ((_it) && (_it->generation == _it->wd->generation)) break; } return (Elm_Object_Item *) _it; ->>>>>>> remotes/origin/upstream } EAPI Elm_Object_Item * elm_genlist_item_parent_get(const Elm_Object_Item *it) { ELM_OBJ_ITEM_CHECK_OR_RETURN(it, NULL); -<<<<<<< HEAD - return (Elm_Object_Item *) ((Elm_Genlist_Item *) it)->parent; -======= return (Elm_Object_Item *) ((Elm_Gen_Item *)it)->parent; ->>>>>>> remotes/origin/upstream } EAPI void @@ -7115,54 +4650,6 @@ elm_genlist_item_subitems_clear(Elm_Object_Item *it) ELM_OBJ_ITEM_CHECK_OR_RETURN(it); Widget_Data *wd = elm_widget_data_get(WIDGET(it)); if (!wd) return; -<<<<<<< HEAD - Elm_Genlist_Item *_it = (Elm_Genlist_Item *) it; - Elm_Genlist_Item *it2, *it3; - Evas_Coord y, h; - - if (!wd->effect_mode || !wd->move_effect_mode) - _item_subitems_clear(_it); - else - { - if ((!wd->item_moving_effect_timer) && (_it->flags != ELM_GENLIST_ITEM_GROUP) && - wd->move_effect_mode != ELM_GENLIST_ITEM_MOVE_EFFECT_DELETE) - { - wd->expanded_item = _it; - _item_flip_effect_show(_it); - evas_object_geometry_get(VIEW(it), NULL, &y, NULL, &h); - wd->expand_item_end = y + h; - - it2 = _it; - do { - it2 = (Elm_Genlist_Item *) elm_genlist_item_next_get((Elm_Object_Item *) it2); - if (!it2) break; - } while (it2->expanded_depth > _it->expanded_depth); - if (it2) - { - int diff; - Evas_Coord vy, vh; - evas_output_viewport_get(evas_object_evas_get(wd->pan_smart), NULL, &vy, NULL, &vh); - diff = it2->old_scrl_y - (vy + vh); - if (diff > 0) - { - it3 = it2; - while (it3) - { - it3->old_scrl_y = it3->old_scrl_y - diff; - it3 = (Elm_Genlist_Item *) elm_genlist_item_next_get((Elm_Object_Item *) it3); - } - } - - wd->expand_item_gap = wd->expand_item_end - it2->old_scrl_y; - } - else - wd->expand_item_gap = 0; - - evas_object_raise(wd->alpha_bg); - evas_object_show(wd->alpha_bg); - - wd->start_time = current_time_get(); -======= Elm_Gen_Item *_it = (Elm_Gen_Item *) it; if (!wd->tree_effect_enabled || !wd->move_effect_mode) @@ -7176,7 +4663,6 @@ elm_genlist_item_subitems_clear(Elm_Object_Item *it) evas_object_raise(wd->alpha_bg); evas_object_show(wd->alpha_bg); wd->start_time = ecore_time_get(); ->>>>>>> remotes/origin/upstream wd->item_moving_effect_timer = ecore_animator_add(_item_moving_effect_timer_cb, wd); } else @@ -7186,17 +4672,10 @@ elm_genlist_item_subitems_clear(Elm_Object_Item *it) EAPI void elm_genlist_item_selected_set(Elm_Object_Item *it, -<<<<<<< HEAD - Eina_Bool selected) -{ - ELM_OBJ_ITEM_CHECK_OR_RETURN(it); - Elm_Genlist_Item *_it = (Elm_Genlist_Item *) it; -======= Eina_Bool selected) { ELM_OBJ_ITEM_CHECK_OR_RETURN(it); Elm_Gen_Item *_it = (Elm_Gen_Item *)it; ->>>>>>> remotes/origin/upstream Widget_Data *wd = _it->wd; if (!wd) return; if ((_it->generation < wd->generation) || elm_widget_item_disabled_get(_it)) @@ -7210,18 +4689,6 @@ elm_genlist_item_selected_set(Elm_Object_Item *it, { while (wd->selected) { -<<<<<<< HEAD - _item_unhighlight(wd->selected->data); - _item_unselect(wd->selected->data); - } - } - _item_highlight(_it); - _item_select(_it); - return; - } - _item_unhighlight(_it); - _item_unselect(_it); -======= if (_it->unhighlight_cb) _it->unhighlight_cb(wd->selected->data); _it->unsel_cb(wd->selected->data); } @@ -7232,36 +4699,12 @@ elm_genlist_item_selected_set(Elm_Object_Item *it, } if (_it->unhighlight_cb) _it->unhighlight_cb(_it); _it->unsel_cb(_it); ->>>>>>> remotes/origin/upstream } EAPI Eina_Bool elm_genlist_item_selected_get(const Elm_Object_Item *it) { ELM_OBJ_ITEM_CHECK_OR_RETURN(it, EINA_FALSE); -<<<<<<< HEAD - return ((Elm_Genlist_Item *) it)->selected; -} - -EAPI void -elm_genlist_item_expanded_set(Elm_Object_Item *it, - Eina_Bool expanded) -{ - ELM_OBJ_ITEM_CHECK_OR_RETURN(it); - Elm_Genlist_Item *_it = (Elm_Genlist_Item *) it; - if (_it->flags != ELM_GENLIST_ITEM_SUBITEMS) return; - if (_it->expanded == expanded) return; - _it->expanded = expanded; - _it->wd->expanded_item = _it; - if (_it->wd->effect_mode && !_it->wd->alpha_bg) - _it->wd->alpha_bg = _create_tray_alpha_bg(WIDGET(_it)); - - if (_it->expanded) - { - _it->wd->move_effect_mode = ELM_GENLIST_ITEM_MOVE_EFFECT_EXPAND; - _it->wd->expanded_move_effect_set = EINA_TRUE; - _it->wd->expanded_next_item = (Elm_Genlist_Item *) elm_genlist_item_next_get(it); -======= return ((Elm_Gen_Item *)it)->selected; } @@ -7334,7 +4777,6 @@ elm_genlist_item_expanded_set(Elm_Object_Item *it, if (_it->item->expanded) { _it->wd->move_effect_mode = ELM_GENLIST_TREE_EFFECT_EXPAND; ->>>>>>> remotes/origin/upstream if (_it->realized) edje_object_signal_emit(VIEW(_it), "elm,state,expanded", "elm"); evas_object_smart_callback_call(WIDGET(_it), SIG_EXPANDED, _it); @@ -7342,12 +4784,7 @@ elm_genlist_item_expanded_set(Elm_Object_Item *it, } else { -<<<<<<< HEAD - _it->wd->move_effect_mode = ELM_GENLIST_ITEM_MOVE_EFFECT_CONTRACT; - _it->wd->expanded_next_item = NULL; -======= _it->wd->move_effect_mode = ELM_GENLIST_TREE_EFFECT_CONTRACT; ->>>>>>> remotes/origin/upstream if (_it->realized) edje_object_signal_emit(VIEW(_it), "elm,state,contracted", "elm"); evas_object_smart_callback_call(WIDGET(_it), SIG_CONTRACTED, _it); @@ -7359,84 +4796,13 @@ EAPI Eina_Bool elm_genlist_item_expanded_get(const Elm_Object_Item *it) { ELM_OBJ_ITEM_CHECK_OR_RETURN(it, EINA_FALSE); -<<<<<<< HEAD - return ((Elm_Genlist_Item *) it)->expanded; -======= return ((Elm_Gen_Item *)it)->item->expanded; ->>>>>>> remotes/origin/upstream } EAPI int elm_genlist_item_expanded_depth_get(const Elm_Object_Item *it) { ELM_OBJ_ITEM_CHECK_OR_RETURN(it, 0); -<<<<<<< HEAD - return ((Elm_Genlist_Item *) it)->expanded_depth; -} - -EAPI void -elm_genlist_item_disabled_set(Elm_Object_Item *it, - Eina_Bool disabled) -{ - elm_object_item_disabled_set(it, disabled); -} - -EAPI Eina_Bool -elm_genlist_item_disabled_get(const Elm_Object_Item *it) -{ - return elm_object_item_disabled_get(it); -} - -EAPI void -elm_genlist_item_display_only_set(Elm_Object_Item *it, - Eina_Bool display_only) -{ - ELM_OBJ_ITEM_CHECK_OR_RETURN(it); - Elm_Genlist_Item *_it = (Elm_Genlist_Item *) it; - display_only = !!display_only; -if (_it->display_only == display_only) return; - if (_it->generation < _it->wd->generation) return; - _it->display_only = display_only; - _it->mincalcd = EINA_FALSE; - _it->updateme = EINA_TRUE; - if (_it->block) _it->block->updateme = EINA_TRUE; - if (_it->wd->update_job) ecore_job_del(_it->wd->update_job); - _it->wd->update_job = ecore_job_add(_update_job, _it->wd); -} - -EAPI Eina_Bool -elm_genlist_item_display_only_get(const Elm_Object_Item *it) -{ - ELM_OBJ_ITEM_CHECK_OR_RETURN(it, EINA_FALSE); - Elm_Genlist_Item *_it = (Elm_Genlist_Item *) it; - if (_it->generation < _it->wd->generation) return EINA_FALSE; - return _it->display_only; -} - -EAPI void -elm_genlist_item_show(Elm_Object_Item *it) -{ - ELM_OBJ_ITEM_CHECK_OR_RETURN(it); - Elm_Genlist_Item *_it = (Elm_Genlist_Item *) it; - if (_it->generation < _it->wd->generation) return; - if ((_it->queued) || (!_it->mincalcd)) - { - _it->wd->show_item = _it; - _it->wd->bring_in = EINA_FALSE; - _it->wd->scrollto_type = ELM_GENLIST_ITEM_SCROLLTO_IN; - _it->showme = EINA_TRUE; - return; - } - if (_it->wd->show_item) - { - _it->wd->show_item->showme = EINA_FALSE; - _it->wd->show_item = NULL; - } - elm_smart_scroller_child_region_show(_it->wd->scr, - _it->x + _it->block->x, - _it->y + _it->block->y, - _it->block->w, _it->h); -======= return ((Elm_Gen_Item *)it)->item->expanded_depth; } @@ -7519,324 +4885,98 @@ static Eina_Bool _elm_genlist_item_compute_coordinates( *x = _it->x + _it->item->block->x; *w = _it->item->block->w; return EINA_TRUE; ->>>>>>> remotes/origin/upstream } EAPI void elm_genlist_item_promote(Elm_Object_Item *it) { ELM_OBJ_ITEM_CHECK_OR_RETURN(it); -<<<<<<< HEAD - Elm_Genlist_Item *_it = (Elm_Genlist_Item *) it; - if (_it->generation < _it->wd->generation) return; - _item_move_before(_it, - (Elm_Genlist_Item *) elm_genlist_first_item_get(WIDGET(_it))); -======= Elm_Gen_Item *_it = (Elm_Gen_Item *)it; if (_it->generation < _it->wd->generation) return; _item_move_before(_it, (Elm_Gen_Item *) elm_genlist_first_item_get(WIDGET(_it))); ->>>>>>> remotes/origin/upstream } EAPI void elm_genlist_item_demote(Elm_Object_Item *it) { ELM_OBJ_ITEM_CHECK_OR_RETURN(it); -<<<<<<< HEAD - Elm_Genlist_Item *_it = (Elm_Genlist_Item *) it; + Elm_Gen_Item *_it = (Elm_Gen_Item *)it; if (_it->generation < _it->wd->generation) return; _item_move_after(_it, - (Elm_Genlist_Item *) elm_genlist_last_item_get(WIDGET(_it))); + (Elm_Gen_Item *) elm_genlist_last_item_get(WIDGET(_it))); } EAPI void -elm_genlist_item_bring_in(Elm_Object_Item *it) +elm_genlist_item_show(Elm_Object_Item *it, Elm_Genlist_Item_Scrollto_Type type) { ELM_OBJ_ITEM_CHECK_OR_RETURN(it); - Elm_Genlist_Item *_it = (Elm_Genlist_Item *) it; - if (_it->generation < _it->wd->generation) return; - if ((_it->queued) || (!_it->mincalcd)) - { - _it->wd->show_item = _it; - _it->wd->bring_in = EINA_TRUE; - _it->wd->scrollto_type = ELM_GENLIST_ITEM_SCROLLTO_IN; - _it->showme = EINA_TRUE; - return; - } - if (_it->wd->show_item) - { - _it->wd->show_item->showme = EINA_FALSE; - _it->wd->show_item = NULL; - } - elm_smart_scroller_region_bring_in(_it->wd->scr, - _it->x + _it->block->x, - _it->y + _it->block->y, - _it->block->w, _it->h); + Evas_Coord x, y, w, h; + Elm_Gen_Item *_it = (Elm_Gen_Item *)it; + + if (_elm_genlist_item_compute_coordinates(it, type, &x, &y, &w, &h)) + elm_smart_scroller_child_region_show(_it->wd->scr, x, y, w, h); } EAPI void -elm_genlist_item_top_show(Elm_Object_Item *it) +elm_genlist_item_bring_in(Elm_Object_Item *it, Elm_Genlist_Item_Scrollto_Type type) { + ELM_OBJ_ITEM_CHECK_OR_RETURN(it); - Evas_Coord ow, oh; - Evas_Coord pan_w = 0, pan_h = 0; - Eina_Bool pan_size_ready = EINA_FALSE; - Elm_Genlist_Item *_it = (Elm_Genlist_Item *) it; + Evas_Coord x, y, w, h; + Elm_Gen_Item *_it = (Elm_Gen_Item *)it; - if (_it->generation < _it->wd->generation) return; - evas_object_geometry_get(_it->wd->pan_smart, NULL, NULL, &ow, &oh); - if (_it->block) - { - _pan_child_size_get(_it->wd->pan_smart, &pan_w, &pan_h); - if ((pan_w > (_it->x + _it->block->x)) && (pan_h > (_it->y + _it->block->y + oh))) - { - pan_size_ready = EINA_TRUE; - } - } - if ((_it->queued) || (!_it->mincalcd) || (!pan_size_ready)) - { - _it->wd->show_item = _it; - _it->wd->bring_in = EINA_FALSE; - _it->wd->scrollto_type = ELM_GENLIST_ITEM_SCROLLTO_TOP; - _it->showme = EINA_TRUE; - return; - } - if (_it->wd->show_item) - { - _it->wd->show_item->showme = EINA_FALSE; - _it->wd->show_item = NULL; - } - elm_smart_scroller_child_region_show(_it->wd->scr, - _it->x + _it->block->x, - _it->y + _it->block->y, - _it->block->w, oh); + if (_elm_genlist_item_compute_coordinates(it, type, &x, &y, &w, &h)) + elm_smart_scroller_region_bring_in(_it->wd->scr,x, y, w, h); } -EAPI void -elm_genlist_item_top_bring_in(Elm_Object_Item *it) +EINA_DEPRECATED EAPI void +elm_genlist_item_top_show(Elm_Object_Item *it) { - ELM_OBJ_ITEM_CHECK_OR_RETURN(it); - Evas_Coord ow, oh; - Evas_Coord pan_w = 0, pan_h = 0; - Eina_Bool pan_size_ready = EINA_FALSE; - Elm_Genlist_Item *_it = (Elm_Genlist_Item *) it; + elm_genlist_item_show(it, ELM_GENLIST_ITEM_SCROLLTO_TOP); +} - if (_it->generation < _it->wd->generation) return; - evas_object_geometry_get(_it->wd->pan_smart, NULL, NULL, &ow, &oh); - if (_it->block) - { - _pan_child_size_get(_it->wd->pan_smart, &pan_w, &pan_h); - if ((pan_w > (_it->x + _it->block->x)) && (pan_h > (_it->y + _it->block->y + oh))) - { - pan_size_ready = EINA_TRUE; - } - } - if ((_it->queued) || (!_it->mincalcd) || (!pan_size_ready)) - { - _it->wd->show_item = _it; - _it->wd->bring_in = EINA_TRUE; - _it->wd->scrollto_type = ELM_GENLIST_ITEM_SCROLLTO_TOP; - _it->showme = EINA_TRUE; - return; - } - if (_it->wd->show_item) - { - _it->wd->show_item->showme = EINA_FALSE; - _it->wd->show_item = NULL; - } - elm_smart_scroller_region_bring_in(_it->wd->scr, - _it->x + _it->block->x, - _it->y + _it->block->y, - _it->block->w, oh); +EINA_DEPRECATED EAPI void +elm_genlist_item_top_bring_in(Elm_Object_Item *it) +{ + elm_genlist_item_bring_in(it, ELM_GENLIST_ITEM_SCROLLTO_TOP); } -EAPI void +EINA_DEPRECATED EAPI void elm_genlist_item_middle_show(Elm_Object_Item *it) { - ELM_OBJ_ITEM_CHECK_OR_RETURN(it); - Evas_Coord ow, oh; - Evas_Coord pan_w = 0, pan_h = 0; - Eina_Bool pan_size_ready = EINA_FALSE; - Elm_Genlist_Item *_it = (Elm_Genlist_Item *) it; + elm_genlist_item_show(it, ELM_GENLIST_ITEM_SCROLLTO_MIDDLE); +} - if (_it->generation < _it->wd->generation) return; - evas_object_geometry_get(_it->wd->pan_smart, NULL, NULL, &ow, &oh); - if (_it->block) - { - _pan_child_size_get(_it->wd->pan_smart, &pan_w, &pan_h); - if ((pan_w > (_it->x + _it->block->x)) && (pan_h > (_it->y + _it->block->y + oh / 2))) - { - pan_size_ready = EINA_TRUE; - } - } - if ((_it->queued) || (!_it->mincalcd) || (!pan_size_ready)) - { - _it->wd->show_item = _it; - _it->wd->bring_in = EINA_FALSE; - _it->wd->scrollto_type = ELM_GENLIST_ITEM_SCROLLTO_MIDDLE; - _it->showme = EINA_TRUE; - return; - } - if (_it->wd->show_item) - { - _it->wd->show_item->showme = EINA_FALSE; - _it->wd->show_item = NULL; - } - elm_smart_scroller_child_region_show(_it->wd->scr, - _it->x + _it->block->x, - _it->y + _it->block->y - oh / 2 + - _it->h / 2, _it->block->w, oh); +EINA_DEPRECATED EAPI void +elm_genlist_item_middle_bring_in(Elm_Object_Item *it) +{ + elm_genlist_item_bring_in(it, ELM_GENLIST_ITEM_SCROLLTO_MIDDLE); +} + +EINA_DEPRECATED EAPI void +elm_genlist_item_contents_orphan(Elm_Object_Item *it) +{ + elm_genlist_item_all_contents_unset(it, NULL); } EAPI void -elm_genlist_item_middle_bring_in(Elm_Object_Item *it) +elm_genlist_item_all_contents_unset(Elm_Object_Item *it, Eina_List **l) { ELM_OBJ_ITEM_CHECK_OR_RETURN(it); - Evas_Coord ow, oh; - Evas_Coord pan_w = 0, pan_h = 0; - Eina_Bool pan_size_ready = EINA_FALSE; - Elm_Genlist_Item *_it = (Elm_Genlist_Item *) it; - if (_it->generation < _it->wd->generation) return; - evas_object_geometry_get(_it->wd->pan_smart, NULL, NULL, &ow, &oh); - if (_it->block) - { - _pan_child_size_get(_it->wd->pan_smart, &pan_w, &pan_h); - if ((pan_w > (_it->x + _it->block->x)) && (pan_h > (_it->y + _it->block->y + oh / 2))) - { - pan_size_ready = EINA_TRUE; - } - } - if ((_it->queued) || (!_it->mincalcd) || (!pan_size_ready)) - { - _it->wd->show_item = _it; - _it->wd->bring_in = EINA_TRUE; - _it->wd->scrollto_type = ELM_GENLIST_ITEM_SCROLLTO_MIDDLE; - _it->showme = EINA_TRUE; - return; - } - if (_it->wd->show_item) - { - _it->wd->show_item->showme = EINA_FALSE; - _it->wd->show_item = NULL; - } - elm_smart_scroller_region_bring_in(_it->wd->scr, - _it->x + _it->block->x, - _it->y + _it->block->y - oh / 2 + _it->h / 2, - _it->block->w, oh); -} - -EAPI void -elm_genlist_item_del(Elm_Object_Item *it) -{ - elm_object_item_del(it); -} - -EAPI void -elm_genlist_item_data_set(Elm_Object_Item *it, - const void *data) -{ - elm_object_item_data_set(it, (void *) data); -} - -EAPI void * -elm_genlist_item_data_get(const Elm_Object_Item *it) -{ - return elm_object_item_data_get(it); -} - -EAPI void -elm_genlist_item_contents_orphan(Elm_Object_Item *it) -======= - Elm_Gen_Item *_it = (Elm_Gen_Item *)it; - if (_it->generation < _it->wd->generation) return; - _item_move_after(_it, - (Elm_Gen_Item *) elm_genlist_last_item_get(WIDGET(_it))); -} - -EAPI void -elm_genlist_item_show(Elm_Object_Item *it, Elm_Genlist_Item_Scrollto_Type type) -{ - ELM_OBJ_ITEM_CHECK_OR_RETURN(it); - Evas_Coord x, y, w, h; - Elm_Gen_Item *_it = (Elm_Gen_Item *)it; - - if (_elm_genlist_item_compute_coordinates(it, type, &x, &y, &w, &h)) - elm_smart_scroller_child_region_show(_it->wd->scr, x, y, w, h); -} - -EAPI void -elm_genlist_item_bring_in(Elm_Object_Item *it, Elm_Genlist_Item_Scrollto_Type type) -{ - - ELM_OBJ_ITEM_CHECK_OR_RETURN(it); - Evas_Coord x, y, w, h; - Elm_Gen_Item *_it = (Elm_Gen_Item *)it; - - if (_elm_genlist_item_compute_coordinates(it, type, &x, &y, &w, &h)) - elm_smart_scroller_region_bring_in(_it->wd->scr,x, y, w, h); -} - -EINA_DEPRECATED EAPI void -elm_genlist_item_top_show(Elm_Object_Item *it) -{ - elm_genlist_item_show(it, ELM_GENLIST_ITEM_SCROLLTO_TOP); -} - -EINA_DEPRECATED EAPI void -elm_genlist_item_top_bring_in(Elm_Object_Item *it) -{ - elm_genlist_item_bring_in(it, ELM_GENLIST_ITEM_SCROLLTO_TOP); -} - -EINA_DEPRECATED EAPI void -elm_genlist_item_middle_show(Elm_Object_Item *it) -{ - elm_genlist_item_show(it, ELM_GENLIST_ITEM_SCROLLTO_MIDDLE); -} - -EINA_DEPRECATED EAPI void -elm_genlist_item_middle_bring_in(Elm_Object_Item *it) -{ - elm_genlist_item_bring_in(it, ELM_GENLIST_ITEM_SCROLLTO_MIDDLE); -} - -EINA_DEPRECATED EAPI void -elm_genlist_item_contents_orphan(Elm_Object_Item *it) -{ - elm_genlist_item_all_contents_unset(it, NULL); -} - -EAPI void -elm_genlist_item_all_contents_unset(Elm_Object_Item *it, Eina_List **l) ->>>>>>> remotes/origin/upstream -{ - ELM_OBJ_ITEM_CHECK_OR_RETURN(it); - - Evas_Object *content; -<<<<<<< HEAD - EINA_LIST_FREE(((Elm_Genlist_Item *) it)->content_objs, content) -======= - EINA_LIST_FREE(((Elm_Gen_Item *)it)->content_objs, content) ->>>>>>> remotes/origin/upstream + Evas_Object *content; + EINA_LIST_FREE(((Elm_Gen_Item *)it)->content_objs, content) { elm_widget_sub_object_del(WIDGET(it), content); evas_object_smart_member_del(content); evas_object_hide(content); -<<<<<<< HEAD - } -} - -EAPI const Evas_Object * -======= if (l) *l = eina_list_append(*l, content); } } EINA_DEPRECATED EAPI const Evas_Object * ->>>>>>> remotes/origin/upstream elm_genlist_item_object_get(const Elm_Object_Item *it) { ELM_OBJ_ITEM_CHECK_OR_RETURN(it, NULL); @@ -7847,18 +4987,6 @@ EAPI void elm_genlist_item_update(Elm_Object_Item *it) { ELM_OBJ_ITEM_CHECK_OR_RETURN(it); -<<<<<<< HEAD - Elm_Genlist_Item *_it = (Elm_Genlist_Item *) it; - - if (!_it->block) return; - if (_it->generation < _it->wd->generation) return; - _it->mincalcd = EINA_FALSE; - _it->updateme = EINA_TRUE; - _it->block->updateme = EINA_TRUE; - if (_it->wd->update_job) ecore_job_del(_it->wd->update_job); - _it->wd->update_job = ecore_job_add(_update_job, _it->wd); - _it->defer_unrealize = EINA_FALSE; -======= Elm_Gen_Item *_it = (Elm_Gen_Item *)it; if (!_it->item->block) return; @@ -7868,27 +4996,17 @@ elm_genlist_item_update(Elm_Object_Item *it) _it->item->block->updateme = EINA_TRUE; if (_it->wd->update_job) ecore_job_del(_it->wd->update_job); _it->wd->update_job = ecore_job_add(_update_job, _it->wd); ->>>>>>> remotes/origin/upstream } EAPI void elm_genlist_item_fields_update(Elm_Object_Item *it, const char *parts, -<<<<<<< HEAD - Elm_Genlist_Item_Field_Flags itf) -{ - ELM_OBJ_ITEM_CHECK_OR_RETURN(it); - Elm_Genlist_Item *_it = (Elm_Genlist_Item *) it; - - if (!_it->block) return; -======= Elm_Genlist_Item_Field_Type itf) { ELM_OBJ_ITEM_CHECK_OR_RETURN(it); Elm_Gen_Item *_it = (Elm_Gen_Item *)it; if (!_it->item->block) return; ->>>>>>> remotes/origin/upstream if (_it->generation < _it->wd->generation) return; if ((!itf) || (itf & ELM_GENLIST_ITEM_FIELD_TEXT)) @@ -7896,58 +5014,15 @@ elm_genlist_item_fields_update(Elm_Object_Item *it, if ((!itf) || (itf & ELM_GENLIST_ITEM_FIELD_CONTENT)) { _it->content_objs = _item_content_unrealize(_it, VIEW(_it), -<<<<<<< HEAD - &_it->contents, parts); - _it->content_objs = _item_content_realize(_it, VIEW(_it), - &_it->contents, parts); - - if (_it->renamed) - { - _it->content_objs = _item_mode_content_unrealize(_it, VIEW(_it), - &_it->contents, parts, &_it->content_objs); - _it->content_objs = _item_mode_content_realize(_it, VIEW(_it), - &_it->contents, parts, &_it->content_objs, "renames"); - } - - if (_it->mode_view) - { - _it->mode_content_objs = _item_mode_content_unrealize(_it, _it->mode_view, - &_it->mode_contents, parts, &_it->mode_content_objs); - _it->mode_content_objs = _item_mode_content_realize(_it, _it->mode_view, - &_it->mode_contents, parts, &_it->mode_content_objs, "contents"); - } - - if (_it->wd->edit_mode) - { - _it->edit_content_objs = _item_mode_content_unrealize(_it, _it->edit_obj, - &_it->contents, parts, &_it->edit_content_objs); - _it->edit_content_objs = _item_mode_content_realize(_it, _it->edit_obj, - &_it->contents, parts, &_it->edit_content_objs, "edit_contents"); - } -======= &_it->contents, parts); _it->content_objs = _item_content_realize(_it, VIEW(_it), &_it->contents, parts); ->>>>>>> remotes/origin/upstream } if ((!itf) || (itf & ELM_GENLIST_ITEM_FIELD_STATE)) _item_state_realize(_it, VIEW(_it), &_it->states, parts); } EAPI void -<<<<<<< HEAD -elm_genlist_item_item_class_update(Elm_Object_Item *it, - const Elm_Genlist_Item_Class *itc) -{ - ELM_OBJ_ITEM_CHECK_OR_RETURN(it); - Elm_Genlist_Item *_it = (Elm_Genlist_Item *) it; - - if (!_it->block) return; - EINA_SAFETY_ON_NULL_RETURN(itc); - if (_it->generation < _it->wd->generation) return; - _it->itc = itc; - _it->nocache = EINA_TRUE; -======= elm_genlist_item_item_class_update(Elm_Object_Item *it, const Elm_Genlist_Item_Class *itc) { @@ -7959,7 +5034,6 @@ elm_genlist_item_item_class_update(Elm_Object_Item *it, if (_it->generation < _it->wd->generation) return; _it->itc = itc; _it->item->nocache_once = EINA_TRUE; ->>>>>>> remotes/origin/upstream elm_genlist_item_update(it); } @@ -7967,11 +5041,7 @@ EAPI const Elm_Genlist_Item_Class * elm_genlist_item_item_class_get(const Elm_Object_Item *it) { ELM_OBJ_ITEM_CHECK_OR_RETURN(it, NULL); -<<<<<<< HEAD - Elm_Genlist_Item *_it = (Elm_Genlist_Item *) it; -======= Elm_Gen_Item *_it = (Elm_Gen_Item *)it; ->>>>>>> remotes/origin/upstream if (_it->generation < _it->wd->generation) return NULL; return _it->itc; } @@ -8010,21 +5080,13 @@ elm_genlist_item_tooltip_text_set(Elm_Object_Item *it, } EAPI void -<<<<<<< HEAD -elm_genlist_item_tooltip_content_cb_set(Elm_Object_Item *it, -======= elm_genlist_item_tooltip_content_cb_set(Elm_Object_Item *it, ->>>>>>> remotes/origin/upstream Elm_Tooltip_Item_Content_Cb func, const void *data, Evas_Smart_Cb del_cb) { ELM_OBJ_ITEM_CHECK_OR_GOTO(it, error); -<<<<<<< HEAD - Elm_Genlist_Item *_it = (Elm_Genlist_Item *) it; -======= Elm_Gen_Item *_it = (Elm_Gen_Item *)it; ->>>>>>> remotes/origin/upstream if ((_it->tooltip.content_cb == func) && (_it->tooltip.data == data)) return; @@ -8042,11 +5104,7 @@ elm_genlist_item_tooltip_content_cb_set(Elm_Object_Item *it, _it->tooltip.content_cb, _it->tooltip.data, NULL); elm_widget_item_tooltip_style_set(_it, _it->tooltip.style); -<<<<<<< HEAD - //elm_widget_item_tooltip_window_mode_set(_it, _it->tooltip.free_size); //upstream -======= elm_widget_item_tooltip_window_mode_set(_it, _it->tooltip.free_size); ->>>>>>> remotes/origin/upstream } return; @@ -8059,47 +5117,27 @@ EAPI void elm_genlist_item_tooltip_unset(Elm_Object_Item *it) { ELM_OBJ_ITEM_CHECK_OR_RETURN(it); -<<<<<<< HEAD - Elm_Genlist_Item *_it = (Elm_Genlist_Item *) it; -======= Elm_Gen_Item *_it = (Elm_Gen_Item *)it; ->>>>>>> remotes/origin/upstream if ((VIEW(_it)) && (_it->tooltip.content_cb)) elm_widget_item_tooltip_unset(_it); if (_it->tooltip.del_cb) -<<<<<<< HEAD - _it->tooltip.del_cb((void *)_it->tooltip.data, WIDGET(_it), _it); - _it->tooltip.del_cb = NULL; - _it->tooltip.content_cb = NULL; - _it->tooltip.data = NULL; - //_it->tooltip.free_size = EINA_FALSE; //upstream -======= _it->tooltip.del_cb((void *) _it->tooltip.data, WIDGET(_it), _it); _it->tooltip.del_cb = NULL; _it->tooltip.content_cb = NULL; _it->tooltip.data = NULL; _it->tooltip.free_size = EINA_FALSE; ->>>>>>> remotes/origin/upstream if (_it->tooltip.style) elm_genlist_item_tooltip_style_set(it, NULL); } EAPI void -<<<<<<< HEAD -elm_genlist_item_tooltip_style_set(Elm_Object_Item *it, - const char *style) -{ - ELM_OBJ_ITEM_CHECK_OR_RETURN(it); - Elm_Genlist_Item *_it = (Elm_Genlist_Item *) it; -======= elm_genlist_item_tooltip_style_set(Elm_Object_Item *it, const char *style) { ELM_OBJ_ITEM_CHECK_OR_RETURN(it); Elm_Gen_Item *_it = (Elm_Gen_Item *)it; ->>>>>>> remotes/origin/upstream eina_stringshare_replace(&_it->tooltip.style, style); if (VIEW(_it)) elm_widget_item_tooltip_style_set(_it, style); @@ -8116,15 +5154,9 @@ elm_genlist_item_tooltip_window_mode_set(Elm_Object_Item *it, Eina_Bool disable) { ELM_OBJ_ITEM_CHECK_OR_RETURN(it, EINA_FALSE); -<<<<<<< HEAD - Elm_Genlist_Item *_it = (Elm_Genlist_Item *) it; - -// _it->tooltip.free_size = disable; //upstream -======= Elm_Gen_Item *_it = (Elm_Gen_Item *)it; _it->tooltip.free_size = disable; ->>>>>>> remotes/origin/upstream if (VIEW(_it)) return elm_widget_item_tooltip_window_mode_set(_it, disable); return EINA_TRUE; } @@ -8136,15 +5168,6 @@ elm_genlist_item_tooltip_window_mode_get(const Elm_Object_Item *it) } EAPI void -<<<<<<< HEAD -elm_genlist_item_cursor_set(Elm_Object_Item *it, - const char *cursor) -{ - ELM_OBJ_ITEM_CHECK_OR_RETURN(it); - Elm_Genlist_Item *_it = (Elm_Genlist_Item *) it; - eina_stringshare_replace(&_it->mouse_cursor, cursor); - if (VIEW(_it)) elm_widget_item_cursor_set(it, cursor); -======= elm_genlist_item_cursor_set(Elm_Object_Item *it, const char *cursor) { @@ -8152,16 +5175,11 @@ elm_genlist_item_cursor_set(Elm_Object_Item *it, Elm_Gen_Item *_it = (Elm_Gen_Item *)it; eina_stringshare_replace(&_it->mouse_cursor, cursor); if (VIEW(_it)) elm_widget_item_cursor_set(_it, cursor); ->>>>>>> remotes/origin/upstream } EAPI const char * elm_genlist_item_cursor_get(const Elm_Object_Item *it) { -<<<<<<< HEAD - ELM_OBJ_ITEM_CHECK_OR_RETURN(it, NULL); -======= ->>>>>>> remotes/origin/upstream return elm_widget_item_cursor_get(it); } @@ -8169,11 +5187,7 @@ EAPI void elm_genlist_item_cursor_unset(Elm_Object_Item *it) { ELM_OBJ_ITEM_CHECK_OR_RETURN(it); -<<<<<<< HEAD - Elm_Genlist_Item *_it = (Elm_Genlist_Item *) it; -======= Elm_Gen_Item *_it = (Elm_Gen_Item *)it; ->>>>>>> remotes/origin/upstream if (!_it->mouse_cursor) return; @@ -8184,62 +5198,32 @@ elm_genlist_item_cursor_unset(Elm_Object_Item *it) } EAPI void -<<<<<<< HEAD -elm_genlist_item_cursor_style_set(Elm_Object_Item *it, - const char *style) -{ - ELM_OBJ_ITEM_CHECK_OR_RETURN(it); -======= elm_genlist_item_cursor_style_set(Elm_Object_Item *it, const char *style) { ->>>>>>> remotes/origin/upstream elm_widget_item_cursor_style_set(it, style); } EAPI const char * elm_genlist_item_cursor_style_get(const Elm_Object_Item *it) { -<<<<<<< HEAD - ELM_OBJ_ITEM_CHECK_OR_RETURN(it, NULL); -======= ->>>>>>> remotes/origin/upstream return elm_widget_item_cursor_style_get(it); } EAPI void elm_genlist_item_cursor_engine_only_set(Elm_Object_Item *it, -<<<<<<< HEAD - Eina_Bool engine_only) -{ - ELM_OBJ_ITEM_CHECK_OR_RETURN(it); -======= Eina_Bool engine_only) { ->>>>>>> remotes/origin/upstream elm_widget_item_cursor_engine_only_set(it, engine_only); } EAPI Eina_Bool elm_genlist_item_cursor_engine_only_get(const Elm_Object_Item *it) { -<<<<<<< HEAD - ELM_OBJ_ITEM_CHECK_OR_RETURN(it, EINA_FALSE); -======= ->>>>>>> remotes/origin/upstream return elm_widget_item_cursor_engine_only_get(it); } EAPI int -<<<<<<< HEAD -elm_genlist_item_index_get(Elm_Object_Item *it) -{ - ELM_OBJ_ITEM_CHECK_OR_RETURN(it, -1); - Elm_Genlist_Item *_it = (Elm_Genlist_Item *) it; - - if (_it->block) - return _it->position + (_it->block->position * _it->wd->max_items_per_block); -======= elm_genlist_item_index_get(const Elm_Object_Item *it) { ELM_OBJ_ITEM_CHECK_OR_RETURN(it, -1); @@ -8247,47 +5231,23 @@ elm_genlist_item_index_get(const Elm_Object_Item *it) if (_it->item->block) return _it->position + _it->item->block->position; ->>>>>>> remotes/origin/upstream return -1; } EAPI void elm_genlist_mode_set(Evas_Object *obj, -<<<<<<< HEAD - Elm_List_Mode mode) -======= Elm_List_Mode mode) ->>>>>>> remotes/origin/upstream { ELM_CHECK_WIDTYPE(obj, widtype); Widget_Data *wd = elm_widget_data_get(obj); if (!wd) return; if (wd->mode == mode) return; wd->mode = mode; -<<<<<<< HEAD - _sizing_eval(obj); -} - -EAPI void -elm_genlist_horizontal_set(Evas_Object *obj, - Elm_List_Mode mode) -{ - elm_genlist_mode_set(obj, mode); -} - -EAPI void -elm_genlist_horizontal_mode_set(Evas_Object *obj, - Elm_List_Mode mode) -{ - elm_genlist_mode_set(obj, mode); -} -======= if (wd->mode == ELM_LIST_COMPRESS) elm_genlist_homogeneous_set(obj, EINA_FALSE); _sizing_eval(obj); } ->>>>>>> remotes/origin/upstream EAPI Elm_List_Mode elm_genlist_mode_get(const Evas_Object *obj) @@ -8298,35 +5258,13 @@ elm_genlist_mode_get(const Evas_Object *obj) return wd->mode; } -<<<<<<< HEAD -EAPI Elm_List_Mode -elm_genlist_horizontal_get(const Evas_Object *obj) -{ - return elm_genlist_mode_get(obj); -} - -EAPI Elm_List_Mode -elm_genlist_horizontal_mode_get(const Evas_Object *obj) -{ - return elm_genlist_mode_get(obj); -} - -EAPI void -======= EINA_DEPRECATED EAPI void ->>>>>>> remotes/origin/upstream elm_genlist_always_select_mode_set(Evas_Object *obj, Eina_Bool always_select) { ELM_CHECK_WIDTYPE(obj, widtype); Widget_Data *wd = elm_widget_data_get(obj); if (!wd) return; -<<<<<<< HEAD - wd->always_select = always_select; -} - -EAPI Eina_Bool -======= if (always_select) elm_genlist_select_mode_set(obj, ELM_OBJECT_SELECT_MODE_ALWAYS); else @@ -8338,18 +5276,11 @@ EAPI Eina_Bool } EINA_DEPRECATED EAPI Eina_Bool ->>>>>>> remotes/origin/upstream elm_genlist_always_select_mode_get(const Evas_Object *obj) { ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE; Widget_Data *wd = elm_widget_data_get(obj); if (!wd) return EINA_FALSE; -<<<<<<< HEAD - return wd->always_select; -} - -EAPI void -======= Elm_Object_Select_Mode oldmode = elm_genlist_select_mode_get(obj); if (oldmode == ELM_OBJECT_SELECT_MODE_ALWAYS) return EINA_TRUE; @@ -8357,64 +5288,12 @@ EAPI void } EINA_DEPRECATED EAPI void ->>>>>>> remotes/origin/upstream elm_genlist_no_select_mode_set(Evas_Object *obj, Eina_Bool no_select) { ELM_CHECK_WIDTYPE(obj, widtype); Widget_Data *wd = elm_widget_data_get(obj); if (!wd) return; -<<<<<<< HEAD - wd->no_select = no_select; -} - -EAPI Eina_Bool -elm_genlist_no_select_mode_get(const Evas_Object *obj) -{ - ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE; - Widget_Data *wd = elm_widget_data_get(obj); - if (!wd) return EINA_FALSE; - return wd->no_select; -} - -EAPI void -elm_genlist_compress_mode_set(Evas_Object *obj, - Eina_Bool compress) -{ - ELM_CHECK_WIDTYPE(obj, widtype); - Widget_Data *wd = elm_widget_data_get(obj); - if (!wd) return; - wd->compress = compress; - if (!compress) elm_genlist_homogeneous_set(obj, EINA_FALSE); -} - -EAPI Eina_Bool -elm_genlist_compress_mode_get(const Evas_Object *obj) -{ - ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE; - Widget_Data *wd = elm_widget_data_get(obj); - if (!wd) return EINA_FALSE; - return wd->compress; -} - -EAPI void -elm_genlist_height_for_width_mode_set(Evas_Object *obj, - Eina_Bool height_for_width) -{ - ELM_CHECK_WIDTYPE(obj, widtype); - Widget_Data *wd = elm_widget_data_get(obj); - if (!wd) return; - wd->height_for_width = !!height_for_width; - if (wd->height_for_width) - { - elm_genlist_homogeneous_set(obj, EINA_FALSE); - elm_genlist_compress_mode_set(obj, EINA_TRUE); - } -} - -EAPI Eina_Bool -elm_genlist_height_for_width_mode_get(const Evas_Object *obj) -======= if (no_select) elm_genlist_select_mode_set(obj, ELM_OBJECT_SELECT_MODE_NONE); else @@ -8427,19 +5306,14 @@ elm_genlist_height_for_width_mode_get(const Evas_Object *obj) EINA_DEPRECATED EAPI Eina_Bool elm_genlist_no_select_mode_get(const Evas_Object *obj) ->>>>>>> remotes/origin/upstream { ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE; Widget_Data *wd = elm_widget_data_get(obj); if (!wd) return EINA_FALSE; -<<<<<<< HEAD - return wd->height_for_width; -======= Elm_Object_Select_Mode oldmode = elm_genlist_select_mode_get(obj); if (oldmode == ELM_OBJECT_SELECT_MODE_NONE) return EINA_TRUE; return EINA_FALSE; ->>>>>>> remotes/origin/upstream } EAPI void @@ -8450,13 +5324,9 @@ elm_genlist_bounce_set(Evas_Object *obj, ELM_CHECK_WIDTYPE(obj, widtype); Widget_Data *wd = elm_widget_data_get(obj); if (!wd) return; -<<<<<<< HEAD - elm_smart_scroller_bounce_allow_set(wd->scr, h_bounce, v_bounce); -======= wd->h_bounce = !!h_bounce; wd->v_bounce = !!v_bounce; elm_smart_scroller_bounce_allow_set(wd->scr, wd->h_bounce, wd->v_bounce); ->>>>>>> remotes/origin/upstream } EAPI void @@ -8467,12 +5337,8 @@ elm_genlist_bounce_get(const Evas_Object *obj, ELM_CHECK_WIDTYPE(obj, widtype); Widget_Data *wd = elm_widget_data_get(obj); if (!wd) return; -<<<<<<< HEAD - elm_smart_scroller_bounce_allow_get(wd->scr, h_bounce, v_bounce); -======= if (h_bounce) *h_bounce = wd->h_bounce; if (v_bounce) *v_bounce = wd->v_bounce; ->>>>>>> remotes/origin/upstream } EAPI void @@ -8482,12 +5348,7 @@ elm_genlist_homogeneous_set(Evas_Object *obj, ELM_CHECK_WIDTYPE(obj, widtype); Widget_Data *wd = elm_widget_data_get(obj); if (!wd) return; -<<<<<<< HEAD - if (homogeneous) elm_genlist_compress_mode_set(obj, EINA_TRUE); - wd->homogeneous = homogeneous; -======= wd->homogeneous = !!homogeneous; ->>>>>>> remotes/origin/upstream } EAPI Eina_Bool @@ -8501,20 +5362,12 @@ elm_genlist_homogeneous_get(const Evas_Object *obj) EAPI void elm_genlist_block_count_set(Evas_Object *obj, -<<<<<<< HEAD - int n) -======= int count) ->>>>>>> remotes/origin/upstream { ELM_CHECK_WIDTYPE(obj, widtype); Widget_Data *wd = elm_widget_data_get(obj); if (!wd) return; -<<<<<<< HEAD - wd->max_items_per_block = n; -======= wd->max_items_per_block = count; ->>>>>>> remotes/origin/upstream wd->item_cache_max = wd->max_items_per_block * 2; _item_cache_clean(wd); } @@ -8589,21 +5442,12 @@ elm_genlist_realized_items_update(Evas_Object *obj) } EAPI void -<<<<<<< HEAD -elm_genlist_item_mode_set(Elm_Object_Item *it, - const char *mode_type, - Eina_Bool mode_set) -{ - ELM_OBJ_ITEM_CHECK_OR_RETURN(it); - Elm_Genlist_Item *_it = (Elm_Genlist_Item *) it; -======= elm_genlist_item_decorate_mode_set(Elm_Object_Item *it, const char *mode_type, Eina_Bool mode_set) { ELM_OBJ_ITEM_CHECK_OR_RETURN(it); Elm_Gen_Item *_it = (Elm_Gen_Item *)it; ->>>>>>> remotes/origin/upstream Widget_Data *wd = _it->wd; Eina_List *l; @@ -8613,40 +5457,25 @@ elm_genlist_item_decorate_mode_set(Elm_Object_Item *it, if (!mode_type) return; if ((_it->generation < _it->wd->generation) || elm_widget_item_disabled_get(_it)) return; -<<<<<<< HEAD - if (wd->edit_mode) return; -======= if (wd->decorate_mode) return; ->>>>>>> remotes/origin/upstream if ((wd->mode_item == _it) && (!strcmp(mode_type, wd->mode_type)) && (mode_set)) return; if (!_it->itc->mode_item_style) return; -<<<<<<< HEAD -======= _it->mode_set = mode_set; ->>>>>>> remotes/origin/upstream if (wd->multi) { EINA_LIST_FOREACH(wd->selected, l, it2) -<<<<<<< HEAD - if (((Elm_Genlist_Item *) it2)->realized) -======= if (((Elm_Gen_Item *)it2)->realized) ->>>>>>> remotes/origin/upstream elm_genlist_item_selected_set(it2, EINA_FALSE); } else { it2 = elm_genlist_selected_item_get(wd->obj); -<<<<<<< HEAD - if ((it2) && (((Elm_Genlist_Item *) it2)->realized)) -======= if ((it2) && (((Elm_Gen_Item *)it2)->realized)) ->>>>>>> remotes/origin/upstream elm_genlist_item_selected_set(it2, EINA_FALSE); } @@ -8659,54 +5488,12 @@ elm_genlist_item_decorate_mode_set(Elm_Object_Item *it, if (mode_set) _item_mode_set(_it); } -<<<<<<< HEAD - -EAPI const char * -elm_genlist_mode_item_style_get(const Evas_Object *obj) -======= -EAPI const char * -elm_genlist_item_decorate_mode_get(const Evas_Object *obj) ->>>>>>> remotes/origin/upstream -{ - ELM_CHECK_WIDTYPE(obj, widtype) NULL; - Widget_Data *wd = elm_widget_data_get(obj); - if (!wd) return NULL; -<<<<<<< HEAD - return wd->mode_item->itc->mode_item_style; -} - -EAPI void -elm_genlist_mode_item_style_set(Evas_Object *obj, const char *style) -{ - ELM_CHECK_WIDTYPE(obj, widtype); - Widget_Data *wd = elm_widget_data_get(obj); - if (!wd) return; - if ((style == wd->mode_item->itc->mode_item_style) || - (style && wd->mode_item->itc->mode_item_style && - (!strcmp(style, wd->mode_item->itc->mode_item_style)))) - return; - eina_stringshare_replace(&wd->mode_item->itc->mode_item_style, style); - elm_genlist_realized_items_update(obj); -} - EAPI const char * -elm_genlist_mode_type_get(const Evas_Object *obj) -{ - ELM_CHECK_WIDTYPE(obj, widtype) NULL; - Widget_Data *wd = elm_widget_data_get(obj); - if (!wd) return NULL; - return wd->mode_type; -} - -EAPI const Elm_Object_Item * -elm_genlist_mode_item_get(const Evas_Object *obj) +elm_genlist_item_decorate_mode_get(const Elm_Object_Item *it) { - ELM_CHECK_WIDTYPE(obj, widtype) NULL; - Widget_Data *wd = elm_widget_data_get(obj); - if (!wd) return NULL; - return (Elm_Object_Item *) wd->mode_item; -======= - return wd->mode_type; + ELM_OBJ_ITEM_CHECK_OR_RETURN(it, NULL); + Elm_Gen_Item *_it = (Elm_Gen_Item *)it; + return _it->wd->mode_type; } EAPI const Elm_Object_Item * @@ -8765,7 +5552,6 @@ elm_genlist_decorate_mode_set(Evas_Object *obj, Eina_Bool decorated) } if (wd->calc_job) ecore_job_del(wd->calc_job); wd->calc_job = ecore_job_add(_calc_job, wd); ->>>>>>> remotes/origin/upstream } EAPI void @@ -8775,11 +5561,7 @@ elm_genlist_reorder_mode_set(Evas_Object *obj, ELM_CHECK_WIDTYPE(obj, widtype); Widget_Data *wd = elm_widget_data_get(obj); if (!wd) return; -<<<<<<< HEAD - wd->reorder_mode = reorder_mode; -======= wd->reorder_mode = !!reorder_mode; ->>>>>>> remotes/origin/upstream } EAPI Eina_Bool @@ -8791,14 +5573,6 @@ elm_genlist_reorder_mode_get(const Evas_Object *obj) return wd->reorder_mode; } -<<<<<<< HEAD -EAPI Elm_Genlist_Item_Flags -elm_genlist_item_flags_get(const Elm_Object_Item *it) -{ - ELM_OBJ_ITEM_CHECK_OR_RETURN(it, ELM_GENLIST_ITEM_MAX); - Elm_Genlist_Item *_it = (Elm_Genlist_Item *) it; - return _it->flags; -======= EAPI Elm_Genlist_Item_Type elm_genlist_item_type_get(const Elm_Object_Item *it) { @@ -8977,7 +5751,6 @@ elm_genlist_item_select_mode_get(const Elm_Object_Item *it) Elm_Gen_Item *_it = (Elm_Gen_Item *)it; if (!_it) return ELM_OBJECT_SELECT_MODE_MAX; return _it->select_mode; ->>>>>>> remotes/origin/upstream } /* for gengrid as of now */ @@ -9037,12 +5810,7 @@ _elm_genlist_current_page_get(const Evas_Object *obj, ELM_CHECK_WIDTYPE(obj, widtype); Widget_Data *wd = elm_widget_data_get(obj); if (!wd) return; -<<<<<<< HEAD - if (wd->scr) - elm_smart_scroller_current_page_get(wd->scr, h_pagenumber, v_pagenumber); -======= elm_smart_scroller_current_page_get(wd->scr, h_pagenumber, v_pagenumber); ->>>>>>> remotes/origin/upstream } /* for gengrid as of now */ @@ -9054,12 +5822,7 @@ _elm_genlist_last_page_get(const Evas_Object *obj, ELM_CHECK_WIDTYPE(obj, widtype); Widget_Data *wd = elm_widget_data_get(obj); if (!wd) return; -<<<<<<< HEAD - if (wd->scr) - elm_smart_scroller_last_page_get(wd->scr, h_pagenumber, v_pagenumber); -======= elm_smart_scroller_last_page_get(wd->scr, h_pagenumber, v_pagenumber); ->>>>>>> remotes/origin/upstream } /* for gengrid as of now */ @@ -9071,12 +5834,7 @@ _elm_genlist_page_show(const Evas_Object *obj, ELM_CHECK_WIDTYPE(obj, widtype); Widget_Data *wd = elm_widget_data_get(obj); if (!wd) return; -<<<<<<< HEAD - if (wd->scr) - elm_smart_scroller_page_show(wd->scr, h_pagenumber, v_pagenumber); -======= elm_smart_scroller_page_show(wd->scr, h_pagenumber, v_pagenumber); ->>>>>>> remotes/origin/upstream } /* for gengrid as of now */ @@ -9088,30 +5846,18 @@ _elm_genlist_page_bring_in(const Evas_Object *obj, ELM_CHECK_WIDTYPE(obj, widtype); Widget_Data *wd = elm_widget_data_get(obj); if (!wd) return; -<<<<<<< HEAD - if (wd->scr) - elm_smart_scroller_page_bring_in(wd->scr, h_pagenumber, v_pagenumber); -} - -void -_elm_genlist_item_unrealize(Elm_Genlist_Item *it, -======= elm_smart_scroller_page_bring_in(wd->scr, h_pagenumber, v_pagenumber); } void _elm_genlist_item_unrealize(Elm_Gen_Item *it, ->>>>>>> remotes/origin/upstream Eina_Bool calc) { Evas_Object *content; if (!it->realized) return; if (it->wd->reorder_it == it) return; -<<<<<<< HEAD -======= ->>>>>>> remotes/origin/upstream evas_event_freeze(evas_object_evas_get(WIDGET(it))); if (!calc) evas_object_smart_callback_call(WIDGET(it), SIG_UNREALIZED, it); @@ -9131,11 +5877,7 @@ _elm_genlist_item_unrealize(Elm_Gen_Item *it, EINA_LIST_FREE(it->content_objs, content) evas_object_del(content); -<<<<<<< HEAD - _item_unrealize(it, EINA_FALSE);//it->unrealize_cb(it); //upstream -======= it->unrealize_cb(it); ->>>>>>> remotes/origin/upstream it->realized = EINA_FALSE; it->want_unrealize = EINA_FALSE; @@ -9144,19 +5886,10 @@ _elm_genlist_item_unrealize(Elm_Gen_Item *it, } void -<<<<<<< HEAD -_elm_genlist_item_del_notserious(Elm_Genlist_Item *it) -{ - elm_widget_item_pre_notify_del(it); - it->generation = it->wd->generation - 1; /* This means that the item is deleted */ - - if (it->walking) return; /* func.del is called twice when it->func.func is _elm_widget_item_del*/ -======= _elm_genlist_item_del_notserious(Elm_Gen_Item *it) { elm_widget_item_pre_notify_del(it); it->generation = it->wd->generation - 1; /* This means that the item is deleted */ ->>>>>>> remotes/origin/upstream if (it->selected) it->wd->selected = eina_list_remove(it->wd->selected, it); if (it->itc->func.del) @@ -9164,11 +5897,7 @@ _elm_genlist_item_del_notserious(Elm_Gen_Item *it) } void -<<<<<<< HEAD -_elm_genlist_item_del_serious(Elm_Genlist_Item *it) -======= _elm_genlist_item_del_serious(Elm_Gen_Item *it) ->>>>>>> remotes/origin/upstream { _elm_genlist_item_del_notserious(it); it->wd->items = eina_inlist_remove(it->wd->items, EINA_INLIST_GET(it)); @@ -9176,74 +5905,31 @@ _elm_genlist_item_del_serious(Elm_Gen_Item *it) it->tooltip.del_cb((void *)it->tooltip.data, WIDGET(it), it); it->wd->walking -= it->walking; if (it->long_timer) ecore_timer_del(it->long_timer); -<<<<<<< HEAD - if (it->flags & ELM_GENLIST_ITEM_GROUP) - it->wd->group_items = eina_list_remove(it->wd->group_items, it); - -/* -======= if (it->group) it->wd->group_items = eina_list_remove(it->wd->group_items, it); ->>>>>>> remotes/origin/upstream if (it->wd->state) { eina_inlist_sorted_state_free(it->wd->state); it->wd->state = NULL; } -<<<<<<< HEAD -*/ if (it->wd->calc_job) ecore_job_del(it->wd->calc_job); - it->wd->calc_job = ecore_job_add(_calc_job, it->wd); - //free(it->item); //upstream + it->wd->calc_job = ecore_job_add(it->wd->calc_cb, it->wd); + free(it->item); - //it->item = NULL; //upstream - if (it->wd->last_selected_item == (Elm_Object_Item *) it) + it->item = NULL; + if (it->wd->last_selected_item == (Elm_Object_Item *)it) it->wd->last_selected_item = NULL; + it->wd->item_count--; } EAPI void -elm_genlist_item_move_after(Elm_Object_Item *it __UNUSED__, Elm_Object_Item *after __UNUSED__) +elm_genlist_tree_effect_enabled_set(Evas_Object *obj, Eina_Bool enabled) { - return; -} - -EAPI void -elm_genlist_item_move_before(Elm_Object_Item *it __UNUSED__, Elm_Object_Item *before __UNUSED__) -{ - return; -} - -EAPI void -elm_genlist_effect_set(const Evas_Object *obj, Eina_Bool emode) -{ - ELM_CHECK_WIDTYPE(obj, widtype); - Widget_Data *wd = elm_widget_data_get(obj); - if (!wd) return; - wd->effect_mode = emode; - // wd->point_rect = evas_object_rectangle_add(evas_object_evas_get(wd->obj)); - // evas_object_resize(wd->point_rect, 10, 25); - // evas_object_color_set(wd->point_rect, 255, 0, 0, 130); - // evas_object_show(wd->point_rect); - // evas_object_hide(wd->point_rect); -======= - if (it->wd->calc_job) ecore_job_del(it->wd->calc_job); - it->wd->calc_job = ecore_job_add(it->wd->calc_cb, it->wd); - free(it->item); - - it->item = NULL; - if (it->wd->last_selected_item == (Elm_Object_Item *)it) - it->wd->last_selected_item = NULL; - it->wd->item_count--; -} - -EAPI void -elm_genlist_tree_effect_enabled_set(Evas_Object *obj, Eina_Bool enabled) -{ - ELM_CHECK_WIDTYPE(obj, widtype); - Widget_Data *wd = elm_widget_data_get(obj); - if (!wd) return; - wd->tree_effect_enabled = !!enabled; + ELM_CHECK_WIDTYPE(obj, widtype); + Widget_Data *wd = elm_widget_data_get(obj); + if (!wd) return; + wd->tree_effect_enabled = !!enabled; } EAPI Eina_Bool @@ -9253,7 +5939,6 @@ elm_genlist_tree_effect_enabled_get(const Evas_Object *obj) Widget_Data *wd = elm_widget_data_get(obj); if (!wd) return EINA_FALSE; return wd->tree_effect_enabled; ->>>>>>> remotes/origin/upstream } static Evas_Object* @@ -9271,576 +5956,6 @@ _create_tray_alpha_bg(const Evas_Object *obj) evas_object_color_set(bg,0,0,0,0); evas_object_resize(bg , ow, oh); evas_object_move(bg , ox, oy); -<<<<<<< HEAD - evas_object_show(bg); - evas_object_hide(bg); - return bg ; -} - -static unsigned int -current_time_get() -{ - struct timeval timev; - - gettimeofday(&timev, NULL); - return ((timev.tv_sec * 1000) + ((timev.tv_usec) / 1000)); -} - -// added for item moving animation. -static Eina_Bool -_item_moving_effect_timer_cb(void *data) -{ - Widget_Data *wd = data; - if (!wd) return EINA_FALSE; - Item_Block *itb; - Evas_Coord ox, oy, ow, oh, cvx, cvy, cvw, cvh; - Elm_Genlist_Item *it = NULL, *it2; - const Eina_List *l; - double time = 0.5, t; - int y, dy; - Eina_Bool check, end = EINA_FALSE, vis = EINA_TRUE; - int in = 0; - - t = ((0.0 > (t = current_time_get() - wd->start_time)) ? 0.0 : t) / 1000; - - evas_object_geometry_get(wd->pan_smart, &ox, &oy, &ow, &oh); - evas_output_viewport_get(evas_object_evas_get(wd->pan_smart), &cvx, &cvy, &cvw, &cvh); - if (t > time) end = EINA_TRUE; - - // Below while statement is needed, when the genlist is resized. - it2 = wd->expanded_item; - while (it2 && vis) - { - evas_object_move(VIEW(it2), it2->scrl_x, it2->scrl_y); - vis = (ELM_RECTS_INTERSECT(it2->scrl_x, it2->scrl_y, it2->w, it2->h, - cvx, cvy, cvw, cvh)); - it2 = (Elm_Genlist_Item *) elm_genlist_item_prev_get((Elm_Object_Item *) it2); - } - if (wd->expanded_next_item) - { - Item_Block *itb2; - it2 = wd->expanded_next_item; - itb2 = wd->expanded_next_item->block; - if ((wd->expanded_move_effect_set) && (!(ELM_RECTS_INTERSECT(itb2->x - wd->pan_x + ox, - itb2->y - wd->pan_y + oy, - itb2->w, itb2->h, - cvx, cvy, cvw, cvh)))) - { - _item_block_position(itb2, 0); - wd->expanded_move_effect_set = EINA_FALSE; - } - } - else - { - it2 = (Elm_Genlist_Item *) elm_genlist_item_next_get((Elm_Object_Item *) wd->expanded_item); - } - while (it2) - { - if (wd->expanded_item->expanded_depth >= it2->expanded_depth) break; - it2 = (Elm_Genlist_Item *) elm_genlist_item_next_get((Elm_Object_Item *) it2); - } - dy = 0; - if (it2) - { - if (wd->move_effect_mode == ELM_GENLIST_ITEM_MOVE_EFFECT_EXPAND) - dy = ((it2->scrl_y > cvy + cvh) ? cvy + cvh : it2->scrl_y) - it2->old_scrl_y; - else if (wd->move_effect_mode == ELM_GENLIST_ITEM_MOVE_EFFECT_CONTRACT) - dy = wd->expand_item_gap; - - if (t <= time) - { - y = ((1 - (1 - (t / time)) * (1 - (t /time))) * dy); - } - else - { - end = EINA_TRUE; - y = dy; - } - - check = EINA_FALSE; - EINA_INLIST_FOREACH(wd->blocks, itb) - { - itb->w = wd->minw; - if (ELM_RECTS_INTERSECT(itb->x - wd->pan_x + ox, - itb->y - wd->pan_y + oy, - itb->w, itb->h, - cvx, cvy, cvw, cvh)) - { - EINA_LIST_FOREACH(itb->items, l, it) - { - if (it == it2) check = EINA_TRUE; - if (!check) continue; - - if (!it->old_scrl_y) - it->old_scrl_y = it->scrl_y; - if (it->old_scrl_y + y < oy + oh) - { - if (!it->realized) _item_realize(it, in, 0); - } - if (wd->move_effect_mode == ELM_GENLIST_ITEM_MOVE_EFFECT_DELETE && it->old_scrl_y + y < it->scrl_y) - it->old_scrl_y = it->scrl_y - y; - in++; - - if (wd->move_effect_mode != ELM_GENLIST_ITEM_MOVE_EFFECT_DELETE || - (wd->move_effect_mode == ELM_GENLIST_ITEM_MOVE_EFFECT_DELETE && it->old_scrl_y + y >= it->scrl_y)) - { - if (wd->edit_mode) _effect_item_controls(it, it->scrl_x, it->old_scrl_y + y); - else - { - evas_object_resize(VIEW(it), it->w, it->h); - evas_object_move(VIEW(it), it->scrl_x, it->old_scrl_y + y); - evas_object_show(VIEW(it)); - evas_object_raise(VIEW(it)); - } - - if (it->group_item) evas_object_raise(it->group_item->base.view); - } - } - } - } - - if (wd->move_effect_mode == ELM_GENLIST_ITEM_MOVE_EFFECT_EXPAND) - { - it = (Elm_Genlist_Item *) elm_genlist_item_prev_get((Elm_Object_Item *) it2); - while (it) - { - if (it->expanded_depth <= it2->expanded_depth) break; - if (it->scrl_y && (it->scrl_y < it2->old_scrl_y + y) && (it->expanded_depth > it2->expanded_depth)) - { - if (!it->effect_done) - { - edje_object_signal_emit(VIEW(it), "flip_item", ""); - evas_object_show(VIEW(it)); - it->effect_done = EINA_TRUE; - } - } - it = (Elm_Genlist_Item *) elm_genlist_item_prev_get((Elm_Object_Item *) it); - } - } - else if (wd->move_effect_mode == ELM_GENLIST_ITEM_MOVE_EFFECT_CONTRACT) - { - it = (Elm_Genlist_Item *) elm_genlist_item_prev_get((Elm_Object_Item *) it2); - while (it) - { - if ((it->scrl_y > it2->old_scrl_y + y) && (it->expanded_depth > it2->expanded_depth)) - { - if (!it->effect_done) - { - edje_object_signal_emit(VIEW(it), "elm,state,hide", ""); - it->effect_done = EINA_TRUE; - } - } - else - break; - it = (Elm_Genlist_Item *) elm_genlist_item_prev_get((Elm_Object_Item *) it); - } - } - } - else - { - int expand_num = 0; - int expand_order = 0; - if (wd->expanded_item) it = (Elm_Genlist_Item *) elm_genlist_item_next_get((Elm_Object_Item *) wd->expanded_item); - while (it) - { - expand_num++; - it = (Elm_Genlist_Item *) elm_genlist_item_next_get((Elm_Object_Item *) it); - } - if (wd->expanded_item) it = (Elm_Genlist_Item *) elm_genlist_item_next_get((Elm_Object_Item *) wd->expanded_item); - while (it) - { - expand_order++; - if (wd->expanded_item->expanded_depth >= it->expanded_depth) break; - if (wd->move_effect_mode == ELM_GENLIST_ITEM_MOVE_EFFECT_EXPAND) - { - if (!it->effect_done) - { - if (t >= (((expand_order - 1) * time) / expand_num)) - { - edje_object_signal_emit(VIEW(it), "flip_item", ""); - evas_object_show(VIEW(it)); - it->effect_done = EINA_TRUE; - } - } - } - it = (Elm_Genlist_Item *) elm_genlist_item_next_get((Elm_Object_Item *) it); - } - } - - if (end) - { - if (wd->item_moving_effect_timer) - { - if (wd->move_effect_mode == ELM_GENLIST_ITEM_MOVE_EFFECT_CONTRACT) - _item_subitems_clear(wd->expanded_item); - EINA_INLIST_FOREACH(wd->blocks, itb) - { - EINA_LIST_FOREACH(itb->items, l, it) - { - it->effect_done = EINA_TRUE; - it->old_scrl_y = it->scrl_y; - } - } - } - wd->item_moving_effect_timer = NULL; - wd->expanded_move_effect_set = EINA_FALSE; - - _item_auto_scroll(wd); - evas_object_lower(wd->alpha_bg); - evas_object_hide(wd->alpha_bg); - elm_smart_scroller_bounce_animator_disabled_set(wd->scr, EINA_FALSE); - wd->move_effect_mode = ELM_GENLIST_ITEM_MOVE_EFFECT_NONE; - - evas_object_smart_callback_call(wd->pan_smart, "changed", NULL); - evas_object_smart_callback_call(wd->obj, "effect_done", NULL); - evas_object_smart_changed(wd->pan_smart); - return ECORE_CALLBACK_CANCEL; - } - return ECORE_CALLBACK_RENEW; -} - -static void -_emit_contract(Elm_Genlist_Item *it) -{ - Elm_Genlist_Item *it2; - Eina_List *l; - - edje_object_signal_emit(VIEW(it), "elm,state,contract_flip", ""); - it->effect_done = EINA_FALSE; - - EINA_LIST_FOREACH(it->items, l, it2) - if (it2) - _emit_contract(it2); -} - -// added for item moving animation. -static int -_item_flip_effect_show(Elm_Genlist_Item *it) -{ - Elm_Genlist_Item *it2; - Eina_List *l; - Widget_Data *wd = it->wd; - - EINA_LIST_FOREACH(it->items, l, it2) - { - if (it2->parent && it == it2->parent) - { - if (wd->move_effect_mode == ELM_GENLIST_ITEM_MOVE_EFFECT_EXPAND) - edje_object_signal_emit(it2->base.view, "elm,state,hide", ""); - else if (wd->move_effect_mode == ELM_GENLIST_ITEM_MOVE_EFFECT_CONTRACT) - _emit_contract(it2); - } - } - - return ECORE_CALLBACK_CANCEL; -} - -/* -static void -_elm_genlist_pinch_zoom_execute(Evas_Object *obj, Eina_Bool emode) -{ - printf("!!! NOW FIXING \n"); -} -*/ - -/** - * Set pinch zoom mode - * - * @param obj The genlist object - * @param emode - * (EINA_TRUE = pinch contract (zoom in), EINA_FALSE = pinch expand (zoom out) - * - * @ingroup Genlist - */ -EAPI void -elm_genlist_pinch_zoom_mode_set(Evas_Object *obj __UNUSED__, Eina_Bool emode __UNUSED__) -{ - printf("!!! NOW FIXING \n"); -} - -/** - * Get pinch zoom mode - * - * @param obj The genlist object - * @return The pinch mode - * (EINA_TRUE = pinch contract (zoom in), EINA_FALSE = pinch expand (zoom out) - * - * @ingroup Genlist - */ -EAPI Eina_Bool -elm_genlist_pinch_zoom_mode_get(const Evas_Object *obj __UNUSED__) -{ - printf("!!! NOW FIXING \n"); - return EINA_FALSE; -} - -EAPI void -elm_genlist_pinch_zoom_set(Evas_Object *obj __UNUSED__, Eina_Bool emode __UNUSED__) -{ - printf("!!! NOW FIXING \n"); -} - - -//////////////////////////////////////////////////////////////////////// -// EDIT MODE -//////////////////////////////////////////////////////////////////////// - -static void -_effect_item_controls(Elm_Genlist_Item *it, int itx, int ity) -{ - if (!it->wd->edit_mode) return; - evas_object_resize(it->edit_obj,it->w, it->h); - evas_object_move(it->edit_obj, itx, ity); -} - -static void -_effect_item_realize(Elm_Genlist_Item *it, Eina_Bool effect_on) -{ - if ((it->effect_item_realized) || (it->generation < it->wd->generation)) return; - char buf[1024]; - - if (it->mode_view) - _mode_finished_signal_cb(it, (Evas_Object *)elm_genlist_item_object_get((Elm_Object_Item *) it), NULL, NULL); - - it->edit_obj = edje_object_add(evas_object_evas_get(WIDGET(it))); - edje_object_scale_set(it->edit_obj, elm_widget_scale_get(WIDGET(it)) * - _elm_config->scale); - evas_object_smart_member_add(it->edit_obj, it->wd->pan_smart); - elm_widget_sub_object_add(WIDGET(it), it->edit_obj); - - if (it->flags & ELM_GENLIST_ITEM_SUBITEMS) strncpy(buf, "tree", sizeof(buf)); - else strncpy(buf, "item", sizeof(buf)); - if (it->wd->compress) strncat(buf, "_compress", sizeof(buf) - strlen(buf)); - - strncat(buf, "/", sizeof(buf) - strlen(buf)); - - if (it->itc->edit_item_style && strcmp(it->itc->edit_item_style, "default")) - { - strncat(buf, it->itc->edit_item_style, sizeof(buf) - strlen(buf)); - _elm_theme_object_set(WIDGET(it), it->edit_obj, "genlist", buf, elm_widget_style_get(WIDGET(it))); - } - else - { - _elm_theme_object_set(WIDGET(it), it->edit_obj, "genlist", "item/edit_default", elm_widget_style_get(WIDGET(it))); - } - - if (it->wd->reorder_mode) - { - if (effect_on) edje_object_signal_emit(it->edit_obj, "elm,state,reorder_enabled_effect", "elm"); - else edje_object_signal_emit(it->edit_obj, "elm,state,reorder_enabled", "elm"); - } - if (effect_on) edje_object_signal_emit(it->edit_obj, "elm,state,emode_enabled_effect", "elm"); - else edje_object_signal_emit(it->edit_obj, "elm,state,emode_enabled", "elm"); - - if (elm_widget_item_disabled_get(it)) edje_object_signal_emit(it->edit_obj, "elm,state,disabled", "elm"); - else edje_object_signal_emit(it->edit_obj, "elm,state,enabled", "elm"); - - - if ((it->wd->edit_mode)) - { - if (it->itc->func.content_get) - { - const Eina_List *l; - const char *key; - - if (it->renamed) edje_object_signal_emit(it->edit_obj, "elm,state,rename,enabled", "elm"); - it->contents = elm_widget_stringlist_get(edje_object_data_get(it->edit_obj, "edit_contents")); - EINA_LIST_FOREACH(it->contents, l, key) - { - Evas_Object *ic = it->itc->func.content_get - ((void *)it->base.data, WIDGET(it), l->data); - - if (ic) - { - it->edit_content_objs = eina_list_append(it->edit_content_objs, ic); - edje_object_part_swallow(it->edit_obj, key, ic); - evas_object_show(ic); - elm_widget_sub_object_add(WIDGET(it), ic); - if (elm_widget_item_disabled_get(it)) - elm_widget_disabled_set(ic, EINA_TRUE); - } - } - } - } - edje_object_part_swallow(it->edit_obj, "original_edc", VIEW(it)); - _effect_item_controls(it,it->scrl_x, it->scrl_y); - evas_object_show(it->edit_obj); - - it->effect_item_realized = EINA_TRUE; - it->want_unrealize = EINA_FALSE; -} - -static void -_effect_item_unrealize(Elm_Genlist_Item *it) -{ - Evas_Object *content; - - if (!it->effect_item_realized) return; - if (it->wd->reorder_it && it->wd->reorder_it == it) return; - - edje_object_signal_emit(it->edit_obj, "elm,state,reorder_disable_effect", "elm"); - edje_object_signal_emit(it->edit_obj, "elm,state,sel,disable", "elm"); - edje_object_message_signal_process(it->edit_obj); - edje_object_part_unswallow(it->edit_obj, VIEW(it)); - evas_object_smart_member_add(VIEW(it), it->wd->pan_smart); - elm_widget_sub_object_add(WIDGET(it), VIEW(it)); - // evas_object_smart_callback_call(it->edit_obj, "unrealized", it); - // _item_cache_add(it); - evas_object_del(it->edit_obj); - it->edit_obj = NULL; - EINA_LIST_FREE(it->edit_content_objs, content) - evas_object_del(content); - -// edje_object_signal_emit(it->edit_obj, "elm,state,edit_end,disable", "elm"); - it->effect_item_realized = EINA_FALSE; -} - -/** - * Get Genlist edit mode - * - * @param obj The genlist object - * @return The edit mode status - * (EINA_TRUE = edit mode, EINA_FALSE = normal mode - * - * @ingroup Genlist - */ -EAPI Eina_Bool -elm_genlist_edit_mode_get(const Evas_Object *obj) -{ - ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE; - Widget_Data *wd = elm_widget_data_get(obj); - if (!wd) return EINA_FALSE; - - if (wd->edit_mode) return EINA_TRUE; - else return EINA_FALSE; -} - -/** - * Set Genlist edit mode - * - * This sets Genlist edit mode. - * - * @param obj The Genlist object - * @param emode ELM_GENLIST_EDIT_MODE_{NONE & REORDER & INSERT & DELETE & SELECT & SELECT_ALL} - * @param edit_class Genlist edit class (Elm_Genlist_Edit_Class structure) - * - * @ingroup Genlist - */ -EAPI void -elm_genlist_edit_mode_set(Evas_Object *obj, Eina_Bool edit_mode) -{ - ELM_CHECK_WIDTYPE(obj, widtype); - - Item_Block *itb; - Eina_List *l; - Elm_Genlist_Item *it; - - Widget_Data *wd = elm_widget_data_get(obj); - if (!wd) return; - if (wd->edit_mode == edit_mode) return; - - wd->edit_mode = edit_mode; - if (!wd->edit_mode) - { - EINA_INLIST_FOREACH(wd->blocks, itb) - { - if (itb->realized) - { - EINA_LIST_FOREACH(itb->items, l, it) - { - if (it->flags != ELM_GENLIST_ITEM_GROUP && it->realized) - { - _effect_item_unrealize(it); - } - } - } - } - _item_cache_zero(wd); - } - else - { - - EINA_INLIST_FOREACH(wd->blocks, itb) - { - if (itb->realized) - { - EINA_LIST_FOREACH(itb->items, l, it) - { - if (it->flags != ELM_GENLIST_ITEM_GROUP && it->realized) - { - if(it->selected) _item_unselect(it); - if (it->itc->edit_item_style) _effect_item_realize(it, EINA_TRUE); - } - } - } - } - } - - if (wd->calc_job) ecore_job_del(wd->calc_job); - wd->calc_job = ecore_job_add(_calc_job, wd); -} - -/** - * Set a given item's rename mode - * - * This renames the item's text from genlist - * - * @param it The item - * @param renamed set if emode is EINA_TRUE, unset if emode is EINA_FALSE - * - * @ingroup Genlist - */ -EAPI void -elm_genlist_item_rename_mode_set(Elm_Object_Item *it, Eina_Bool renamed) -{ - if (!it) return; - Elm_Genlist_Item *_it = (Elm_Genlist_Item *) it; - - if (renamed) - { - _item_unrealize(_it, EINA_FALSE); - _it->renamed = EINA_TRUE; - _it->wd->rename_it = _it; - _it->nocache = EINA_TRUE; - if (_it->selected) _item_unselect(_it); - - if (_it->wd->calc_job) ecore_job_del(_it->wd->calc_job); - _it->wd->calc_job = ecore_job_add(_calc_job, _it->wd); - } - else - { - if (_it->renamed) - { - _it->renamed = EINA_FALSE; - _it->nocache = EINA_TRUE; - _it->wd->rename_it = NULL; - _item_cache_zero(_it->wd); - elm_genlist_item_update(it); - } - } -} - -EAPI Eina_Bool -elm_genlist_item_rename_mode_get(Elm_Object_Item *it) -{ - ELM_OBJ_ITEM_CHECK_OR_RETURN(it, EINA_FALSE); - return ((Elm_Genlist_Item *) it)->renamed; -} - -EAPI void -elm_genlist_item_no_select_mode_set(Elm_Object_Item *it, - Eina_Bool no_select) -{ - ELM_OBJ_ITEM_CHECK_OR_RETURN(it); - ((Elm_Genlist_Item *) it)->no_select = no_select; -} - -EAPI Eina_Bool -elm_genlist_item_no_select_mode_get(const Elm_Object_Item *it) -{ - ELM_OBJ_ITEM_CHECK_OR_RETURN(it, EINA_FALSE); - return ((Elm_Genlist_Item *) it)->no_select; -======= return bg ; } @@ -10088,5 +6203,4 @@ _item_moving_effect_timer_cb(void *data) return ECORE_CALLBACK_CANCEL; } return ECORE_CALLBACK_RENEW; ->>>>>>> remotes/origin/upstream }