00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef LIBVLC_EVENTS_H
00026 #define LIBVLC_EVENTS_H 1
00027
00028 # ifdef __cplusplus
00029 extern "C" {
00030 # endif
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042 typedef enum libvlc_event_type_t {
00043 libvlc_MediaMetaChanged,
00044 libvlc_MediaSubItemAdded,
00045 libvlc_MediaDurationChanged,
00046 libvlc_MediaPreparsedChanged,
00047 libvlc_MediaFreed,
00048 libvlc_MediaStateChanged,
00049
00050 libvlc_MediaPlayerNothingSpecial,
00051 libvlc_MediaPlayerOpening,
00052 libvlc_MediaPlayerBuffering,
00053 libvlc_MediaPlayerPlaying,
00054 libvlc_MediaPlayerPaused,
00055 libvlc_MediaPlayerStopped,
00056 libvlc_MediaPlayerForward,
00057 libvlc_MediaPlayerBackward,
00058 libvlc_MediaPlayerEndReached,
00059 libvlc_MediaPlayerEncounteredError,
00060 libvlc_MediaPlayerTimeChanged,
00061 libvlc_MediaPlayerPositionChanged,
00062 libvlc_MediaPlayerSeekableChanged,
00063 libvlc_MediaPlayerPausableChanged,
00064
00065 libvlc_MediaListItemAdded,
00066 libvlc_MediaListWillAddItem,
00067 libvlc_MediaListItemDeleted,
00068 libvlc_MediaListWillDeleteItem,
00069
00070 libvlc_MediaListViewItemAdded,
00071 libvlc_MediaListViewWillAddItem,
00072 libvlc_MediaListViewItemDeleted,
00073 libvlc_MediaListViewWillDeleteItem,
00074
00075 libvlc_MediaListPlayerPlayed,
00076 libvlc_MediaListPlayerNextItemSet,
00077 libvlc_MediaListPlayerStopped,
00078
00079 libvlc_MediaDiscovererStarted,
00080 libvlc_MediaDiscovererEnded
00081
00082 } libvlc_event_type_t;
00083
00084
00085
00086
00087
00088
00089
00090
00091 typedef struct libvlc_event_t
00092 {
00093 libvlc_event_type_t type;
00094 void * p_obj;
00095 union event_type_specific
00096 {
00097
00098 struct
00099 {
00100 libvlc_meta_t meta_type;
00101 } media_meta_changed;
00102 struct
00103 {
00104 libvlc_media_t * new_child;
00105 } media_subitem_added;
00106 struct
00107 {
00108 int64_t new_duration;
00109 } media_duration_changed;
00110 struct
00111 {
00112 int new_status;
00113 } media_preparsed_changed;
00114 struct
00115 {
00116 libvlc_media_t * md;
00117 } media_freed;
00118 struct
00119 {
00120 libvlc_state_t new_state;
00121 } media_state_changed;
00122
00123
00124 struct
00125 {
00126 float new_position;
00127 } media_player_position_changed;
00128 struct
00129 {
00130 libvlc_time_t new_time;
00131 } media_player_time_changed;
00132 struct
00133 {
00134 libvlc_time_t new_seekable;
00135 } media_player_seekable_changed;
00136 struct
00137 {
00138 libvlc_time_t new_pausable;
00139 } media_player_pausable_changed;
00140
00141
00142 struct
00143 {
00144 libvlc_media_t * item;
00145 int index;
00146 } media_list_item_added;
00147 struct
00148 {
00149 libvlc_media_t * item;
00150 int index;
00151 } media_list_will_add_item;
00152 struct
00153 {
00154 libvlc_media_t * item;
00155 int index;
00156 } media_list_item_deleted;
00157 struct
00158 {
00159 libvlc_media_t * item;
00160 int index;
00161 } media_list_will_delete_item;
00162
00163
00164 struct
00165 {
00166 libvlc_media_t * item;
00167 int index;
00168 } media_list_view_item_added;
00169 struct
00170 {
00171 libvlc_media_t * item;
00172 int index;
00173 } media_list_view_will_add_item;
00174 struct
00175 {
00176 libvlc_media_t * item;
00177 int index;
00178 } media_list_view_item_deleted;
00179 struct
00180 {
00181 libvlc_media_t * item;
00182 int index;
00183 } media_list_view_will_delete_item;
00184
00185
00186 struct
00187 {
00188 void * unused;
00189 } media_media_discoverer_started;
00190 struct
00191 {
00192 void * unused;
00193 } media_media_discoverer_ended;
00194
00195 } u;
00196 } libvlc_event_t;
00197
00198
00199
00200
00201
00202
00203 typedef struct libvlc_event_manager_t libvlc_event_manager_t;
00204
00205
00206
00207
00208
00209
00210 typedef void ( *libvlc_callback_t )( const libvlc_event_t *, void * );
00211
00212
00213
00214 # ifdef __cplusplus
00215 }
00216 # endif
00217
00218 #endif