]> git.sesse.net Git - vlc/blobdiff - include/vlc_window.h
Remove unneeded VOUT_CLOSE.
[vlc] / include / vlc_window.h
index 8cbb75a8463995688016783876af65633c1070ee..144e622d06d2addbe2e6a7244955491c80098a69 100644 (file)
 #ifndef LIBVLCCORE_WINDOW_H
 # define LIBVLCCORE_WINDOW_H 1
 
+/**
+ * \file
+ * This file defines functions and structures for output windows
+ */
+
 # include <stdarg.h>
 
 typedef struct vout_window_t vout_window_t;
+typedef struct vout_window_sys_t vout_window_sys_t;
 
 struct vout_window_t
 {
@@ -31,7 +37,12 @@ struct vout_window_t
 
     module_t      *module;
     vout_thread_t *vout;
-    void          *handle; /* OS-specific Window handle */
+    union
+    {
+        void      *hwnd; /* Win32 window handle */
+        uint32_t   xid;  /* X11 window ID */
+    } handle;
+    vout_window_sys_t *p_sys;  /* window provider private data */
 
     unsigned       width;  /* pixels width */
     unsigned       height; /* pixels height */
@@ -41,4 +52,22 @@ struct vout_window_t
     int (*control) (struct vout_window_t *, int, va_list);
 };
 
+VLC_EXPORT( vout_window_t *, vout_RequestWindow, ( vout_thread_t *, const char *, int *, int *, unsigned int *, unsigned int * ) );
+VLC_EXPORT( void,   vout_ReleaseWindow, ( vout_window_t * ) );
+VLC_EXPORT( int, vout_ControlWindow, ( vout_window_t *, int, va_list ) );
+
+static inline vout_window_t *
+vout_RequestXWindow (vout_thread_t *vout,
+                     int *x, int *y, unsigned *w, unsigned *h)
+{
+    return vout_RequestWindow (vout, "xwindow", x, y, w, h);
+}
+
+static inline vout_window_t *
+vout_RequestHWND (vout_thread_t *vout,
+                  int *x, int *y, unsigned *w, unsigned *h)
+{
+    return vout_RequestWindow (vout, "hwnd", x, y, w, h);
+}
+
 #endif /* !LIBVLCCORE_WINDOW_H */