elementary: add a smart callback to slideshow to be notified when current item change

SVN revision: 56336
This commit is contained in:
Michael BOUCHAUD 2011-01-27 22:58:28 +00:00
parent 0f80e8a743
commit 1b6d65550b
2 changed files with 6 additions and 1 deletions

View File

@ -1868,6 +1868,9 @@ extern "C" {
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);
/* smart callbacks called:
* "changed" - when the slideshow switch to another item
*/
/* file selector */
typedef enum _Elm_Fileselector_Mode

View File

@ -391,6 +391,7 @@ elm_slideshow_show(Elm_Slideshow_Item *item)
return;
next = item;
evas_object_smart_callback_call(item->base.widget, "changed", next);
_end(item->base.widget, item->base.widget, NULL, NULL);
if (wd->timer) ecore_timer_del(wd->timer);
@ -426,7 +427,7 @@ elm_slideshow_next(Evas_Object *obj)
next = _item_next_get(wd->current);
if ((!next) || (next == wd->current)) return;
evas_object_smart_callback_call(obj, "changed", next);
_end(obj, obj, NULL, NULL);
@ -467,6 +468,7 @@ elm_slideshow_previous(Evas_Object *obj)
prev = _item_prev_get(wd->current);
if ((!prev) || (prev == wd->current)) return;
evas_object_smart_callback_call(obj, "changed", prev);
_end(obj, obj, NULL, NULL);