2 #include <Elementary.h>
3 #include <Elementary_Cursor.h>
6 #define ELM_GEN_ITEM_FROM_INLIST(it) \
7 ((it) ? EINA_INLIST_CONTAINER_GET(it, Elm_Gen_Item) : NULL)
9 typedef struct Elm_Gen_Item_Type Elm_Gen_Item_Type;
10 typedef struct Elm_Gen_Item_Tooltip Elm_Gen_Item_Tooltip;
11 typedef struct _Widget_Data Widget_Data;
12 typedef struct _Pan Pan;
14 struct Elm_Gen_Item_Tooltip
17 Elm_Tooltip_Item_Content_Cb content_cb;
20 Eina_Bool free_size : 1;
25 Evas_Object_Smart_Clipped_Data __clipped_data;
27 Ecore_Job *resize_job;
35 Elm_Gen_Item_Type *item;
36 const Elm_Gen_Item_Class *itc;
37 Evas_Coord x, y, dx, dy;
40 Eina_List *labels, *contents, *states, *content_objs;
41 Ecore_Timer *long_timer;
44 const char *mouse_cursor;
52 Elm_Gen_Item_Tooltip tooltip;
53 Ecore_Cb del_cb, sel_cb, highlight_cb;
54 Ecore_Cb unsel_cb, unhighlight_cb, unrealize_cb;
56 Eina_Bool want_unrealize : 1;
57 Eina_Bool display_only : 1;
58 Eina_Bool realized : 1;
59 Eina_Bool selected : 1;
60 Eina_Bool highlighted : 1;
61 Eina_Bool disabled : 1;
62 Eina_Bool dragging : 1;
63 Eina_Bool delete_me : 1;
66 Eina_Bool reorder : 1;
67 Eina_Bool mode_set : 1; /* item uses style mode for highlight/select */
71 elm_gen_item_new(Widget_Data *wd,
72 const Elm_Gen_Item_Class *itc,
76 const void *func_data);
79 elm_gen_item_unrealize(Elm_Gen_Item *it,
82 elm_gen_item_del_serious(Elm_Gen_Item *it);
85 elm_gen_item_del_notserious(Elm_Gen_Item *it);
87 typedef struct Elm_Gen_Item Elm_Gen_Item;
90 * @struct Elm_Gen_Item_Class
92 * Gengrid or Genlist item class definition.
95 typedef struct _Elm_Gen_Item_Class Elm_Gen_Item_Class;
98 * Text fetching class function for Elm_Gen_Item_Class.
99 * @param data The data passed in the item creation function
100 * @param obj The base widget object
101 * @param part The part name of the swallow
102 * @return The allocated (NOT stringshared) string to set as the text
104 typedef char *(*Elm_Gen_Item_Text_Get_Cb)(void *data, Evas_Object *obj, const char *part); /**< Label fetching class function for gen item classes. */
107 * Content (swallowed object) fetching class function for Elm_Gen_Item_Class.
108 * @param data The data passed in the item creation function
109 * @param obj The base widget object
110 * @param part The part name of the swallow
111 * @return The content object to swallow
113 typedef Evas_Object *(*Elm_Gen_Item_Content_Get_Cb)(void *data, Evas_Object *obj, const char *part); /**< Content(swallowed object) fetching class function for gen item classes. */
116 * State fetching class function for Elm_Gen_Item_Class.
117 * @param data The data passed in the item creation function
118 * @param obj The base widget object
119 * @param part The part name of the swallow
120 * @return The hell if I know
122 typedef Eina_Bool (*Elm_Gen_Item_State_Get_Cb)(void *data, Evas_Object *obj, const char *part); /**< State fetching class function for gen item classes. */
125 * Deletion class function for Elm_Gen_Item_Class.
126 * @param data The data passed in the item creation function
127 * @param obj The base widget object
129 typedef void (*Elm_Gen_Item_Del_Cb)(void *data, Evas_Object *obj); /**< Deletion class function for gen item classes. */
131 struct _Elm_Gen_Item_Class
133 int version; /**< Set by elementary if you alloc an item class using elm_gengrid_item_class_new() or elm_genlist_item_class_new(), or if you set your own class (must be const) then set it to ELM_GENGRID_ITEM_CLASS_VERSION */
134 unsigned int refcount; /**< Set it to 0 if you use your own const class, or its managed for you by class ref/unref calls */
135 Eina_Bool delete_me : 1; /**< Leave this alone - set it to 0 if you have a const class of your own */
136 const char *item_style; /**< Name of the visual style to use for this item. If you don't know use "default" */
137 const char *mode_item_style; /**< Style used if item is set to a specific mode. @see elm_genlist_item_mode_set() or NULL if you don't care. currently it's used only in genlist. */
138 const char *edit_item_style; /**< Style to use when in edit mode, or NULL if you don't care. currently it's used only in genlist. */
140 Elm_Gen_Item_Text_Get_Cb text_get; /**< Text fetching class function for gengrid/list item classes.*/
141 Elm_Gen_Item_Content_Get_Cb content_get; /**< Content fetching class function for gengrid/list item classes. */
142 Elm_Gen_Item_State_Get_Cb state_get; /**< State fetching class function for gengrid/list item classes. */
143 Elm_Gen_Item_Del_Cb del; /**< Deletion class function for gengrid/list item classes. */
145 }; /**< #Elm_Gen_Item_Class member definitions */
147 #define ELM_GEN_ITEM_CLASS_VERSION 2
148 #define ELM_GEN_ITEM_CLASS_HEADER ELM_GEN_ITEM_CLASS_VERSION, 0, 0
149 >>>>>>> remotes/origin/upstream