From: discomfitor Date: Fri, 21 Oct 2011 21:00:07 +0000 (+0000) Subject: more reordering X-Git-Tag: REL_F_I9500_20120323_1~17^2~1542 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=52189180a2c9d1b22d17dce2a187f50807afb846;p=framework%2Fuifw%2Felementary.git more reordering git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@64268 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/lib/elm_gen.c b/src/lib/elm_gen.c index 18a6274..c93449a 100644 --- a/src/lib/elm_gen.c +++ b/src/lib/elm_gen.c @@ -6,13 +6,18 @@ struct _Widget_Data { Eina_Inlist_Sorted_State *state; - Evas_Object *obj; - Eina_List *selected; - Eina_List *group_items; + Evas_Object *obj; + Evas_Object *scr; /* a smart scroller object which is used internally in genlist */ + Evas_Object *pan_smart; /* "elm_genlist_pan" evas smart object. this is an extern pan of smart scroller(scr). */ + Eina_List *selected; + Eina_List *group_items; Eina_Inlist *items; /* inlist of all items */ Elm_Gen_Item *reorder_it; /* item currently being repositioned */ + Elm_Gen_Item *last_selected_item; + Pan *pan; /* pan_smart object's smart data */ Ecore_Job *calc_job; - int walking; + int walking; + Evas_Coord pan_x, pan_y; Eina_Bool reorder_mode : 1; Eina_Bool on_hold : 1; Eina_Bool multi : 1; @@ -221,7 +226,7 @@ _item_single_select_right(Widget_Data *wd) return EINA_TRUE; } #endif - +/******************************************************************************/ void elm_gen_item_unrealize(Elm_Gen_Item *it, Eina_Bool calc, @@ -314,3 +319,4 @@ elm_gen_item_new(Widget_Data *wd, elm_widget_item_text_get_hook_set(it, _item_label_hook); return it; } +/******************************************************************************/ diff --git a/src/lib/elm_gen.h b/src/lib/elm_gen.h index b16113b..3c7cbbf 100644 --- a/src/lib/elm_gen.h +++ b/src/lib/elm_gen.h @@ -5,6 +5,7 @@ typedef struct Elm_Gen_Item_Type Elm_Gen_Item_Type; typedef struct Elm_Gen_Item_Tooltip Elm_Gen_Item_Tooltip; typedef struct _Widget_Data Widget_Data; +typedef struct _Pan Pan; struct Elm_Gen_Item_Tooltip { @@ -15,6 +16,13 @@ struct Elm_Gen_Item_Tooltip Eina_Bool free_size : 1; }; +struct _Pan +{ + Evas_Object_Smart_Clipped_Data __clipped_data; + Widget_Data *wd; + Ecore_Job *resize_job; +}; + struct Elm_Gen_Item { ELM_WIDGET_ITEM; diff --git a/src/lib/elm_gengrid.c b/src/lib/elm_gengrid.c index 3cea21e..1ad1954 100644 --- a/src/lib/elm_gengrid.c +++ b/src/lib/elm_gengrid.c @@ -9,8 +9,6 @@ * Handle non-homogeneous objects too. */ - typedef struct _Pan Pan; - #define PRELOAD 1 #define REORDER_EFFECT_TIME 0.5 @@ -30,12 +28,17 @@ struct _Widget_Data { Eina_Inlist_Sorted_State *state; Evas_Object *obj; /* the gengrid object */ + Evas_Object *scr; /* a smart scroller object which is used internally in genlist */ + Evas_Object *pan_smart; /* "elm_genlist_pan" evas smart object. this is an extern pan of smart scroller(scr). */ Eina_List *selected; Eina_List *group_items; /* list of groups index items */ Eina_Inlist *items; /* inlist of all items */ Elm_Gen_Item *reorder_it; /* item currently being repositioned */ + Elm_Gen_Item *last_selected_item; + Pan *pan; /* pan_smart object's smart data */ Ecore_Job *calc_job; int walking; + Evas_Coord pan_x, pan_y; Eina_Bool reorder_mode : 1; Eina_Bool on_hold : 1; Eina_Bool multi : 1; @@ -43,13 +46,9 @@ struct _Widget_Data Eina_Bool wasselected : 1; Eina_Bool always_select : 1; //////////////////////////////////// - Evas_Object *scr; - Evas_Object *pan_smart; - Pan *pan; - Elm_Gen_Item *last_selected_item; double align_x, align_y; - Evas_Coord pan_x, pan_y, old_pan_x, old_pan_y; + Evas_Coord old_pan_x, old_pan_y; Evas_Coord item_width, item_height; /* Each it size */ Evas_Coord group_item_width, group_item_height; /* Each group it size */ Evas_Coord minw, minh; /* Total obj size */ @@ -70,12 +69,6 @@ struct _Widget_Data #define ELM_GENGRID_ITEM_FROM_INLIST(it) \ ((it) ? EINA_INLIST_CONTAINER_GET(it, Elm_Gen_Item) : NULL) -struct _Pan -{ - Evas_Object_Smart_Clipped_Data __clipped_data; - Widget_Data *wd; -}; - static const char *widtype = NULL; static void _item_highlight(Elm_Gen_Item *it); static void _item_unrealize_cb(Elm_Gen_Item *it); diff --git a/src/lib/elm_genlist.c b/src/lib/elm_genlist.c index d92f8a3..928ed3a 100644 --- a/src/lib/elm_genlist.c +++ b/src/lib/elm_genlist.c @@ -11,7 +11,6 @@ #define REORDER_EFFECT_TIME 0.5 typedef struct _Item_Block Item_Block; -typedef struct _Pan Pan; typedef struct _Item_Cache Item_Cache; struct Elm_Gen_Item_Type @@ -49,12 +48,17 @@ struct _Widget_Data { Eina_Inlist_Sorted_State *state; Evas_Object *obj; /* the genlist object */ + Evas_Object *scr; /* a smart scroller object which is used internally in genlist */ + Evas_Object *pan_smart; /* "elm_genlist_pan" evas smart object. this is an extern pan of smart scroller(scr). */ Eina_List *selected; Eina_List *group_items; /* list of groups index items */ Eina_Inlist *items; /* inlist of all items */ Elm_Gen_Item *reorder_it; /* item currently being repositioned */ + Elm_Gen_Item *last_selected_item; + Pan *pan; /* pan_smart object's smart data */ Ecore_Job *calc_job; int walking; + Evas_Coord pan_x, pan_y; Eina_Bool reorder_mode : 1; Eina_Bool on_hold : 1; Eina_Bool multi : 1; @@ -62,17 +66,13 @@ struct _Widget_Data Eina_Bool wasselected : 1; Eina_Bool always_select : 1; //////////////////////////////////// - Evas_Object *scr; /* a smart scroller object which is used internally in genlist */ - Evas_Object *pan_smart; /* "elm_genlist_pan" evas smart object. this is an extern pan of smart scroller(scr). */ Eina_Inlist *blocks; /* inlist of all blocks. a block consists of a certain number of items. maximum number of items in a block is 'max_items_per_block'. */ - Pan *pan; /* pan_smart object's smart data */ - Evas_Coord pan_x, pan_y, reorder_old_pan_y, w, h, minw, minh, realminw, prev_viewport_w; + Evas_Coord reorder_old_pan_y, w, h, minw, minh, realminw, prev_viewport_w; Ecore_Job *update_job; Ecore_Idle_Enterer *queue_idle_enterer; Ecore_Idler *must_recalc_idler; Eina_List *queue; Elm_Gen_Item *show_item, *anchor_item, *mode_item, *reorder_rel, *expanded_item; - Elm_Gen_Item *last_selected_item; /* the last selected it. */ Eina_Inlist *item_cache; /* an inlist of edje object it cache. */ Evas_Coord anchor_y; Evas_Coord reorder_start_y; /* reorder it's initial y coordinate in the pan. */ @@ -149,13 +149,6 @@ struct _Item_Cache #define ELM_GENLIST_ITEM_FROM_INLIST(it) \ ((it) ? EINA_INLIST_CONTAINER_GET(it, Elm_Gen_Item) : NULL) -struct _Pan -{ - Evas_Object_Smart_Clipped_Data __clipped_data; - Widget_Data *wd; - Ecore_Job *resize_job; -}; - static const char *widtype = NULL; static void _item_cache_zero(Widget_Data *wd); static void _del_hook(Evas_Object *obj);