1 /*****************************************************************************
2 * vout_xvideo.c: Xvideo video output display method
3 *****************************************************************************
4 * Copyright (C) 1998-2001 VideoLAN
5 * $Id: vout_common.h,v 1.2 2001/12/13 12:47:17 sam Exp $
7 * Authors: Shane Harper <shanegh@optusnet.com.au>
8 * Vincent Seguin <seguin@via.ecp.fr>
9 * Samuel Hocevar <sam@zoy.org>
10 * David Kennedy <dkennedy@tinytoad.com>
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 2 of the License, or
15 * (at your option) any later version.
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
25 *****************************************************************************/
27 /*****************************************************************************
28 * vout_sys_t: video output method descriptor
29 *****************************************************************************
30 * This structure is part of the video output thread descriptor.
31 * It describes the X11 and XVideo specific properties of an output thread.
32 *****************************************************************************/
33 typedef struct vout_sys_s
37 /* this plugin (currently) requires the SHM Ext... */
38 boolean_t b_shm; /* shared memory extension flag */
41 /* Internal settings and properties */
42 Display * p_display; /* display pointer */
43 #if MODULE_NAME == xvideo
44 Visual * p_visual; /* visual pointer */
46 int i_screen; /* screen number */
47 Window window; /* root window */
48 GC gc; /* graphic context instance handler */
49 #if MODULE_NAME == xvideo
50 Window yuv_window; /* sub-window for displaying yuv video
55 Colormap colormap; /* colormap used (8bpp only) */
57 /* Display buffers and shared memory information */
58 XImage * p_ximage[2]; /* XImage pointer */
59 XShmSegmentInfo shm_info[2]; /* shared memory zone information */
62 /* X11 generic properties */
64 Atom wm_delete_window;
66 int i_width; /* width of main window */
67 int i_height; /* height of main window */
69 /* Screen saver properties */
70 int i_ss_timeout; /* timeout */
71 int i_ss_interval; /* interval between changes */
72 int i_ss_blanking; /* blanking mode */
73 int i_ss_exposure; /* exposure mode */
75 /* Mouse pointer properties */
76 boolean_t b_mouse_pointer_visible;
77 mtime_t i_time_mouse_last_moved; /* used to auto-hide pointer*/
78 Cursor blank_cursor; /* the hidden cursor */
83 /*****************************************************************************
84 * picture_sys_t: direct buffer method descriptor
85 *****************************************************************************
86 * This structure is part of the picture descriptor, it describes the
87 * XVideo specific properties of a direct buffer.
88 *****************************************************************************/
89 typedef struct picture_sys_s
92 XShmSegmentInfo shminfo; /* shared memory zone information */
96 /*****************************************************************************
97 * mwmhints_t: window manager hints
98 *****************************************************************************
99 * Fullscreen needs to be able to hide the wm decorations so we provide
100 * this structure to make it easier.
101 *****************************************************************************/
102 #define MWM_HINTS_DECORATIONS (1L << 1)
103 #define PROP_MWM_HINTS_ELEMENTS 5
104 typedef struct mwmhints_s
113 /*****************************************************************************
115 *****************************************************************************/
116 int _M( vout_Manage ) ( struct vout_thread_s * );
118 int _M( XCommonCreateWindow ) ( vout_thread_t *p_vout );
119 void _M( XCommonDestroyWindow ) ( vout_thread_t *p_vout );
121 void _M( XCommonEnableScreenSaver ) ( vout_thread_t *p_vout );
122 void _M( XCommonDisableScreenSaver ) ( vout_thread_t *p_vout );
123 void _M( XCommonToggleMousePointer ) ( vout_thread_t *p_vout );