forked from enlightenment/efl
elementary: add 2 method to slideshow item_nth_get and count_get
SVN revision: 59308
This commit is contained in:
parent
c3ce0db67a
commit
874f8d098e
|
@ -2116,6 +2116,7 @@ extern "C" {
|
|||
EAPI void *elm_slideshow_item_data_get(const Elm_Slideshow_Item *item) EINA_ARG_NONNULL(1);
|
||||
EAPI Elm_Slideshow_Item *elm_slideshow_item_current_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
|
||||
EAPI Evas_Object* elm_slideshow_item_object_get(const Elm_Slideshow_Item* item) EINA_ARG_NONNULL(1);
|
||||
EAPI Elm_Slideshow_Item *elm_slideshow_item_nth_get(const Evas_Object *obj, unsigned int nth) EINA_ARG_NONNULL(1);
|
||||
EAPI const char *elm_slideshow_layout_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
|
||||
EAPI void elm_slideshow_layout_set(Evas_Object *obj, const char *layout) EINA_ARG_NONNULL(1);
|
||||
EAPI const Eina_List *elm_slideshow_layouts_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
|
||||
|
@ -2123,6 +2124,7 @@ extern "C" {
|
|||
EAPI int elm_slideshow_cache_before_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
|
||||
EAPI void elm_slideshow_cache_after_set(Evas_Object *obj, int count) EINA_ARG_NONNULL(1);
|
||||
EAPI int elm_slideshow_cache_after_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
|
||||
EAPI unsigned int elm_slideshow_count_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
|
||||
/* smart callbacks called:
|
||||
* "changed" - when the slideshow switch to another item
|
||||
*/
|
||||
|
|
|
@ -958,3 +958,39 @@ elm_slideshow_cache_after_set(Evas_Object *obj, int count)
|
|||
if (count < 0) count = 0;
|
||||
wd->count_item_pre_after = count;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the nth item of the slideshow
|
||||
*
|
||||
* @param obj The slideshow object
|
||||
* @param nth The number of the element (0 being first)
|
||||
* @return The item stored in slideshow at position required
|
||||
*
|
||||
* @ingroup Slideshow
|
||||
*/
|
||||
EAPI Elm_Slideshow_Item *
|
||||
elm_slideshow_item_nth_get(const Evas_Object *obj, unsigned int nth)
|
||||
{
|
||||
ELM_CHECK_WIDTYPE(obj, widtype);
|
||||
Widget_Data *wd = elm_widget_data_get(obj);
|
||||
if (!wd) return NULL;
|
||||
return eina_list_nth(wd->items, nth);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get count of items stored in slideshow
|
||||
*
|
||||
* @param obj The slideshow object
|
||||
* @return The count of items
|
||||
*
|
||||
* @ingroup Slideshow
|
||||
*/
|
||||
EAPI unsigned int
|
||||
elm_slideshow_count_get(const Evas_Object *obj)
|
||||
{
|
||||
ELM_CHECK_WIDTYPE(obj, widtype);
|
||||
Widget_Data *wd = elm_widget_data_get(obj);
|
||||
if (!wd) return 0;
|
||||
return eina_list_count(wd->items);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue