]> git.sesse.net Git - vlc/blobdiff - src/control/libvlc_internal.h
Libvlc Event: Add support for input event.
[vlc] / src / control / libvlc_internal.h
index 7769538c973dbfc6322c181d597de40ea651d44f..d454f70b9c1054b86c9be8d5d174b713906239f6 100644 (file)
@@ -30,26 +30,49 @@ extern "C" {
 # endif
 
 #include <vlc/vlc.h>
-
+#include <vlc/libvlc_structures.h>
+    
 /***************************************************************************
  * Internal creation and destruction functions
  ***************************************************************************/
-libvlc_int_t *libvlc_InternalCreate( void );
-int libvlc_InternalInit( libvlc_int_t *, int, char *ppsz_argv[] );
-int libvlc_InternalCleanup( libvlc_int_t * );
-int libvlc_InternalDestroy( libvlc_int_t *, vlc_bool_t );
+VLC_EXPORT (libvlc_int_t *, libvlc_InternalCreate, ( void ) );
+VLC_EXPORT (int, libvlc_InternalInit, ( libvlc_int_t *, int, char *ppsz_argv[] ) );
+VLC_EXPORT (int, libvlc_InternalCleanup, ( libvlc_int_t * ) );
+VLC_EXPORT (int, libvlc_InternalDestroy, ( libvlc_int_t *, vlc_bool_t ) );
+
+VLC_EXPORT (int, libvlc_InternalAddIntf, ( libvlc_int_t *, const char *, vlc_bool_t,
+                            vlc_bool_t, int, const char *const * ) );
 
-int libvlc_InternalAddIntf( libvlc_int_t *, const char *, vlc_bool_t,
-                            vlc_bool_t, int, const char *const * );
+VLC_EXPORT (void, libvlc_event_init, ( libvlc_instance_t *, libvlc_exception_t * ) );
+VLC_EXPORT (void, libvlc_event_fini, ( libvlc_instance_t *, libvlc_exception_t * ) );
 
 /***************************************************************************
  * Opaque structures for libvlc API
  ***************************************************************************/
 
+struct libvlc_callback_entry_t
+{
+    libvlc_instance_t *p_instance;
+    libvlc_callback_t f_callback;
+    libvlc_event_type_t i_event_type;
+    void *p_user_data;
+};
+
+struct libvlc_callback_entry_list_t
+{
+    struct libvlc_callback_entry_t *elmt;
+    struct libvlc_callback_entry_list_t *next;
+    struct libvlc_callback_entry_list_t *prev;
+};
+    
 struct libvlc_instance_t
 {
     libvlc_int_t *p_libvlc_int;
-    vlm_t      *p_vlm;
+    vlm_t        *p_vlm;
+    int           b_playlist_locked;
+    vlc_mutex_t   instance_lock;
+    vlc_mutex_t   event_callback_lock;
+    struct libvlc_callback_entry_list_t *p_callback_list;
 };
 
 struct libvlc_input_t
@@ -59,6 +82,12 @@ struct libvlc_input_t
     struct libvlc_instance_t *p_instance; ///< Parent instance
 };
 
+/***************************************************************************
+ * Other internal functions
+ ***************************************************************************/
+VLC_EXPORT (input_thread_t *, libvlc_get_input_thread,
+                        ( struct libvlc_input_t *, libvlc_exception_t * ) );
+
 #define RAISENULL( psz,a... ) { libvlc_exception_raise( p_e, psz,##a ); \
                                 return NULL; }
 #define RAISEVOID( psz,a... ) { libvlc_exception_raise( p_e, psz,##a ); \