Playlist callbacks.
More...
#include <vlc_playlist.h>
|
void(* | on_items_reset )(vlc_playlist_t *, vlc_playlist_item_t *const items[], size_t count, void *userdata) |
| Called when the whole content has changed (e.g.
|
|
void(* | on_items_added )(vlc_playlist_t *playlist, size_t index, vlc_playlist_item_t *const items[], size_t count, void *userdata) |
| Called when items have been added to the playlist.
|
|
void(* | on_items_moved )(vlc_playlist_t *playlist, size_t index, size_t count, size_t target, void *userdata) |
| Called when a slice of items have been moved.
|
|
void(* | on_items_removed )(vlc_playlist_t *playlist, size_t index, size_t count, void *userdata) |
| Called when a slice of items have been removed from the playlist.
|
|
void(* | on_items_updated )(vlc_playlist_t *playlist, size_t index, vlc_playlist_item_t *const items[], size_t count, void *userdata) |
| Called when an item has been updated via (pre-)parsing.
|
|
void(* | on_playback_repeat_changed )(vlc_playlist_t *playlist, enum vlc_playlist_playback_repeat repeat, void *userdata) |
| Called when the playback repeat mode has been changed.
|
|
void(* | on_playback_order_changed )(vlc_playlist_t *playlist, enum vlc_playlist_playback_order order, void *userdata) |
| Called when the playback order mode has been changed.
|
|
void(* | on_current_index_changed )(vlc_playlist_t *playlist, ssize_t index, void *userdata) |
| Called when the current item index has changed.
|
|
void(* | on_has_prev_changed )(vlc_playlist_t *playlist, bool has_prev, void *userdata) |
| Called when the "has previous item" property has changed.
|
|
void(* | on_has_next_changed )(vlc_playlist_t *playlist, bool has_next, void *userdata) |
| Called when the "has next item" property has changed.
|
|
void(* | on_media_stopped_action_changed )(vlc_playlist_t *playlist, enum vlc_playlist_media_stopped_action new_action, void *userdata) |
| Called when the stopped action has changed.
|
|
Playlist callbacks.
A client may register a listener using vlc_playlist_AddListener() to listen playlist events.
All callbacks are called with the playlist locked (see vlc_playlist_Lock()).
◆ on_current_index_changed
void(* vlc_playlist_callbacks::on_current_index_changed) (vlc_playlist_t *playlist, ssize_t index, void *userdata) |
Called when the current item index has changed.
Note that the current item index may have changed while the current item is still the same: it may have been moved.
- Parameters
-
playlist | the playlist |
index | the new current index (-1 if there is no current item) |
userdata | userdata provided to AddListener() |
◆ on_has_next_changed
void(* vlc_playlist_callbacks::on_has_next_changed) (vlc_playlist_t *playlist, bool has_next, void *userdata) |
Called when the "has next item" property has changed.
This is typically useful to update any "next" button in the UI.
- Parameters
-
playlist | the playlist |
has_next | true if there is a next item, false otherwise |
userdata | userdata provided to AddListener() |
◆ on_has_prev_changed
void(* vlc_playlist_callbacks::on_has_prev_changed) (vlc_playlist_t *playlist, bool has_prev, void *userdata) |
Called when the "has previous item" property has changed.
This is typically useful to update any "previous" button in the UI.
- Parameters
-
playlist | the playlist |
has_prev | true if there is a previous item, false otherwise |
userdata | userdata provided to AddListener() |
◆ on_items_added
Called when items have been added to the playlist.
- Parameters
-
playlist | the playlist |
index | the index of the insertion |
items | the array of added items |
count | the number of items added |
userdata | userdata provided to AddListener() |
◆ on_items_moved
void(* vlc_playlist_callbacks::on_items_moved) (vlc_playlist_t *playlist, size_t index, size_t count, size_t target, void *userdata) |
Called when a slice of items have been moved.
- Parameters
-
playlist | the playlist |
index | the index of the first moved item |
count | the number of items moved |
target | the new index of the moved slice |
userdata | userdata provided to AddListener() |
◆ on_items_removed
void(* vlc_playlist_callbacks::on_items_removed) (vlc_playlist_t *playlist, size_t index, size_t count, void *userdata) |
Called when a slice of items have been removed from the playlist.
- Parameters
-
playlist | the playlist |
index | the index of the first removed item |
count | the number of items removed |
userdata | userdata provided to AddListener() |
◆ on_items_reset
Called when the whole content has changed (e.g.
when the playlist has been cleared, shuffled or sorted).
- Parameters
-
playlist | the playlist |
items | the whole new content of the playlist |
count | the number of items |
userdata | userdata provided to AddListener() |
◆ on_items_updated
Called when an item has been updated via (pre-)parsing.
- Parameters
-
playlist | the playlist |
index | the index of the first updated item |
items | the array of updated items |
count | the number of items updated |
userdata | userdata provided to AddListener() |
Referenced by vlc_playlist_HasItemUpdatedListeners().
◆ on_media_stopped_action_changed
Called when the stopped action has changed.
- See also
- vlc_playlist_SetMediaStoppedAction()
- Parameters
-
playlist | the playlist |
new_action | action to execute when a media is stopped |
userdata | userdata provided to AddListener() |
◆ on_playback_order_changed
Called when the playback order mode has been changed.
- Parameters
-
playlist | the playlist |
rorder | the new playback order |
userdata | userdata provided to AddListener() |
◆ on_playback_repeat_changed
Called when the playback repeat mode has been changed.
- Parameters
-
playlist | the playlist |
repeat | the new playback "repeat" mode |
userdata | userdata provided to AddListener() |
The documentation for this struct was generated from the following file: