annotate libvo/x11_common.h @ 35418:cedb0ba2b5c6

Move the code to set guiInfo's Track, Chapter and Angle start values. Set them before checking whether there is any media opened, because with no media opened we clear the counters.
author ib
date Thu, 29 Nov 2012 14:11:03 +0000
parents e7f393cb9d0f
children bdc064185bda
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
28446
7681eab10aea Add standard license headers, unify header formatting.
diego
parents: 28250
diff changeset
1 /*
7681eab10aea Add standard license headers, unify header formatting.
diego
parents: 28250
diff changeset
2 * This file is part of MPlayer.
7681eab10aea Add standard license headers, unify header formatting.
diego
parents: 28250
diff changeset
3 *
7681eab10aea Add standard license headers, unify header formatting.
diego
parents: 28250
diff changeset
4 * MPlayer is free software; you can redistribute it and/or modify
7681eab10aea Add standard license headers, unify header formatting.
diego
parents: 28250
diff changeset
5 * it under the terms of the GNU General Public License as published by
7681eab10aea Add standard license headers, unify header formatting.
diego
parents: 28250
diff changeset
6 * the Free Software Foundation; either version 2 of the License, or
7681eab10aea Add standard license headers, unify header formatting.
diego
parents: 28250
diff changeset
7 * (at your option) any later version.
7681eab10aea Add standard license headers, unify header formatting.
diego
parents: 28250
diff changeset
8 *
7681eab10aea Add standard license headers, unify header formatting.
diego
parents: 28250
diff changeset
9 * MPlayer is distributed in the hope that it will be useful,
7681eab10aea Add standard license headers, unify header formatting.
diego
parents: 28250
diff changeset
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
7681eab10aea Add standard license headers, unify header formatting.
diego
parents: 28250
diff changeset
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7681eab10aea Add standard license headers, unify header formatting.
diego
parents: 28250
diff changeset
12 * GNU General Public License for more details.
7681eab10aea Add standard license headers, unify header formatting.
diego
parents: 28250
diff changeset
13 *
7681eab10aea Add standard license headers, unify header formatting.
diego
parents: 28250
diff changeset
14 * You should have received a copy of the GNU General Public License along
7681eab10aea Add standard license headers, unify header formatting.
diego
parents: 28250
diff changeset
15 * with MPlayer; if not, write to the Free Software Foundation, Inc.,
7681eab10aea Add standard license headers, unify header formatting.
diego
parents: 28250
diff changeset
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
7681eab10aea Add standard license headers, unify header formatting.
diego
parents: 28250
diff changeset
17 */
7681eab10aea Add standard license headers, unify header formatting.
diego
parents: 28250
diff changeset
18
26029
4129c8cfa742 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 26007
diff changeset
19 #ifndef MPLAYER_X11_COMMON_H
4129c8cfa742 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 26007
diff changeset
20 #define MPLAYER_X11_COMMON_H
32
9e66f722790e the common x11 stuff
arpi_esp
parents:
diff changeset
21
30166
1d39794263eb Add missing header #includes to fix 'make checkheaders'.
diego
parents: 30083
diff changeset
22 #include <stdint.h>
4993
53c569d36b2c small changes in libvo's X11 support
pontscho
parents: 4981
diff changeset
23 #include <X11/Xlib.h>
53c569d36b2c small changes in libvo's X11 support
pontscho
parents: 4981
diff changeset
24 #include <X11/Xutil.h>
53c569d36b2c small changes in libvo's X11 support
pontscho
parents: 4981
diff changeset
25
27750
2c11b155ff11 Move X11_FULLSCREEN definition to x11_common.h where it belongs.
diego
parents: 27377
diff changeset
26 #include "config.h"
2c11b155ff11 Move X11_FULLSCREEN definition to x11_common.h where it belongs.
diego
parents: 27377
diff changeset
27
9317
c7f5df43b937 - support command line parameter -fstype, eg. -fstype layer=12,above,fullscreen
filon
parents: 8864
diff changeset
28 #define vo_wm_LAYER 1
c7f5df43b937 - support command line parameter -fstype, eg. -fstype layer=12,above,fullscreen
filon
parents: 8864
diff changeset
29 #define vo_wm_FULLSCREEN 2
c7f5df43b937 - support command line parameter -fstype, eg. -fstype layer=12,above,fullscreen
filon
parents: 8864
diff changeset
30 #define vo_wm_STAYS_ON_TOP 4
c7f5df43b937 - support command line parameter -fstype, eg. -fstype layer=12,above,fullscreen
filon
parents: 8864
diff changeset
31 #define vo_wm_ABOVE 8
c7f5df43b937 - support command line parameter -fstype, eg. -fstype layer=12,above,fullscreen
filon
parents: 8864
diff changeset
32 #define vo_wm_BELOW 16
c7f5df43b937 - support command line parameter -fstype, eg. -fstype layer=12,above,fullscreen
filon
parents: 8864
diff changeset
33 #define vo_wm_NETWM (vo_wm_FULLSCREEN | vo_wm_STAYS_ON_TOP | vo_wm_ABOVE | vo_wm_BELOW)
8864
b8c271750450 - sync with x11_common
pontscho
parents: 7964
diff changeset
34
12520
94e66acdb706 Metacity fullscreen issues, patch by Alexander Strasser <eclipse7@gmx.net>,
diego
parents: 11542
diff changeset
35 /* EWMH state actions, see
94e66acdb706 Metacity fullscreen issues, patch by Alexander Strasser <eclipse7@gmx.net>,
diego
parents: 11542
diff changeset
36 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
37 #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
38 #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
39 #define _NET_WM_STATE_TOGGLE 2 /* toggle property */
94e66acdb706 Metacity fullscreen issues, patch by Alexander Strasser <eclipse7@gmx.net>,
diego
parents: 11542
diff changeset
40
8864
b8c271750450 - sync with x11_common
pontscho
parents: 7964
diff changeset
41 extern int metacity_hack;
b8c271750450 - sync with x11_common
pontscho
parents: 7964
diff changeset
42
9317
c7f5df43b937 - support command line parameter -fstype, eg. -fstype layer=12,above,fullscreen
filon
parents: 8864
diff changeset
43 extern int vo_fs_layer;
5997
b5fb9a927bf3 add WM detection, and wm specific fullscreen code. (???)
pontscho
parents: 5955
diff changeset
44 extern int vo_wm_type;
9317
c7f5df43b937 - support command line parameter -fstype, eg. -fstype layer=12,above,fullscreen
filon
parents: 8864
diff changeset
45 extern int vo_fs_type;
c7f5df43b937 - support command line parameter -fstype, eg. -fstype layer=12,above,fullscreen
filon
parents: 8864
diff changeset
46 extern char** vo_fstype_list;
32
9e66f722790e the common x11 stuff
arpi_esp
parents:
diff changeset
47
922
db06ae8967eb Centralized and cleaned up X11 connecting, fixed remote X11 playing, -display option for mplayer. SHOULD BE TESTED.
lgb
parents: 723
diff changeset
48 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
49 extern Display *mDisplay;
2455
712a46dff92d printf-gcc3 patch, x11-commons mRootwin
sven
parents: 1811
diff changeset
50 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
51 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
52 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
53
5955
caac20b1ca79 fix xmga fs, resize to movie size and mouse auto hide + dga
pontscho
parents: 5835
diff changeset
54 extern int vo_mouse_autohide;
5651
b8d8d72776f2 fix playlist bug with gui and rewrite mousecursor show/hide code
pontscho
parents: 4993
diff changeset
55
31385
f2aebe1309b2 Declare stop_xscreensaver extern in x11_common.h instead of all over the code.
diego
parents: 30532
diff changeset
56 extern int stop_xscreensaver;
f2aebe1309b2 Declare stop_xscreensaver extern in x11_common.h instead of all over the code.
diego
parents: 30532
diff changeset
57
27886
e38ae03895c9 Cosmetics: remove useless "extern"
reimar
parents: 27885
diff changeset
58 int vo_init( void );
e38ae03895c9 Cosmetics: remove useless "extern"
reimar
parents: 27885
diff changeset
59 void vo_uninit( void );
e38ae03895c9 Cosmetics: remove useless "extern"
reimar
parents: 27885
diff changeset
60 void vo_x11_decoration( Display * vo_Display,Window w,int d );
30083
8375205ecdcc vo_x11_classhint name argument should be const, since we pass string constants there.
reimar
parents: 28512
diff changeset
61 void vo_x11_classhint( Display * display,Window window,const char *name );
27886
e38ae03895c9 Cosmetics: remove useless "extern"
reimar
parents: 27885
diff changeset
62 void vo_x11_nofs_sizepos(int x, int y, int width, int height);
e38ae03895c9 Cosmetics: remove useless "extern"
reimar
parents: 27885
diff changeset
63 void vo_x11_sizehint( int x, int y, int width, int height, int max );
e38ae03895c9 Cosmetics: remove useless "extern"
reimar
parents: 27885
diff changeset
64 int vo_x11_check_events(Display *mydisplay);
e38ae03895c9 Cosmetics: remove useless "extern"
reimar
parents: 27885
diff changeset
65 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
66 int vo_x11_update_geometry(void);
27886
e38ae03895c9 Cosmetics: remove useless "extern"
reimar
parents: 27885
diff changeset
67 void vo_x11_fullscreen( void );
e38ae03895c9 Cosmetics: remove useless "extern"
reimar
parents: 27885
diff changeset
68 void vo_x11_setlayer( Display * mDisplay,Window vo_window,int layer );
e38ae03895c9 Cosmetics: remove useless "extern"
reimar
parents: 27885
diff changeset
69 void vo_x11_uninit(void);
e38ae03895c9 Cosmetics: remove useless "extern"
reimar
parents: 27885
diff changeset
70 Colormap vo_x11_create_colormap(XVisualInfo *vinfo);
33313
169a40da4c53 Add "const" to equalizer name argument to avoid compiler warnings.
reimar
parents: 33300
diff changeset
71 uint32_t vo_x11_set_equalizer(const char *name, int value);
169a40da4c53 Add "const" to equalizer name argument to avoid compiler warnings.
reimar
parents: 33300
diff changeset
72 uint32_t vo_x11_get_equalizer(const char *name, int *value);
27886
e38ae03895c9 Cosmetics: remove useless "extern"
reimar
parents: 27885
diff changeset
73 void fstype_help(void);
e38ae03895c9 Cosmetics: remove useless "extern"
reimar
parents: 27885
diff changeset
74 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
75 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
76 int depth, Colormap col_map);
27886
e38ae03895c9 Cosmetics: remove useless "extern"
reimar
parents: 27885
diff changeset
77 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
78 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
79 Colormap col_map, const char *classname, const char *title);
27886
e38ae03895c9 Cosmetics: remove useless "extern"
reimar
parents: 27885
diff changeset
80 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
81 int img_width, int img_height, int use_fs);
27886
e38ae03895c9 Cosmetics: remove useless "extern"
reimar
parents: 27885
diff changeset
82 void vo_x11_clearwindow( Display *mDisplay, Window vo_window );
e38ae03895c9 Cosmetics: remove useless "extern"
reimar
parents: 27885
diff changeset
83 void vo_x11_ontop(void);
e38ae03895c9 Cosmetics: remove useless "extern"
reimar
parents: 27885
diff changeset
84 void vo_x11_border(void);
33937
ab4b48ef5a68 Add a parameter to vo_x11_ewmh_fullscreen().
ib
parents: 33313
diff changeset
85 void vo_x11_ewmh_fullscreen( Window win, int action );
6095
891cff8aba60 some cleanup, gl/gl2 updated to use vo_window
arpi
parents: 6013
diff changeset
86
32
9e66f722790e the common x11 stuff
arpi_esp
parents:
diff changeset
87
4993
53c569d36b2c small changes in libvo's X11 support
pontscho
parents: 4981
diff changeset
88 extern Window vo_window;
53c569d36b2c small changes in libvo's X11 support
pontscho
parents: 4981
diff changeset
89 extern GC vo_gc;
53c569d36b2c small changes in libvo's X11 support
pontscho
parents: 4981
diff changeset
90 extern XSizeHints vo_hint;
4795
b18e61cb457a small changes
pontscho
parents: 4425
diff changeset
91
34024
b48986b92913 Remove unnecessary #ifdefs from header file.
reimar
parents: 33966
diff changeset
92
b48986b92913 Remove unnecessary #ifdefs from header file.
reimar
parents: 33966
diff changeset
93
b48986b92913 Remove unnecessary #ifdefs from header file.
reimar
parents: 33966
diff changeset
94 // XVideo related declarations
14742
76d461a061df Unified colorkey code for vo xv and vo xvmc.
al
parents: 14663
diff changeset
95 extern unsigned int xv_port;
76d461a061df Unified colorkey code for vo xv and vo xvmc.
al
parents: 14663
diff changeset
96
33300
c7ebb0b711a6 Make vo_xv_set/get_eq() functions expect "const char *" for attribute name.
iive
parents: 31385
diff changeset
97 int vo_xv_set_eq(uint32_t xv_port, const char * name, int value);
c7ebb0b711a6 Make vo_xv_set/get_eq() functions expect "const char *" for attribute name.
iive
parents: 31385
diff changeset
98 int vo_xv_get_eq(uint32_t xv_port, const char * name, int *value);
14742
76d461a061df Unified colorkey code for vo xv and vo xvmc.
al
parents: 14663
diff changeset
99
27886
e38ae03895c9 Cosmetics: remove useless "extern"
reimar
parents: 27885
diff changeset
100 int vo_xv_enable_vsync(void);
15864
9c674e162678 added forgotten xv_enable_vsync
reimar
parents: 15100
diff changeset
101
27886
e38ae03895c9 Cosmetics: remove useless "extern"
reimar
parents: 27885
diff changeset
102 void vo_xv_get_max_img_dim( uint32_t * width, uint32_t * height );
16958
3ff863e54b93 Test if source image dimensions are too big.
al
parents: 16280
diff changeset
103
14742
76d461a061df Unified colorkey code for vo xv and vo xvmc.
al
parents: 14663
diff changeset
104 /*** colorkey handling ***/
76d461a061df Unified colorkey code for vo xv and vo xvmc.
al
parents: 14663
diff changeset
105 typedef struct xv_ck_info_s
76d461a061df Unified colorkey code for vo xv and vo xvmc.
al
parents: 14663
diff changeset
106 {
76d461a061df Unified colorkey code for vo xv and vo xvmc.
al
parents: 14663
diff changeset
107 int method; ///< CK_METHOD_* constants
76d461a061df Unified colorkey code for vo xv and vo xvmc.
al
parents: 14663
diff changeset
108 int source; ///< CK_SRC_* constants
76d461a061df Unified colorkey code for vo xv and vo xvmc.
al
parents: 14663
diff changeset
109 } xv_ck_info_t;
76d461a061df Unified colorkey code for vo xv and vo xvmc.
al
parents: 14663
diff changeset
110
76d461a061df Unified colorkey code for vo xv and vo xvmc.
al
parents: 14663
diff changeset
111 #define CK_METHOD_NONE 0 ///< no colorkey drawing
76d461a061df Unified colorkey code for vo xv and vo xvmc.
al
parents: 14663
diff changeset
112 #define CK_METHOD_BACKGROUND 1 ///< set colorkey as window background
76d461a061df Unified colorkey code for vo xv and vo xvmc.
al
parents: 14663
diff changeset
113 #define CK_METHOD_AUTOPAINT 2 ///< let xv draw the colorkey
76d461a061df Unified colorkey code for vo xv and vo xvmc.
al
parents: 14663
diff changeset
114 #define CK_METHOD_MANUALFILL 3 ///< manually draw the colorkey
76d461a061df Unified colorkey code for vo xv and vo xvmc.
al
parents: 14663
diff changeset
115 #define CK_SRC_USE 0 ///< use specified / default colorkey
76d461a061df Unified colorkey code for vo xv and vo xvmc.
al
parents: 14663
diff changeset
116 #define CK_SRC_SET 1 ///< use and set specified / default colorkey
76d461a061df Unified colorkey code for vo xv and vo xvmc.
al
parents: 14663
diff changeset
117 #define CK_SRC_CUR 2 ///< use current colorkey ( get it from xv )
76d461a061df Unified colorkey code for vo xv and vo xvmc.
al
parents: 14663
diff changeset
118
76d461a061df Unified colorkey code for vo xv and vo xvmc.
al
parents: 14663
diff changeset
119 extern xv_ck_info_t xv_ck_info;
76d461a061df Unified colorkey code for vo xv and vo xvmc.
al
parents: 14663
diff changeset
120 extern unsigned long xv_colorkey;
76d461a061df Unified colorkey code for vo xv and vo xvmc.
al
parents: 14663
diff changeset
121
27886
e38ae03895c9 Cosmetics: remove useless "extern"
reimar
parents: 27885
diff changeset
122 int vo_xv_init_colorkey(void);
e38ae03895c9 Cosmetics: remove useless "extern"
reimar
parents: 27885
diff changeset
123 void vo_xv_draw_colorkey(int32_t x, int32_t y, int32_t w, int32_t h);
e38ae03895c9 Cosmetics: remove useless "extern"
reimar
parents: 27885
diff changeset
124 void xv_setup_colorkeyhandling(char const * ck_method_str, char const * ck_str);
14742
76d461a061df Unified colorkey code for vo xv and vo xvmc.
al
parents: 14663
diff changeset
125
76d461a061df Unified colorkey code for vo xv and vo xvmc.
al
parents: 14663
diff changeset
126 /*** test functions for common suboptions ***/
76d461a061df Unified colorkey code for vo xv and vo xvmc.
al
parents: 14663
diff changeset
127 int xv_test_ck( void * arg );
76d461a061df Unified colorkey code for vo xv and vo xvmc.
al
parents: 14663
diff changeset
128 int xv_test_ckm( void * arg );
34024
b48986b92913 Remove unnecessary #ifdefs from header file.
reimar
parents: 33966
diff changeset
129
b48986b92913 Remove unnecessary #ifdefs from header file.
reimar
parents: 33966
diff changeset
130
10359
772571c63d45 move xv_set_eq to x11_common
iive
parents: 9317
diff changeset
131
27886
e38ae03895c9 Cosmetics: remove useless "extern"
reimar
parents: 27885
diff changeset
132 void vo_setwindow( Window w,GC g );
e38ae03895c9 Cosmetics: remove useless "extern"
reimar
parents: 27885
diff changeset
133 void vo_x11_putkey(int key);
723
c3e0bdb64027 add gui support
pontscho
parents: 402
diff changeset
134
30532
18b9a39a5bac Add xscreensaver_heartbeat() declaration to x11_common.h.
diego
parents: 30166
diff changeset
135 void xscreensaver_heartbeat(void);
324
720c640332c8 Szebb es jobb screensaver-kikapcsolo resz
laaz
parents: 32
diff changeset
136 void saver_off( Display * );
720c640332c8 Szebb es jobb screensaver-kikapcsolo resz
laaz
parents: 32
diff changeset
137 void saver_on( Display * );
3990
87538547c8f4 xinerama fix by attila
atmos4
parents: 3830
diff changeset
138
34024
b48986b92913 Remove unnecessary #ifdefs from header file.
reimar
parents: 33966
diff changeset
139
b48986b92913 Remove unnecessary #ifdefs from header file.
reimar
parents: 33966
diff changeset
140
b48986b92913 Remove unnecessary #ifdefs from header file.
reimar
parents: 33966
diff changeset
141 // XF86VM-related functions
27890
a4e2700e9381 Simplify vo_vm_switch and vo_vm_close, everyone was using the (almost) same
reimar
parents: 27886
diff changeset
142 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
143 void vo_vm_close(void);
34024
b48986b92913 Remove unnecessary #ifdefs from header file.
reimar
parents: 33966
diff changeset
144
b48986b92913 Remove unnecessary #ifdefs from header file.
reimar
parents: 33966
diff changeset
145
4981
bfc652fc7f43 rewrite fullscreen support in some libvo driver
pontscho
parents: 4795
diff changeset
146
18174
0f897ffb95bc forgotten update_xinerama_info prototypes
reimar
parents: 18116
diff changeset
147 void update_xinerama_info(void);
0f897ffb95bc forgotten update_xinerama_info prototypes
reimar
parents: 18116
diff changeset
148
8864
b8c271750450 - sync with x11_common
pontscho
parents: 7964
diff changeset
149 int vo_find_depth_from_visuals(Display *dpy, int screen, Visual **visual_return);
b8c271750450 - sync with x11_common
pontscho
parents: 7964
diff changeset
150
26029
4129c8cfa742 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 26007
diff changeset
151 #endif /* MPLAYER_X11_COMMON_H */