Removed a few dependencies on kernel32 functions.
[wine] / dlls / ddraw / x11_private.h
1 #ifndef __WINE_DDRAW_X11_PRIVATE_H
2 #define __WINE_DDRAW_X11_PRIVATE_H
3
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"
9
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) */
20
21 #ifdef HAVE_XVIDEO
22 #include "ts_xvideo.h"
23 #else
24 /* Fake type so that NOT to have too many #ifdef XVideo lying around */
25 typedef int XvImage;
26 #endif
27
28 #include "x11drv.h"
29
30 #include "ddraw_private.h"
31
32 #include "wine_gl.h"
33
34 extern ICOM_VTABLE(IDirectDraw)         xlib_ddvt;
35 extern ICOM_VTABLE(IDirectDraw2)         xlib_dd2vt;
36 extern ICOM_VTABLE(IDirectDraw4)        xlib_dd4vt;
37 extern ICOM_VTABLE(IDirectDrawPalette)  xlib_ddpalvt;
38 extern ICOM_VTABLE(IDirectDrawSurface4) xlib_dds4vt;
39
40 typedef struct x11_dd_private {
41 #ifdef HAVE_LIBXXSHM
42     int xshm_active, xshm_compl;
43 #endif /* defined(HAVE_LIBXXSHM) */
44 #ifdef HAVE_XVIDEO
45     BOOL xvideo_active;
46     XvPortID port_id;
47 #endif
48     Window drawable;
49     void *device_capabilities;
50 } x11_dd_private;
51
52 typedef struct x11_dp_private {
53     BOOL        installed;      /* is colormap installed */
54     Colormap    cm;             /* the X11 Colormap associated */
55 } x11_dp_private;
56
57 extern HRESULT WINAPI Xlib_IDirectDrawPaletteImpl_SetEntries(LPDIRECTDRAWPALETTE,DWORD,DWORD,DWORD,LPPALETTEENTRY);
58 extern ULONG WINAPI Xlib_IDirectDrawPaletteImpl_Release(LPDIRECTDRAWPALETTE iface);
59
60 typedef struct x11_ds_private {
61     BOOL is_overlay;
62     union {
63       XImage    *image;
64       struct {
65         /* The 'image' field should be in FIRST !!!! The Flip function depends on that... */
66         XvImage *image;
67         BOOL shown;
68         RECT src_rect;
69         RECT dst_rect;
70         LPDIRECTDRAWSURFACE dest_surface;
71       } overlay;
72     } info; 
73 #ifdef HAVE_LIBXXSHM
74     XShmSegmentInfo     shminfo;
75 #endif
76     int         *oldDIBmap;
77     BOOL         opengl_flip;
78 } x11_ds_private;
79
80 #ifdef HAVE_LIBXXSHM
81 extern int XShmErrorFlag;
82 #endif
83 #endif /* __WINE_DDRAW_X11_PRIVATE_H */