*
* @ingroup Genlist
*/
-//XXX: Elm_Genlist_Item_Type
typedef enum
{
ELM_GENLIST_ITEM_NONE = 0, /**< simple item */
+ //XXX: ELM_GENLIST_ITEM_TREE
ELM_GENLIST_ITEM_SUBITEMS = (1 << 0), /**< may expand and have child items */
ELM_GENLIST_ITEM_GROUP = (1 << 1), /**< index of a group of items */
ELM_GENLIST_ITEM_MAX = (1 << 2)
-} Elm_Genlist_Item_Flags;
+} Elm_Genlist_Item_Type;
-//XXX: Elm_Genlist_Item_Field_Type
typedef enum
{
ELM_GENLIST_ITEM_FIELD_ALL = 0,
ELM_GENLIST_ITEM_FIELD_TEXT = (1 << 0),
ELM_GENLIST_ITEM_FIELD_CONTENT = (1 << 1),
ELM_GENLIST_ITEM_FIELD_STATE = (1 << 2)
-} Elm_Genlist_Item_Field_Flags;
+} Elm_Genlist_Item_Field_Type;
typedef struct _Elm_Genlist_Item_Class Elm_Genlist_Item_Class; /**< Genlist item class definition structs */
#define Elm_Genlist_Item_Class Elm_Gen_Item_Class
* @param itc The item class for the item
* @param data The item data
* @param parent The parent item, or NULL if none
- * @param flags Item flags
+ * @param type Item type
* @param func Convenience function called when the item is selected
* @param func_data Data passed to @p func above.
* @return A handle to the item added or @c NULL if not possible
*
* @ingroup Genlist
*/
-EAPI Elm_Object_Item *elm_genlist_item_append(Evas_Object *obj, const Elm_Genlist_Item_Class *itc, const void *data, Elm_Object_Item *parent, Elm_Genlist_Item_Flags flags, Evas_Smart_Cb func, const void *func_data);
+EAPI Elm_Object_Item *elm_genlist_item_append(Evas_Object *obj, const Elm_Genlist_Item_Class *itc, const void *data, Elm_Object_Item *parent, Elm_Genlist_Item_Type type, Evas_Smart_Cb func, const void *func_data);
/**
* Prepend a new item in a given genlist widget.
* @param itc The item class for the item
* @param data The item data
* @param parent The parent item, or NULL if none
- * @param flags Item flags
+ * @param type Item type
* @param func Convenience function called when the item is selected
* @param func_data Data passed to @p func above.
* @return A handle to the item added or NULL if not possible
*
* @ingroup Genlist
*/
-EAPI Elm_Object_Item *elm_genlist_item_prepend(Evas_Object *obj, const Elm_Genlist_Item_Class *itc, const void *data, Elm_Object_Item *parent, Elm_Genlist_Item_Flags flags, Evas_Smart_Cb func, const void *func_data);
+EAPI Elm_Object_Item *elm_genlist_item_prepend(Evas_Object *obj, const Elm_Genlist_Item_Class *itc, const void *data, Elm_Object_Item *parent, Elm_Genlist_Item_Type type, Evas_Smart_Cb func, const void *func_data);
/**
* Insert an item before another in a genlist widget
* @param data The item data
* @param parent The parent item, or NULL if none
* @param before The item to place this new one before.
- * @param flags Item flags
+ * @param type Item type
* @param func Convenience function called when the item is selected
* @param func_data Data passed to @p func above.
* @return A handle to the item added or @c NULL if not possible
*
* @ingroup Genlist
*/
-EAPI Elm_Object_Item *elm_genlist_item_insert_before(Evas_Object *obj, const Elm_Genlist_Item_Class *itc, const void *data, Elm_Object_Item *parent, Elm_Object_Item *before, Elm_Genlist_Item_Flags flags, Evas_Smart_Cb func, const void *func_data);
+EAPI Elm_Object_Item *elm_genlist_item_insert_before(Evas_Object *obj, const Elm_Genlist_Item_Class *itc, const void *data, Elm_Object_Item *parent, Elm_Object_Item *before, Elm_Genlist_Item_Type type, Evas_Smart_Cb func, const void *func_data);
/**
* Insert an item after another in a genlist widget
* @param data The item data
* @param parent The parent item, or NULL if none
* @param after The item to place this new one after.
- * @param flags Item flags
+ * @param type Item type
* @param func Convenience function called when the item is selected
* @param func_data Data passed to @p func above.
* @return A handle to the item added or @c NULL if not possible
*
* @ingroup Genlist
*/
-EAPI Elm_Object_Item *elm_genlist_item_insert_after(Evas_Object *obj, const Elm_Genlist_Item_Class *itc, const void *data, Elm_Object_Item *parent, Elm_Object_Item *after, Elm_Genlist_Item_Flags flags, Evas_Smart_Cb func, const void *func_data);
+EAPI Elm_Object_Item *elm_genlist_item_insert_after(Evas_Object *obj, const Elm_Genlist_Item_Class *itc, const void *data, Elm_Object_Item *parent, Elm_Object_Item *after, Elm_Genlist_Item_Type type, Evas_Smart_Cb func, const void *func_data);
/**
* Insert a new item into the sorted genlist object
* @param itc The item class for the item
* @param data The item data
* @param parent The parent item, or NULL if none
- * @param flags Item flags
+ * @param type Item type
* @param comp The function called for the sort
* @param func Convenience function called when item selected
* @param func_data Data passed to @p func above.
* @ingroup Genlist
*/
-EAPI Elm_Object_Item *elm_genlist_item_sorted_insert(Evas_Object *obj, const Elm_Genlist_Item_Class *itc, const void *data, Elm_Object_Item *parent, Elm_Genlist_Item_Flags flags, Eina_Compare_Cb comp, Evas_Smart_Cb func, const void *func_data);
+EAPI Elm_Object_Item *elm_genlist_item_sorted_insert(Evas_Object *obj, const Elm_Genlist_Item_Class *itc, const void *data, Elm_Object_Item *parent, Elm_Genlist_Item_Type type, Eina_Compare_Cb comp, Evas_Smart_Cb func, const void *func_data);
/* operations to retrieve existing items */
/**
EAPI unsigned int elm_genlist_items_count(const Evas_Object *obj);
#define ELM_GENLIST_ITEM_CLASS_VERSION 2 /* current version number */
+#define ELM_GENLIST_ITEM_CLASS_HEADER ELM_GENLIST_ITEM_CLASS_VERSION, 0, 0
/**
* Add a new genlist item class in a given genlist widget.
*
* This adds genlist item class for the genlist widget. When adding a item,
* genlist_item_{append, prepend, insert} function needs item class of the item.
- * Given callback paramters are used at retrieving {text, content} of
+ * Given callback parameters are used at retrieving {text, content} of
* added item. Set as NULL if it's not used.
* If there's no available memory, return can be NULL.
*
*
* @ingroup Genlist
*/
+// XXX: kill this. elm_genlist_height_for_width_mode_set() covers this.
EAPI void elm_genlist_compress_mode_set(Evas_Object *obj, Eina_Bool compress);
/**
*
* @ingroup Genlist
*/
+//aspect
//XXX: API name is ambiguous.. How about elm_genlist_mode_fixed_width_set?
EAPI void elm_genlist_height_for_width_mode_set(Evas_Object *obj, Eina_Bool height_for_width);
*
* @ingroup Genlist
*/
-//XXX: API name is ambigious elm_genlist_mode_fixed_width_get() ?????
+//XXX: API name is ambiguous elm_genlist_mode_fixed_width_get() ?????
EAPI Eina_Bool elm_genlist_height_for_width_mode_get(const Evas_Object *obj);
/**
*
* @ingroup Genlist
*/
-//XXX: elm_genlist_item_event_freeze_set()?
+//XXX: elm_genlist_item_no_select_mode_set()?
EAPI void elm_genlist_item_display_only_set(Elm_Object_Item *it, Eina_Bool display_only);
/**
*
* @ingroup Genlist
*/
-//XXX: elm_genlist_item_event_freeze_get()?
+//XXX: elm_genlist_item_no_select_mode_get()?
EAPI Eina_Bool elm_genlist_item_display_only_get(const Elm_Object_Item *it);
/**
- * Tells genlist to "orphan" contents fetched by the item class
+ * Unset all contents fetched by the item class
*
* @param it The item
+ * @param l The contents list to return
*
* This instructs genlist to release references to contents in the item,
* meaning that they will no longer be managed by genlist and are
*
* @ingroup Genlist
*/
-//XXX: elm_genlist_item_all_contents_unset() ??
-EAPI void elm_genlist_item_contents_orphan(Elm_Object_Item *it);
+EAPI void elm_genlist_item_all_contents_unset(Elm_Object_Item *it, Eina_List **l);
/**
* Promote an item to the top of the list
*
* @param it The item
* @param parts The name of item's part
- * @param itf The flags of item's part type
+ * @param itf The type of item's part type
*
* This updates an item's part by calling item's fetching functions again
* to get the contents, texts and states. Use this when the original
*
* @ingroup Genlist
*/
-EAPI void elm_genlist_item_fields_update(Elm_Object_Item *it, const char *parts, Elm_Genlist_Item_Field_Flags itf);
+EAPI void elm_genlist_item_fields_update(Elm_Object_Item *it, const char *parts, Elm_Genlist_Item_Field_Type itf);
/**
* Activate a genlist mode on an item
*
* @ingroup Genlist
*/
-//XXX: How bout elm_genlist_mode_item_set
+//XXX: How bout elm_genlist_effect_mode_set
EAPI void elm_genlist_item_mode_set(Elm_Object_Item *it, const char *mode_type, Eina_Bool mode_set);
/**
EAPI Eina_Bool elm_genlist_reorder_mode_get(const Evas_Object *obj);
/**
- * Get the Item's Flags
+ * Get the Item's Type
*
* @param it The genlist item
- * @return The item flags.
+ * @return The item type.
*
* This function returns the item's type. Normally the item's type.
* If it failed, return value is ELM_GENLIST_ITEM_MAX
*
* @ingroup Genlist
*/
-//XXX: type would be more intuitive...
-EAPI Elm_Genlist_Item_Flags elm_genlist_item_flags_get(const Elm_Object_Item *it);
+EAPI Elm_Genlist_Item_Type elm_genlist_item_type_get(const Elm_Object_Item *it);
/**
* Set Genlist edit mode
*
* @ingroup Genlist
*/
+//XXX: elm_genlist_effect_mode_set();
EAPI void elm_genlist_edit_mode_set(Evas_Object *obj, Eina_Bool edit_mode);
/**
*
* @ingroup Genlist
*/
+//XXX: elm_genlist_all_items_effect_mode_get();
EAPI Eina_Bool elm_genlist_edit_mode_get(const Evas_Object *obj);
/**
+ * Set the flip state of a given genlist item.
+ *
+ * @param it The genlist item object
+ * @param flip The flip mode
+ * (EINA_TRUE = on, EINA_FALSE = off)
+ *
+ * This function sets the flip state of a given genlist item.
+ * Flip mode overrides current item object.
+ * It can be used for on-the-fly item replace.
+ * Flip mode can be used with/without edit mode.
+ *
+ * @see elm_genlist_item_flip_get()
+ *
+ * @ingroup Genlist
+ */
+
+EAPI void elm_genlist_item_flip_set(Elm_Object_Item *it, Eina_Bool flip);
+
+/**
+ * Get the flip state of a given genlist item.
+ *
+ * @param it The genlist item object
+ *
+ * This function returns the flip state of a given genlist item.
+ * If the parameter is invalid, it returns EINA_FALSE.
+ *
+ * @see elm_genlist_item_flip_set()
+ *
+ * @ingroup Genlist
+ */
+
+EAPI Eina_Bool elm_genlist_item_flip_get(const Elm_Object_Item *it);
+
+/**
* @}
*/