]> git.sesse.net Git - vlc/blob - include/video_x11.h
8bf7d9dfa91cf4f8755836743d42c4ff9edbf89d
[vlc] / include / video_x11.h
1 /*******************************************************************************
2  * video_x11.h: X11 video output display method
3  * (c)1999 VideoLAN
4  *******************************************************************************
5  * The X11 method for video output thread. The functions declared here should 
6  * not be needed by any other module than video_output.c.
7  *******************************************************************************
8  * Required headers:
9  * <pthread.h>
10  * <X11/Xlib.h>
11  * <X11/Xutil.h>
12  * <X11/extensions/XShm.h>
13  * "config.h"
14  * "common.h"
15  * "mtime.h"
16  * "video.h"
17  * "video_output.h"
18  *******************************************************************************/
19
20 /*******************************************************************************
21  * vout_x11_t: video output X11 method descriptor
22  *******************************************************************************
23  * This structure is part of the video output thread descriptor.
24  * It describes the X11 specific properties of an output thread. X11 video 
25  * output is performed through regular resizable windows. Windows can be
26  * dynamically resized to adapt to the size of the streams.
27  *******************************************************************************/
28 typedef struct vout_x11_s
29 {
30     /* User settings */
31     boolean_t           b_shm_ext;             /* shared memory extension flag */
32
33     /* Thread configuration - these properties are copied from a video_cfg_t 
34      * structure to be used in second step of initialization */
35     char *              psz_display;                           /* display name */
36     char *              psz_title;                             /* window title */
37
38     /* Internal settings and properties */
39     Display *           p_display;                          /* display pointer */
40     int                 i_screen;                             /* screen number */
41     Window              window;                     /* window instance handler */
42     GC                  gc;                /* graphic context instance handler */    
43
44     /* Window manager hints and atoms */
45     Atom                wm_protocols;                     /* WM_PROTOCOLS atom */
46     Atom                wm_delete_window;             /* WM_DELETE_WINDOW atom */
47
48     /* Color maps and translation tables - some of those tables are shifted,
49      * see x11.c for more informations. */
50     u8 *                trans_16bpp_red;           /* red (16 bpp) (SHIFTED !) */
51     u8 *                trans_16bpp_green;       /* green (16 bpp) (SHIFTED !) */
52     u8 *                trans_16bpp_blue;         /* blue (16 bpp) (SHIFTED !) */
53
54     /* ?? colormaps ? */
55     boolean_t           b_private_colormap;          /* private color map flag */
56     Colormap            private_colormap;                 /* private color map */
57
58     /* Display buffers and shared memory information */
59     int                 i_buffer_index;                        /* buffer index */
60     XImage *            p_ximage[2];                         /* XImage pointer */   
61     XShmSegmentInfo     shm_info[2];         /* shared memory zone information */
62
63     int                 i_completion_type;                               /* ?? */
64 } vout_x11_t;
65
66 /*******************************************************************************
67  * Prototypes
68  *******************************************************************************/
69 int     vout_X11AllocOutputMethod   ( vout_thread_t *p_vout, video_cfg_t *p_cfg );
70 void    vout_X11FreeOutputMethod    ( vout_thread_t *p_vout );    
71 int     vout_X11CreateOutputMethod  ( vout_thread_t *p_vout );
72 void    vout_X11DestroyOutputMethod ( vout_thread_t *p_vout );
73 int     vout_X11ManageOutputMethod  ( vout_thread_t *p_vout );
74 void    vout_X11DisplayOutput       ( vout_thread_t *p_vout );
75
76