X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=include%2Fvlc_window.h;h=144e622d06d2addbe2e6a7244955491c80098a69;hb=b8fc38757e5e9c171496c0bbf220cdb358146487;hp=8cbb75a8463995688016783876af65633c1070ee;hpb=81c7b0627056ca8dbe7c68d925eb7cf0fdf6ca3e;p=vlc diff --git a/include/vlc_window.h b/include/vlc_window.h index 8cbb75a846..144e622d06 100644 --- a/include/vlc_window.h +++ b/include/vlc_window.h @@ -21,9 +21,15 @@ #ifndef LIBVLCCORE_WINDOW_H # define LIBVLCCORE_WINDOW_H 1 +/** + * \file + * This file defines functions and structures for output windows + */ + # include 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 */