This widget, as the name indicates, is a pre-made image slideshow panel, with API functions acting on (child) image items presentation. Between those actions, are:
advance to next/previous image
select the style of image transition animation
set the exhibition time for each image
start/stop the slideshow
The transition animations are defined in the widget’s theme, consequently new animations can be added without having to update the widget’s code.
For slideshow items, just like for Genlist
ones, the user defines a classes, specifying functions that will be called
on the item’s creation and deletion times.
The SlideshowItemClass
class contains the following
members:
get
- When an item is displayed, this function is
called, and it’s where one should create the item object, de
facto. For example, the object can be a pure Evas image object
or a Photocam
widget.
delete
- When an item is no more displayed, this function
is called, where the user must delete any data associated to
the item.
The slideshow provides facilities to have items adjacent to the one being displayed already “realized” (i.e. loaded) for you, so that the system does not have to decode image data anymore at the time it has to actually switch images on its viewport. The user is able to set the numbers of items to be cached before and after the current item, in the widget’s item list.
changed
- when the slideshow switches its view to a new item.
event_info parameter in callback contains the current visible item
transition,end
- when a slide transition ends. event_info
parameter in callback contains the current visible item
efl.elementary.
Slideshow
(Object parent, *args, **kwargs)¶parent (efl.evas.Object
) – The parent object
**kwargs – All the remaining keyword arguments are interpreted as properties of the instance
efl.elementary.
SlideshowItem
(SlideshowItemClass item_class, item_data=None, *args, **kwargs)¶efl.elementary.
SlideshowItemClass
(get_func=None, del_func=None)¶This class should be created and handled to the Slideshow itself.
It may be subclassed, in this case the methods get()
and delete()
will be used.
It may also be instantiated directly, given getters to override as constructor parameters.
get_func – if provided will override the behavior
defined by get()
in this class. Its purpose is
to return the icon object to be used (swallowed) by a
given part and row. This function should have the
signature:
func(obj, item_data) -> obj
del_func – if provided will override the behavior
defined by delete()
in this class. Its purpose is to be
called when item is deleted, thus finalizing resources
and similar. This function should have the signature:
func(obj, item_data)
Note
In all these signatures, ‘obj’ means Slideshow and ‘item_data’ is the value given to Slideshow item add/sorted_insert methods, it should represent your item model as you want.