]> git.sesse.net Git - vlc/blob - plugins/x11/vout_common.h
* Forgot a file in my last commit.
[vlc] / plugins / x11 / vout_common.h
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 $
6  *
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>
11  *
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.
16  *
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.
21  *
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  *****************************************************************************/
26
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
34 {
35     /* User settings */
36 #if 0
37     /* this plugin (currently) requires the SHM Ext... */
38     boolean_t           b_shm;               /* shared memory extension flag */
39 #endif
40
41     /* Internal settings and properties */
42     Display *           p_display;                        /* display pointer */
43 #if MODULE_NAME == xvideo
44     Visual *            p_visual;                          /* visual pointer */
45 #endif
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
51                                                                         data */
52     GC                  yuv_gc;
53     int                 i_xvport;
54 #else
55     Colormap            colormap;               /* colormap used (8bpp only) */
56
57     /* Display buffers and shared memory information */
58     XImage *            p_ximage[2];                       /* XImage pointer */
59     XShmSegmentInfo     shm_info[2];       /* shared memory zone information */
60 #endif
61
62     /* X11 generic properties */
63     Atom                wm_protocols;
64     Atom                wm_delete_window;
65
66     int                 i_width;                     /* width of main window */
67     int                 i_height;                   /* height of main window */
68
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 */
74
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 */
79     Pixmap              cursor_pixmap;
80
81 } vout_sys_t;
82
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
90 {
91     XvImage *           p_xvimage;
92     XShmSegmentInfo     shminfo;       /* shared memory zone information */
93
94 } picture_sys_t;
95
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
105 {
106     u32 flags;
107     u32 functions;
108     u32 decorations;
109     s32 input_mode;
110     u32 status;
111 } mwmhints_t;
112
113 /*****************************************************************************
114  * Common prototypes
115  *****************************************************************************/
116 int  _M( vout_Manage )   ( struct vout_thread_s * );
117
118 int  _M( XCommonCreateWindow )    ( vout_thread_t *p_vout );
119 void _M( XCommonDestroyWindow )   ( vout_thread_t *p_vout );
120
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 );
124