10l initial patch by Oded Shimon <ods15 at ods15.dyndns.org>
[mplayer/greg.git] / libvo / x11_common.h
blobd5c27c8135dcb89f8bdcbff2a08bc9b5a1bc7031
2 #ifndef X11_COMMON_H
3 #define X11_COMMON_H
5 #ifdef X11_FULLSCREEN
7 #include <X11/Xlib.h>
8 #include <X11/Xutil.h>
10 #define vo_wm_LAYER 1
11 #define vo_wm_FULLSCREEN 2
12 #define vo_wm_STAYS_ON_TOP 4
13 #define vo_wm_ABOVE 8
14 #define vo_wm_BELOW 16
15 #define vo_wm_NETWM (vo_wm_FULLSCREEN | vo_wm_STAYS_ON_TOP | vo_wm_ABOVE | vo_wm_BELOW)
17 /* EWMH state actions, see
18 http://freedesktop.org/Standards/wm-spec/index.html#id2768769 */
19 #define _NET_WM_STATE_REMOVE 0 /* remove/unset property */
20 #define _NET_WM_STATE_ADD 1 /* add/set property */
21 #define _NET_WM_STATE_TOGGLE 2 /* toggle property */
23 extern int metacity_hack;
24 extern int vo_fsmode;
26 extern int vo_depthonscreen;
27 extern int vo_screenwidth;
28 extern int vo_screenheight;
29 extern int vo_dwidth;
30 extern int vo_dheight;
31 extern int vo_fs;
32 extern int vo_fs_layer;
33 extern int vo_wm_type;
34 extern int vo_fs_type;
35 extern char** vo_fstype_list;
36 extern int vo_ontop;
37 extern int vo_rootwin;
39 extern char *mDisplayName;
40 extern Display *mDisplay;
41 extern Window mRootWin;
42 extern int mScreen;
43 extern int mLocalDisplay;
44 extern int WinID;
46 extern int vo_mouse_timer_const;
47 extern int vo_mouse_autohide;
49 extern int vo_init( void );
50 extern void vo_uninit( void );
51 extern void vo_hidecursor ( Display* , Window );
52 extern void vo_showcursor( Display *disp, Window win );
53 extern void vo_x11_decoration( Display * vo_Display,Window w,int d );
54 extern void vo_x11_classhint( Display * display,Window window,char *name );
55 extern void vo_x11_nofs_sizepos(int x, int y, int width, int height);
56 extern void vo_x11_sizehint( int x, int y, int width, int height, int max );
57 extern int vo_x11_check_events(Display *mydisplay);
58 extern void vo_x11_selectinput_witherr(Display *display, Window w, long event_mask);
59 extern void vo_x11_fullscreen( void );
60 extern void vo_x11_setlayer( Display * mDisplay,Window vo_window,int layer );
61 extern void vo_x11_uninit();
62 extern Colormap vo_x11_create_colormap(XVisualInfo *vinfo);
63 extern uint32_t vo_x11_set_equalizer(char *name, int value);
64 extern uint32_t vo_x11_get_equalizer(char *name, int *value);
65 extern void fstype_help(void);
66 extern Window vo_x11_create_smooth_window( Display *mDisplay, Window mRoot,
67 Visual *vis, int x, int y, unsigned int width, unsigned int height,
68 int depth, Colormap col_map);
69 extern void vo_x11_clearwindow_part(Display *mDisplay, Window vo_window,
70 int img_width, int img_height, int use_fs);
71 extern void vo_x11_clearwindow( Display *mDisplay, Window vo_window );
72 extern void vo_x11_ontop();
73 extern void vo_x11_ewmh_fullscreen( int action );
75 #endif
77 extern Window vo_window;
78 extern GC vo_gc;
79 extern XSizeHints vo_hint;
81 #ifdef HAVE_XV
82 extern int vo_xv_set_eq(uint32_t xv_port, char * name, int value);
83 extern int vo_xv_get_eq(uint32_t xv_port, char * name, int *value);
84 #endif
86 #ifdef HAVE_NEW_GUI
87 extern void vo_setwindow( Window w,GC g );
88 extern void vo_x11_putkey(int key);
89 #endif
91 void saver_off( Display * );
92 void saver_on( Display * );
94 #ifdef HAVE_XINERAMA
95 void vo_x11_xinerama_move(Display *dsp, Window w);
96 #endif
98 #ifdef HAVE_XF86VM
99 void vo_vm_switch(uint32_t, uint32_t, int*, int*);
100 void vo_vm_close(Display*);
101 #endif
103 int vo_find_depth_from_visuals(Display *dpy, int screen, Visual **visual_return);
105 #endif