1 /*****************************************************************************
2 * vlc_window.h: Embedded video output window
3 *****************************************************************************
4 * Copyright (C) 2008 RĂ©mi Denis-Courmont
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
19 *****************************************************************************/
21 #ifndef LIBVLCCORE_WINDOW_H
22 # define LIBVLCCORE_WINDOW_H 1
26 * This file defines functions and structures for output windows
31 typedef struct vout_window_t vout_window_t;
32 typedef struct vout_window_sys_t vout_window_sys_t;
42 void *hwnd; /* Win32 window handle */
43 uint32_t xid; /* X11 window ID */
45 vout_window_sys_t *p_sys; /* window provider private data */
47 unsigned width; /* pixels width */
48 unsigned height; /* pixels height */
49 int pos_x; /* horizontal position hint */
50 int pos_y; /* vertical position hint */
52 int (*control) (struct vout_window_t *, int, va_list);
55 VLC_EXPORT( vout_window_t *, vout_RequestWindow, ( vout_thread_t *, const char *, int *, int *, unsigned int *, unsigned int * ) );
56 VLC_EXPORT( void, vout_ReleaseWindow, ( vout_window_t * ) );
57 VLC_EXPORT( int, vout_ControlWindow, ( vout_window_t *, int, va_list ) );
59 static inline vout_window_t *
60 vout_RequestXWindow (vout_thread_t *vout,
61 int *x, int *y, unsigned *w, unsigned *h)
63 return vout_RequestWindow (vout, "xwindow", x, y, w, h);
66 static inline vout_window_t *
67 vout_RequestHWND (vout_thread_t *vout,
68 int *x, int *y, unsigned *w, unsigned *h)
70 return vout_RequestWindow (vout, "hwnd", x, y, w, h);
73 #endif /* !LIBVLCCORE_WINDOW_H */