elm genlist: Changed item mode APIs.

1. elm_genlist_item_mode_set -> elm_genlist_item_decorate_mode_set.
2. elm_genlist_mode_item_get -> elm_genlist_decorated_item_get.
3. elm_genlist_mode_type_get -> elm_genlist_decorate_type_get.

Signed-off-by: Daniel Juyung Seo <juyung.seo@samsung.com>

SVN revision: 68992
This commit is contained in:
Daniel Juyung Seo 2012-03-07 16:19:25 +00:00 committed by Daniel Juyung Seo
parent 4b8fcf7430
commit c4508b0cc3
3 changed files with 81 additions and 20 deletions

View File

@ -1611,8 +1611,7 @@ EINA_DEPRECATED EAPI Evas_Object *elm_genlist_item_genlist_get(
*
* This is a constant string and simply defines the name of the
* style that will be used for mode animations. It can be
* @c NULL if you don't plan to use Genlist mode. See
* elm_genlist_item_mode_set() for more info.
* @c NULL if you don't plan to use Genlist mode.
*
*/
EINA_DEPRECATED EAPI const char *elm_genlist_mode_item_style_get(const Evas_Object *obj);
@ -1624,8 +1623,7 @@ EINA_DEPRECATED EAPI const char *elm_genlist_mode_item_style_g
*
* This is a constant string and simply defines the name of the
* style that will be used for mode animations. It can be
* @c NULL if you don't plan to use Genlist mode. See
* elm_genlist_item_mode_set() for more info.
* @c NULL if you don't plan to use Genlist mode.
*
*/
EINA_DEPRECATED EAPI void elm_genlist_mode_item_style_set(Evas_Object *obj, const char *style);
@ -6210,6 +6208,71 @@ EINA_DEPRECATED EAPI void elm_genlist_height_for_width_
*/
EINA_DEPRECATED EAPI Eina_Bool elm_genlist_height_for_width_mode_get(const Evas_Object *obj);
/**
* 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.
*
* The current item style will still be used, but applying a genlist mode to
* an item will select it using a different kind of animation.
*
* The current active item for a mode can be found by
* elm_genlist_decorated_item_get().
*
* The characteristics of genlist mode are:
* - Only one mode can be active at any time, and for only one item.
* - Genlist handles deactivating other items when one item is activated.
* - A mode is defined in the genlist theme (edc), and more modes can easily
* be added.
* - A mode style and the genlist item style are different things. They
* can be combined to provide a default style to the item, with some kind
* of animation for that item when the mode is activated.
*
* When a mode is activated on an item, a new view for that item is created.
* The theme of this mode defines the animation that will be used to transit
* the item from the old view to the new view. This second (new) view will be
* active for that item while the mode is active on the item, and will be
* destroyed after the mode is totally deactivated from that item.
*
* @deprecated elm_genlist_item_decorate_mode_set()
*/
EINA_DEPRECATED EAPI void elm_genlist_item_mode_set(Elm_Object_Item *it, const char *mode_type, Eina_Bool mode_set);
/**
* Get the last (or current) genlist mode used.
*
* @param obj The genlist object
*
* This function just returns the name of the last used genlist mode. It will
* be the current mode if it's still active.
*
* @deprecated elm_genlist_decorate_type_get()
*/
EINA_DEPRECATED EAPI const char *elm_genlist_mode_type_get(const Evas_Object *obj);
/**
* Get active genlist mode item
*
* @param obj The genlist object
* @return The active item for that current mode. Or @c NULL if no item is
* activated with any mode.
*
* This function returns the item that was activated with a mode, by the
* function elm_genlist_item_decorate_mode_set().
*
* @deprecated elm_genlist_decorated_item_get()
*/
EINA_DEPRECATED EAPI const Elm_Object_Item *elm_genlist_mode_item_get(const Evas_Object *obj);
/**
* @}
*/

View File

@ -5434,9 +5434,9 @@ elm_genlist_realized_items_update(Evas_Object *obj)
}
EAPI void
elm_genlist_item_mode_set(Elm_Object_Item *it,
const char *mode_type,
Eina_Bool mode_set)
elm_genlist_item_decorate_mode_set(Elm_Object_Item *it,
const char *mode_type,
Eina_Bool mode_set)
{
ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
Elm_Gen_Item *_it = (Elm_Gen_Item *)it;
@ -5481,7 +5481,7 @@ elm_genlist_item_mode_set(Elm_Object_Item *it,
}
EAPI const char *
elm_genlist_mode_type_get(const Evas_Object *obj)
elm_genlist_decorate_type_get(const Evas_Object *obj)
{
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
Widget_Data *wd = elm_widget_data_get(obj);
@ -5490,7 +5490,7 @@ elm_genlist_mode_type_get(const Evas_Object *obj)
}
EAPI const Elm_Object_Item *
elm_genlist_mode_item_get(const Evas_Object *obj)
elm_genlist_decorated_item_get(const Evas_Object *obj)
{
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
Widget_Data *wd = elm_widget_data_get(obj);

View File

@ -1612,7 +1612,7 @@ EAPI void elm_genlist_item_fields_update(Elm_Object_Ite
* an item will select it using a different kind of animation.
*
* The current active item for a mode can be found by
* elm_genlist_mode_item_get().
* elm_genlist_decorated_item_get().
*
* The characteristics of genlist mode are:
* - Only one mode can be active at any time, and for only one item.
@ -1630,12 +1630,11 @@ EAPI void elm_genlist_item_fields_update(Elm_Object_Ite
* destroyed after the mode is totally deactivated from that item.
*
* @see elm_genlist_mode_get()
* @see elm_genlist_mode_item_get()
* @see elm_genlist_decorated_item_get()
*
* @ingroup Genlist
*/
//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 void elm_genlist_item_decorate_mode_set(Elm_Object_Item *it, const char *mode_type, Eina_Bool mode_set);
/**
* Get the last (or current) genlist mode used.
@ -1645,13 +1644,12 @@ EAPI void elm_genlist_item_mode_set(Elm_Object_Item *it
* This function just returns the name of the last used genlist mode. It will
* be the current mode if it's still active.
*
* @see elm_genlist_item_mode_set()
* @see elm_genlist_mode_item_get()
* @see elm_genlist_item_decorate_mode_set()
* @see elm_genlist_decorated_item_get()
*
* @ingroup Genlist
*/
//XXX: looks weird... set the mode type to item and get the mode type from object...
EAPI const char *elm_genlist_mode_type_get(const Evas_Object *obj);
EAPI const char *elm_genlist_decorate_type_get(const Evas_Object *obj);
/**
* Get active genlist mode item
@ -1661,14 +1659,14 @@ EAPI const char *elm_genlist_mode_type_get(const Evas_Object *
* activated with any mode.
*
* This function returns the item that was activated with a mode, by the
* function elm_genlist_item_mode_set().
* function elm_genlist_item_decorate_mode_set().
*
* @see elm_genlist_item_mode_set()
* @see elm_genlist_item_decorate_mode_set()
* @see elm_genlist_mode_get()
*
* @ingroup Genlist
*/
EAPI const Elm_Object_Item *elm_genlist_mode_item_get(const Evas_Object *obj);
EAPI const Elm_Object_Item *elm_genlist_decorated_item_get(const Evas_Object *obj);
/**
* Set reorder mode