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
00029
00030
00031
00032
00033 # ifdef __cplusplus
00034 extern "C" {
00035 # endif
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049 #define DEFINE_LIBVLC_EVENT_TYPES \
00050 DEF( MediaMetaChanged ), \
00051 DEF( MediaSubItemAdded ), \
00052 DEF( MediaDurationChanged ), \
00053 DEF( MediaPreparsedChanged ), \
00054 DEF( MediaFreed ), \
00055 DEF( MediaStateChanged ), \
00056 \
00057 DEF( MediaPlayerNothingSpecial ), \
00058 DEF( MediaPlayerOpening ), \
00059 DEF( MediaPlayerBuffering ), \
00060 DEF( MediaPlayerPlaying ), \
00061 DEF( MediaPlayerPaused ), \
00062 DEF( MediaPlayerStopped ), \
00063 DEF( MediaPlayerForward ), \
00064 DEF( MediaPlayerBackward ), \
00065 DEF( MediaPlayerEndReached ), \
00066 DEF( MediaPlayerEncounteredError ), \
00067 DEF( MediaPlayerTimeChanged ), \
00068 DEF( MediaPlayerPositionChanged ), \
00069 DEF( MediaPlayerSeekableChanged ), \
00070 DEF( MediaPlayerPausableChanged ), \
00071 \
00072 DEF( MediaListItemAdded ), \
00073 DEF( MediaListWillAddItem ), \
00074 DEF( MediaListItemDeleted ), \
00075 DEF( MediaListWillDeleteItem ), \
00076 \
00077 DEF( MediaListViewItemAdded ), \
00078 DEF( MediaListViewWillAddItem ), \
00079 DEF( MediaListViewItemDeleted ), \
00080 DEF( MediaListViewWillDeleteItem ), \
00081 \
00082 DEF( MediaListPlayerPlayed ), \
00083 DEF( MediaListPlayerNextItemSet ), \
00084 DEF( MediaListPlayerStopped ), \
00085 \
00086 DEF( MediaDiscovererStarted ), \
00087 DEF( MediaDiscovererEnded ), \
00088 \
00089 DEF( MediaPlayerTitleChanged ), \
00090 DEF( MediaPlayerSnapshotTaken ), \
00091 DEF( MediaPlayerLengthChanged ), \
00092 \
00093 DEF( VlmMediaAdded ), \
00094 DEF( VlmMediaRemoved ), \
00095 DEF( VlmMediaChanged ), \
00096 DEF( VlmMediaInstanceStarted ), \
00097 DEF( VlmMediaInstanceStopped ), \
00098 DEF( VlmMediaInstanceStatusInit ), \
00099 DEF( VlmMediaInstanceStatusOpening ), \
00100 DEF( VlmMediaInstanceStatusPlaying ), \
00101 DEF( VlmMediaInstanceStatusPause ), \
00102 DEF( VlmMediaInstanceStatusEnd ), \
00103 DEF( VlmMediaInstanceStatusError ), \
00104
00105
00106 #ifdef __cplusplus
00107 enum libvlc_event_type_e {
00108 #else
00109 enum libvlc_event_type_t {
00110 #endif
00111 #define DEF(a) libvlc_##a
00112 DEFINE_LIBVLC_EVENT_TYPES
00113 libvlc_num_event_types
00114 #undef DEF
00115 };
00116
00117
00118 #ifndef LIBVLC_EVENT_TYPES_KEEP_DEFINE
00119 #undef DEFINE_LIBVLC_EVENT_TYPES
00120 #endif
00121
00122
00123
00124
00125
00126
00127
00128
00129 struct libvlc_event_t
00130 {
00131 libvlc_event_type_t type;
00132 void * p_obj;
00133 union event_type_specific
00134 {
00135
00136 struct
00137 {
00138 libvlc_meta_t meta_type;
00139 } media_meta_changed;
00140 struct
00141 {
00142 libvlc_media_t * new_child;
00143 } media_subitem_added;
00144 struct
00145 {
00146 int64_t new_duration;
00147 } media_duration_changed;
00148 struct
00149 {
00150 int new_status;
00151 } media_preparsed_changed;
00152 struct
00153 {
00154 libvlc_media_t * md;
00155 } media_freed;
00156 struct
00157 {
00158 libvlc_state_t new_state;
00159 } media_state_changed;
00160
00161
00162 struct
00163 {
00164 float new_position;
00165 } media_player_position_changed;
00166 struct
00167 {
00168 libvlc_time_t new_time;
00169 } media_player_time_changed;
00170 struct
00171 {
00172 int new_title;
00173 } media_player_title_changed;
00174 struct
00175 {
00176 int new_seekable;
00177 } media_player_seekable_changed;
00178 struct
00179 {
00180 int new_pausable;
00181 } media_player_pausable_changed;
00182
00183
00184 struct
00185 {
00186 libvlc_media_t * item;
00187 int index;
00188 } media_list_item_added;
00189 struct
00190 {
00191 libvlc_media_t * item;
00192 int index;
00193 } media_list_will_add_item;
00194 struct
00195 {
00196 libvlc_media_t * item;
00197 int index;
00198 } media_list_item_deleted;
00199 struct
00200 {
00201 libvlc_media_t * item;
00202 int index;
00203 } media_list_will_delete_item;
00204
00205
00206 struct
00207 {
00208 libvlc_media_t * item;
00209 int index;
00210 } media_list_view_item_added;
00211 struct
00212 {
00213 libvlc_media_t * item;
00214 int index;
00215 } media_list_view_will_add_item;
00216 struct
00217 {
00218 libvlc_media_t * item;
00219 int index;
00220 } media_list_view_item_deleted;
00221 struct
00222 {
00223 libvlc_media_t * item;
00224 int index;
00225 } media_list_view_will_delete_item;
00226
00227
00228 struct
00229 {
00230 libvlc_media_t * item;
00231 } media_list_player_next_item_set;
00232
00233
00234 struct
00235 {
00236 char* psz_filename ;
00237 } media_player_snapshot_taken ;
00238
00239
00240 struct
00241 {
00242 libvlc_time_t new_length;
00243 } media_player_length_changed;
00244
00245
00246 struct
00247 {
00248 const char * psz_media_name;
00249 const char * psz_instance_name;
00250 } vlm_media_event;
00251 } u;
00252 };
00253
00254
00255
00256
00257 # ifdef __cplusplus
00258 }
00259 # endif
00260
00261 #endif