more reordering

SVN revision: 64268
This commit is contained in:
Mike Blumenkrantz 2011-10-21 21:00:07 +00:00
parent 4b911014e5
commit 72700795f2
4 changed files with 31 additions and 31 deletions

View File

@ -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;
}
/******************************************************************************/

View File

@ -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;

View File

@ -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);

View File

@ -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);