Mercurial > mplayer.hg
annotate libvo/x11_common.h @ 28063:a318969a4f45
Set the base size window manager hint, otherwise some subtract the minimum
size of 4x4 from the numbers displayed to the user which might be confusing.
Based on patch by Bert Wesarg [bert wesarg googlemail com].
author | reimar |
---|---|
date | Fri, 05 Dec 2008 19:01:49 +0000 |
parents | a4e2700e9381 |
children | a4aa7ecd8cbe |
rev | line source |
---|---|
26029 | 1 #ifndef MPLAYER_X11_COMMON_H |
2 #define MPLAYER_X11_COMMON_H | |
32 | 3 |
4993 | 4 #include <X11/Xlib.h> |
5 #include <X11/Xutil.h> | |
6 | |
27750
2c11b155ff11
Move X11_FULLSCREEN definition to x11_common.h where it belongs.
diego
parents:
27377
diff
changeset
|
7 #include "config.h" |
2c11b155ff11
Move X11_FULLSCREEN definition to x11_common.h where it belongs.
diego
parents:
27377
diff
changeset
|
8 |
2c11b155ff11
Move X11_FULLSCREEN definition to x11_common.h where it belongs.
diego
parents:
27377
diff
changeset
|
9 #if defined(CONFIG_GL) || defined(CONFIG_X11) || defined(CONFIG_XV) |
2c11b155ff11
Move X11_FULLSCREEN definition to x11_common.h where it belongs.
diego
parents:
27377
diff
changeset
|
10 #define X11_FULLSCREEN 1 |
2c11b155ff11
Move X11_FULLSCREEN definition to x11_common.h where it belongs.
diego
parents:
27377
diff
changeset
|
11 #endif |
2c11b155ff11
Move X11_FULLSCREEN definition to x11_common.h where it belongs.
diego
parents:
27377
diff
changeset
|
12 |
14663
9d79600ff98d
X11 headers must be included also when X11_FULLSCREEN is not defined (although
reimar
parents:
13843
diff
changeset
|
13 #ifdef X11_FULLSCREEN |
9d79600ff98d
X11 headers must be included also when X11_FULLSCREEN is not defined (although
reimar
parents:
13843
diff
changeset
|
14 |
9317
c7f5df43b937
- support command line parameter -fstype, eg. -fstype layer=12,above,fullscreen
filon
parents:
8864
diff
changeset
|
15 #define vo_wm_LAYER 1 |
c7f5df43b937
- support command line parameter -fstype, eg. -fstype layer=12,above,fullscreen
filon
parents:
8864
diff
changeset
|
16 #define vo_wm_FULLSCREEN 2 |
c7f5df43b937
- support command line parameter -fstype, eg. -fstype layer=12,above,fullscreen
filon
parents:
8864
diff
changeset
|
17 #define vo_wm_STAYS_ON_TOP 4 |
c7f5df43b937
- support command line parameter -fstype, eg. -fstype layer=12,above,fullscreen
filon
parents:
8864
diff
changeset
|
18 #define vo_wm_ABOVE 8 |
c7f5df43b937
- support command line parameter -fstype, eg. -fstype layer=12,above,fullscreen
filon
parents:
8864
diff
changeset
|
19 #define vo_wm_BELOW 16 |
c7f5df43b937
- support command line parameter -fstype, eg. -fstype layer=12,above,fullscreen
filon
parents:
8864
diff
changeset
|
20 #define vo_wm_NETWM (vo_wm_FULLSCREEN | vo_wm_STAYS_ON_TOP | vo_wm_ABOVE | vo_wm_BELOW) |
8864 | 21 |
12520
94e66acdb706
Metacity fullscreen issues, patch by Alexander Strasser <eclipse7@gmx.net>,
diego
parents:
11542
diff
changeset
|
22 /* EWMH state actions, see |
94e66acdb706
Metacity fullscreen issues, patch by Alexander Strasser <eclipse7@gmx.net>,
diego
parents:
11542
diff
changeset
|
23 http://freedesktop.org/Standards/wm-spec/index.html#id2768769 */ |
94e66acdb706
Metacity fullscreen issues, patch by Alexander Strasser <eclipse7@gmx.net>,
diego
parents:
11542
diff
changeset
|
24 #define _NET_WM_STATE_REMOVE 0 /* remove/unset property */ |
94e66acdb706
Metacity fullscreen issues, patch by Alexander Strasser <eclipse7@gmx.net>,
diego
parents:
11542
diff
changeset
|
25 #define _NET_WM_STATE_ADD 1 /* add/set property */ |
94e66acdb706
Metacity fullscreen issues, patch by Alexander Strasser <eclipse7@gmx.net>,
diego
parents:
11542
diff
changeset
|
26 #define _NET_WM_STATE_TOGGLE 2 /* toggle property */ |
94e66acdb706
Metacity fullscreen issues, patch by Alexander Strasser <eclipse7@gmx.net>,
diego
parents:
11542
diff
changeset
|
27 |
8864 | 28 extern int metacity_hack; |
29 | |
9317
c7f5df43b937
- support command line parameter -fstype, eg. -fstype layer=12,above,fullscreen
filon
parents:
8864
diff
changeset
|
30 extern int vo_fs_layer; |
5997
b5fb9a927bf3
add WM detection, and wm specific fullscreen code. (???)
pontscho
parents:
5955
diff
changeset
|
31 extern int vo_wm_type; |
9317
c7f5df43b937
- support command line parameter -fstype, eg. -fstype layer=12,above,fullscreen
filon
parents:
8864
diff
changeset
|
32 extern int vo_fs_type; |
c7f5df43b937
- support command line parameter -fstype, eg. -fstype layer=12,above,fullscreen
filon
parents:
8864
diff
changeset
|
33 extern char** vo_fstype_list; |
32 | 34 |
922
db06ae8967eb
Centralized and cleaned up X11 connecting, fixed remote X11 playing, -display option for mplayer. SHOULD BE TESTED.
lgb
parents:
723
diff
changeset
|
35 extern char *mDisplayName; |
db06ae8967eb
Centralized and cleaned up X11 connecting, fixed remote X11 playing, -display option for mplayer. SHOULD BE TESTED.
lgb
parents:
723
diff
changeset
|
36 extern Display *mDisplay; |
2455 | 37 extern Window mRootWin; |
922
db06ae8967eb
Centralized and cleaned up X11 connecting, fixed remote X11 playing, -display option for mplayer. SHOULD BE TESTED.
lgb
parents:
723
diff
changeset
|
38 extern int mScreen; |
db06ae8967eb
Centralized and cleaned up X11 connecting, fixed remote X11 playing, -display option for mplayer. SHOULD BE TESTED.
lgb
parents:
723
diff
changeset
|
39 extern int mLocalDisplay; |
db06ae8967eb
Centralized and cleaned up X11 connecting, fixed remote X11 playing, -display option for mplayer. SHOULD BE TESTED.
lgb
parents:
723
diff
changeset
|
40 |
5955
caac20b1ca79
fix xmga fs, resize to movie size and mouse auto hide + dga
pontscho
parents:
5835
diff
changeset
|
41 extern int vo_mouse_autohide; |
5651
b8d8d72776f2
fix playlist bug with gui and rewrite mousecursor show/hide code
pontscho
parents:
4993
diff
changeset
|
42 |
27886 | 43 int vo_init( void ); |
44 void vo_uninit( void ); | |
45 void vo_hidecursor ( Display* , Window ); | |
46 void vo_showcursor( Display *disp, Window win ); | |
47 void vo_x11_decoration( Display * vo_Display,Window w,int d ); | |
48 void vo_x11_classhint( Display * display,Window window,char *name ); | |
49 void vo_x11_nofs_sizepos(int x, int y, int width, int height); | |
50 void vo_x11_sizehint( int x, int y, int width, int height, int max ); | |
51 int vo_x11_check_events(Display *mydisplay); | |
52 void vo_x11_selectinput_witherr(Display *display, Window w, long event_mask); | |
27885
9829cfa41d6d
Replace some of the different inconsistent XGetGeometry uses by a
reimar
parents:
27750
diff
changeset
|
53 int vo_x11_update_geometry(void); |
27886 | 54 void vo_x11_fullscreen( void ); |
55 void vo_x11_setlayer( Display * mDisplay,Window vo_window,int layer ); | |
56 void vo_x11_uninit(void); | |
57 Colormap vo_x11_create_colormap(XVisualInfo *vinfo); | |
58 uint32_t vo_x11_set_equalizer(char *name, int value); | |
59 uint32_t vo_x11_get_equalizer(char *name, int *value); | |
60 void fstype_help(void); | |
61 Window vo_x11_create_smooth_window( Display *mDisplay, Window mRoot, | |
10765
c8fb7e2690a3
10000l. Never ever use such foolish GCC 3.x extensionscvs diff -u x11_common.c x11_common.h |more
alex
parents:
10359
diff
changeset
|
62 Visual *vis, int x, int y, unsigned int width, unsigned int height, |
c8fb7e2690a3
10000l. Never ever use such foolish GCC 3.x extensionscvs diff -u x11_common.c x11_common.h |more
alex
parents:
10359
diff
changeset
|
63 int depth, Colormap col_map); |
27886 | 64 void vo_x11_create_vo_window(XVisualInfo *vis, int x, int y, |
23655
00aa61cde84a
Make X11 window creation and (with -fixed-vo) management simpler and more
reimar
parents:
22886
diff
changeset
|
65 unsigned int width, unsigned int height, int flags, |
00aa61cde84a
Make X11 window creation and (with -fixed-vo) management simpler and more
reimar
parents:
22886
diff
changeset
|
66 Colormap col_map, const char *classname, const char *title); |
27886 | 67 void vo_x11_clearwindow_part(Display *mDisplay, Window vo_window, |
10765
c8fb7e2690a3
10000l. Never ever use such foolish GCC 3.x extensionscvs diff -u x11_common.c x11_common.h |more
alex
parents:
10359
diff
changeset
|
68 int img_width, int img_height, int use_fs); |
27886 | 69 void vo_x11_clearwindow( Display *mDisplay, Window vo_window ); |
70 void vo_x11_ontop(void); | |
71 void vo_x11_border(void); | |
72 void vo_x11_ewmh_fullscreen( int action ); | |
6095 | 73 |
32 | 74 #endif |
75 | |
4993 | 76 extern Window vo_window; |
77 extern GC vo_gc; | |
78 extern XSizeHints vo_hint; | |
4795 | 79 |
27377
d58d06eafe83
Change a bunch of X11-specific preprocessor directives.
diego
parents:
27306
diff
changeset
|
80 #ifdef CONFIG_XV |
14742 | 81 //XvPortID xv_port; |
82 extern unsigned int xv_port; | |
83 | |
27886 | 84 int vo_xv_set_eq(uint32_t xv_port, char * name, int value); |
85 int vo_xv_get_eq(uint32_t xv_port, char * name, int *value); | |
14742 | 86 |
27886 | 87 int vo_xv_enable_vsync(void); |
15864 | 88 |
27886 | 89 void vo_xv_get_max_img_dim( uint32_t * width, uint32_t * height ); |
16958 | 90 |
14742 | 91 /*** colorkey handling ***/ |
92 typedef struct xv_ck_info_s | |
93 { | |
94 int method; ///< CK_METHOD_* constants | |
95 int source; ///< CK_SRC_* constants | |
96 } xv_ck_info_t; | |
97 | |
98 #define CK_METHOD_NONE 0 ///< no colorkey drawing | |
99 #define CK_METHOD_BACKGROUND 1 ///< set colorkey as window background | |
100 #define CK_METHOD_AUTOPAINT 2 ///< let xv draw the colorkey | |
101 #define CK_METHOD_MANUALFILL 3 ///< manually draw the colorkey | |
102 #define CK_SRC_USE 0 ///< use specified / default colorkey | |
103 #define CK_SRC_SET 1 ///< use and set specified / default colorkey | |
104 #define CK_SRC_CUR 2 ///< use current colorkey ( get it from xv ) | |
105 | |
106 extern xv_ck_info_t xv_ck_info; | |
107 extern unsigned long xv_colorkey; | |
108 | |
27886 | 109 int vo_xv_init_colorkey(void); |
110 void vo_xv_draw_colorkey(int32_t x, int32_t y, int32_t w, int32_t h); | |
111 void xv_setup_colorkeyhandling(char const * ck_method_str, char const * ck_str); | |
14742 | 112 |
113 /*** test functions for common suboptions ***/ | |
114 int xv_test_ck( void * arg ); | |
115 int xv_test_ckm( void * arg ); | |
10359 | 116 #endif |
117 | |
27886 | 118 void vo_setwindow( Window w,GC g ); |
119 void vo_x11_putkey(int key); | |
723 | 120 |
324 | 121 void saver_off( Display * ); |
122 void saver_on( Display * ); | |
3990 | 123 |
27377
d58d06eafe83
Change a bunch of X11-specific preprocessor directives.
diego
parents:
27306
diff
changeset
|
124 #ifdef CONFIG_XF86VM |
27890
a4e2700e9381
Simplify vo_vm_switch and vo_vm_close, everyone was using the (almost) same
reimar
parents:
27886
diff
changeset
|
125 void vo_vm_switch(void); |
a4e2700e9381
Simplify vo_vm_switch and vo_vm_close, everyone was using the (almost) same
reimar
parents:
27886
diff
changeset
|
126 void vo_vm_close(void); |
4425
6144f63cbaa1
common -vm code, patch by Santi Bjar <tiarda@yahoo.es>
arpi
parents:
3990
diff
changeset
|
127 #endif |
4981 | 128 |
18174 | 129 void update_xinerama_info(void); |
130 | |
8864 | 131 int vo_find_depth_from_visuals(Display *dpy, int screen, Visual **visual_return); |
132 | |
26029 | 133 #endif /* MPLAYER_X11_COMMON_H */ |