diff options
author | Uoti Urpala <uau@symbol.nonexistent.invalid> | 2008-04-19 07:45:16 +0300 |
---|---|---|
committer | Uoti Urpala <uau@symbol.nonexistent.invalid> | 2008-04-23 13:41:06 +0300 |
commit | bfe569b76ebc19263efbf717728a6da7c413cbac (patch) | |
tree | 59bd4aa70aa2fad9d5db0aa0335401d3a93cf2ac /libvo/x11_common.h | |
parent | 6c9d09170d70df6e915b6e98906b7625c0c52c64 (diff) | |
download | mpv-bfe569b76ebc19263efbf717728a6da7c413cbac.tar.bz2 mpv-bfe569b76ebc19263efbf717728a6da7c413cbac.tar.xz |
Move vo_ontop to options struct
Add a 'struct vo *vo' argument to the x11_common.c functions that
access the variable so it's available as vo->opts->vo_ontop. To keep
VOs using the old API working create a global vo variable that is set
to the currently used old vo. "vo_ontop" will be #defined to
"global_vo->opts->vo_ontop", and x11_common.h will add defines like
the following when it is included by old VOs:
#define vo_x11_ontop() vo_x11_ontop(global_vo)
so that they will call the function according to the new declaration.
Diffstat (limited to 'libvo/x11_common.h')
-rw-r--r-- | libvo/x11_common.h | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/libvo/x11_common.h b/libvo/x11_common.h index 2c52eb3163..b19a02377c 100644 --- a/libvo/x11_common.h +++ b/libvo/x11_common.h @@ -4,6 +4,8 @@ #include <X11/Xlib.h> #include <X11/Xutil.h> +struct vo; + #ifdef X11_FULLSCREEN #define vo_wm_LAYER 1 @@ -44,7 +46,7 @@ extern void vo_x11_nofs_sizepos(int x, int y, int width, int height); extern void vo_x11_sizehint( int x, int y, int width, int height, int max ); extern int vo_x11_check_events(Display *mydisplay); extern void vo_x11_selectinput_witherr(Display *display, Window w, long event_mask); -extern void vo_x11_fullscreen( void ); +void vo_x11_fullscreen(struct vo *vo); extern void vo_x11_setlayer( Display * mDisplay,Window vo_window,int layer ); extern void vo_x11_uninit(void); extern Colormap vo_x11_create_colormap(XVisualInfo *vinfo); @@ -54,13 +56,13 @@ extern void fstype_help(void); extern Window vo_x11_create_smooth_window( Display *mDisplay, Window mRoot, Visual *vis, int x, int y, unsigned int width, unsigned int height, int depth, Colormap col_map); -extern void vo_x11_create_vo_window(XVisualInfo *vis, int x, int y, - unsigned int width, unsigned int height, int flags, +void vo_x11_create_vo_window(struct vo *vo, XVisualInfo *vis, + int x, int y, unsigned int width, unsigned int height, int flags, Colormap col_map, const char *classname, const char *title); extern void vo_x11_clearwindow_part(Display *mDisplay, Window vo_window, int img_width, int img_height, int use_fs); extern void vo_x11_clearwindow( Display *mDisplay, Window vo_window ); -extern void vo_x11_ontop(void); +void vo_x11_ontop(struct vo *vo); extern void vo_x11_ewmh_fullscreen( int action ); #endif @@ -122,4 +124,12 @@ void update_xinerama_info(void); int vo_find_depth_from_visuals(Display *dpy, int screen, Visual **visual_return); +// Old VOs use incompatible function calls, translate them to new +// prototypes +#ifdef IS_OLD_VO +#define vo_x11_create_vo_window(...) vo_x11_create_vo_window(global_vo, __VA_ARGS__) +#define vo_x11_fullscreen() vo_x11_fullscreen(global_vo) +#define vo_x11_ontop() vo_x11_ontop(global_vo) +#endif + #endif /* MPLAYER_X11_COMMON_H */ |