2011-12-29 22:49:28 -08:00
# ifndef ELM_GEN_H_
2011-12-29 23:20:48 -08:00
# define ELM_GEN_H_
2011-12-29 22:49:28 -08:00
# include <Elementary.h>
# include <Elementary_Cursor.h>
# define ELM_GEN_ITEM_FROM_INLIST(it) \
2011-12-29 23:20:48 -08:00
( ( it ) ? EINA_INLIST_CONTAINER_GET ( it , Elm_Gen_Item ) : NULL )
2011-12-29 22:49:28 -08:00
2017-10-24 00:53:18 -07:00
# define ELM_GEN_ITEM_PREV(_it) ((_it) ? ELM_GEN_ITEM_FROM_INLIST(EINA_INLIST_GET(_it)->prev) : NULL)
# define ELM_GEN_ITEM_NEXT(_it) ((_it) ? ELM_GEN_ITEM_FROM_INLIST(EINA_INLIST_GET(_it)->next) : NULL)
2011-12-29 23:20:48 -08:00
# define SWIPE_MOVES 12
2011-12-29 22:49:28 -08:00
2012-07-16 14:56:30 -07:00
/* common item handles for genlist/gengrid */
2011-12-29 23:20:48 -08:00
typedef struct Elm_Gen_Item_Type Elm_Gen_Item_Type ;
2011-12-29 22:49:28 -08:00
typedef struct Elm_Gen_Item_Tooltip Elm_Gen_Item_Tooltip ;
struct Elm_Gen_Item_Tooltip
{
const void * data ;
Elm_Tooltip_Item_Content_Cb content_cb ;
Evas_Smart_Cb del_cb ;
const char * style ;
Eina_Bool free_size : 1 ;
} ;
struct Elm_Gen_Item
{
2014-09-27 22:15:28 -07:00
Elm_Widget_Item_Data * base ;
2011-12-29 22:49:28 -08:00
EINA_INLIST ;
2012-07-10 14:40:38 -07:00
2011-12-29 23:20:48 -08:00
Elm_Gen_Item_Type * item ;
const Elm_Gen_Item_Class * itc ;
Evas_Coord x , y , dx , dy ;
2012-04-06 00:10:26 -07:00
Evas_Object * spacer , * deco_all_view ;
2011-12-29 23:20:48 -08:00
Elm_Gen_Item * parent ;
Eina_List * texts , * contents , * states , * content_objs ;
Ecore_Timer * long_timer ;
2015-06-17 05:32:03 -07:00
int generation ; /**< a generation of an item. when the item is created, this value is set to the value of genlist/gengrid generation. this value will be decreased when the item is going to be deleted */
2011-12-29 23:20:48 -08:00
const char * mouse_cursor ;
2013-02-20 02:00:49 -08:00
Eina_List * item_focus_chain ;
2011-12-29 22:49:28 -08:00
struct
2012-07-16 14:56:30 -07:00
{
Evas_Smart_Cb func ;
const void * data ;
} func ;
2011-12-29 22:49:28 -08:00
2011-12-29 23:20:48 -08:00
Elm_Gen_Item_Tooltip tooltip ;
2012-11-16 06:26:04 -08:00
Ecore_Cb del_cb , unrealize_cb ;
Ecore_Cb sel_cb , unsel_cb ;
Ecore_Cb highlight_cb , unhighlight_cb ;
2011-12-29 23:20:48 -08:00
int position ;
2012-03-07 08:22:58 -08:00
Elm_Object_Select_Mode select_mode ;
2011-12-29 23:20:48 -08:00
Eina_Bool position_update : 1 ;
Eina_Bool want_unrealize : 1 ;
Eina_Bool realized : 1 ;
Eina_Bool selected : 1 ;
Eina_Bool highlighted : 1 ;
2012-03-06 02:59:33 -08:00
Eina_Bool dragging : 1 ; /**< this is set true when an item is being dragged. this is set false on multidown/mouseup/mousedown. when this is true, the item should not be unrealized. or evas mouse down/up event will be corrupted. */
2011-12-29 23:20:48 -08:00
Eina_Bool down : 1 ;
Eina_Bool group : 1 ;
Eina_Bool reorder : 1 ;
2012-04-03 02:56:53 -07:00
Eina_Bool decorate_it_set : 1 ; /**< item uses style mode for highlight/select */
2012-03-06 02:59:33 -08:00
Eina_Bool flipped : 1 ; /**< a flag that shows the flip status of the item. */
2013-12-16 10:34:59 -08:00
Eina_Bool has_contents : 1 ; /**< content objs have or previously did exist (size calcs) */
2015-04-14 03:20:16 -07:00
Eina_Bool cursor_engine_only : 1 ;
2015-09-23 04:50:05 -07:00
Eina_Bool hide : 1 ; /**< flag used for hiding the items which do not match filter text */
Eina_Bool filtered : 1 ; /**<flag used to indicate whether or not item has been filtered */
2018-05-07 15:16:29 -07:00
Eina_Bool callbacks : 1 ;
2011-12-29 22:49:28 -08:00
} ;
# endif