return photo;
}
-
+static void
+_slide_transition(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
+{
+ Elm_Object_Item *slide_it = (Elm_Object_Item *) event_info;
+ if (data == slide_it)
+ printf("Reaches to End of slides\n");
+}
void
test_slideshow(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
Evas_Object *win, *bg, *notify, *bx, *bt, *hv, *spin;
const Eina_List *l;
const char *transition, *layout;
+ Elm_Object_Item *slide_last_it;
win = elm_win_add(NULL, "slideshow", ELM_WIN_BASIC);
elm_win_title_set(win, "Slideshow");
elm_slideshow_item_add(slideshow, &itc, img5);
elm_slideshow_item_add(slideshow, &itc, img6);
elm_slideshow_item_add(slideshow, &itc, img7);
- elm_slideshow_item_add(slideshow, &itc, img8);
+ slide_last_it = elm_slideshow_item_add(slideshow, &itc, img8);
+ evas_object_smart_callback_add(slideshow, "transition,end", _slide_transition, slide_last_it);
notify = elm_notify_add(win);
elm_notify_orient_set(notify, ELM_NOTIFY_ORIENT_BOTTOM);
* Smart events one can add callbacks for are:
*
* - @c "changed" - when the slideshow switches its view to a new
- * item
+ * item. event_info parameter in callback contains the current visible item
+ * - @c "transition,end" - when a slide transition ends. event_info parameter
+ * in callback contains the current visible item
*
* List of examples for the slideshow widget:
* @li @ref slideshow_example
Evas_Callback_Type type, void *event_info);
static const char SIG_CHANGED[] = "changed";
+static const char SIG_TRANSITION_END[] = "transition,end";
static const Evas_Smart_Cb_Description _signals[] = {
{SIG_CHANGED, ""},
+ {SIG_TRANSITION_END, ""},
{NULL, NULL}
};
}
static void
-_end(void *data, Evas_Object *obj __UNUSED__, const char *emission __UNUSED__, const char *source __UNUSED__)
+_end(void *data, Evas_Object *obj __UNUSED__, const char *emission, const char *source __UNUSED__)
{
Elm_Slideshow_Item *item;
Widget_Data *wd = elm_widget_data_get(data);
edje_object_signal_emit(wd->slideshow, "anim,end", "slideshow");
edje_object_part_swallow(wd->slideshow, "elm.swallow.1", item->base.view);
+ if (emission != NULL)
+ evas_object_smart_callback_call(data, SIG_TRANSITION_END, wd->current);
}
static Eina_Bool