2011-12-30 01:41:11 -08:00
typedef struct Elm_Gen_Item Elm_Gen_Item ;
2012-03-05 22:09:20 -08:00
/**
* @ struct Elm_Gen_Item_Class
*
* Gengrid or Genlist item class definition .
* field details .
*/
2011-12-30 01:41:11 -08:00
typedef struct _Elm_Gen_Item_Class Elm_Gen_Item_Class ;
2012-03-05 22:09:20 -08:00
/**
* Text fetching class function for Elm_Gen_Item_Class .
* @ param data The data passed in the item creation function
* @ param obj The base widget object
* @ param part The part name of the swallow
* @ return The allocated ( NOT stringshared ) string to set as the text
*/
2011-12-30 01:41:11 -08:00
typedef char * ( * Elm_Gen_Item_Text_Get_Cb ) ( void * data , Evas_Object * obj , const char * part ) ; /**< Label fetching class function for gen item classes. */
2012-03-05 22:09:20 -08:00
/**
* Content ( swallowed object ) fetching class function for Elm_Gen_Item_Class .
* @ param data The data passed in the item creation function
* @ param obj The base widget object
* @ param part The part name of the swallow
* @ return The content object to swallow
*/
2011-12-30 01:41:11 -08:00
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. */
2012-03-05 22:09:20 -08:00
/**
* State fetching class function for Elm_Gen_Item_Class .
* @ param data The data passed in the item creation function
* @ param obj The base widget object
* @ param part The part name of the swallow
* @ return The hell if I know
*/
2011-12-30 01:41:11 -08:00
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. */
2012-03-05 22:09:20 -08:00
/**
* Deletion class function for Elm_Gen_Item_Class .
* @ param data The data passed in the item creation function
* @ param obj The base widget object
*/
2011-12-30 01:41:11 -08:00
typedef void ( * Elm_Gen_Item_Del_Cb ) ( void * data , Evas_Object * obj ) ; /**< Deletion class function for gen item classes. */
2012-03-05 22:09:20 -08:00
2011-12-30 01:41:11 -08:00
struct _Elm_Gen_Item_Class
{
2012-03-09 03:39:01 -08:00
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 */
2012-03-05 22:09:20 -08:00
unsigned int refcount ; /**< Set it to 0 if you use your own const class, or its managed for you by class ref/unref calls */
Eina_Bool delete_me : 1 ; /**< Leave this alone - set it to 0 if you have a const class of your own */
const char * item_style ; /**< Name of the visual style to use for this item. If you don't know use "default" */
2012-03-09 04:00:11 -08:00
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. */
2012-03-09 04:00:28 -08:00
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. */
2012-03-09 03:39:01 -08:00
struct
{
Elm_Gen_Item_Text_Get_Cb text_get ; /**< Text fetching class function for genlist/gengrid item classes.*/
Elm_Gen_Item_Content_Get_Cb content_get ; /**< Content fetching class function for genlist/gengrid item classes. */
Elm_Gen_Item_State_Get_Cb state_get ; /**< State fetching class function for genlist/gengrid item classes. */
Elm_Gen_Item_Del_Cb del ; /**< Deletion class function for genlist/gengrid item classes. */
} func ;
2012-03-05 22:09:20 -08:00
} ; /**< #Elm_Gen_Item_Class member definitions */
# define ELM_GEN_ITEM_CLASS_VERSION 2
# define ELM_GEN_ITEM_CLASS_HEADER ELM_GEN_ITEM_CLASS_VERSION, 0, 0