aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/elementary/src/lib/elm_gen.h
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/elementary/src/lib/elm_gen.h')
-rw-r--r--libraries/elementary/src/lib/elm_gen.h63
1 files changed, 63 insertions, 0 deletions
diff --git a/libraries/elementary/src/lib/elm_gen.h b/libraries/elementary/src/lib/elm_gen.h
new file mode 100644
index 0000000..431f7b1
--- /dev/null
+++ b/libraries/elementary/src/lib/elm_gen.h
@@ -0,0 +1,63 @@
1typedef struct Elm_Gen_Item Elm_Gen_Item;
2
3/**
4 * @struct Elm_Gen_Item_Class
5 *
6 * Gengrid or Genlist item class definition.
7 * field details.
8 */
9typedef struct _Elm_Gen_Item_Class Elm_Gen_Item_Class;
10
11/**
12 * Text fetching class function for Elm_Gen_Item_Class.
13 * @param data The data passed in the item creation function
14 * @param obj The base widget object
15 * @param part The part name of the swallow
16 * @return The allocated (NOT stringshared) string to set as the text
17 */
18typedef char *(*Elm_Gen_Item_Text_Get_Cb)(void *data, Evas_Object *obj, const char *part); /**< Label fetching class function for gen item classes. */
19
20/**
21 * Content (swallowed object) fetching class function for Elm_Gen_Item_Class.
22 * @param data The data passed in the item creation function
23 * @param obj The base widget object
24 * @param part The part name of the swallow
25 * @return The content object to swallow
26 */
27typedef 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. */
28
29/**
30 * State fetching class function for Elm_Gen_Item_Class.
31 * @param data The data passed in the item creation function
32 * @param obj The base widget object
33 * @param part The part name of the swallow
34 * @return The hell if I know
35 */
36typedef Eina_Bool (*Elm_Gen_Item_State_Get_Cb)(void *data, Evas_Object *obj, const char *part); /**< State fetching class function for gen item classes. */
37
38/**
39 * Deletion class function for Elm_Gen_Item_Class.
40 * @param data The data passed in the item creation function
41 * @param obj The base widget object
42 */
43typedef void (*Elm_Gen_Item_Del_Cb)(void *data, Evas_Object *obj); /**< Deletion class function for gen item classes. */
44
45struct _Elm_Gen_Item_Class
46{
47 int version; /**< Set by elementary if you alloc an item class using elm_genlist/gengrid_item_class_new(), or if you set your own class (must be const) then set it to ELM_GENLIST/GENGRID_ITEM_CLASS_VERSION */
48 unsigned int refcount; /**< Set it to 0 if you use your own const class, or its managed for you by class ref/unref calls */
49 Eina_Bool delete_me : 1; /**< Leave this alone - set it to 0 if you have a const class of your own */
50 const char *item_style; /**< Name of the visual style to use for this item. If you don't know use "default" */
51 const char *decorate_item_style; /**< Style used if item is set to a decorate mode. @see elm_genlist_item_decorate_mode_set() or NULL if you don't care. currently it's used only in genlist. */
52 const char *decorate_all_item_style; /**< Style to use when in edit mode, or NULL if you don't care. currently it's used only in genlist. */
53 struct
54 {
55 Elm_Gen_Item_Text_Get_Cb text_get; /**< Text fetching class function for genlist/gengrid item classes.*/
56 Elm_Gen_Item_Content_Get_Cb content_get; /**< Content fetching class function for genlist/gengrid item classes. */
57 Elm_Gen_Item_State_Get_Cb state_get; /**< State fetching class function for genlist/gengrid item classes. */
58 Elm_Gen_Item_Del_Cb del; /**< Deletion class function for genlist/gengrid item classes. */
59 } func;
60}; /**< #Elm_Gen_Item_Class member definitions */
61
62#define ELM_GEN_ITEM_CLASS_VERSION 2
63#define ELM_GEN_ITEM_CLASS_HEADER ELM_GEN_ITEM_CLASS_VERSION, 0, 0