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:
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:
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.
Bases: efl.elementary.__init__.LayoutClass
This is the class that actually implements the widget.
Parameters: |
|
---|
The number of items to cache, on a given slideshow widget, after the current item
The default value for this property is 2.
Type: | int |
---|
The number of items to cache, on a given slideshow widget, before the current item
The default value for this property is 2.
Type: | int |
---|
When the slideshow switches its view to a new item. event_info parameter in callback contains the current visible item.
When the slideshow has received focus.
New in version 1.8.
When a slide transition ends. event_info parameter in callback contains the current visible item.
When the slideshow has lost focus.
New in version 1.8.
Remove all items from a given slideshow widget.
This removes (and deletes) all items in the object, leaving it empty.
See also
delete(), to remove just one item.
Get the number of items stored in a given slideshow widget
Type: | int |
---|
The currently displayed item, in a given slideshow widget
Type: | SlideshowItem |
---|
Add (append) a new item in a given slideshow widget.
Add a new item to obj's internal list of items, appending it. The item’s class must contain the function really fetching the image object to show for this item, which could be an Evas image object or an Elementary photo, for example. The data parameter is going to be passed to both class functions of the item.
See also
SlideshowItemClass item_sorted_insert() efl.elementary.object_item.ObjectItem.data
Parameters: |
|
---|---|
Returns: | A handle to the item added or None, on errors |
Return type: |
Changed in version 1.14: use item_data param instead or args/kargs
Insert a new item into the given slideshow widget, using the func function to sort items (by item handles).
Add a new item to obj‘s internal list of items, in a position determined by the func comparing function. The item’s class must contain the function really fetching the image object to show for this item, which could be an Evas image object or an Elementary photo, for example. The data parameter is going to be passed to both class functions of the item.
The compare function compares data1 and data2. If data1 is ‘less’ than data2, -1 must be returned, if it is ‘greater’, 1 must be returned, and if they are equal, 0 must be returned.
See also
Parameters: |
|
---|---|
Returns: | A handle to the item added or None, on errors |
Return type: |
Changed in version 1.14: use item_data param instead or args/kargs
Get the internal list of items in a given slideshow widget.
This list is not to be modified in any way and must not be freed. Use the list members with functions like delete(), data.
Warning
This list is only valid until obj object’s internal items list is changed. It should be fetched again with another call to this function when changes happen.
Type: | tuple of SlideshowItem |
---|
The current slide layout in use for a given slideshow widget
If layout is implemented in obj's theme (i.e., is contained in the list returned by elm_slideshow_layouts_get()), this new images layout will be used on the widget.
Type: | string |
---|
Returns the list of layout names available, for a given slideshow widget.
Slideshow layouts will change how the widget is to dispose each image item in its viewport, with regard to cropping, scaling, etc.
The layouts, which come from the object theme, must be an EDC data item name "layouts" on the theme file, with (prefix) names of EDC programs actually implementing them.
See also
Type: | tuple of strings |
---|
If, after a slideshow is started, for a given slideshow widget, its items should be displayed cyclically or not.
Note
The methods next() and previous() will ignore what is set by this property, i.e., they’ll always cycle through items. This affects only the “automatic” slideshow, as set by timeout.
Type: | bool |
---|
Slide to the next item, in a given slideshow widget
The sliding animation the object is set to use will be the transition effect used, after this call is issued.
Note
If the end of the slideshow’s internal list of items is reached, it’ll wrap around to the list’s beginning, again.
Get the the item, in a given slideshow widget, placed at position nth in its internal items list.
Parameters: | nth (int) – The number of the item to grab a handle to (0 being the first) |
---|---|
Returns: | The item stored in obj at position nth or None, if there’s no item with that index (and on errors) |
Return type: | SlideshowItem |
Slide to the previous item, in a given slideshow widget
The sliding animation the object is set to use will be the transition effect used, after this call is issued.
Note
If the beginning of the slideshow’s internal list of items is reached, it’ll wrap around to the list’s end, again.
The interval between each image transition on a given slideshow widget, and start the slideshow, itself
After setting this, the slideshow widget will start cycling its view, sequentially and automatically, with the images of the items it has. The time between each new image displayed is going to be timeout in seconds. If a different timeout was set previously and an slideshow was in progress, it will continue with the new time between transitions, after this call.
Note
A value less than or equal to 0 on timeout will disable the widget’s internal timer, thus halting any slideshow which could be happening on obj.
Type: | float |
---|
The slide transition/effect in use for a given slideshow widget
If transition is implemented in obj's theme (i.e., is contained in the list returned by transitions), this new sliding effect will be used on the widget.
Type: | string |
---|
Returns the list of sliding transition/effect names available, for a given slideshow widget.
The transitions, which come from the objects theme, must be an EDC data item named "transitions" on the theme file, with (prefix) names of EDC programs actually implementing them.
See also
Type: | tuple of strings |
---|
Bases: efl.elementary.__init__.ObjectItem
An item for the Slideshow widget.
Add (append) a new item in a given slideshow widget.
Add a new item to obj's internal list of items, appending it. The item’s class must contain the function really fetching the image object to show for this item, which could be an Evas image object or an Elementary photo, for example. The data parameter is going to be passed to both class functions of the item.
See also
Parameters: | item_class (SlideshowItemClass) – The item class for the item |
---|---|
Returns: | A handle to the item added or None, on errors |
Return type: | SlideshowItem |
The data (model) associated with this item.
This is the data that has been passed to the add/sorted_insert functions, and the same that you get in the ItemClass get and delete functions.
New in version 1.14.
Get the real Evas object created to implement the view of a given slideshow item.
This returns the actual Evas object used to implement the specified slideshow item’s view. This may be None, as it may not have been created or may have been deleted, at any time, by the slideshow. Do not modify this object (move, resize, show, hide, etc.), as the slideshow is controlling it. This function is for querying, emitting custom signals or hooking lower level callbacks for events on that object. Do not delete this object under any circumstances.
See also
data
Type: | Slideshow |
---|
Display a given slideshow widget’s item, programmatically.
The change between the current item and this item will use the transition the slideshow object is set to use.
See also
Insert a new item into the given slideshow widget, using the func function to sort items (by item handles).
Add a new item to obj‘s internal list of items, in a position determined by the func comparing function. The item’s class must contain the function really fetching the image object to show for this item, which could be an Evas image object or an Elementary photo, for example. The data parameter is going to be passed to both class functions of the item.
The compare function compares data1 and data2. If data1 is ‘less’ than data2, -1 must be returned, if it is ‘greater’, 1 must be returned, and if they are equal, 0 must be returned.
See also
Parameters: |
|
---|---|
Returns: | Returns The slideshow item handle, on success, or None, on errors |
Bases: object
Defines the behavior of each slideshow item.
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.
Parameters: |
|
---|
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.
To be called by Slideshow for each item to get its icon.
Parameters: |
|
---|---|
Returns: | icon object to be used and swallowed. |
Return type: | evas Object or None |