use version as an actual version and bring back macros for setting up
[framework/uifw/elementary.git] / src / lib / elm_genlist.h
index 952c608..b9e5661 100644 (file)
  *
  * @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,
-   //XXX:ELM_GENLSIT_ITEM_FIELD_TEXT
-   ELM_GENLIST_ITEM_FIELD_LABEL = (1 << 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
@@ -585,76 +583,6 @@ EAPI void                          elm_genlist_no_select_mode_set(Evas_Object *o
 EAPI Eina_Bool                     elm_genlist_no_select_mode_get(const Evas_Object *obj);
 
 /**
- * Enable/disable compress mode.
- *
- * @param obj The genlist object
- * @param compress The compress mode
- * (@c EINA_TRUE = on, @c EINA_FALSE = off). Default is @c EINA_FALSE.
- *
- * This will enable the compress mode where items are "compressed"
- * horizontally to fit the genlist scrollable viewport width. This is
- * special for genlist.  Do not rely on
- * elm_genlist_horizontal_set() being set to @c ELM_LIST_COMPRESS to
- * work as genlist needs to handle it specially.
- *
- * @see elm_genlist_compress_mode_get()
- *
- * @ingroup Genlist
- */
-EAPI void                          elm_genlist_compress_mode_set(Evas_Object *obj, Eina_Bool compress);
-
-/**
- * Get whether the compress mode is enabled.
- *
- * @param obj The genlist object
- * @return The compress mode
- * (@c EINA_TRUE = on, @c EINA_FALSE = off)
- *
- * @see elm_genlist_compress_mode_set()
- *
- * @ingroup Genlist
- */
-EAPI Eina_Bool                     elm_genlist_compress_mode_get(const Evas_Object *obj);
-
-/**
- * Enable/disable height-for-width mode.
- *
- * @param obj The genlist object
- * @param height_for_width The height-for-width mode (@c EINA_TRUE = on,
- * @c EINA_FALSE = off). Default is @c EINA_FALSE.
- *
- * With height-for-width mode the item width will be fixed (restricted
- * to a minimum of) to the list width when calculating its size in
- * order to allow the height to be calculated based on it. This allows,
- * for instance, text block to wrap lines if the Edje part is
- * configured with "text.min: 0 1".
- *
- * @note This mode will make list resize slower as it will have to
- *       recalculate every item height again whenever the list width
- *       changes!
- *
- * @note When height-for-width mode is enabled, it also enables
- *       compress mode (see elm_genlist_compress_mode_set()) and
- *       disables homogeneous (see elm_genlist_homogeneous_set()).
- *
- * @ingroup Genlist
- */
-//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);
-
-/**
- * Get whether the height-for-width mode is enabled.
- *
- * @param obj The genlist object
- * @return The height-for-width mode (@c EINA_TRUE = on, @c EINA_FALSE =
- * off)
- *
- * @ingroup Genlist
- */
-//XXX: API name is ambigious elm_genlist_mode_fixed_width_get() ?????
-EAPI Eina_Bool                     elm_genlist_height_for_width_mode_get(const Evas_Object *obj);
-
-/**
  * Enable/disable horizontal and vertical bouncing effect.
  *
  * @param obj The genlist object
@@ -689,115 +617,13 @@ EAPI void                          elm_genlist_bounce_set(Evas_Object *obj, Eina
 EAPI void                          elm_genlist_bounce_get(const Evas_Object *obj, Eina_Bool *h_bounce, Eina_Bool *v_bounce);
 
 /**
- * Enable/disable homogeneous mode.
- *
- * @param obj The genlist object
- * @param homogeneous Assume the items within the genlist are of the
- * same height and width (EINA_TRUE = on, EINA_FALSE = off). Default is @c
- * EINA_FALSE.
- *
- * This will enable the homogeneous mode where items are of the same
- * height and width so that genlist may do the lazy-loading at its
- * maximum (which increases the performance for scrolling the list). This
- * implies 'compressed' mode.
- *
- * @see elm_genlist_compress_mode_set()
- * @see elm_genlist_homogeneous_get()
- *
- * @ingroup Genlist
- */
-EAPI void                          elm_genlist_homogeneous_set(Evas_Object *obj, Eina_Bool homogeneous);
-
-/**
- * Get whether the homogeneous mode is enabled.
- *
- * @param obj The genlist object
- * @return Assume the items within the genlist are of the same height
- * and width (EINA_TRUE = on, EINA_FALSE = off)
- *
- * @see elm_genlist_homogeneous_set()
- *
- * @ingroup Genlist
- */
-EAPI Eina_Bool                     elm_genlist_homogeneous_get(const Evas_Object *obj);
-
-/**
- * Set the maximum number of items within an item block
- *
- * @param obj The genlist object
- * @param count Maximum number of items within an item block. Default is 32.
- *
- * This will configure the block count to tune to the target with particular
- * performance matrix.
- *
- * A block of objects will be used to reduce the number of operations due to
- * many objects in the screen. It can determine the visibility, or if the
- * object has changed, it theme needs to be updated, etc. doing this kind of
- * calculation to the entire block, instead of per object.
- *
- * The default value for the block count is enough for most lists, so unless
- * you know you will have a lot of objects visible in the screen at the same
- * time, don't try to change this.
- *
- * @see elm_genlist_block_count_get()
- * @see @ref Genlist_Implementation
- *
- * @ingroup Genlist
- */
-EAPI void                          elm_genlist_block_count_set(Evas_Object *obj, int count);
-
-/**
- * Get the maximum number of items within an item block
- *
- * @param obj The genlist object
- * @return Maximum number of items within an item block
- *
- * @see elm_genlist_block_count_set()
- *
- * @ingroup Genlist
- */
-EAPI int                           elm_genlist_block_count_get(const Evas_Object *obj);
-
-/**
- * Set the timeout in seconds for the longpress event.
- *
- * @param obj The genlist object
- * @param timeout timeout in seconds. Default is elm config value(1.0)
- *
- * This option will change how long it takes to send an event "longpressed"
- * after the mouse down signal is sent to the list. If this event occurs, no
- * "clicked" event will be sent.
- *
- * @warning If you set the longpress timeout value with this API, your genlist
- * will not be affected by the longpress value of elementary config value
- * later.
- *
- * @see elm_genlist_longpress_timeout_set()
- *
- * @ingroup Genlist
- */
-EAPI void                          elm_genlist_longpress_timeout_set(Evas_Object *obj, double timeout);
-
-/**
- * Get the timeout in seconds for the longpress event.
- *
- * @param obj The genlist object
- * @return timeout in seconds
- *
- * @see elm_genlist_longpress_timeout_get()
- *
- * @ingroup Genlist
- */
-EAPI double                        elm_genlist_longpress_timeout_get(const Evas_Object *obj);
-
-/**
  * Append a new item in a given genlist widget.
  *
  * @param obj The 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 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
@@ -812,7 +638,7 @@ EAPI double                        elm_genlist_longpress_timeout_get(const Evas_
  *
  * @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.
@@ -821,7 +647,7 @@ EAPI Elm_Object_Item             *elm_genlist_item_append(Evas_Object *obj, cons
  * @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
@@ -836,7 +662,7 @@ EAPI Elm_Object_Item             *elm_genlist_item_append(Evas_Object *obj, cons
  *
  * @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
@@ -846,7 +672,7 @@ EAPI Elm_Object_Item             *elm_genlist_item_prepend(Evas_Object *obj, con
  * @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
@@ -861,7 +687,7 @@ EAPI Elm_Object_Item             *elm_genlist_item_prepend(Evas_Object *obj, con
  *
  * @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
@@ -871,7 +697,7 @@ EAPI Elm_Object_Item             *elm_genlist_item_insert_before(Evas_Object *ob
  * @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
@@ -886,7 +712,7 @@ EAPI Elm_Object_Item             *elm_genlist_item_insert_before(Evas_Object *ob
  *
  * @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
@@ -895,15 +721,24 @@ EAPI Elm_Object_Item             *elm_genlist_item_insert_after(Evas_Object *obj
  * @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.
  * @return A handle to the item added or NULL if not possible
  *
+ * This inserts an item in the genlist based on user defined comparison
+ * function. The two arguments passed to the function @p func are genlist item
+ * handles to compare.
+ *
+ * @see elm_genlist_item_append()
+ * @see elm_genlist_item_prepend()
+ * @see elm_genlist_item_insert_after()
+ * @see elm_object_item_del()
+
  * @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 */
 /**
@@ -967,29 +802,6 @@ EAPI const Eina_List              *elm_genlist_selected_items_get(const Evas_Obj
 EAPI Eina_List                    *elm_genlist_realized_items_get(const Evas_Object *obj);
 
 /**
- * Get the item that is at the x, y canvas coords.
- *
- * @param obj The genlist object.
- * @param x The input x coordinate
- * @param y The input y coordinate
- * @param posret The position relative to the item returned here
- * @return The item at the coordinates or NULL if none
- *
- * This returns the item at the given coordinates (which are canvas
- * relative, not object-relative). If an item is at that coordinate,
- * that item handle is returned, and if @p posret is not NULL, the
- * integer pointed to is set to a value of -1, 0 or 1, depending if
- * the coordinate is on the upper portion of that item (-1), on the
- * middle section (0) or on the lower part (1). If NULL is returned as
- * an item (no item found there), then posret may indicate -1 or 1
- * based if the coordinate is above or below all items respectively in
- * the genlist.
- *
- * @ingroup Genlist
- */
-EAPI Elm_Object_Item             *elm_genlist_at_xy_item_get(const Evas_Object *obj, Evas_Coord x, Evas_Coord y, int *posret);
-
-/**
  * Get the first item in the genlist
  *
  * This returns the first item in the list.
@@ -1081,34 +893,6 @@ EAPI Elm_Object_Item             *elm_genlist_item_next_get(const Elm_Object_Ite
 EAPI Elm_Object_Item             *elm_genlist_item_prev_get(const Elm_Object_Item *it);
 
 /**
- * Get the parent item of the given item
- *
- * @param it The item
- * @return The parent of the item or @c NULL if it has no parent.
- *
- * This returns the item that was specified as parent of the item @p it on
- * elm_genlist_item_append() and insertion related functions.
- *
- * @ingroup Genlist
- */
-EAPI Elm_Object_Item             *elm_genlist_item_parent_get(const Elm_Object_Item *it);
-
-/**
- * Remove all sub-items (children) of the given item
- *
- * @param it The item
- *
- * This removes all items that are children (and their descendants) of the
- * given item @p it.
- *
- * @see elm_genlist_clear()
- * @see elm_object_item_del()
- *
- * @ingroup Genlist
- */
-EAPI void                          elm_genlist_item_subitems_clear(Elm_Object_Item *it);
-
-/**
  * Set whether a given genlist item is selected or not
  *
  * @param it The item
@@ -1139,109 +923,26 @@ EAPI void                          elm_genlist_item_selected_set(Elm_Object_Item
 EAPI Eina_Bool                     elm_genlist_item_selected_get(const Elm_Object_Item *it);
 
 /**
- * Sets the expanded state of an item.
- *
- * @param it The item
- * @param expanded The expanded state (@c EINA_TRUE expanded, @c EINA_FALSE not expanded).
- *
- * This function flags the item of type #ELM_GENLIST_ITEM_SUBITEMS as
- * expanded or not.
+ * Show the portion of a genlist's internal list containing a given
+ * item, immediately.
  *
- * The theme will respond to this change visually, and a signal "expanded" or
- * "contracted" will be sent from the genlist with a pointer to the item that
- * has been expanded/contracted.
+ * @param it The item to display
  *
- * Calling this function won't show or hide any child of this item (if it is
- * a parent). You must manually delete and create them on the callbacks of
- * the "expanded" or "contracted" signals.
+ * This causes genlist to jump to the given item @p it and show it (by
+ * jumping to that position), if it is not fully visible.
  *
- * @see elm_genlist_item_expanded_get()
+ * @see elm_genlist_item_bring_in()
+ * @see elm_genlist_item_top_show()
+ * @see elm_genlist_item_middle_show()
  *
  * @ingroup Genlist
  */
-EAPI void                          elm_genlist_item_expanded_set(Elm_Object_Item *it, Eina_Bool expanded);
+//XXX: elm_genlist_item_show(it, TOP/MIDDLE/BOTTOM/...); this kind of API would cover all similar APIs - item_show, item_top_show...
+EAPI void                          elm_genlist_item_show(Elm_Object_Item *it);
 
 /**
- * Get the expanded state of an item
- *
- * @param it The item
- * @return The expanded state
- *
- * This gets the expanded state of an item.
- *
- * @see elm_genlist_item_expanded_set()
- *
- * @ingroup Genlist
- */
-EAPI Eina_Bool                     elm_genlist_item_expanded_get(const Elm_Object_Item *it);
-
-/**
- * Get the depth of expanded item
- *
- * @param it The genlist item object
- * @return The depth of expanded item
- *
- * @ingroup Genlist
- */
-EAPI int                           elm_genlist_item_expanded_depth_get(const Elm_Object_Item *it);
-
-
-/**
- * Sets the display only state of an item.
- *
- * @param it The item
- * @param display_only @c EINA_TRUE if the item is display only, @c
- * EINA_FALSE otherwise.
- *
- * A display only item cannot be selected or unselected. It is for
- * display only and not selecting or otherwise clicking, dragging
- * etc. by the user, thus finger size rules will not be applied to
- * this item.
- *
- * It's good to set group index items to display only state.
- *
- * @see elm_genlist_item_display_only_get()
- *
- * @ingroup Genlist
- */
-//XXX: elm_genlist_item_event_freeze_set()?
-EAPI void                          elm_genlist_item_display_only_set(Elm_Object_Item *it, Eina_Bool display_only);
-
-/**
- * Get the display only state of an item
- *
- * @param it The item
- * @return @c EINA_TRUE if the item is display only, @c
- * EINA_FALSE otherwise.
- *
- * @see elm_genlist_item_display_only_set()
- *
- * @ingroup Genlist
- */
-//XXX: elm_genlist_item_event_freeze_get()?
-EAPI Eina_Bool                     elm_genlist_item_display_only_get(const Elm_Object_Item *it);
-
-/**
- * Show the portion of a genlist's internal list containing a given
- * item, immediately.
- *
- * @param it The item to display
- *
- * This causes genlist to jump to the given item @p it and show it (by
- * jumping to that position), if it is not fully visible.
- *
- * @see elm_genlist_item_bring_in()
- * @see elm_genlist_item_top_show()
- * @see elm_genlist_item_middle_show()
- *
- * @ingroup Genlist
- */
-//XXX: elm_genlist_item_show(it, TOP/MIDDLE/BOTTOM/...); this kind of API would cover all similar APIs - item_show, item_top_show...
-EAPI void                          elm_genlist_item_show(Elm_Object_Item *it);
-
-/**
- * Animatedly bring in, to the visible are of a genlist, a given
- * item on it.
+ * Animatedly bring in, to the visible are of a genlist, a given
+ * item on it.
  *
  * @param it The item to display
  *
@@ -1337,21 +1038,6 @@ EAPI void                          elm_genlist_item_middle_show(Elm_Object_Item
 EAPI void                          elm_genlist_item_middle_bring_in(Elm_Object_Item *it);
 
 /**
- * Tells genlist to "orphan" contents fetched by the item class
- *
- * @param it The item
- *
- * This instructs genlist to release references to contents in the item,
- * meaning that they will no longer be managed by genlist and are
- * floating "orphans" that can be re-used elsewhere if the user wants
- * to.
- *
- * @ingroup Genlist
- */
-//XXX: elm_genlist_item_all_contents_unset() ??
-EAPI void                          elm_genlist_item_contents_orphan(Elm_Object_Item *it);
-
-/**
  * Update the contents of an item
  *
  * @param it The item
@@ -1370,59 +1056,140 @@ EAPI void                          elm_genlist_item_contents_orphan(Elm_Object_I
 EAPI void                          elm_genlist_item_update(Elm_Object_Item *it);
 
 /**
- * Promote an item to the top of the list
+ * Update the item class of an item
  *
  * @param it The item
+ * @param itc The item class for the item
+ *
+ * This sets another class of the item, changing the way that it is
+ * displayed. After changing the item class, elm_genlist_item_update() is
+ * called on the item @p it.
  *
  * @ingroup Genlist
  */
-EAPI void                          elm_genlist_item_promote(Elm_Object_Item *it);
+EAPI void                          elm_genlist_item_item_class_update(Elm_Object_Item *it, const Elm_Genlist_Item_Class *itc);
 
 /**
- * Demote an item to the end of the list
+ * Get the Genlist Item class for the given Genlist Item.
  *
- * @param it The item
+ * @param it The genlist item
+ *
+ * This returns the Genlist_Item_Class for the given item. It can be used to 
+ * examine the function pointers and item_style.
  *
  * @ingroup Genlist
  */
-EAPI void                          elm_genlist_item_demote(Elm_Object_Item *it);
+EAPI const Elm_Genlist_Item_Class *elm_genlist_item_item_class_get(const Elm_Object_Item *it);
 
 /**
- * Update the part of an item
+ * Get the index of the item. It is only valid once displayed.
  *
- * @param it The item
- * @param parts The name of item's part
- * @param itf The flags of item's part type
+ * @param it a genlist item
+ * @return the position inside the list of item.
  *
- * This updates an item's part by calling item's fetching functions again
+ * @ingroup Genlist
+ */
+EAPI int                           elm_genlist_item_index_get(const Elm_Object_Item *it);
+
+/**
+ * Update the contents of all realized items.
+ *
+ * @param obj The genlist object.
+ *
+ * This updates all realized items by calling all the item class functions again
  * to get the contents, texts and states. Use this when the original
  * item data has changed and the changes are desired to be reflected.
- * Second parts argument is used for globbing to match '*', '?', and '.'
- * It can be used at updating multi fields.
  *
- * Use elm_genlist_realized_items_update() to update an item's all
- * property.
+ * To update just one item, use elm_genlist_item_update().
  *
+ * @see elm_genlist_realized_items_get()
  * @see elm_genlist_item_update()
  *
  * @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_realized_items_update(Evas_Object *obj);
+
+/**
+ * Return how many items are currently in a list
+ *
+ * @param obj The list
+ * @return The total number of list items in the list
+ *
+ * This behavior is O(1) and includes items which may or may not be realized.
+ *
+ * @ingroup Genlist
+ */
+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
 
 /**
- * Update the item class of an item
+ * Add a new genlist item class in a given genlist widget.
  *
- * @param it The item
- * @param itc The item class for the item
+ * @return New allocated a genlist item class.
  *
- * This sets another class of the item, changing the way that it is
- * displayed. After changing the item class, elm_genlist_item_update() is
- * called on the item @p it.
+ * 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 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.
+ *
+ * @see elm_genlist_item_class_free()
+ * @see elm_genlist_item_append()
  *
  * @ingroup Genlist
  */
-EAPI void                          elm_genlist_item_item_class_update(Elm_Object_Item *it, const Elm_Genlist_Item_Class *itc);
-EAPI const Elm_Genlist_Item_Class *elm_genlist_item_item_class_get(const Elm_Object_Item *it);
+EAPI Elm_Genlist_Item_Class *elm_genlist_item_class_new(void);
+
+/**
+ * Remove a item class in a given genlist widget.
+ *
+ * @param itc The itc to be removed.
+ *
+ * This removes item class from the genlist widget.
+ * Whenever it has no more references to it, item class is going to be freed.
+ * Otherwise it just decreases its reference count.
+ *
+ * @see elm_genlist_item_class_new()
+ * @see elm_genlist_item_class_ref()
+ * @see elm_genlist_item_class_unref()
+ *
+ * @ingroup Genlist
+ */
+EAPI void elm_genlist_item_class_free(Elm_Genlist_Item_Class *itc);
+
+/**
+ * Increments object reference count for the item class.
+ *
+ * @param itc The given item class object to reference
+ *
+ * This API just increases its reference count for item class management.
+ *
+ * @see elm_genlist_item_class_unref()
+ *
+ * @ingroup Genlist
+ */
+EAPI void elm_genlist_item_class_ref(Elm_Genlist_Item_Class *itc);
+
+/**
+ * Decrements object reference count for the item class.
+ *
+ * @param itc The given item class object to reference
+ *
+ * This API just decreases its reference count for item class management.
+ * Reference count can't be less than 0.
+ *
+ * @see elm_genlist_item_class_ref()
+ * @see elm_genlist_item_class_free()
+ *
+ * @ingroup Genlist
+ */
+EAPI void elm_genlist_item_class_unref(Elm_Genlist_Item_Class *itc);
+
+
+
+//XXX: Need to review tooltip & cursor APIs
 
 /**
  * Set the text to be shown in a given genlist item's tooltips.
@@ -1469,7 +1236,6 @@ EAPI void                          elm_genlist_item_tooltip_text_set(Elm_Object_
  *
  * @ingroup Genlist
  */
-//XXX: Need to review tooltip & cursor APIs
 EAPI void                          elm_genlist_item_tooltip_content_cb_set(Elm_Object_Item *it, Elm_Tooltip_Item_Content_Cb func, const void *data, Evas_Smart_Cb del_cb);
 
 /**
@@ -1681,44 +1447,378 @@ EAPI void                          elm_genlist_item_cursor_engine_only_set(Elm_O
 EAPI Eina_Bool                     elm_genlist_item_cursor_engine_only_get(const Elm_Object_Item *it);
 
 /**
- * Get the index of the item. It is only valid once displayed.
+ * Enable/disable compress mode.
  *
- * @param it a genlist item
- * @return the position inside the list of item.
+ * @param obj The genlist object
+ * @param compress The compress mode
+ * (@c EINA_TRUE = on, @c EINA_FALSE = off). Default is @c EINA_FALSE.
+ *
+ * This will enable the compress mode where items are "compressed"
+ * horizontally to fit the genlist scrollable viewport width. This is
+ * special for genlist.  Do not rely on
+ * elm_genlist_horizontal_set() being set to @c ELM_LIST_COMPRESS to
+ * work as genlist needs to handle it specially.
+ *
+ * @see elm_genlist_compress_mode_get()
  *
  * @ingroup Genlist
  */
-EAPI int                           elm_genlist_item_index_get(const Elm_Object_Item *it);
+// 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);
 
 /**
- * Update the contents of all realized items.
- *
- * @param obj The genlist object.
- *
- * This updates all realized items by calling all the item class functions again
- * to get the contents, texts and states. Use this when the original
- * item data has changed and the changes are desired to be reflected.
+ * Get whether the compress mode is enabled.
  *
- * To update just one item, use elm_genlist_item_update().
+ * @param obj The genlist object
+ * @return The compress mode
+ * (@c EINA_TRUE = on, @c EINA_FALSE = off)
  *
- * @see elm_genlist_realized_items_get()
- * @see elm_genlist_item_update()
+ * @see elm_genlist_compress_mode_set()
  *
  * @ingroup Genlist
  */
-EAPI void                          elm_genlist_realized_items_update(Evas_Object *obj);
+EAPI Eina_Bool                     elm_genlist_compress_mode_get(const Evas_Object *obj);
 
 /**
- * Activate a genlist mode on an item
+ * Enable/disable height-for-width mode.
  *
- * @param it The genlist item
- * @param mode_type Mode name
- * @param mode_set Boolean to define set or unset mode.
+ * @param obj The genlist object
+ * @param height_for_width The height-for-width mode (@c EINA_TRUE = on,
+ * @c EINA_FALSE = off). Default is @c EINA_FALSE.
  *
- * A genlist mode is a different way of selecting an item. Once a mode is
- * activated on an item, any other selected item is immediately unselected.
- * This feature provides an easy way of implementing a new kind of animation
- * for selecting an item, without having to entirely rewrite the item style
+ * With height-for-width mode the item width will be fixed (restricted
+ * to a minimum of) to the list width when calculating its size in
+ * order to allow the height to be calculated based on it. This allows,
+ * for instance, text block to wrap lines if the Edje part is
+ * configured with "text.min: 0 1".
+ *
+ * @note This mode will make list resize slower as it will have to
+ *       recalculate every item height again whenever the list width
+ *       changes!
+ *
+ * @note When height-for-width mode is enabled, it also enables
+ *       compress mode (see elm_genlist_compress_mode_set()) and
+ *       disables homogeneous (see elm_genlist_homogeneous_set()).
+ *
+ * @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);
+
+/**
+ * Get whether the height-for-width mode is enabled.
+ *
+ * @param obj The genlist object
+ * @return The height-for-width mode (@c EINA_TRUE = on, @c EINA_FALSE =
+ * off)
+ *
+ * @ingroup Genlist
+ */
+//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);
+
+/**
+ * Enable/disable homogeneous mode.
+ *
+ * @param obj The genlist object
+ * @param homogeneous Assume the items within the genlist are of the
+ * same height and width (EINA_TRUE = on, EINA_FALSE = off). Default is @c
+ * EINA_FALSE.
+ *
+ * This will enable the homogeneous mode where items are of the same
+ * height and width so that genlist may do the lazy-loading at its
+ * maximum (which increases the performance for scrolling the list). This
+ * implies 'compressed' mode.
+ *
+ * @see elm_genlist_compress_mode_set()
+ * @see elm_genlist_homogeneous_get()
+ *
+ * @ingroup Genlist
+ */
+EAPI void                          elm_genlist_homogeneous_set(Evas_Object *obj, Eina_Bool homogeneous);
+
+/**
+ * Get whether the homogeneous mode is enabled.
+ *
+ * @param obj The genlist object
+ * @return Assume the items within the genlist are of the same height
+ * and width (EINA_TRUE = on, EINA_FALSE = off)
+ *
+ * @see elm_genlist_homogeneous_set()
+ *
+ * @ingroup Genlist
+ */
+EAPI Eina_Bool                     elm_genlist_homogeneous_get(const Evas_Object *obj);
+
+/**
+ * Set the maximum number of items within an item block
+ *
+ * @param obj The genlist object
+ * @param count Maximum number of items within an item block. Default is 32.
+ *
+ * This will configure the block count to tune to the target with particular
+ * performance matrix.
+ *
+ * A block of objects will be used to reduce the number of operations due to
+ * many objects in the screen. It can determine the visibility, or if the
+ * object has changed, it theme needs to be updated, etc. doing this kind of
+ * calculation to the entire block, instead of per object.
+ *
+ * The default value for the block count is enough for most lists, so unless
+ * you know you will have a lot of objects visible in the screen at the same
+ * time, don't try to change this.
+ *
+ * @see elm_genlist_block_count_get()
+ * @see @ref Genlist_Implementation
+ *
+ * @ingroup Genlist
+ */
+EAPI void                          elm_genlist_block_count_set(Evas_Object *obj, int count);
+
+/**
+ * Get the maximum number of items within an item block
+ *
+ * @param obj The genlist object
+ * @return Maximum number of items within an item block
+ *
+ * @see elm_genlist_block_count_set()
+ *
+ * @ingroup Genlist
+ */
+EAPI int                           elm_genlist_block_count_get(const Evas_Object *obj);
+
+/**
+ * Set the timeout in seconds for the longpress event.
+ *
+ * @param obj The genlist object
+ * @param timeout timeout in seconds. Default is elm config value(1.0)
+ *
+ * This option will change how long it takes to send an event "longpressed"
+ * after the mouse down signal is sent to the list. If this event occurs, no
+ * "clicked" event will be sent.
+ *
+ * @warning If you set the longpress timeout value with this API, your genlist
+ * will not be affected by the longpress value of elementary config value
+ * later.
+ *
+ * @see elm_genlist_longpress_timeout_set()
+ *
+ * @ingroup Genlist
+ */
+EAPI void                          elm_genlist_longpress_timeout_set(Evas_Object *obj, double timeout);
+
+/**
+ * Get the timeout in seconds for the longpress event.
+ *
+ * @param obj The genlist object
+ * @return timeout in seconds
+ *
+ * @see elm_genlist_longpress_timeout_get()
+ *
+ * @ingroup Genlist
+ */
+EAPI double                        elm_genlist_longpress_timeout_get(const Evas_Object *obj);
+
+/**
+ * Get the item that is at the x, y canvas coords.
+ *
+ * @param obj The genlist object.
+ * @param x The input x coordinate
+ * @param y The input y coordinate
+ * @param posret The position relative to the item returned here
+ * @return The item at the coordinates or NULL if none
+ *
+ * This returns the item at the given coordinates (which are canvas
+ * relative, not object-relative). If an item is at that coordinate,
+ * that item handle is returned, and if @p posret is not NULL, the
+ * integer pointed to is set to a value of -1, 0 or 1, depending if
+ * the coordinate is on the upper portion of that item (-1), on the
+ * middle section (0) or on the lower part (1). If NULL is returned as
+ * an item (no item found there), then posret may indicate -1 or 1
+ * based if the coordinate is above or below all items respectively in
+ * the genlist.
+ *
+ * @ingroup Genlist
+ */
+EAPI Elm_Object_Item             *elm_genlist_at_xy_item_get(const Evas_Object *obj, Evas_Coord x, Evas_Coord y, int *posret);
+
+/**
+ * Get the parent item of the given item
+ *
+ * @param it The item
+ * @return The parent of the item or @c NULL if it has no parent.
+ *
+ * This returns the item that was specified as parent of the item @p it on
+ * elm_genlist_item_append() and insertion related functions.
+ *
+ * @ingroup Genlist
+ */
+EAPI Elm_Object_Item             *elm_genlist_item_parent_get(const Elm_Object_Item *it);
+
+/**
+ * Remove all sub-items (children) of the given item
+ *
+ * @param it The item
+ *
+ * This removes all items that are children (and their descendants) of the
+ * given item @p it.
+ *
+ * @see elm_genlist_clear()
+ * @see elm_object_item_del()
+ *
+ * @ingroup Genlist
+ */
+EAPI void                          elm_genlist_item_subitems_clear(Elm_Object_Item *it);
+
+/**
+ * Sets the expanded state of an item.
+ *
+ * @param it The item
+ * @param expanded The expanded state (@c EINA_TRUE expanded, @c EINA_FALSE not expanded).
+ *
+ * This function flags the item of type #ELM_GENLIST_ITEM_SUBITEMS as
+ * expanded or not.
+ *
+ * The theme will respond to this change visually, and a signal "expanded" or
+ * "contracted" will be sent from the genlist with a pointer to the item that
+ * has been expanded/contracted.
+ *
+ * Calling this function won't show or hide any child of this item (if it is
+ * a parent). You must manually delete and create them on the callbacks of
+ * the "expanded" or "contracted" signals.
+ *
+ * @see elm_genlist_item_expanded_get()
+ *
+ * @ingroup Genlist
+ */
+EAPI void                          elm_genlist_item_expanded_set(Elm_Object_Item *it, Eina_Bool expanded);
+
+/**
+ * Get the expanded state of an item
+ *
+ * @param it The item
+ * @return The expanded state
+ *
+ * This gets the expanded state of an item.
+ *
+ * @see elm_genlist_item_expanded_set()
+ *
+ * @ingroup Genlist
+ */
+EAPI Eina_Bool                     elm_genlist_item_expanded_get(const Elm_Object_Item *it);
+
+/**
+ * Get the depth of expanded item
+ *
+ * @param it The genlist item object
+ * @return The depth of expanded item
+ *
+ * @ingroup Genlist
+ */
+EAPI int                           elm_genlist_item_expanded_depth_get(const Elm_Object_Item *it);
+
+/**
+ * Sets the display only state of an item.
+ *
+ * @param it The item
+ * @param display_only @c EINA_TRUE if the item is display only, @c
+ * EINA_FALSE otherwise.
+ *
+ * A display only item cannot be selected or unselected. It is for
+ * display only and not selecting or otherwise clicking, dragging
+ * etc. by the user, thus finger size rules will not be applied to
+ * this item.
+ *
+ * It's good to set group index items to display only state.
+ *
+ * @see elm_genlist_item_display_only_get()
+ *
+ * @ingroup Genlist
+ */
+//XXX: elm_genlist_item_no_select_mode_set()?
+EAPI void                          elm_genlist_item_display_only_set(Elm_Object_Item *it, Eina_Bool display_only);
+
+/**
+ * Get the display only state of an item
+ *
+ * @param it The item
+ * @return @c EINA_TRUE if the item is display only, @c
+ * EINA_FALSE otherwise.
+ *
+ * @see elm_genlist_item_display_only_set()
+ *
+ * @ingroup Genlist
+ */
+//XXX: elm_genlist_item_no_select_mode_get()?
+EAPI Eina_Bool                     elm_genlist_item_display_only_get(const Elm_Object_Item *it);
+
+/**
+ * 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
+ * floating "orphans" that can be re-used elsewhere if the user wants
+ * to.
+ *
+ * @ingroup Genlist
+ */
+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
+ *
+ * @ingroup Genlist
+ */
+EAPI void                          elm_genlist_item_promote(Elm_Object_Item *it);
+
+/**
+ * Demote an item to the end of the list
+ *
+ * @param it The item
+ *
+ * @ingroup Genlist
+ */
+EAPI void                          elm_genlist_item_demote(Elm_Object_Item *it);
+
+/**
+ * Update the part of an item
+ *
+ * @param it The item
+ * @param parts The name of item's part
+ * @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
+ * item data has changed and the changes are desired to be reflected.
+ * Second parts argument is used for globbing to match '*', '?', and '.'
+ * It can be used at updating multi fields.
+ *
+ * Use elm_genlist_realized_items_update() to update an item's all
+ * property.
+ *
+ * @see elm_genlist_item_update()
+ *
+ * @ingroup Genlist
+ */
+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
+ *
+ * @param it The genlist item
+ * @param mode_type Mode name
+ * @param mode_set Boolean to define set or unset mode.
+ *
+ * A genlist mode is a different way of selecting an item. Once a mode is
+ * activated on an item, any other selected item is immediately unselected.
+ * This feature provides an easy way of implementing a new kind of animation
+ * for selecting an item, without having to entirely rewrite the item style
  * theme. However, the elm_genlist_selected_* API can't be used to get what
  * item is activate for a mode.
  *
@@ -1748,7 +1848,7 @@ EAPI void                          elm_genlist_realized_items_update(Evas_Object
  *
  * @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);
 
 /**
@@ -1807,118 +1907,77 @@ EAPI void                          elm_genlist_reorder_mode_set(Evas_Object *obj
 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);
-
-#define ELM_GENLIST_ITEM_CLASS_VERSION 2 /* current version number */
+EAPI Elm_Genlist_Item_Type        elm_genlist_item_type_get(const Elm_Object_Item *it);
 
 /**
- * Add a new genlist item class in a given genlist widget.
- *
- * @return New allocated a genlist item class.
+ * Set Genlist edit mode
  *
- * 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
- * added item. Set as NULL if it's not used.
- * If there's no available memory, return can be NULL.
+ * This sets Genlist edit mode.
  *
- * @see elm_genlist_item_class_free()
- * @see elm_genlist_item_append()
+ * @param obj The Genlist object
+ * @param The edit mode status
+ * (EINA_TRUE = edit mode, EINA_FALSE = normal mode
  *
  * @ingroup Genlist
  */
-EAPI Elm_Genlist_Item_Class *elm_genlist_item_class_new(void);
+//XXX: elm_genlist_effect_mode_set();
+EAPI void               elm_genlist_edit_mode_set(Evas_Object *obj, Eina_Bool edit_mode);
 
 /**
- * Remove a item class in a given genlist widget.
- *
- * @param itc The itc to be removed.
- *
- * This removes item class from the genlist widget.
- * Whenever it has no more references to it, item class is going to be freed.
- * Otherwise it just decreases its reference count.
+ * Get Genlist edit mode
  *
- * @see elm_genlist_item_class_new()
- * @see elm_genlist_item_class_ref()
- * @see elm_genlist_item_class_unref()
+ * @param obj The genlist object
+ * @return The edit mode status
+ * (EINA_TRUE = edit mode, EINA_FALSE = normal mode
  *
  * @ingroup Genlist
  */
-EAPI void elm_genlist_item_class_free(Elm_Genlist_Item_Class *itc);
+//XXX: elm_genlist_all_items_effect_mode_get();
+EAPI Eina_Bool          elm_genlist_edit_mode_get(const Evas_Object *obj);
 
 /**
- * Increments object reference count for the item class.
+ * Set the flip state of a given genlist item.
  *
- * @param itc The given item class object to reference
+ * @param it The genlist item object
+ * @param flip The flip mode
+ * (EINA_TRUE = on, EINA_FALSE = off)
  *
- * This API just increases its reference count for item class management.
+ * 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_class_unref()
+ * @see elm_genlist_item_flip_get()
  *
  * @ingroup Genlist
  */
-EAPI void elm_genlist_item_class_ref(Elm_Genlist_Item_Class *itc);
 
-/**
- * Decrements object reference count for the item class.
- *
- * @param itc The given item class object to reference
- *
- * This API just decreases its reference count for item class management.
- * Reference count can't be less than 0.
- *
- * @see elm_genlist_item_class_ref()
- * @see elm_genlist_item_class_free()
- *
- * @ingroup Genlist
- */
-EAPI void elm_genlist_item_class_unref(Elm_Genlist_Item_Class *itc);
+EAPI void elm_genlist_item_flip_set(Elm_Object_Item *it, Eina_Bool flip);
 
 /**
- * Return how many items are currently in a list
- *
- * @param obj The list
- * @return The total number of list items in the list
+ * Get the flip state of a given genlist item.
  *
- * This behavior is O(1) and includes items which may or may not be realized.
+ * @param it The genlist item object
  *
- * @ingroup Genlist
- */
-EAPI unsigned int elm_genlist_items_count(const Evas_Object *obj);
-/**
- * Set Genlist edit mode
+ * This function returns the flip state of a given genlist item.
+ * If the parameter is invalid, it returns EINA_FALSE.
  *
- * This sets Genlist edit mode.
- *
- * @param obj The Genlist object
- * @param The edit mode status
- * (EINA_TRUE = edit mode, EINA_FALSE = normal mode
+ * @see elm_genlist_item_flip_set()
  *
  * @ingroup Genlist
  */
-EAPI void               elm_genlist_edit_mode_set(Evas_Object *obj, Eina_Bool edit_mode);
 
-/**
- * Get Genlist edit mode
- *
- * @param obj The genlist object
- * @return The edit mode status
- * (EINA_TRUE = edit mode, EINA_FALSE = normal mode
- *
- * @ingroup Genlist
- */
-EAPI Eina_Bool          elm_genlist_edit_mode_get(const Evas_Object *obj);
+EAPI Eina_Bool elm_genlist_item_flip_get(const Elm_Object_Item *it);
 
 /**
  * @}