]> git.sesse.net Git - vlc/blobdiff - include/vlc/libvlc_events.h
libvlc: Split public headers by object and layers.
[vlc] / include / vlc / libvlc_events.h
index cba64a3b52240e3f5206c18406aca350ee345873..08e52a5a891d53a8d6bd0b7c9b4ed98ebc16cf13 100644 (file)
@@ -1,7 +1,7 @@
 /*****************************************************************************
  * libvlc_events.h:  libvlc_events external API structure
  *****************************************************************************
- * Copyright (C) 1998-2007 the VideoLAN team
+ * Copyright (C) 1998-2008 the VideoLAN team
  * $Id $
  *
  * Authors: Filippo Carone <littlejohn@videolan.org>
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
-#ifndef _LIBVLC_EVENTS_H
-#define _LIBVLC_EVENTS_H 1
+#ifndef LIBVLC_EVENTS_H
+#define LIBVLC_EVENTS_H 1
+
+/**
+ * \file
+ * This file defines libvlc_event external API
+ */
 
 # ifdef __cplusplus
 extern "C" {
@@ -33,29 +38,36 @@ extern "C" {
  * Events handling
  *****************************************************************************/
 
-/** \defgroup libvlc_events Events
- * \ingroup libvlc
+/** \defgroup libvlc_event libvlc_event
+ * \ingroup libvlc_core
  * LibVLC Available Events
  * @{
  */
 
-typedef enum libvlc_event_type_t {
-    libvlc_MediaDescriptorMetaChanged,
-    libvlc_MediaDescriptorSubItemAdded,
-    libvlc_MediaDescriptorDurationChanged,
-    libvlc_MediaDescriptorPreparsedChanged,
-    libvlc_MediaDescriptorFreed,
-    libvlc_MediaDescriptorStateChanged,
-
-    libvlc_MediaInstancePlayed,
-    libvlc_MediaInstancePaused,
-    libvlc_MediaInstanceEndReached,
-    libvlc_MediaInstanceStopped,
-    libvlc_MediaInstanceEncounteredError,
-    libvlc_MediaInstanceTimeChanged,
-    libvlc_MediaInstancePositionChanged,
-    libvlc_MediaInstanceSeekableChanged,
-    libvlc_MediaInstancePausableChanged,
+enum libvlc_event_type_t {
+    /* Append new event types at the end.
+     * Do not remove, insert or re-order any entry. */
+    libvlc_MediaMetaChanged,
+    libvlc_MediaSubItemAdded,
+    libvlc_MediaDurationChanged,
+    libvlc_MediaPreparsedChanged,
+    libvlc_MediaFreed,
+    libvlc_MediaStateChanged,
+
+    libvlc_MediaPlayerNothingSpecial,
+    libvlc_MediaPlayerOpening,
+    libvlc_MediaPlayerBuffering,
+    libvlc_MediaPlayerPlaying,
+    libvlc_MediaPlayerPaused,
+    libvlc_MediaPlayerStopped,
+    libvlc_MediaPlayerForward,
+    libvlc_MediaPlayerBackward,
+    libvlc_MediaPlayerEndReached,
+    libvlc_MediaPlayerEncounteredError,
+    libvlc_MediaPlayerTimeChanged,
+    libvlc_MediaPlayerPositionChanged,
+    libvlc_MediaPlayerSeekableChanged,
+    libvlc_MediaPlayerPausableChanged,
 
     libvlc_MediaListItemAdded,
     libvlc_MediaListWillAddItem,
@@ -72,9 +84,13 @@ typedef enum libvlc_event_type_t {
     libvlc_MediaListPlayerStopped,
 
     libvlc_MediaDiscovererStarted,
-    libvlc_MediaDiscovererEnded
+    libvlc_MediaDiscovererEnded,
 
-} libvlc_event_type_t;
+    libvlc_MediaPlayerTitleChanged,
+    libvlc_MediaPlayerSnapshotTaken,
+    libvlc_MediaPlayerLengthChanged,
+    /* New event types HERE */
+};
 
 /**
  * An Event
@@ -83,7 +99,7 @@ typedef enum libvlc_event_type_t {
  * \param u Event dependent content
  */
 
-typedef struct libvlc_event_t
+struct libvlc_event_t
 {
     libvlc_event_type_t type;
     void * p_obj;
@@ -100,7 +116,7 @@ typedef struct libvlc_event_t
         } media_subitem_added;
         struct
         {
-            vlc_int64_t new_duration;
+            int64_t new_duration;
         } media_duration_changed;
         struct
         {
@@ -126,11 +142,15 @@ typedef struct libvlc_event_t
         } media_player_time_changed;
         struct
         {
-            libvlc_time_t new_seekable;
+            int new_title;
+        } media_player_title_changed;
+        struct
+        {
+            uint64_t new_seekable; /* FIXME: that's a boolean! */
         } media_player_seekable_changed;
         struct
         {
-            libvlc_time_t new_pausable;
+            uint64_t new_pausable; /* FIXME: that's a BOOL!!! */
         } media_player_pausable_changed;
 
         /* media list */
@@ -177,32 +197,20 @@ typedef struct libvlc_event_t
             int index;
         } media_list_view_will_delete_item;
 
-        /* media discoverer */
+        /* snapshot taken */
         struct
         {
-            void * unused;
-        } media_media_discoverer_started;
+             char* psz_filename ;
+        } media_player_snapshot_taken ;
+
+        /* Length changed */
         struct
         {
-            void * unused;
-        } media_media_discoverer_ended;
-
+            libvlc_time_t   new_length;
+        } media_player_length_changed;
     } u;
-} libvlc_event_t;
-
-/**
- * Event manager that belongs to a libvlc object, and from whom events can
- * be received.
- */
-
-typedef struct libvlc_event_manager_t libvlc_event_manager_t;
-
-/**
- * Callback function notification
- * \param p_event the event triggering the callback
- */
+};
 
-typedef void ( *libvlc_callback_t )( const libvlc_event_t *, void * );
 
 /**@} */