~steve-sk2/mingw-w64/oneiric

« back to all changes in this revision

Viewing changes to mingw-w64-headers/direct-x/include/ddraw.h

  • Committer: Bazaar Package Importer
  • Author(s): Stephen Kitt
  • Date: 2010-11-18 00:04:46 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20101118000446-xe24b423su55onyl
Tags: 1.0+20101003-1
* New maintainer. (Closes: #594371.)
* New upstream snapshot:
  - Includes getopt.h. (Closes: #569914.)
* Build g++ for Win64. (Closes: #600451.)
* Standards-Version 3.9.1 (new packaging).
* Include patch from
  http://mingw-w64.svn.sourceforge.net/viewvc/mingw-w64?view=revision&revision=3715
  as suggested by Rafaël Carré.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 
19
19
#ifndef __WINE_DDRAW_H
20
20
#define __WINE_DDRAW_H
 
21
#define __DDRAW_INCLUDED__
21
22
 
22
23
#define COM_NO_WINDOWS_H
23
24
#include <objbase.h>
40
41
DEFINE_GUID( CLSID_DirectDrawClipper,   0x593817A0,0x7DB3,0x11CF,0xA2,0xDE,0x00,0xAA,0x00,0xb9,0x33,0x56 );
41
42
DEFINE_GUID( IID_IDirectDraw,           0x6C14DB80,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
42
43
DEFINE_GUID( IID_IDirectDraw2,          0xB3A6F3E0,0x2B43,0x11CF,0xA2,0xDE,0x00,0xAA,0x00,0xB9,0x33,0x56 );
 
44
DEFINE_GUID( IID_IDirectDraw3,          0x618f8ad4,0x8b7a,0x11d0,0x8f,0xcc,0x0,0xc0,0x4f,0xd9,0x18,0x9d );
43
45
DEFINE_GUID( IID_IDirectDraw4,          0x9c59509a,0x39bd,0x11d1,0x8c,0x4a,0x00,0xc0,0x4f,0xd9,0x30,0xc5 );
44
46
DEFINE_GUID( IID_IDirectDraw7,          0x15e65ec0,0x3b9c,0x11d2,0xb9,0x2f,0x00,0x60,0x97,0x97,0xea,0x5b );
45
47
DEFINE_GUID( IID_IDirectDrawSurface,    0x6C14DB81,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
55
57
 
56
58
typedef struct IDirectDraw *LPDIRECTDRAW;
57
59
typedef struct IDirectDraw2 *LPDIRECTDRAW2;
 
60
typedef struct IDirectDraw3 *LPDIRECTDRAW3;
58
61
typedef struct IDirectDraw4 *LPDIRECTDRAW4;
59
62
typedef struct IDirectDraw7 *LPDIRECTDRAW7;
60
63
typedef struct IDirectDrawClipper *LPDIRECTDRAWCLIPPER;
241
244
#define DDFLIP_NOVSYNC          0x00000008
242
245
#define DDFLIP_STEREO           0x00000010
243
246
#define DDFLIP_DONOTWAIT        0x00000020
 
247
#define DDFLIP_INTERVAL2        0x02000000
 
248
#define DDFLIP_INTERVAL3        0x03000000
 
249
#define DDFLIP_INTERVAL4        0x04000000
 
250
 
244
251
 
245
252
/* dwFlags for GetBltStatus */
246
253
#define DDGBS_CANBLT                            0x00000001
365
372
        DWORD   dwCaps; /* capabilities of surface wanted */
366
373
        DWORD   dwCaps2; /* additional capabilities */
367
374
        DWORD   dwCaps3; /* reserved capabilities */
368
 
        DWORD   dwCaps4; /* more reserved capabilities */
 
375
        __extension__ union {
 
376
          DWORD dwCaps4; /* low word is the depth for a volume texture */
 
377
          DWORD dwVolumeDepth;
 
378
        } DUMMYUNIONNAME1;
369
379
} DDSCAPS2,*LPDDSCAPS2;
370
380
 
 
381
typedef struct _DDSCAPSEX {
 
382
    DWORD       dwCaps2;
 
383
    DWORD       dwCaps3;
 
384
    __extension__ union {
 
385
        DWORD   dwCaps4;
 
386
        DWORD   dwVolumeDepth;
 
387
    } DUMMYUNIONNAME1;
 
388
} DDSCAPSEX,*LPDDSCAPSEX;
 
389
 
371
390
#define DD_ROP_SPACE    (256/32)        /* space required to store ROP array */
372
391
 
373
392
typedef struct _DDCAPS_DX7              /* DirectX 7 version of caps struct */
764
783
                                        /* 20: next structure */
765
784
} DDPIXELFORMAT,*LPDDPIXELFORMAT;
766
785
 
 
786
#ifndef MAKEFOURCC
767
787
#define MAKEFOURCC(ch0, ch1, ch2, ch3)  \
768
788
    ((DWORD)(BYTE)(ch0) | ((DWORD)(BYTE)(ch1) << 8) |  \
769
789
    ((DWORD)(BYTE)(ch2) << 16) | ((DWORD)(BYTE)(ch3) << 24 ))
 
790
#endif /* MAKEFOURCC */
770
791
 
771
792
/* DDCAPS.dwFXCaps */
772
793
#define DDFXCAPS_BLTALPHA               0x00000001
935
956
#define DDSD_TEXTURESTAGE       0x00100000
936
957
#define DDSD_FVF                0x00200000
937
958
#define DDSD_SRCVBHANDLE        0x00400000
938
 
#define DDSD_ALL                0x007ff9ee
 
959
#define DDSD_DEPTH              0x00800000
 
960
#define DDSD_ALL                0x00fff9ee
939
961
 
940
962
/* EnumSurfaces flags */
941
963
#define DDENUMSURFACES_ALL          0x00000001
1019
1041
        DWORD           dwTextureStage; /* 78: stage in multitexture cascade */
1020
1042
} DDSURFACEDESC2,*LPDDSURFACEDESC2;
1021
1043
 
 
1044
 
 
1045
typedef struct _DDARGB {
 
1046
        BYTE    blue;
 
1047
        BYTE    green;
 
1048
        BYTE    red;
 
1049
        BYTE    alpha;
 
1050
} DDARGB, *LPDDARGB;
 
1051
 
 
1052
typedef struct _DDRGBA {
 
1053
        BYTE    red;
 
1054
        BYTE    green;
 
1055
        BYTE    blue;
 
1056
        BYTE    alpha;
 
1057
} DDRGBA, *LPDDRGBA;
 
1058
 
 
1059
 
1022
1060
/* DDCOLORCONTROL.dwFlags */
1023
1061
#define DDCOLOR_BRIGHTNESS      0x00000001
1024
1062
#define DDCOLOR_CONTRAST        0x00000002
1214
1252
/*****************************************************************************
1215
1253
 * IDirectDrawPalette interface
1216
1254
 */
 
1255
#undef INTERFACE
1217
1256
#define INTERFACE IDirectDrawPalette
1218
1257
DECLARE_INTERFACE_(IDirectDrawPalette,IUnknown)
1219
1258
{
1498
1537
 
1499
1538
 
1500
1539
/*****************************************************************************
 
1540
 * IDirectDraw3 interface
 
1541
 */
 
1542
#define INTERFACE IDirectDraw3
 
1543
DECLARE_INTERFACE_(IDirectDraw3,IUnknown)
 
1544
{
 
1545
          /*** IUnknown methods ***/
 
1546
/*00*/    STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
 
1547
/*04*/    STDMETHOD_(ULONG,AddRef)(THIS) PURE;
 
1548
/*08*/    STDMETHOD_(ULONG,Release)(THIS) PURE;
 
1549
          /*** IDirectDraw2 methods ***/
 
1550
/*0c*/    STDMETHOD(Compact)(THIS) PURE;
 
1551
/*10*/    STDMETHOD(CreateClipper)(THIS_ DWORD dwFlags, LPDIRECTDRAWCLIPPER *lplpDDClipper, IUnknown *pUnkOuter) PURE;
 
1552
/*14*/    STDMETHOD(CreatePalette)(THIS_ DWORD dwFlags, LPPALETTEENTRY lpColorTable, LPDIRECTDRAWPALETTE *lplpDDPalette, IUnknown *pUnkOuter) PURE;
 
1553
/*18*/    STDMETHOD(CreateSurface)(THIS_ LPDDSURFACEDESC lpDDSurfaceDesc, LPDIRECTDRAWSURFACE *lplpDDSurface, IUnknown *pUnkOuter) PURE;
 
1554
/*1c*/    STDMETHOD(DuplicateSurface)(THIS_ LPDIRECTDRAWSURFACE lpDDSurface, LPDIRECTDRAWSURFACE *lplpDupDDSurface) PURE;
 
1555
/*20*/    STDMETHOD(EnumDisplayModes)(THIS_ DWORD dwFlags, LPDDSURFACEDESC lpDDSurfaceDesc, LPVOID lpContext, LPDDENUMMODESCALLBACK lpEnumModesCallback) PURE;
 
1556
/*24*/    STDMETHOD(EnumSurfaces)(THIS_ DWORD dwFlags, LPDDSURFACEDESC lpDDSD, LPVOID lpContext, LPDDENUMSURFACESCALLBACK lpEnumSurfacesCallback) PURE;
 
1557
/*28*/    STDMETHOD(FlipToGDISurface)(THIS) PURE;
 
1558
/*2c*/    STDMETHOD(GetCaps)(THIS_ LPDDCAPS lpDDDriverCaps, LPDDCAPS lpDDHELCaps) PURE;
 
1559
/*30*/    STDMETHOD(GetDisplayMode)(THIS_ LPDDSURFACEDESC lpDDSurfaceDesc) PURE;
 
1560
/*34*/    STDMETHOD(GetFourCCCodes)(THIS_ LPDWORD lpNumCodes, LPDWORD lpCodes) PURE;
 
1561
/*38*/    STDMETHOD(GetGDISurface)(THIS_ LPDIRECTDRAWSURFACE *lplpGDIDDSurface) PURE;
 
1562
/*3c*/    STDMETHOD(GetMonitorFrequency)(THIS_ LPDWORD lpdwFrequency) PURE;
 
1563
/*40*/    STDMETHOD(GetScanLine)(THIS_ LPDWORD lpdwScanLine) PURE;
 
1564
/*44*/    STDMETHOD(GetVerticalBlankStatus)(THIS_ BOOL *lpbIsInVB) PURE;
 
1565
/*48*/    STDMETHOD(Initialize)(THIS_ GUID *lpGUID) PURE;
 
1566
/*4c*/    STDMETHOD(RestoreDisplayMode)(THIS) PURE;
 
1567
/*50*/    STDMETHOD(SetCooperativeLevel)(THIS_ HWND hWnd, DWORD dwFlags) PURE;
 
1568
/*54*/    STDMETHOD(SetDisplayMode)(THIS_ DWORD dwWidth, DWORD dwHeight, DWORD dwBPP, DWORD dwRefreshRate, DWORD dwFlags) PURE;
 
1569
/*58*/    STDMETHOD(WaitForVerticalBlank)(THIS_ DWORD dwFlags, HANDLE hEvent) PURE;
 
1570
          /* added in v2 */
 
1571
/*5c*/    STDMETHOD(GetAvailableVidMem)(THIS_ LPDDSCAPS lpDDCaps, LPDWORD lpdwTotal, LPDWORD lpdwFree) PURE;
 
1572
          /* added in v3 */
 
1573
/*60*/    STDMETHOD(GetSurfaceFromDC)(THIS_ HDC hdc, LPDIRECTDRAWSURFACE *pSurf) PURE;
 
1574
};
 
1575
#undef INTERFACE
 
1576
 
 
1577
#if !defined(__cplusplus) || defined(CINTERFACE)
 
1578
/*** IUnknown methods ***/
 
1579
#define IDirectDraw3_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
 
1580
#define IDirectDraw3_AddRef(p)             (p)->lpVtbl->AddRef(p)
 
1581
#define IDirectDraw3_Release(p)            (p)->lpVtbl->Release(p)
 
1582
/*** IDirectDraw methods ***/
 
1583
#define IDirectDraw3_Compact(p)                  (p)->lpVtbl->Compact(p)
 
1584
#define IDirectDraw3_CreateClipper(p,a,b,c)      (p)->lpVtbl->CreateClipper(p,a,b,c)
 
1585
#define IDirectDraw3_CreatePalette(p,a,b,c,d)    (p)->lpVtbl->CreatePalette(p,a,b,c,d)
 
1586
#define IDirectDraw3_CreateSurface(p,a,b,c)      (p)->lpVtbl->CreateSurface(p,a,b,c)
 
1587
#define IDirectDraw3_DuplicateSurface(p,a,b)     (p)->lpVtbl->DuplicateSurface(p,a,b)
 
1588
#define IDirectDraw3_EnumDisplayModes(p,a,b,c,d) (p)->lpVtbl->EnumDisplayModes(p,a,b,c,d)
 
1589
#define IDirectDraw3_EnumSurfaces(p,a,b,c,d)     (p)->lpVtbl->EnumSurfaces(p,a,b,c,d)
 
1590
#define IDirectDraw3_FlipToGDISurface(p)         (p)->lpVtbl->FlipToGDISurface(p)
 
1591
#define IDirectDraw3_GetCaps(p,a,b)              (p)->lpVtbl->GetCaps(p,a,b)
 
1592
#define IDirectDraw3_GetDisplayMode(p,a)         (p)->lpVtbl->GetDisplayMode(p,a)
 
1593
#define IDirectDraw3_GetFourCCCodes(p,a,b)       (p)->lpVtbl->GetFourCCCodes(p,a,b)
 
1594
#define IDirectDraw3_GetGDISurface(p,a)          (p)->lpVtbl->GetGDISurface(p,a)
 
1595
#define IDirectDraw3_GetMonitorFrequency(p,a)    (p)->lpVtbl->GetMonitorFrequency(p,a)
 
1596
#define IDirectDraw3_GetScanLine(p,a)            (p)->lpVtbl->GetScanLine(p,a)
 
1597
#define IDirectDraw3_GetVerticalBlankStatus(p,a) (p)->lpVtbl->GetVerticalBlankStatus(p,a)
 
1598
#define IDirectDraw3_Initialize(p,a)             (p)->lpVtbl->Initialize(p,a)
 
1599
#define IDirectDraw3_RestoreDisplayMode(p)       (p)->lpVtbl->RestoreDisplayMode(p)
 
1600
#define IDirectDraw3_SetCooperativeLevel(p,a,b)  (p)->lpVtbl->SetCooperativeLevel(p,a,b)
 
1601
#define IDirectDraw3_SetDisplayMode(p,a,b,c,d,e) (p)->lpVtbl->SetDisplayMode(p,a,b,c,d,e)
 
1602
#define IDirectDraw3_WaitForVerticalBlank(p,a,b) (p)->lpVtbl->WaitForVerticalBlank(p,a,b)
 
1603
/*** IDirectDraw2 methods ***/
 
1604
#define IDirectDraw3_GetAvailableVidMem(p,a,b,c) (p)->lpVtbl->GetAvailableVidMem(p,a,b,c)
 
1605
/*** IDirectDraw3 methods ***/
 
1606
#define IDirectDraw3_GetSurfaceFromDC(p,a,b)    (p)->lpVtbl->GetSurfaceFromDC(p,a,b)
 
1607
#else
 
1608
/*** IUnknown methods ***/
 
1609
#define IDirectDraw3_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
 
1610
#define IDirectDraw3_AddRef(p)             (p)->AddRef()
 
1611
#define IDirectDraw3_Release(p)            (p)->Release()
 
1612
/*** IDirectDraw methods ***/
 
1613
#define IDirectDraw3_Compact(p)                  (p)->Compact()
 
1614
#define IDirectDraw3_CreateClipper(p,a,b,c)      (p)->CreateClipper(a,b,c)
 
1615
#define IDirectDraw3_CreatePalette(p,a,b,c,d)    (p)->CreatePalette(a,b,c,d)
 
1616
#define IDirectDraw3_CreateSurface(p,a,b,c)      (p)->CreateSurface(a,b,c)
 
1617
#define IDirectDraw3_DuplicateSurface(p,a,b)     (p)->DuplicateSurface(a,b)
 
1618
#define IDirectDraw3_EnumDisplayModes(p,a,b,c,d) (p)->EnumDisplayModes(a,b,c,d)
 
1619
#define IDirectDraw3_EnumSurfaces(p,a,b,c,d)     (p)->EnumSurfaces(a,b,c,d)
 
1620
#define IDirectDraw3_FlipToGDISurface(p)         (p)->FlipToGDISurface()
 
1621
#define IDirectDraw3_GetCaps(p,a,b)              (p)->GetCaps(a,b)
 
1622
#define IDirectDraw3_GetDisplayMode(p,a)         (p)->GetDisplayMode(a)
 
1623
#define IDirectDraw3_GetFourCCCodes(p,a,b)       (p)->GetFourCCCodes(a,b)
 
1624
#define IDirectDraw3_GetGDISurface(p,a)          (p)->GetGDISurface(a)
 
1625
#define IDirectDraw3_GetMonitorFrequency(p,a)    (p)->GetMonitorFrequency(a)
 
1626
#define IDirectDraw3_GetScanLine(p,a)            (p)->GetScanLine(a)
 
1627
#define IDirectDraw3_GetVerticalBlankStatus(p,a) (p)->GetVerticalBlankStatus(a)
 
1628
#define IDirectDraw3_Initialize(p,a)             (p)->Initialize(a)
 
1629
#define IDirectDraw3_RestoreDisplayMode(p)       (p)->RestoreDisplayMode()
 
1630
#define IDirectDraw3_SetCooperativeLevel(p,a,b)  (p)->SetCooperativeLevel(a,b)
 
1631
#define IDirectDraw3_SetDisplayMode(p,a,b,c,d,e) (p)->SetDisplayMode(a,b,c,d,e)
 
1632
#define IDirectDraw3_WaitForVerticalBlank(p,a,b) (p)->WaitForVerticalBlank(a,b)
 
1633
/*** IDirectDraw2 methods ***/
 
1634
#define IDirectDraw3_GetAvailableVidMem(p,a,b,c) (p)->GetAvailableVidMem(a,b,c)
 
1635
/*** IDirectDraw3 methods ***/
 
1636
#define IDirectDraw3_GetSurfaceFromDC(p,a,b)    (p)->GetSurfaceFromDC(a,b)
 
1637
#endif
 
1638
 
 
1639
 
 
1640
/*****************************************************************************
1501
1641
 * IDirectDraw4 interface
1502
1642
 */
1503
1643
#define INTERFACE IDirectDraw4