*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef __DDRAWI_INCLUDED__
#define __DDRAWI_INCLUDED__
+/* Helper macro to enable gcc's extension. */
+#ifndef __GNU_EXTENSION
+#ifdef __GNUC__
+#define __GNU_EXTENSION __extension__
+#else
+#define __GNU_EXTENSION
+#endif
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
typedef struct _VIDMEM {
DWORD dwFlags;
FLATPTR fpStart;
- union {
+ __GNU_EXTENSION union {
FLATPTR fpEnd;
DWORD dwWidth;
};
DDSCAPS ddsCaps;
DDSCAPS ddsCapsAlt;
- union {
+ __GNU_EXTENSION union {
LPVMEMHEAP lpHeap;
DWORD dwHeight;
};
} VIDMEM;
-
-#ifndef __DD_INCLUDED__
-#define VIDMEM_ISLINEAR 0x00000001
-#define VIDMEM_ISRECTANGULAR 0x00000002
-#define VIDMEM_ISHEAP 0x00000004
-#define VIDMEM_ISNONLOCAL 0x00000008
-#define VIDMEM_ISWC 0x00000010
-#define VIDMEM_ISDISABLED 0x00000020
-#endif
+#define VIDMEM_ISLINEAR 0x00000001l
+#define VIDMEM_ISRECTANGULAR 0x00000002l
+#define VIDMEM_ISHEAP 0x00000004l
+#define VIDMEM_ISNONLOCAL 0x00000008l
+#define VIDMEM_ISWC 0x00000010l
+#define VIDMEM_HEAPDISABLED 0x00000020l
typedef struct _VIDMEMINFO {
FLATPTR fpPrimary;
/*****************************************************************************
* ddraw->driver callbacks
*/
-#ifndef __DD_INCLUDED__
-#define DDHAL_DRIVER_NOTHANDLED 0
-#define DDHAL_DRIVER_HANDLED 1
-#define DDHAL_DRIVER_NOCKEYHW 2
-#endif
+#define DDHAL_DRIVER_NOTHANDLED 0x00000000l
+#define DDHAL_DRIVER_HANDLED 0x00000001l
+#define DDHAL_DRIVER_NOCKEYHW 0x00000002l
typedef struct _DDHAL_DESTROYDRIVERDATA *LPDDHAL_DESTROYDRIVERDATA;
typedef struct _DDHAL_CREATESURFACEDATA *LPDDHAL_CREATESURFACEDATA;
#define DDHAL_CB32_FLIPTOGDISURFACE 0x00000200l
#define DDHAL_PALCB32_DESTROYPALETTE 0x00000001l
#define DDHAL_PALCB32_SETENTRIES 0x00000002l
-#ifndef __DD_INCLUDED__
#define DDHALINFO_ISPRIMARYDISPLAY 0x00000001
#define DDHALINFO_MODEXILLEGAL 0x00000002
#define DDHALINFO_GETDRIVERINFOSET 0x00000004
#define DDHALINFO_GETDRIVERINFO2 0x00000008
-#endif
#define DDRAWI_VPORTSTART 0x0001
#define DDRAWI_VPORTSTOP 0x0002
#define DDRAWI_VPORTUPDATE 0x0003
#define DDHAL_MISC2CB32_CREATESURFACEEX 0x00000002
#define DDHAL_MISC2CB32_GETDRIVERSTATE 0x00000004
#define DDHAL_MISC2CB32_DESTROYDDLOCAL 0x00000008
-#ifndef __DD_INCLUDED__
-#define DDHAL_EXEBUFCB32_CANCREATEEXEBUF 0x00000001
-#define DDHAL_EXEBUFCB32_CREATEEXEBUF 0x00000002
-#define DDHAL_EXEBUFCB32_DESTROYEXEBUF 0x00000004
-#define DDHAL_EXEBUFCB32_LOCKEXEBUF 0x00000008
-#define DDHAL_EXEBUFCB32_UNLOCKEXEBUF 0x00000010
-#endif
+#define DDHAL_EXEBUFCB32_CANCREATEEXEBUF 0x00000001l
+#define DDHAL_EXEBUFCB32_CREATEEXEBUF 0x00000002l
+#define DDHAL_EXEBUFCB32_DESTROYEXEBUF 0x00000004l
+#define DDHAL_EXEBUFCB32_LOCKEXEBUF 0x00000008l
+#define DDHAL_EXEBUFCB32_UNLOCKEXEBUF 0x00000010l
#define DDHAL_VPORT32_CANCREATEVIDEOPORT 0x00000001
#define DDHAL_VPORT32_CREATEVIDEOPORT 0x00000002
#define DDHAL_VPORT32_FLIP 0x00000004
#define DDHAL_VPORT32_GETSIGNALSTATUS 0x00004000
#define DDHAL_VPORT32_COLORCONTROL 0x00008000
#define DDHAL_COLOR_COLORCONTROL 0x00000001
-#ifndef __DD_INCLUDED__
-#define DDHAL_KERNEL_SYNCSURFACEDATA 0x00000001
-#define DDHAL_KERNEL_SYNCVIDEOPORTDATA 0x00000002
-#endif
+#define DDHAL_KERNEL_SYNCSURFACEDATA 0x00000001l
+#define DDHAL_KERNEL_SYNCVIDEOPORTDATA 0x00000002l
#define DDHAL_MOCOMP32_GETGUIDS 0x00000001
#define DDHAL_MOCOMP32_GETFORMATS 0x00000002
#define DDHAL_MOCOMP32_CREATE 0x00000004
typedef struct _DDRAWI_DDRAWSURFACE_GBL {
DWORD dwRefCnt;
DWORD dwGlobalFlags;
- union {
+ __GNU_EXTENSION union {
LPACCESSRECTLIST lpRectList;
DWORD dwBlockSizeY;
LONG lSlicePitch;
};
- union {
+ __GNU_EXTENSION union {
LPVMEMHEAP lpVidMemHeap;
DWORD dwBlockSizeX;
};
- union {
+ __GNU_EXTENSION union {
LPDDRAWI_DIRECTDRAW_GBL lpDD;
LPVOID lpDDHandle;
};
FLATPTR fpVidMem;
- union {
+ __GNU_EXTENSION union {
LONG lPitch;
DWORD dwLinearSize;
};
typedef struct _DDRAWI_DDRAWSURFACE_GBL_MORE {
DWORD dwSize;
- union {
+ __GNU_EXTENSION union {
DWORD dwPhysicalPageTable;
FLATPTR fpPhysicalVidMem;
};
DWORD dwProcessId;
DWORD dwFlags;
DDSCAPS ddsCaps;
- union
+ __GNU_EXTENSION union
{
- LPDDRAWI_DDRAWPALETTE_INT lpDDPalette;
+ LPDDRAWI_DDRAWPALETTE_INT lpDDPalette;
LPDDRAWI_DDRAWPALETTE_INT lp16DDPalette;
- };
- union
+ };
+ __GNU_EXTENSION union
{
- LPDDRAWI_DDRAWCLIPPER_LCL lpDDClipper;
- LPDDRAWI_DDRAWCLIPPER_INT lp16DDClipper;
+ LPDDRAWI_DDRAWCLIPPER_LCL lpDDClipper;
+ LPDDRAWI_DDRAWCLIPPER_INT lp16DDClipper;
};
DWORD dwModeCreatedIn;
DWORD dwBackBufferCount;
LPDDRAWI_DIRECTDRAW_LCL lpDD_lcl;
DWORD dwProcessId;
LPPALETTEENTRY lpColorTable;
- union {
+ __GNU_EXTENSION union {
ULONG_PTR dwReserved1;
HPALETTE hHELGDIPalette;
};
#define DDRAWICLIP_INMASTERSPRITELIST 0x00000004
#define PFINDEX_UNINITIALIZED (0UL)
#define PFINDEX_UNSUPPORTED (~0UL)
-#ifndef __DD_INCLUDED__
-#define ROP_HAS_SOURCE 0x00000001
-#define ROP_HAS_PATTERN 0x00000002
-#define ROP_HAS_SOURCEPATTERN ROP_HAS_PATTERN | ROP_HAS_SOURCE
-#endif
+#define ROP_HAS_SOURCE 0x00000001l
+#define ROP_HAS_PATTERN 0x00000002l
+#define ROP_HAS_SOURCEPATTERN ROP_HAS_SOURCE | ROP_HAS_PATTERN
#define DDRAWIVPORT_ON 0x00000001
#define DDRAWIVPORT_SOFTWARE_AUTOFLIP 0x00000002
#define DDRAWIVPORT_COLORKEYANDINTERP 0x00000004
typedef struct _DDHAL_GETDRIVERSTATEDATA {
DWORD dwFlags;
- union
+ __GNU_EXTENSION union
{
ULONG_PTR dwhContext;
};