Enable XF86vmode switching possible for X11 too.
[wine.git] / dlls / ddraw / x11_private.h
blob1644827b1fcad6daff9d7d75829ed1ca6abbcb55
1 #ifndef __WINE_DDRAW_X11_PRIVATE_H
2 #define __WINE_DDRAW_X11_PRIVATE_H
4 /* This file contains all X11 private and specific definitions.
5 * It may also be used by all ports that reuse X11 stuff (like XF86 DGA)
6 */
7 #include "ts_xlib.h"
8 #include "ts_xutil.h"
10 #ifdef HAVE_LIBXXSHM
11 # include <sys/types.h>
12 # ifdef HAVE_SYS_IPC_H
13 # include <sys/ipc.h>
14 # endif
15 # ifdef HAVE_SYS_SHM_H
16 # include <sys/shm.h>
17 # endif
18 # include "ts_xshm.h"
19 #endif /* defined(HAVE_LIBXXSHM) */
21 #ifdef HAVE_LIBXXF86VM
22 # include "ts_xf86vmode.h"
23 extern XF86VidModeModeInfo *orig_mode;
24 #endif /* defined(HAVE_LIBXXF86VM) */
26 extern void xf86vmode_setdisplaymode(int,int);
27 extern void xf86vmode_restore();
29 #ifdef HAVE_XVIDEO
30 #include "ts_xvideo.h"
31 #else
32 /* Fake type so that NOT to have too many #ifdef XVideo lying around */
33 typedef int XvImage;
34 #endif
36 #include "x11drv.h"
38 #include "ddraw_private.h"
40 #include "wine_gl.h"
42 extern ICOM_VTABLE(IDirectDraw) xlib_ddvt;
43 extern ICOM_VTABLE(IDirectDraw2) xlib_dd2vt;
44 extern ICOM_VTABLE(IDirectDraw4) xlib_dd4vt;
45 extern ICOM_VTABLE(IDirectDrawPalette) xlib_ddpalvt;
46 extern ICOM_VTABLE(IDirectDrawSurface4) xlib_dds4vt;
48 typedef struct x11_dd_private {
49 #ifdef HAVE_LIBXXSHM
50 int xshm_active, xshm_compl;
51 #endif /* defined(HAVE_LIBXXSHM) */
52 #ifdef HAVE_XVIDEO
53 BOOL xvideo_active;
54 XvPortID port_id;
55 #endif
56 Window drawable;
57 void *device_capabilities;
58 } x11_dd_private;
60 typedef struct x11_dp_private {
61 BOOL installed; /* is colormap installed */
62 Colormap cm; /* the X11 Colormap associated */
63 } x11_dp_private;
65 extern HRESULT WINAPI Xlib_IDirectDrawPaletteImpl_SetEntries(LPDIRECTDRAWPALETTE,DWORD,DWORD,DWORD,LPPALETTEENTRY);
66 extern ULONG WINAPI Xlib_IDirectDrawPaletteImpl_Release(LPDIRECTDRAWPALETTE iface);
68 typedef struct x11_ds_private {
69 BOOL is_overlay;
70 union {
71 XImage *image;
72 struct {
73 /* The 'image' field should be in FIRST !!!! The Flip function depends on that... */
74 XvImage *image;
75 BOOL shown;
76 RECT src_rect;
77 RECT dst_rect;
78 LPDIRECTDRAWSURFACE dest_surface;
79 } overlay;
80 } info;
81 #ifdef HAVE_LIBXXSHM
82 XShmSegmentInfo shminfo;
83 #endif
84 int *oldDIBmap;
85 BOOL opengl_flip;
86 } x11_ds_private;
88 #ifdef HAVE_LIBXXSHM
89 extern int XShmErrorFlag;
90 #endif
91 #endif /* __WINE_DDRAW_X11_PRIVATE_H */