Ignore:
Timestamp:
Jun 26, 1999, 1:43:12 PM (26 years ago)
Author:
achimha
Message:

new ddraw include files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/win/ddraw.h

    r4 r213  
    1 /* $Id: ddraw.h,v 1.1 1999-05-24 20:19:11 ktk Exp $ */
     1/* $Id: ddraw.h,v 1.2 1999-06-26 11:43:12 achimha Exp $ */
    22
    33#ifndef __WINE_DDRAW_H
    4 #define __WINE_DDRAW_H
    5 
    6 #include <X11/Xlib.h>
    7 #ifdef HAVE_LIBXXSHM
    8 #include <X11/extensions/XShm.h>
    9 #endif /* defined(HAVE_LIBXXSHM) */
    10 
    11 #include "winnt.h" /* LARGE_INTEGER ... */
    12 #include "wingdi.h" /* PALETTE stuff ... */
    13 #include "wine/obj_base.h"
    14 
    15 #ifndef DIRECTDRAW_VERSION
    16 #define DIRECTDRAW_VERSION      0x0500
    17 #endif /* DIRECTDRAW_VERSION */
     4  #define __WINE_DDRAW_H
     5
     6  #include "winnt.h" /* LARGE_INTEGER ... */
     7  #include "wingdi.h" /* PALETTE stuff ... */
     8  #include "wine/dd_obj_base.h"
     9
     10  #ifndef DIRECTDRAW_VERSION
     11    #define DIRECTDRAW_VERSION  0x0600
     12  #endif /* DIRECTDRAW_VERSION */
    1813
    1914/*****************************************************************************
    2015 * Predeclare the interfaces
    2116 */
    22 DEFINE_GUID( CLSID_DirectDraw,          0xD7B70EE0,0x4340,0x11CF,0xB0,0x63,0x00,0x20,0xAF,0xC2,0xCD,0x35 );
    23 DEFINE_GUID( CLSID_DirectDrawClipper,   0x593817A0,0x7DB3,0x11CF,0xA2,0xDE,0x00,0xAA,0x00,0xb9,0x33,0x56 );
    24 DEFINE_GUID( IID_IDirectDraw,           0x6C14DB80,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
    25 DEFINE_GUID( IID_IDirectDraw2,          0xB3A6F3E0,0x2B43,0x11CF,0xA2,0xDE,0x00,0xAA,0x00,0xB9,0x33,0x56 );
     17DEFINE_GUID( CLSID_DirectDraw,    0xD7B70EE0,0x4340,0x11CF,0xB0,0x63,0x00,0x20,0xAF,0xC2,0xCD,0x35 );
     18DEFINE_GUID( CLSID_DirectDrawClipper, 0x593817A0,0x7DB3,0x11CF,0xA2,0xDE,0x00,0xAA,0x00,0xb9,0x33,0x56 );
     19DEFINE_GUID( IID_IDirectDraw,   0x6C14DB80,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
     20DEFINE_GUID( IID_IDirectDraw2,    0xB3A6F3E0,0x2B43,0x11CF,0xA2,0xDE,0x00,0xAA,0x00,0xB9,0x33,0x56 );
    2621DEFINE_GUID( IID_IDirectDraw4,          0x9c59509a,0x39bd,0x11d1,0x8c,0x4a,0x00,0xc0,0x4f,0xd9,0x30,0xc5 );
    27 DEFINE_GUID( IID_IDirectDrawSurface,    0x6C14DB81,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
    28 DEFINE_GUID( IID_IDirectDrawSurface2,   0x57805885,0x6eec,0x11cf,0x94,0x41,0xa8,0x23,0x03,0xc1,0x0e,0x27 );
    29 DEFINE_GUID( IID_IDirectDrawSurface3,   0xDA044E00,0x69B2,0x11D0,0xA1,0xD5,0x00,0xAA,0x00,0xB8,0xDF,0xBB );
     22DEFINE_GUID( IID_IDirectDrawSurface,  0x6C14DB81,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
     23DEFINE_GUID( IID_IDirectDrawSurface2, 0x57805885,0x6eec,0x11cf,0x94,0x41,0xa8,0x23,0x03,0xc1,0x0e,0x27 );
     24DEFINE_GUID( IID_IDirectDrawSurface3, 0xDA044E00,0x69B2,0x11D0,0xA1,0xD5,0x00,0xAA,0x00,0xB8,0xDF,0xBB );
    3025DEFINE_GUID( IID_IDirectDrawSurface4,   0x0B2B8630,0xAD35,0x11D0,0x8E,0xA6,0x00,0x60,0x97,0x97,0xEA,0x5B );
    31 DEFINE_GUID( IID_IDirectDrawPalette,    0x6C14DB84,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
    32 DEFINE_GUID( IID_IDirectDrawClipper,    0x6C14DB85,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
     26DEFINE_GUID( IID_IDirectDrawPalette,  0x6C14DB84,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
     27DEFINE_GUID( IID_IDirectDrawClipper,  0x6C14DB85,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
    3328DEFINE_GUID( IID_IDirectDrawColorControl,0x4B9F0EE0,0x0D7E,0x11D0,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8 );
     29DEFINE_GUID( IID_IDirectDrawGammaControl,       0x69C11C3E,0xB46B,0x11D1,0xAD,0x7A,0x00,0xC0,0x4F,0xC2,0x9B,0x4E );
    3430
    3531typedef struct IDirectDraw IDirectDraw,*LPDIRECTDRAW;
     
    4339typedef struct IDirectDrawSurface4 IDirectDrawSurface4,*LPDIRECTDRAWSURFACE4;
    4440typedef struct IDirectDrawColorControl IDirectDrawColorControl,*LPDIRECTDRAWCOLORCONTROL;
    45 
    46 
    47 #define DDENUMRET_CANCEL        0
    48 #define DDENUMRET_OK            1
    49 
    50 #define DD_OK                   0
    51 
    52 
    53 #define _FACDD          0x876
     41typedef struct IDirectDrawGammaControl IDirectDrawGammaControl,*LPDIRECTDRAWGAMMACONTROL;
     42
     43
     44#define DDENUMRET_CANCEL  0
     45#define DDENUMRET_OK    1
     46
     47#define DD_OK     0
     48
     49//
     50// Create an HRESULT value from component pieces
     51//
     52
     53#define MAKE_HRESULT(sev,fac,code) \
     54    ((HRESULT) (((unsigned long)(sev)<<31) | ((unsigned long)(fac)<<16) | ((unsigned long)(code))) )
     55
     56#define _FACDD    0x876
    5457#define MAKE_DDHRESULT( code )  MAKE_HRESULT( 1, _FACDD, code )
    5558
    56 #define DDERR_ALREADYINITIALIZED                MAKE_DDHRESULT( 5 )
    57 #define DDERR_CANNOTATTACHSURFACE               MAKE_DDHRESULT( 10 )
    58 #define DDERR_CANNOTDETACHSURFACE               MAKE_DDHRESULT( 20 )
    59 #define DDERR_CURRENTLYNOTAVAIL                 MAKE_DDHRESULT( 40 )
    60 #define DDERR_EXCEPTION                         MAKE_DDHRESULT( 55 )
    61 #define DDERR_GENERIC                           E_FAIL
    62 #define DDERR_HEIGHTALIGN                       MAKE_DDHRESULT( 90 )
    63 #define DDERR_INCOMPATIBLEPRIMARY               MAKE_DDHRESULT( 95 )
    64 #define DDERR_INVALIDCAPS                       MAKE_DDHRESULT( 100 )
    65 #define DDERR_INVALIDCLIPLIST                   MAKE_DDHRESULT( 110 )
    66 #define DDERR_INVALIDMODE                       MAKE_DDHRESULT( 120 )
    67 #define DDERR_INVALIDOBJECT                     MAKE_DDHRESULT( 130 )
    68 #define DDERR_INVALIDPARAMS                     E_INVALIDARG
    69 #define DDERR_INVALIDPIXELFORMAT                MAKE_DDHRESULT( 145 )
    70 #define DDERR_INVALIDRECT                       MAKE_DDHRESULT( 150 )
    71 #define DDERR_LOCKEDSURFACES                    MAKE_DDHRESULT( 160 )
    72 #define DDERR_NO3D                              MAKE_DDHRESULT( 170 )
    73 #define DDERR_NOALPHAHW                         MAKE_DDHRESULT( 180 )
    74 #define DDERR_NOCLIPLIST                        MAKE_DDHRESULT( 205 )
    75 #define DDERR_NOCOLORCONVHW                     MAKE_DDHRESULT( 210 )
    76 #define DDERR_NOCOOPERATIVELEVELSET             MAKE_DDHRESULT( 212 )
    77 #define DDERR_NOCOLORKEY                        MAKE_DDHRESULT( 215 )
    78 #define DDERR_NOCOLORKEYHW                      MAKE_DDHRESULT( 220 )
    79 #define DDERR_NODIRECTDRAWSUPPORT               MAKE_DDHRESULT( 222 )
    80 #define DDERR_NOEXCLUSIVEMODE                   MAKE_DDHRESULT( 225 )
    81 #define DDERR_NOFLIPHW                          MAKE_DDHRESULT( 230 )
    82 #define DDERR_NOGDI                             MAKE_DDHRESULT( 240 )
    83 #define DDERR_NOMIRRORHW                        MAKE_DDHRESULT( 250 )
    84 #define DDERR_NOTFOUND                          MAKE_DDHRESULT( 255 )
    85 #define DDERR_NOOVERLAYHW                       MAKE_DDHRESULT( 260 )
    86 #define DDERR_NORASTEROPHW                      MAKE_DDHRESULT( 280 )
    87 #define DDERR_NOROTATIONHW                      MAKE_DDHRESULT( 290 )
    88 #define DDERR_NOSTRETCHHW                       MAKE_DDHRESULT( 310 )
    89 #define DDERR_NOT4BITCOLOR                      MAKE_DDHRESULT( 316 )
    90 #define DDERR_NOT4BITCOLORINDEX                 MAKE_DDHRESULT( 317 )
    91 #define DDERR_NOT8BITCOLOR                      MAKE_DDHRESULT( 320 )
    92 #define DDERR_NOTEXTUREHW                       MAKE_DDHRESULT( 330 )
    93 #define DDERR_NOVSYNCHW                         MAKE_DDHRESULT( 335 )
    94 #define DDERR_NOZBUFFERHW                       MAKE_DDHRESULT( 340 )
    95 #define DDERR_NOZOVERLAYHW                      MAKE_DDHRESULT( 350 )
    96 #define DDERR_OUTOFCAPS                         MAKE_DDHRESULT( 360 )
    97 #define DDERR_OUTOFMEMORY                       E_OUTOFMEMORY
    98 #define DDERR_OUTOFVIDEOMEMORY                  MAKE_DDHRESULT( 380 )
    99 #define DDERR_OVERLAYCANTCLIP                   MAKE_DDHRESULT( 382 )
    100 #define DDERR_OVERLAYCOLORKEYONLYONEACTIVE      MAKE_DDHRESULT( 384 )
    101 #define DDERR_PALETTEBUSY                       MAKE_DDHRESULT( 387 )
    102 #define DDERR_COLORKEYNOTSET                    MAKE_DDHRESULT( 400 )
    103 #define DDERR_SURFACEALREADYATTACHED            MAKE_DDHRESULT( 410 )
    104 #define DDERR_SURFACEALREADYDEPENDENT           MAKE_DDHRESULT( 420 )
    105 #define DDERR_SURFACEBUSY                       MAKE_DDHRESULT( 430 )
    106 #define DDERR_CANTLOCKSURFACE                   MAKE_DDHRESULT( 435 )
    107 #define DDERR_SURFACEISOBSCURED                 MAKE_DDHRESULT( 440 )
    108 #define DDERR_SURFACELOST                       MAKE_DDHRESULT( 450 )
    109 #define DDERR_SURFACENOTATTACHED                MAKE_DDHRESULT( 460 )
    110 #define DDERR_TOOBIGHEIGHT                      MAKE_DDHRESULT( 470 )
    111 #define DDERR_TOOBIGSIZE                        MAKE_DDHRESULT( 480 )
    112 #define DDERR_TOOBIGWIDTH                       MAKE_DDHRESULT( 490 )
    113 #define DDERR_UNSUPPORTED                       E_NOTIMPL
    114 #define DDERR_UNSUPPORTEDFORMAT                 MAKE_DDHRESULT( 510 )
    115 #define DDERR_UNSUPPORTEDMASK                   MAKE_DDHRESULT( 520 )
    116 #define DDERR_VERTICALBLANKINPROGRESS           MAKE_DDHRESULT( 537 )
    117 #define DDERR_WASSTILLDRAWING                   MAKE_DDHRESULT( 540 )
    118 #define DDERR_XALIGN                            MAKE_DDHRESULT( 560 )
    119 #define DDERR_INVALIDDIRECTDRAWGUID             MAKE_DDHRESULT( 561 )
    120 #define DDERR_DIRECTDRAWALREADYCREATED          MAKE_DDHRESULT( 562 )
    121 #define DDERR_NODIRECTDRAWHW                    MAKE_DDHRESULT( 563 )
    122 #define DDERR_PRIMARYSURFACEALREADYEXISTS       MAKE_DDHRESULT( 564 )
    123 #define DDERR_NOEMULATION                       MAKE_DDHRESULT( 565 )
    124 #define DDERR_REGIONTOOSMALL                    MAKE_DDHRESULT( 566 )
    125 #define DDERR_CLIPPERISUSINGHWND                MAKE_DDHRESULT( 567 )
    126 #define DDERR_NOCLIPPERATTACHED                 MAKE_DDHRESULT( 568 )
    127 #define DDERR_NOHWND                            MAKE_DDHRESULT( 569 )
    128 #define DDERR_HWNDSUBCLASSED                    MAKE_DDHRESULT( 570 )
    129 #define DDERR_HWNDALREADYSET                    MAKE_DDHRESULT( 571 )
    130 #define DDERR_NOPALETTEATTACHED                 MAKE_DDHRESULT( 572 )
    131 #define DDERR_NOPALETTEHW                       MAKE_DDHRESULT( 573 )
    132 #define DDERR_BLTFASTCANTCLIP                   MAKE_DDHRESULT( 574 )
    133 #define DDERR_NOBLTHW                           MAKE_DDHRESULT( 575 )
    134 #define DDERR_NODDROPSHW                        MAKE_DDHRESULT( 576 )
    135 #define DDERR_OVERLAYNOTVISIBLE                 MAKE_DDHRESULT( 577 )
    136 #define DDERR_NOOVERLAYDEST                     MAKE_DDHRESULT( 578 )
    137 #define DDERR_INVALIDPOSITION                   MAKE_DDHRESULT( 579 )
    138 #define DDERR_NOTAOVERLAYSURFACE                MAKE_DDHRESULT( 580 )
    139 #define DDERR_EXCLUSIVEMODEALREADYSET           MAKE_DDHRESULT( 581 )
    140 #define DDERR_NOTFLIPPABLE                      MAKE_DDHRESULT( 582 )
    141 #define DDERR_CANTDUPLICATE                     MAKE_DDHRESULT( 583 )
    142 #define DDERR_NOTLOCKED                         MAKE_DDHRESULT( 584 )
    143 #define DDERR_CANTCREATEDC                      MAKE_DDHRESULT( 585 )
    144 #define DDERR_NODC                              MAKE_DDHRESULT( 586 )
    145 #define DDERR_WRONGMODE                         MAKE_DDHRESULT( 587 )
    146 #define DDERR_IMPLICITLYCREATED                 MAKE_DDHRESULT( 588 )
    147 #define DDERR_NOTPALETTIZED                     MAKE_DDHRESULT( 589 )
    148 #define DDERR_UNSUPPORTEDMODE                   MAKE_DDHRESULT( 590 )
    149 #define DDERR_NOMIPMAPHW                        MAKE_DDHRESULT( 591 )
    150 #define DDERR_INVALIDSURFACETYPE                MAKE_DDHRESULT( 592 )
    151 #define DDERR_NOOPTIMIZEHW                      MAKE_DDHRESULT( 600 )
    152 #define DDERR_NOTLOADED                         MAKE_DDHRESULT( 601 )
    153 #define DDERR_NOFOCUSWINDOW                     MAKE_DDHRESULT( 602 )
    154 #define DDERR_DCALREADYCREATED                  MAKE_DDHRESULT( 620 )
    155 #define DDERR_NONONLOCALVIDMEM                  MAKE_DDHRESULT( 630 )
    156 #define DDERR_CANTPAGELOCK                      MAKE_DDHRESULT( 640 )
    157 #define DDERR_CANTPAGEUNLOCK                    MAKE_DDHRESULT( 660 )
    158 #define DDERR_NOTPAGELOCKED                     MAKE_DDHRESULT( 680 )
    159 #define DDERR_MOREDATA                          MAKE_DDHRESULT( 690 )
    160 #define DDERR_VIDEONOTACTIVE                    MAKE_DDHRESULT( 695 )
    161 #define DDERR_DEVICEDOESNTOWNSURFACE            MAKE_DDHRESULT( 699 )
    162 #define DDERR_NOTINITIALIZED                    CO_E_NOTINITIALIZED
     59#define DDERR_ALREADYINITIALIZED            MAKE_DDHRESULT( 5 )
     60#define DDERR_CANNOTATTACHSURFACE           MAKE_DDHRESULT( 10 )
     61#define DDERR_CANNOTDETACHSURFACE           MAKE_DDHRESULT( 20 )
     62#define DDERR_CURRENTLYNOTAVAIL             MAKE_DDHRESULT( 40 )
     63#define DDERR_EXCEPTION                     MAKE_DDHRESULT( 55 )
     64#define DDERR_GENERIC                       E_FAIL
     65#define DDERR_HEIGHTALIGN                   MAKE_DDHRESULT( 90 )
     66#define DDERR_INCOMPATIBLEPRIMARY           MAKE_DDHRESULT( 95 )
     67#define DDERR_INVALIDCAPS                   MAKE_DDHRESULT( 100 )
     68#define DDERR_INVALIDCLIPLIST               MAKE_DDHRESULT( 110 )
     69#define DDERR_INVALIDMODE                   MAKE_DDHRESULT( 120 )
     70#define DDERR_INVALIDOBJECT                 MAKE_DDHRESULT( 130 )
     71#define DDERR_INVALIDPARAMS                 E_INVALIDARG
     72#define DDERR_INVALIDPIXELFORMAT            MAKE_DDHRESULT( 145 )
     73#define DDERR_INVALIDRECT                   MAKE_DDHRESULT( 150 )
     74#define DDERR_LOCKEDSURFACES                MAKE_DDHRESULT( 160 )
     75#define DDERR_NO3D                          MAKE_DDHRESULT( 170 )
     76#define DDERR_NOALPHAHW                     MAKE_DDHRESULT( 180 )
     77#define DDERR_NOCLIPLIST                    MAKE_DDHRESULT( 205 )
     78#define DDERR_NOCOLORCONVHW                 MAKE_DDHRESULT( 210 )
     79#define DDERR_NOCOOPERATIVELEVELSET         MAKE_DDHRESULT( 212 )
     80#define DDERR_NOCOLORKEY                    MAKE_DDHRESULT( 215 )
     81#define DDERR_NOCOLORKEYHW                  MAKE_DDHRESULT( 220 )
     82#define DDERR_NODIRECTDRAWSUPPORT           MAKE_DDHRESULT( 222 )
     83#define DDERR_NOEXCLUSIVEMODE               MAKE_DDHRESULT( 225 )
     84#define DDERR_NOFLIPHW                      MAKE_DDHRESULT( 230 )
     85#define DDERR_NOGDI                         MAKE_DDHRESULT( 240 )
     86#define DDERR_NOMIRRORHW                    MAKE_DDHRESULT( 250 )
     87#define DDERR_NOTFOUND                      MAKE_DDHRESULT( 255 )
     88#define DDERR_NOOVERLAYHW                   MAKE_DDHRESULT( 260 )
     89#define DDERR_NORASTEROPHW                  MAKE_DDHRESULT( 280 )
     90#define DDERR_NOROTATIONHW                  MAKE_DDHRESULT( 290 )
     91#define DDERR_NOSTRETCHHW                   MAKE_DDHRESULT( 310 )
     92#define DDERR_NOT4BITCOLOR                  MAKE_DDHRESULT( 316 )
     93#define DDERR_NOT4BITCOLORINDEX             MAKE_DDHRESULT( 317 )
     94#define DDERR_NOT8BITCOLOR                  MAKE_DDHRESULT( 320 )
     95#define DDERR_NOTEXTUREHW                   MAKE_DDHRESULT( 330 )
     96#define DDERR_NOVSYNCHW                     MAKE_DDHRESULT( 335 )
     97#define DDERR_NOZBUFFERHW                   MAKE_DDHRESULT( 340 )
     98#define DDERR_NOZOVERLAYHW                  MAKE_DDHRESULT( 350 )
     99#define DDERR_OUTOFCAPS                     MAKE_DDHRESULT( 360 )
     100#define DDERR_OUTOFMEMORY                   E_OUTOFMEMORY
     101#define DDERR_OUTOFVIDEOMEMORY              MAKE_DDHRESULT( 380 )
     102#define DDERR_OVERLAYCANTCLIP               MAKE_DDHRESULT( 382 )
     103#define DDERR_OVERLAYCOLORKEYONLYONEACTIVE  MAKE_DDHRESULT( 384 )
     104#define DDERR_PALETTEBUSY                   MAKE_DDHRESULT( 387 )
     105#define DDERR_COLORKEYNOTSET                MAKE_DDHRESULT( 400 )
     106#define DDERR_SURFACEALREADYATTACHED        MAKE_DDHRESULT( 410 )
     107#define DDERR_SURFACEALREADYDEPENDENT       MAKE_DDHRESULT( 420 )
     108#define DDERR_SURFACEBUSY                   MAKE_DDHRESULT( 430 )
     109#define DDERR_CANTLOCKSURFACE               MAKE_DDHRESULT( 435 )
     110#define DDERR_SURFACEISOBSCURED             MAKE_DDHRESULT( 440 )
     111#define DDERR_SURFACELOST                   MAKE_DDHRESULT( 450 )
     112#define DDERR_SURFACENOTATTACHED            MAKE_DDHRESULT( 460 )
     113#define DDERR_TOOBIGHEIGHT                  MAKE_DDHRESULT( 470 )
     114#define DDERR_TOOBIGSIZE                    MAKE_DDHRESULT( 480 )
     115#define DDERR_TOOBIGWIDTH                   MAKE_DDHRESULT( 490 )
     116#define DDERR_UNSUPPORTED                   E_NOTIMPL
     117#define DDERR_UNSUPPORTEDFORMAT             MAKE_DDHRESULT( 510 )
     118#define DDERR_UNSUPPORTEDMASK               MAKE_DDHRESULT( 520 )
     119#define DDERR_INVALIDSTREAM                 MAKE_DDHRESULT( 521 )
     120#define DDERR_VERTICALBLANKINPROGRESS       MAKE_DDHRESULT( 537 )
     121#define DDERR_WASSTILLDRAWING               MAKE_DDHRESULT( 540 )
     122#define DDERR_XALIGN                        MAKE_DDHRESULT( 560 )
     123#define DDERR_INVALIDDIRECTDRAWGUID         MAKE_DDHRESULT( 561 )
     124#define DDERR_DIRECTDRAWALREADYCREATED      MAKE_DDHRESULT( 562 )
     125#define DDERR_NODIRECTDRAWHW                MAKE_DDHRESULT( 563 )
     126#define DDERR_PRIMARYSURFACEALREADYEXISTS   MAKE_DDHRESULT( 564 )
     127#define DDERR_NOEMULATION                   MAKE_DDHRESULT( 565 )
     128#define DDERR_REGIONTOOSMALL                MAKE_DDHRESULT( 566 )
     129#define DDERR_CLIPPERISUSINGHWND            MAKE_DDHRESULT( 567 )
     130#define DDERR_NOCLIPPERATTACHED             MAKE_DDHRESULT( 568 )
     131#define DDERR_NOHWND                        MAKE_DDHRESULT( 569 )
     132#define DDERR_HWNDSUBCLASSED                MAKE_DDHRESULT( 570 )
     133#define DDERR_HWNDALREADYSET                MAKE_DDHRESULT( 571 )
     134#define DDERR_NOPALETTEATTACHED             MAKE_DDHRESULT( 572 )
     135#define DDERR_NOPALETTEHW                   MAKE_DDHRESULT( 573 )
     136#define DDERR_BLTFASTCANTCLIP               MAKE_DDHRESULT( 574 )
     137#define DDERR_NOBLTHW                       MAKE_DDHRESULT( 575 )
     138#define DDERR_NODDROPSHW                    MAKE_DDHRESULT( 576 )
     139#define DDERR_OVERLAYNOTVISIBLE             MAKE_DDHRESULT( 577 )
     140#define DDERR_NOOVERLAYDEST                 MAKE_DDHRESULT( 578 )
     141#define DDERR_INVALIDPOSITION               MAKE_DDHRESULT( 579 )
     142#define DDERR_NOTAOVERLAYSURFACE            MAKE_DDHRESULT( 580 )
     143#define DDERR_EXCLUSIVEMODEALREADYSET       MAKE_DDHRESULT( 581 )
     144#define DDERR_NOTFLIPPABLE                  MAKE_DDHRESULT( 582 )
     145#define DDERR_CANTDUPLICATE                 MAKE_DDHRESULT( 583 )
     146#define DDERR_NOTLOCKED                     MAKE_DDHRESULT( 584 )
     147#define DDERR_CANTCREATEDC                  MAKE_DDHRESULT( 585 )
     148#define DDERR_NODC                          MAKE_DDHRESULT( 586 )
     149#define DDERR_WRONGMODE                     MAKE_DDHRESULT( 587 )
     150#define DDERR_IMPLICITLYCREATED             MAKE_DDHRESULT( 588 )
     151#define DDERR_NOTPALETTIZED                 MAKE_DDHRESULT( 589 )
     152#define DDERR_UNSUPPORTEDMODE               MAKE_DDHRESULT( 590 )
     153#define DDERR_NOMIPMAPHW                    MAKE_DDHRESULT( 591 )
     154#define DDERR_INVALIDSURFACETYPE            MAKE_DDHRESULT( 592 )
     155#define DDERR_NOOPTIMIZEHW                  MAKE_DDHRESULT( 600 )
     156#define DDERR_NOTLOADED                     MAKE_DDHRESULT( 601 )
     157#define DDERR_NOFOCUSWINDOW                 MAKE_DDHRESULT( 602 )
     158#define DDERR_DCALREADYCREATED              MAKE_DDHRESULT( 620 )
     159#define DDERR_NONONLOCALVIDMEM              MAKE_DDHRESULT( 630 )
     160#define DDERR_CANTPAGELOCK                  MAKE_DDHRESULT( 640 )
     161#define DDERR_CANTPAGEUNLOCK                MAKE_DDHRESULT( 660 )
     162#define DDERR_NOTPAGELOCKED                 MAKE_DDHRESULT( 680 )
     163#define DDERR_MOREDATA                      MAKE_DDHRESULT( 690 )
     164#define DDERR_EXPIRED                       MAKE_DDHRESULT( 691 )
     165#define DDERR_VIDEONOTACTIVE                MAKE_DDHRESULT( 695 )
     166#define DDERR_DEVICEDOESNTOWNSURFACE        MAKE_DDHRESULT( 699 )
     167#define DDERR_NOTINITIALIZED                CO_E_NOTINITIALIZED
     168
     169/* DIRECTDRAWSURFACE SETPRIVATEDATA CONSTANTS */
     170#define DDSPD_IUNKNOWNPOINTER           0x00000001L
     171#define DDSPD_VOLATILE                  0x00000002L
     172
    163173
    164174/* dwFlags for Blt* */
    165 #define DDBLT_ALPHADEST                         0x00000001
    166 #define DDBLT_ALPHADESTCONSTOVERRIDE            0x00000002
    167 #define DDBLT_ALPHADESTNEG                      0x00000004
    168 #define DDBLT_ALPHADESTSURFACEOVERRIDE          0x00000008
    169 #define DDBLT_ALPHAEDGEBLEND                    0x00000010
    170 #define DDBLT_ALPHASRC                          0x00000020
    171 #define DDBLT_ALPHASRCCONSTOVERRIDE             0x00000040
    172 #define DDBLT_ALPHASRCNEG                       0x00000080
    173 #define DDBLT_ALPHASRCSURFACEOVERRIDE           0x00000100
    174 #define DDBLT_ASYNC                             0x00000200
    175 #define DDBLT_COLORFILL                         0x00000400
    176 #define DDBLT_DDFX                              0x00000800
    177 #define DDBLT_DDROPS                            0x00001000
    178 #define DDBLT_KEYDEST                           0x00002000
    179 #define DDBLT_KEYDESTOVERRIDE                   0x00004000
    180 #define DDBLT_KEYSRC                            0x00008000
    181 #define DDBLT_KEYSRCOVERRIDE                    0x00010000
    182 #define DDBLT_ROP                               0x00020000
    183 #define DDBLT_ROTATIONANGLE                     0x00040000
    184 #define DDBLT_ZBUFFER                           0x00080000
    185 #define DDBLT_ZBUFFERDESTCONSTOVERRIDE          0x00100000
    186 #define DDBLT_ZBUFFERDESTOVERRIDE               0x00200000
    187 #define DDBLT_ZBUFFERSRCCONSTOVERRIDE           0x00400000
    188 #define DDBLT_ZBUFFERSRCOVERRIDE                0x00800000
    189 #define DDBLT_WAIT                              0x01000000
    190 #define DDBLT_DEPTHFILL                         0x02000000
     175#define DDBLT_ALPHADEST                 0x00000001
     176#define DDBLT_ALPHADESTCONSTOVERRIDE    0x00000002
     177#define DDBLT_ALPHADESTNEG              0x00000004
     178#define DDBLT_ALPHADESTSURFACEOVERRIDE  0x00000008
     179#define DDBLT_ALPHAEDGEBLEND            0x00000010
     180#define DDBLT_ALPHASRC                  0x00000020
     181#define DDBLT_ALPHASRCCONSTOVERRIDE     0x00000040
     182#define DDBLT_ALPHASRCNEG               0x00000080
     183#define DDBLT_ALPHASRCSURFACEOVERRIDE   0x00000100
     184#define DDBLT_ASYNC                     0x00000200
     185#define DDBLT_COLORFILL                 0x00000400
     186#define DDBLT_DDFX                      0x00000800
     187#define DDBLT_DDROPS                    0x00001000
     188#define DDBLT_KEYDEST                   0x00002000
     189#define DDBLT_KEYDESTOVERRIDE           0x00004000
     190#define DDBLT_KEYSRC                    0x00008000
     191#define DDBLT_KEYSRCOVERRIDE            0x00010000
     192#define DDBLT_ROP                       0x00020000
     193#define DDBLT_ROTATIONANGLE             0x00040000
     194#define DDBLT_ZBUFFER                   0x00080000
     195#define DDBLT_ZBUFFERDESTCONSTOVERRIDE  0x00100000
     196#define DDBLT_ZBUFFERDESTOVERRIDE       0x00200000
     197#define DDBLT_ZBUFFERSRCCONSTOVERRIDE   0x00400000
     198#define DDBLT_ZBUFFERSRCOVERRIDE        0x00800000
     199#define DDBLT_WAIT                      0x01000000
     200#define DDBLT_DEPTHFILL                 0x02000000
    191201
    192202/* dwTrans for BltFast */
    193 #define DDBLTFAST_NOCOLORKEY                    0x00000000
    194 #define DDBLTFAST_SRCCOLORKEY                   0x00000001
    195 #define DDBLTFAST_DESTCOLORKEY                  0x00000002
    196 #define DDBLTFAST_WAIT                          0x00000010
     203#define DDBLTFAST_NOCOLORKEY            0x00000000
     204#define DDBLTFAST_SRCCOLORKEY           0x00000001
     205#define DDBLTFAST_DESTCOLORKEY          0x00000002
     206#define DDBLTFAST_WAIT                  0x00000010
    197207
    198208/* dwFlags for Flip */
    199 #define DDFLIP_WAIT     0x00000001
    200 #define DDFLIP_EVEN     0x00000002 /* only valid for overlay */
    201 #define DDFLIP_ODD      0x00000004 /* only valid for overlay */
     209#define DDFLIP_WAIT                     0x00000001
     210#define DDFLIP_EVEN                     0x00000002 /* only valid for overlay */
     211#define DDFLIP_ODD                      0x00000004 /* only valid for overlay */
    202212
    203213/* dwFlags for GetBltStatus */
    204 #define DDGBS_CANBLT                            0x00000001
    205 #define DDGBS_ISBLTDONE                         0x00000002
     214#define DDGBS_CANBLT                    0x00000001
     215#define DDGBS_ISBLTDONE                 0x00000002
    206216
    207217/* DDSCAPS.dwCaps */
    208218/* reserved1, was 3d capable */
    209 #define DDSCAPS_RESERVED1               0x00000001
     219#define DDSCAPS_RESERVED1               0x00000001
    210220/* surface contains alpha information */
    211 #define DDSCAPS_ALPHA                   0x00000002
     221#define DDSCAPS_ALPHA                   0x00000002
    212222/* this surface is a backbuffer */
    213 #define DDSCAPS_BACKBUFFER              0x00000004
     223#define DDSCAPS_BACKBUFFER              0x00000004
    214224/* complex surface structure */
    215 #define DDSCAPS_COMPLEX                 0x00000008
     225#define DDSCAPS_COMPLEX                 0x00000008
    216226/* part of surface flipping structure */
    217 #define DDSCAPS_FLIP                    0x00000010
     227#define DDSCAPS_FLIP                    0x00000010
    218228/* this surface is the frontbuffer surface */
    219 #define DDSCAPS_FRONTBUFFER             0x00000020
     229#define DDSCAPS_FRONTBUFFER             0x00000020
    220230/* this is a plain offscreen surface */
    221 #define DDSCAPS_OFFSCREENPLAIN          0x00000040
     231#define DDSCAPS_OFFSCREENPLAIN          0x00000040
    222232/* overlay */
    223 #define DDSCAPS_OVERLAY                 0x00000080
     233#define DDSCAPS_OVERLAY                 0x00000080
    224234/* palette objects can be created and attached to us */
    225 #define DDSCAPS_PALETTE                 0x00000100
     235#define DDSCAPS_PALETTE                 0x00000100
    226236/* primary surface (the one the user looks at currently)(right eye)*/
    227 #define DDSCAPS_PRIMARYSURFACE          0x00000200
     237#define DDSCAPS_PRIMARYSURFACE          0x00000200
    228238/* primary surface for left eye */
    229 #define DDSCAPS_PRIMARYSURFACELEFT      0x00000400
     239#define DDSCAPS_PRIMARYSURFACELEFT      0x00000400
    230240/* surface exists in systemmemory */
    231 #define DDSCAPS_SYSTEMMEMORY            0x00000800
     241#define DDSCAPS_SYSTEMMEMORY            0x00000800
    232242/* surface can be used as a texture */
    233 #define DDSCAPS_TEXTURE                 0x00001000
     243#define DDSCAPS_TEXTURE                 0x00001000
    234244/* surface may be destination for 3d rendering */
    235 #define DDSCAPS_3DDEVICE                0x00002000
     245#define DDSCAPS_3DDEVICE                0x00002000
    236246/* surface exists in videomemory */
    237 #define DDSCAPS_VIDEOMEMORY             0x00004000
     247#define DDSCAPS_VIDEOMEMORY             0x00004000
    238248/* surface changes immediately visible */
    239 #define DDSCAPS_VISIBLE                 0x00008000
     249#define DDSCAPS_VISIBLE                 0x00008000
    240250/* write only surface */
    241 #define DDSCAPS_WRITEONLY               0x00010000
     251#define DDSCAPS_WRITEONLY               0x00010000
    242252/* zbuffer surface */
    243 #define DDSCAPS_ZBUFFER                 0x00020000
     253#define DDSCAPS_ZBUFFER                 0x00020000
    244254/* has its own DC */
    245 #define DDSCAPS_OWNDC                   0x00040000
     255#define DDSCAPS_OWNDC                   0x00040000
    246256/* surface should be able to receive live video */
    247 #define DDSCAPS_LIVEVIDEO               0x00080000
     257#define DDSCAPS_LIVEVIDEO               0x00080000
    248258/* should be able to have a hw codec decompress stuff into it */
    249 #define DDSCAPS_HWCODEC                 0x00100000
     259#define DDSCAPS_HWCODEC                 0x00100000
    250260/* mode X (320x200 or 320x240) surface */
    251 #define DDSCAPS_MODEX                   0x00200000
     261#define DDSCAPS_MODEX                   0x00200000
    252262/* one mipmap surface (1 level) */
    253 #define DDSCAPS_MIPMAP                  0x00400000
    254 #define DDSCAPS_RESERVED2               0x00800000
     263#define DDSCAPS_MIPMAP                  0x00400000
     264#define DDSCAPS_RESERVED2               0x00800000
    255265/* memory allocation delayed until Load() */
    256 #define DDSCAPS_ALLOCONLOAD             0x04000000
     266#define DDSCAPS_ALLOCONLOAD             0x04000000
    257267/* Indicates that the surface will recieve data from a video port */
    258 #define DDSCAPS_VIDEOPORT               0x08000000
     268#define DDSCAPS_VIDEOPORT               0x08000000
    259269/* surface is in local videomemory */
    260 #define DDSCAPS_LOCALVIDMEM             0x10000000
     270#define DDSCAPS_LOCALVIDMEM             0x10000000
    261271/* surface is in nonlocal videomemory */
    262 #define DDSCAPS_NONLOCALVIDMEM          0x20000000
     272#define DDSCAPS_NONLOCALVIDMEM          0x20000000
    263273/* surface is a standard VGA mode surface (NOT ModeX) */
    264 #define DDSCAPS_STANDARDVGAMODE         0x40000000
     274#define DDSCAPS_STANDARDVGAMODE         0x40000000
    265275/* optimized? surface */
    266 #define DDSCAPS_OPTIMIZED               0x80000000
    267 
    268 typedef struct _DDSCAPS {
    269         DWORD   dwCaps; /* capabilities of surface wanted */
     276#define DDSCAPS_OPTIMIZED               0x80000000
     277
     278typedef struct _DDSCAPS
     279{
     280  DWORD dwCaps; /* capabilities of surface wanted */
    270281} DDSCAPS,*LPDDSCAPS;
    271282
    272 #define DD_ROP_SPACE    (256/32)        /* space required to store ROP array */
     283#define DD_ROP_SPACE  (256/32)  /* space required to store ROP array */
    273284
    274285typedef struct _DDCAPS_DX3
    275286{
    276     DWORD       dwSize;                 /* size of the DDDRIVERCAPS structure */
    277     DWORD       dwCaps;                 /* driver specific capabilities */
    278     DWORD       dwCaps2;                /* more driver specific capabilites */
    279     DWORD       dwCKeyCaps;             /* color key capabilities of the surface */
    280     DWORD       dwFXCaps;               /* driver specific stretching and effects capabilites */
    281     DWORD       dwFXAlphaCaps;          /* alpha driver specific capabilities */
    282     DWORD       dwPalCaps;              /* palette capabilities */
    283     DWORD       dwSVCaps;               /* stereo vision capabilities */
    284     DWORD       dwAlphaBltConstBitDepths;       /* DDBD_2,4,8 */
    285     DWORD       dwAlphaBltPixelBitDepths;       /* DDBD_1,2,4,8 */
    286     DWORD       dwAlphaBltSurfaceBitDepths;     /* DDBD_1,2,4,8 */
    287     DWORD       dwAlphaOverlayConstBitDepths;   /* DDBD_2,4,8 */
    288     DWORD       dwAlphaOverlayPixelBitDepths;   /* DDBD_1,2,4,8 */
    289     DWORD       dwAlphaOverlaySurfaceBitDepths; /* DDBD_1,2,4,8 */
    290     DWORD       dwZBufferBitDepths;             /* DDBD_8,16,24,32 */
    291     DWORD       dwVidMemTotal;          /* total amount of video memory */
    292     DWORD       dwVidMemFree;           /* amount of free video memory */
    293     DWORD       dwMaxVisibleOverlays;   /* maximum number of visible overlays */
    294     DWORD       dwCurrVisibleOverlays;  /* current number of visible overlays */
    295     DWORD       dwNumFourCCCodes;       /* number of four cc codes */
    296     DWORD       dwAlignBoundarySrc;     /* source rectangle alignment */
    297     DWORD       dwAlignSizeSrc;         /* source rectangle byte size */
    298     DWORD       dwAlignBoundaryDest;    /* dest rectangle alignment */
    299     DWORD       dwAlignSizeDest;        /* dest rectangle byte size */
    300     DWORD       dwAlignStrideAlign;     /* stride alignment */
    301     DWORD       dwRops[DD_ROP_SPACE];   /* ROPS supported */
    302     DDSCAPS     ddsCaps;                /* DDSCAPS structure has all the general capabilities */
    303     DWORD       dwMinOverlayStretch;    /* minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
    304     DWORD       dwMaxOverlayStretch;    /* maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
    305     DWORD       dwMinLiveVideoStretch;  /* minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
    306     DWORD       dwMaxLiveVideoStretch;  /* maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
    307     DWORD       dwMinHwCodecStretch;    /* minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
    308     DWORD       dwMaxHwCodecStretch;    /* maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
    309     DWORD       dwReserved1;
    310     DWORD       dwReserved2;
    311     DWORD       dwReserved3;
    312     DWORD       dwSVBCaps;              /* driver specific capabilities for System->Vmem blts */
    313     DWORD       dwSVBCKeyCaps;          /* driver color key capabilities for System->Vmem blts */
    314     DWORD       dwSVBFXCaps;            /* driver FX capabilities for System->Vmem blts */
    315     DWORD       dwSVBRops[DD_ROP_SPACE];/* ROPS supported for System->Vmem blts */
    316     DWORD       dwVSBCaps;              /* driver specific capabilities for Vmem->System blts */
    317     DWORD       dwVSBCKeyCaps;          /* driver color key capabilities for Vmem->System blts */
    318     DWORD       dwVSBFXCaps;            /* driver FX capabilities for Vmem->System blts */
    319     DWORD       dwVSBRops[DD_ROP_SPACE];/* ROPS supported for Vmem->System blts */
    320     DWORD       dwSSBCaps;              /* driver specific capabilities for System->System blts */
    321     DWORD       dwSSBCKeyCaps;          /* driver color key capabilities for System->System blts */
    322     DWORD       dwSSBFXCaps;            /* driver FX capabilities for System->System blts */
    323     DWORD       dwSSBRops[DD_ROP_SPACE];/* ROPS supported for System->System blts */
    324     DWORD       dwReserved4;
    325     DWORD       dwReserved5;
    326     DWORD       dwReserved6;
     287  DWORD dwSize;                 /* size of the DDDRIVERCAPS structure */
     288  DWORD dwCaps;                 /* driver specific capabilities */
     289  DWORD dwCaps2;                /* more driver specific capabilites */
     290  DWORD dwCKeyCaps;             /* color key capabilities of the surface */
     291  DWORD dwFXCaps;               /* driver specific stretching and effects capabilites */
     292  DWORD dwFXAlphaCaps;          /* alpha driver specific capabilities */
     293  DWORD dwPalCaps;              /* palette capabilities */
     294  DWORD dwSVCaps;               /* stereo vision capabilities */
     295  DWORD dwAlphaBltConstBitDepths;       /* DDBD_2,4,8 */
     296  DWORD dwAlphaBltPixelBitDepths;       /* DDBD_1,2,4,8 */
     297  DWORD dwAlphaBltSurfaceBitDepths;     /* DDBD_1,2,4,8 */
     298  DWORD dwAlphaOverlayConstBitDepths;   /* DDBD_2,4,8 */
     299  DWORD dwAlphaOverlayPixelBitDepths;   /* DDBD_1,2,4,8 */
     300  DWORD dwAlphaOverlaySurfaceBitDepths; /* DDBD_1,2,4,8 */
     301  DWORD dwZBufferBitDepths;             /* DDBD_8,16,24,32 */
     302  DWORD dwVidMemTotal;          /* total amount of video memory */
     303  DWORD dwVidMemFree;           /* amount of free video memory */
     304  DWORD dwMaxVisibleOverlays;   /* maximum number of visible overlays */
     305  DWORD dwCurrVisibleOverlays;  /* current number of visible overlays */
     306  DWORD dwNumFourCCCodes;       /* number of four cc codes */
     307  DWORD dwAlignBoundarySrc;     /* source rectangle alignment */
     308  DWORD dwAlignSizeSrc;         /* source rectangle byte size */
     309  DWORD dwAlignBoundaryDest;    /* dest rectangle alignment */
     310  DWORD dwAlignSizeDest;        /* dest rectangle byte size */
     311  DWORD dwAlignStrideAlign;     /* stride alignment */
     312  DWORD dwRops[DD_ROP_SPACE];   /* ROPS supported */
     313  DDSCAPS ddsCaps;                /* DDSCAPS structure has all the general capabilities */
     314  DWORD dwMinOverlayStretch;    /* minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
     315  DWORD dwMaxOverlayStretch;    /* maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
     316  DWORD dwMinLiveVideoStretch;  /* minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
     317  DWORD dwMaxLiveVideoStretch;  /* maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
     318  DWORD dwMinHwCodecStretch;    /* minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
     319  DWORD dwMaxHwCodecStretch;    /* maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
     320  DWORD dwReserved1;
     321  DWORD dwReserved2;
     322  DWORD dwReserved3;
     323  DWORD dwSVBCaps;              /* driver specific capabilities for System->Vmem blts */
     324  DWORD dwSVBCKeyCaps;          /* driver color key capabilities for System->Vmem blts */
     325  DWORD dwSVBFXCaps;            /* driver FX capabilities for System->Vmem blts */
     326  DWORD dwSVBRops[DD_ROP_SPACE];/* ROPS supported for System->Vmem blts */
     327  DWORD dwVSBCaps;              /* driver specific capabilities for Vmem->System blts */
     328  DWORD dwVSBCKeyCaps;          /* driver color key capabilities for Vmem->System blts */
     329  DWORD dwVSBFXCaps;            /* driver FX capabilities for Vmem->System blts */
     330  DWORD dwVSBRops[DD_ROP_SPACE];/* ROPS supported for Vmem->System blts */
     331  DWORD dwSSBCaps;              /* driver specific capabilities for System->System blts */
     332  DWORD dwSSBCKeyCaps;          /* driver color key capabilities for System->System blts */
     333  DWORD dwSSBFXCaps;            /* driver FX capabilities for System->System blts */
     334  DWORD dwSSBRops[DD_ROP_SPACE];/* ROPS supported for System->System blts */
     335  DWORD dwReserved4;
     336  DWORD dwReserved5;
     337  DWORD dwReserved6;
    327338} DDCAPS_DX3,*LPDDCAPS_DX3;
     339
     340typedef struct _DDCAPS_DX5
     341{
     342/*  0*/ DWORD  dwSize;              /* size of the DDDRIVERCAPS structure */
     343/*  4*/ DWORD  dwCaps;              /* driver specific capabilities       */
     344/*  8*/ DWORD  dwCaps2;             /* more driver specific capabilites    */
     345/*  c*/ DWORD  dwCKeyCaps;          /* color key capabilities of the surface */
     346/* 10*/ DWORD  dwFXCaps;            /* driver specific stretching and effects capabilites */
     347/* 14*/ DWORD  dwFXAlphaCaps;       /* alpha driver specific capabilities */
     348/* 18*/ DWORD  dwPalCaps;           /* palette capabilities */
     349/* 1c*/ DWORD  dwSVCaps;            /* stereo vision capabilities */
     350/* 20*/ DWORD  dwAlphaBltConstBitDepths;        /* DDBD_2,4,8 */
     351/* 24*/ DWORD  dwAlphaBltPixelBitDepths;        /* DDBD_1,2,4,8 */
     352/* 28*/ DWORD  dwAlphaBltSurfaceBitDepths;      /* DDBD_1,2,4,8 */
     353/* 2c*/ DWORD  dwAlphaOverlayConstBitDepths;    /* DDBD_2,4,8 */
     354/* 30*/ DWORD  dwAlphaOverlayPixelBitDepths;    /* DDBD_1,2,4,8 */
     355/* 34*/ DWORD  dwAlphaOverlaySurfaceBitDepths;  /* DDBD_1,2,4,8 */
     356/* 38*/ DWORD  dwZBufferBitDepths;              /* DDBD_8,16,24,32 */
     357/* 3c*/ DWORD  dwVidMemTotal;                   /* total amount of video memory */
     358/* 40*/ DWORD  dwVidMemFree;                    /* amount of free video memory */
     359/* 44*/ DWORD  dwMaxVisibleOverlays;            /* maximum number of visible overlays */
     360/* 48*/ DWORD  dwCurrVisibleOverlays;           /* current number of visible overlays */
     361/* 4c*/ DWORD  dwNumFourCCCodes;                /* number of four cc codes */
     362/* 50*/ DWORD  dwAlignBoundarySrc;              /* source rectangle alignment */
     363/* 54*/ DWORD  dwAlignSizeSrc;                  /* source rectangle byte size */
     364/* 58*/ DWORD  dwAlignBoundaryDest;             /* dest rectangle alignment */
     365/* 5c*/ DWORD  dwAlignSizeDest;                 /* dest rectangle byte size */
     366/* 60*/ DWORD  dwAlignStrideAlign;              /* stride alignment */
     367/* 64*/ DWORD  dwRops[DD_ROP_SPACE];            /* ROPS supported */
     368/* 84*/ DDSCAPS  ddsCaps;                       /* DDSCAPS structure has all the general capabilities */
     369/* 88*/ DWORD  dwMinOverlayStretch;             /* minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
     370/* 8c*/ DWORD  dwMaxOverlayStretch;             /* maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
     371/* 90*/ DWORD  dwMinLiveVideoStretch;           /* minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
     372/* 94*/ DWORD  dwMaxLiveVideoStretch;           /* maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
     373/* 98*/ DWORD  dwMinHwCodecStretch;             /* minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
     374/* 9c*/ DWORD  dwMaxHwCodecStretch;             /* maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
     375/* a0*/ DWORD  dwReserved1;                     /* reserved */
     376/* a4*/ DWORD  dwReserved2;                     /* reserved */
     377/* a8*/ DWORD  dwReserved3;                     /* reserved */
     378/* ac*/ DWORD  dwSVBCaps;                       /* driver specific capabilities for System->Vmem blts */
     379/* b0*/ DWORD  dwSVBCKeyCaps;                   /* driver color key capabilities for System->Vmem blts */
     380/* b4*/ DWORD  dwSVBFXCaps;                     /* driver FX capabilities for System->Vmem blts */
     381/* b8*/ DWORD  dwSVBRops[DD_ROP_SPACE];         /* ROPS supported for System->Vmem blts */
     382/* d8*/ DWORD  dwVSBCaps;                       /* driver specific capabilities for Vmem->System blts */
     383/* dc*/ DWORD  dwVSBCKeyCaps;                   /* driver color key capabilities for Vmem->System blts */
     384/* e0*/ DWORD  dwVSBFXCaps;                     /* driver FX capabilities for Vmem->System blts */
     385/* e4*/ DWORD  dwVSBRops[DD_ROP_SPACE];         /* ROPS supported for Vmem->System blts */
     386/*104*/ DWORD  dwSSBCaps;                       /* driver specific capabilities for System->System blts */
     387/*108*/ DWORD  dwSSBCKeyCaps;                   /* driver color key capabilities for System->System blts */
     388/*10c*/ DWORD  dwSSBFXCaps;                     /* driver FX capabilities for System->System blts */
     389/*110*/ DWORD  dwSSBRops[DD_ROP_SPACE];         /* ROPS supported for System->System blts */
     390/* Members added for DX5: */
     391/*130*/ DWORD  dwMaxVideoPorts;   /* maximum number of usable video ports */
     392/*134*/ DWORD  dwCurrVideoPorts;  /* current number of video ports used */
     393/*138*/ DWORD  dwSVBCaps2;        /* more driver specific capabilities for System->Vmem blts */
     394/*13c*/ DWORD  dwNLVBCaps;        /* driver specific capabilities for non-local->local vidmem blts */
     395/*140*/ DWORD  dwNLVBCaps2;       /* more driver specific capabilities non-local->local vidmem blts */
     396/*144*/ DWORD  dwNLVBCKeyCaps;    /* driver color key capabilities for non-local->local vidmem blts */
     397/*148*/ DWORD  dwNLVBFXCaps;      /* driver FX capabilities for non-local->local blts */
     398/*14c*/ DWORD  dwNLVBRops[DD_ROP_SPACE]; /* ROPS supported for non-local->local blts */
     399} DDCAPS_DX5, *LPDDCAPS_DX5;
     400
     401
     402typedef struct _DDSCAPS2
     403{
     404  DWORD  dwCaps;    // capabilities of surface wanted
     405  DWORD  dwCaps2;
     406  DWORD  dwCaps3;
     407  DWORD  dwCaps4;
     408} DDSCAPS2,* LPDDSCAPS2;
     409
    328410
    329411typedef struct _DDCAPS
    330412{
    331 /*  0*/ DWORD  dwSize;                  /* size of the DDDRIVERCAPS structure */
    332 /*  4*/ DWORD  dwCaps;                  /* driver specific capabilities */
    333 /*  8*/ DWORD  dwCaps2;                 /* more driver specific capabilites */
    334 /*  c*/ DWORD  dwCKeyCaps;              /* color key capabilities of the surface */
    335 /* 10*/ DWORD  dwFXCaps;                /* driver specific stretching and effects capabilites */
    336 /* 14*/ DWORD  dwFXAlphaCaps;           /* alpha driver specific capabilities */
    337 /* 18*/ DWORD  dwPalCaps;               /* palette capabilities */
    338 /* 1c*/ DWORD  dwSVCaps;                /* stereo vision capabilities */
    339 /* 20*/ DWORD  dwAlphaBltConstBitDepths;        /* DDBD_2,4,8 */
    340 /* 24*/ DWORD  dwAlphaBltPixelBitDepths;        /* DDBD_1,2,4,8 */
    341 /* 28*/ DWORD  dwAlphaBltSurfaceBitDepths;      /* DDBD_1,2,4,8 */
    342 /* 2c*/ DWORD  dwAlphaOverlayConstBitDepths;    /* DDBD_2,4,8 */
    343 /* 30*/ DWORD  dwAlphaOverlayPixelBitDepths;    /* DDBD_1,2,4,8 */
    344 /* 34*/ DWORD  dwAlphaOverlaySurfaceBitDepths;  /* DDBD_1,2,4,8 */
    345 /* 38*/ DWORD  dwZBufferBitDepths;              /* DDBD_8,16,24,32 */
    346 /* 3c*/ DWORD  dwVidMemTotal;           /* total amount of video memory */
    347 /* 40*/ DWORD  dwVidMemFree;            /* amount of free video memory */
    348 /* 44*/ DWORD  dwMaxVisibleOverlays;    /* maximum number of visible overlays */
    349 /* 48*/ DWORD  dwCurrVisibleOverlays;   /* current number of visible overlays */
    350 /* 4c*/ DWORD  dwNumFourCCCodes;        /* number of four cc codes */
    351 /* 50*/ DWORD  dwAlignBoundarySrc;      /* source rectangle alignment */
    352 /* 54*/ DWORD  dwAlignSizeSrc;          /* source rectangle byte size */
    353 /* 58*/ DWORD  dwAlignBoundaryDest;     /* dest rectangle alignment */
    354 /* 5c*/ DWORD  dwAlignSizeDest;         /* dest rectangle byte size */
    355 /* 60*/ DWORD  dwAlignStrideAlign;      /* stride alignment */
    356 /* 64*/ DWORD  dwRops[DD_ROP_SPACE];    /* ROPS supported */
    357 /* 84*/ DDSCAPS ddsCaps;                /* DDSCAPS structure has all the general capabilities */
    358 /* 88*/ DWORD  dwMinOverlayStretch;     /* minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
    359 /* 8c*/ DWORD  dwMaxOverlayStretch;     /* maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
    360 /* 90*/ DWORD  dwMinLiveVideoStretch;   /* minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
    361 /* 94*/ DWORD  dwMaxLiveVideoStretch;   /* maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
    362 /* 98*/ DWORD  dwMinHwCodecStretch;     /* minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
    363 /* 9c*/ DWORD  dwMaxHwCodecStretch;     /* maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
     413/*  0*/ DWORD  dwSize;      /* size of the DDDRIVERCAPS structure */
     414/*  4*/ DWORD  dwCaps;      /* driver specific capabilities */
     415/*  8*/ DWORD  dwCaps2;     /* more driver specific capabilites */
     416/*  c*/ DWORD  dwCKeyCaps;    /* color key capabilities of the surface */
     417/* 10*/ DWORD  dwFXCaps;    /* driver specific stretching and effects capabilites */
     418/* 14*/ DWORD  dwFXAlphaCaps;   /* alpha driver specific capabilities */
     419/* 18*/ DWORD  dwPalCaps;   /* palette capabilities */
     420/* 1c*/ DWORD  dwSVCaps;    /* stereo vision capabilities */
     421/* 20*/ DWORD  dwAlphaBltConstBitDepths;  /* DDBD_2,4,8 */
     422/* 24*/ DWORD  dwAlphaBltPixelBitDepths;  /* DDBD_1,2,4,8 */
     423/* 28*/ DWORD  dwAlphaBltSurfaceBitDepths;  /* DDBD_1,2,4,8 */
     424/* 2c*/ DWORD  dwAlphaOverlayConstBitDepths;  /* DDBD_2,4,8 */
     425/* 30*/ DWORD  dwAlphaOverlayPixelBitDepths;  /* DDBD_1,2,4,8 */
     426/* 34*/ DWORD  dwAlphaOverlaySurfaceBitDepths;  /* DDBD_1,2,4,8 */
     427/* 38*/ DWORD  dwZBufferBitDepths;    /* DDBD_8,16,24,32 */
     428/* 3c*/ DWORD  dwVidMemTotal;   /* total amount of video memory */
     429/* 40*/ DWORD  dwVidMemFree;    /* amount of free video memory */
     430/* 44*/ DWORD  dwMaxVisibleOverlays;  /* maximum number of visible overlays */
     431/* 48*/ DWORD  dwCurrVisibleOverlays; /* current number of visible overlays */
     432/* 4c*/ DWORD  dwNumFourCCCodes;  /* number of four cc codes */
     433/* 50*/ DWORD  dwAlignBoundarySrc;  /* source rectangle alignment */
     434/* 54*/ DWORD  dwAlignSizeSrc;    /* source rectangle byte size */
     435/* 58*/ DWORD  dwAlignBoundaryDest; /* dest rectangle alignment */
     436/* 5c*/ DWORD  dwAlignSizeDest;   /* dest rectangle byte size */
     437/* 60*/ DWORD  dwAlignStrideAlign;  /* stride alignment */
     438/* 64*/ DWORD  dwRops[DD_ROP_SPACE];  /* ROPS supported */
     439#if DIRECTDRAW_VERSION < 0x0600
     440  /* 84*/ DDSCAPS ddsCaps;    /* DDSCAPS structure has all the general capabilities */
     441#else
     442  /* 84*/ DDSCAPS ddsOldCaps;    /* DDSCAPS structure has all the general capabilities */
     443#endif
     444/* 88*/ DWORD  dwMinOverlayStretch; /* minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
     445/* 8c*/ DWORD  dwMaxOverlayStretch; /* maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
     446/* 90*/ DWORD  dwMinLiveVideoStretch; /* minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
     447/* 94*/ DWORD  dwMaxLiveVideoStretch; /* maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
     448/* 98*/ DWORD  dwMinHwCodecStretch; /* minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
     449/* 9c*/ DWORD  dwMaxHwCodecStretch; /* maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
    364450/* a0*/ DWORD  dwReserved1;
    365451/* a4*/ DWORD  dwReserved2;
    366452/* a8*/ DWORD  dwReserved3;
    367 /* ac*/ DWORD  dwSVBCaps;       /* driver specific capabilities for System->Vmem blts */
    368 /* b0*/ DWORD  dwSVBCKeyCaps;   /* driver color key capabilities for System->Vmem blts */
    369 /* b4*/ DWORD  dwSVBFXCaps;     /* driver FX capabilities for System->Vmem blts */
     453/* ac*/ DWORD  dwSVBCaps; /* driver specific capabilities for System->Vmem blts */
     454/* b0*/ DWORD  dwSVBCKeyCaps; /* driver color key capabilities for System->Vmem blts */
     455/* b4*/ DWORD  dwSVBFXCaps; /* driver FX capabilities for System->Vmem blts */
    370456/* b8*/ DWORD  dwSVBRops[DD_ROP_SPACE];/* ROPS supported for System->Vmem blts */
    371 /* d8*/ DWORD  dwVSBCaps;       /* driver specific capabilities for Vmem->System blts */
    372 /* dc*/ DWORD  dwVSBCKeyCaps;   /* driver color key capabilities for Vmem->System blts */
    373 /* e0*/ DWORD  dwVSBFXCaps;     /* driver FX capabilities for Vmem->System blts */
     457/* d8*/ DWORD  dwVSBCaps; /* driver specific capabilities for Vmem->System blts */
     458/* dc*/ DWORD  dwVSBCKeyCaps; /* driver color key capabilities for Vmem->System blts */
     459/* e0*/ DWORD  dwVSBFXCaps; /* driver FX capabilities for Vmem->System blts */
    374460/* e4*/ DWORD  dwVSBRops[DD_ROP_SPACE];/* ROPS supported for Vmem->System blts */
    375 /*104*/ DWORD  dwSSBCaps;       /* driver specific capabilities for System->System blts */
    376 /*108*/ DWORD  dwSSBCKeyCaps;   /* driver color key capabilities for System->System blts */
    377 /*10c*/ DWORD  dwSSBFXCaps;     /* driver FX capabilities for System->System blts */
     461/*104*/ DWORD  dwSSBCaps; /* driver specific capabilities for System->System blts */
     462/*108*/ DWORD  dwSSBCKeyCaps; /* driver color key capabilities for System->System blts */
     463/*10c*/ DWORD  dwSSBFXCaps; /* driver FX capabilities for System->System blts */
    378464/*110*/ DWORD  dwSSBRops[DD_ROP_SPACE];/* ROPS supported for System->System blts */
    379 #if       DIRECTDRAW_VERSION >= 0x0500
    380 /*130*/ DWORD  dwMaxVideoPorts; /* maximum number of usable video ports */
    381 /*134*/ DWORD  dwCurrVideoPorts;/* current number of video ports used */
    382 /*138*/ DWORD  dwSVBCaps2;      /* more driver specific capabilities for System->Vmem blts */
    383 /*13c*/ DWORD  dwNLVBCaps;      /* driver specific capabilities for non-local->local vidmem blts */
    384 /*140*/ DWORD  dwNLVBCaps2;     /* more driver specific capabilities non-local->local vidmem blts */
    385 /*144*/ DWORD  dwNLVBCKeyCaps;  /* driver color key capabilities for non-local->local vidmem blts */
    386 /*148*/ DWORD  dwNLVBFXCaps;    /* driver FX capabilities for non-local->local blts */
    387 /*14c*/ DWORD  dwNLVBRops[DD_ROP_SPACE];/* ROPS supported for non-local->local blts */
     465#if DIRECTDRAW_VERSION >= 0x0500
     466  /*130*/ DWORD  dwMaxVideoPorts; /* maximum number of usable video ports */
     467  /*134*/ DWORD  dwCurrVideoPorts;/* current number of video ports used */
     468  /*138*/ DWORD  dwSVBCaps2;  /* more driver specific capabilities for System->Vmem blts */
     469  /*13c*/ DWORD  dwNLVBCaps;  /* driver specific capabilities for non-local->local vidmem blts */
     470  /*140*/ DWORD  dwNLVBCaps2; /* more driver specific capabilities non-local->local vidmem blts */
     471  /*144*/ DWORD  dwNLVBCKeyCaps;  /* driver color key capabilities for non-local->local vidmem blts */
     472  /*148*/ DWORD  dwNLVBFXCaps;  /* driver FX capabilities for non-local->local blts */
     473  /*14c*/ DWORD  dwNLVBRops[DD_ROP_SPACE];/* ROPS supported for non-local->local blts */
     474  #if DIRECTDRAW_VERSION >= 0x0600
     475    /*16c*/ DDSCAPS2 ddsCaps;               /* Surface Caps */
     476  #endif
    388477#else  /* DIRECTDRAW_VERSION >= 0x0500 */
    389 /*130*/ DWORD  dwReserved4;
    390 /*134*/ DWORD  dwReserved5;
    391 /*138*/ DWORD  dwReserved6;
     478  /*130*/ DWORD  dwReserved4;
     479  /*134*/ DWORD  dwReserved5;
     480  /*138*/ DWORD  dwReserved6;
    392481#endif /* DIRECTDRAW_VERSION >= 0x0500 */
    393482} DDCAPS,*LPDDCAPS;
    394483
     484#if DIRECTDRAW_VERSION == 0x0600
     485  typedef DDCAPS DDCAPS_DX6,*LPDDCAPS_DX6;
     486#endif
    395487
    396488/* DDCAPS.dwCaps */
    397 #define DDCAPS_3D                       0x00000001
    398 #define DDCAPS_ALIGNBOUNDARYDEST        0x00000002
    399 #define DDCAPS_ALIGNSIZEDEST            0x00000004
    400 #define DDCAPS_ALIGNBOUNDARYSRC         0x00000008
    401 #define DDCAPS_ALIGNSIZESRC             0x00000010
    402 #define DDCAPS_ALIGNSTRIDE              0x00000020
    403 #define DDCAPS_BLT                      0x00000040
    404 #define DDCAPS_BLTQUEUE                 0x00000080
    405 #define DDCAPS_BLTFOURCC                0x00000100
    406 #define DDCAPS_BLTSTRETCH               0x00000200
    407 #define DDCAPS_GDI                      0x00000400
    408 #define DDCAPS_OVERLAY                  0x00000800
    409 #define DDCAPS_OVERLAYCANTCLIP          0x00001000
    410 #define DDCAPS_OVERLAYFOURCC            0x00002000
    411 #define DDCAPS_OVERLAYSTRETCH           0x00004000
    412 #define DDCAPS_PALETTE                  0x00008000
    413 #define DDCAPS_PALETTEVSYNC             0x00010000
    414 #define DDCAPS_READSCANLINE             0x00020000
    415 #define DDCAPS_STEREOVIEW               0x00040000
    416 #define DDCAPS_VBI                      0x00080000
    417 #define DDCAPS_ZBLTS                    0x00100000
    418 #define DDCAPS_ZOVERLAYS                0x00200000
    419 #define DDCAPS_COLORKEY                 0x00400000
    420 #define DDCAPS_ALPHA                    0x00800000
    421 #define DDCAPS_COLORKEYHWASSIST         0x01000000
    422 #define DDCAPS_NOHARDWARE               0x02000000
    423 #define DDCAPS_BLTCOLORFILL             0x04000000
    424 #define DDCAPS_BANKSWITCHED             0x08000000
    425 #define DDCAPS_BLTDEPTHFILL             0x10000000
    426 #define DDCAPS_CANCLIP                  0x20000000
    427 #define DDCAPS_CANCLIPSTRETCHED         0x40000000
    428 #define DDCAPS_CANBLTSYSMEM             0x80000000
     489#define DDCAPS_3D                 0x00000001
     490#define DDCAPS_ALIGNBOUNDARYDEST  0x00000002
     491#define DDCAPS_ALIGNSIZEDEST      0x00000004
     492#define DDCAPS_ALIGNBOUNDARYSRC   0x00000008
     493#define DDCAPS_ALIGNSIZESRC       0x00000010
     494#define DDCAPS_ALIGNSTRIDE        0x00000020
     495#define DDCAPS_BLT                0x00000040
     496#define DDCAPS_BLTQUEUE           0x00000080
     497#define DDCAPS_BLTFOURCC          0x00000100
     498#define DDCAPS_BLTSTRETCH         0x00000200
     499#define DDCAPS_GDI                0x00000400
     500#define DDCAPS_OVERLAY            0x00000800
     501#define DDCAPS_OVERLAYCANTCLIP    0x00001000
     502#define DDCAPS_OVERLAYFOURCC      0x00002000
     503#define DDCAPS_OVERLAYSTRETCH     0x00004000
     504#define DDCAPS_PALETTE            0x00008000
     505#define DDCAPS_PALETTEVSYNC       0x00010000
     506#define DDCAPS_READSCANLINE       0x00020000
     507#define DDCAPS_STEREOVIEW         0x00040000
     508#define DDCAPS_VBI                0x00080000
     509#define DDCAPS_ZBLTS              0x00100000
     510#define DDCAPS_ZOVERLAYS          0x00200000
     511#define DDCAPS_COLORKEY           0x00400000
     512#define DDCAPS_ALPHA              0x00800000
     513#define DDCAPS_COLORKEYHWASSIST   0x01000000
     514#define DDCAPS_NOHARDWARE         0x02000000
     515#define DDCAPS_BLTCOLORFILL       0x04000000
     516#define DDCAPS_BANKSWITCHED       0x08000000
     517#define DDCAPS_BLTDEPTHFILL       0x10000000
     518#define DDCAPS_CANCLIP            0x20000000
     519#define DDCAPS_CANCLIPSTRETCHED   0x40000000
     520#define DDCAPS_CANBLTSYSMEM       0x80000000
    429521
    430522/* DDCAPS.dwCaps2 */
    431 #define DDCAPS2_CERTIFIED               0x00000001
    432 #define DDCAPS2_NO2DDURING3DSCENE       0x00000002
    433 #define DDCAPS2_VIDEOPORT               0x00000004
    434 #define DDCAPS2_AUTOFLIPOVERLAY         0x00000008
    435 #define DDCAPS2_CANBOBINTERLEAVED       0x00000010
    436 #define DDCAPS2_CANBOBNONINTERLEAVED    0x00000020
    437 #define DDCAPS2_COLORCONTROLOVERLAY     0x00000040
    438 #define DDCAPS2_COLORCONTROLPRIMARY     0x00000080
    439 #define DDCAPS2_CANDROPZ16BIT           0x00000100
    440 #define DDCAPS2_NONLOCALVIDMEM          0x00000200
    441 #define DDCAPS2_NONLOCALVIDMEMCAPS      0x00000400
    442 #define DDCAPS2_NOPAGELOCKREQUIRED      0x00000800
    443 #define DDCAPS2_WIDESURFACES            0x00001000
    444 #define DDCAPS2_CANFLIPODDEVEN          0x00002000
    445 #define DDCAPS2_CANBOBHARDWARE          0x00004000
    446 
     523#define DDCAPS2_CERTIFIED             0x00000001
     524#define DDCAPS2_NO2DDURING3DSCENE     0x00000002
     525#define DDCAPS2_VIDEOPORT             0x00000004
     526#define DDCAPS2_AUTOFLIPOVERLAY       0x00000008
     527#define DDCAPS2_CANBOBINTERLEAVED     0x00000010
     528#define DDCAPS2_CANBOBNONINTERLEAVED  0x00000020
     529#define DDCAPS2_COLORCONTROLOVERLAY   0x00000040
     530#define DDCAPS2_COLORCONTROLPRIMARY   0x00000080
     531#define DDCAPS2_CANDROPZ16BIT         0x00000100
     532#define DDCAPS2_NONLOCALVIDMEM        0x00000200
     533#define DDCAPS2_NONLOCALVIDMEMCAPS    0x00000400
     534#define DDCAPS2_NOPAGELOCKREQUIRED    0x00000800
     535#define DDCAPS2_WIDESURFACES          0x00001000
     536#define DDCAPS2_CANFLIPODDEVEN        0x00002000
     537#define DDCAPS2_CANBOBHARDWARE        0x00004000
     538#define DDCAPS2_COPYFOURCC            0x00008000
     539#define DDCAPS2_PRIMARYGAMMA          0x00020000
     540#define DDCAPS2_CANRENDERWINDOWED     0x00080000
     541#define DDCAPS2_CANCALIBRATEGAMMA     0x00100000
     542#define DDCAPS2_FLIPINTERVAL          0x00200000
     543#define DDCAPS2_FLIPNOVSYNC           0x00400000
     544
     545
     546
     547/* Generic pixel format with 8-bit RGB and alpha components */
     548
     549typedef struct _DDRGBA
     550{
     551  BYTE red;
     552  BYTE green;
     553  BYTE blue;
     554  BYTE alpha;
     555} DDRGBA, *LPDDRGBA;
    447556
    448557/* Set/Get Colour Key Flags */
     
    455564typedef struct _DDCOLORKEY
    456565{
    457         DWORD   dwColorSpaceLowValue;/* low boundary of color space that is to
    458                                       * be treated as Color Key, inclusive
    459                                       */
    460         DWORD   dwColorSpaceHighValue;/* high boundary of color space that is
    461                                        * to be treated as Color Key, inclusive
    462                                        */
     566  DWORD dwColorSpaceLowValue;/* low boundary of color space that is to
     567                              * be treated as Color Key, inclusive
     568                              */
     569  DWORD dwColorSpaceHighValue;/* high boundary of color space that is
     570                               * to be treated as Color Key, inclusive
     571                               */
    463572} DDCOLORKEY,*LPDDCOLORKEY;
    464573
    465574/* ddCKEYCAPS bits */
    466 #define DDCKEYCAPS_DESTBLT                      0x00000001
    467 #define DDCKEYCAPS_DESTBLTCLRSPACE              0x00000002
    468 #define DDCKEYCAPS_DESTBLTCLRSPACEYUV           0x00000004
    469 #define DDCKEYCAPS_DESTBLTYUV                   0x00000008
    470 #define DDCKEYCAPS_DESTOVERLAY                  0x00000010
    471 #define DDCKEYCAPS_DESTOVERLAYCLRSPACE          0x00000020
    472 #define DDCKEYCAPS_DESTOVERLAYCLRSPACEYUV       0x00000040
    473 #define DDCKEYCAPS_DESTOVERLAYONEACTIVE         0x00000080
    474 #define DDCKEYCAPS_DESTOVERLAYYUV               0x00000100
    475 #define DDCKEYCAPS_SRCBLT                       0x00000200
    476 #define DDCKEYCAPS_SRCBLTCLRSPACE               0x00000400
    477 #define DDCKEYCAPS_SRCBLTCLRSPACEYUV            0x00000800
    478 #define DDCKEYCAPS_SRCBLTYUV                    0x00001000
    479 #define DDCKEYCAPS_SRCOVERLAY                   0x00002000
    480 #define DDCKEYCAPS_SRCOVERLAYCLRSPACE           0x00004000
    481 #define DDCKEYCAPS_SRCOVERLAYCLRSPACEYUV        0x00008000
    482 #define DDCKEYCAPS_SRCOVERLAYONEACTIVE          0x00010000
    483 #define DDCKEYCAPS_SRCOVERLAYYUV                0x00020000
    484 #define DDCKEYCAPS_NOCOSTOVERLAY                0x00040000
    485 
    486 typedef struct _DDPIXELFORMAT {
    487     DWORD       dwSize;                 /* 0: size of structure */
    488     DWORD       dwFlags;                /* 4: pixel format flags */
    489     DWORD       dwFourCC;               /* 8: (FOURCC code) */
    490     union {
    491         DWORD   dwRGBBitCount;          /* C: how many bits per pixel */
    492         DWORD   dwYUVBitCount;          /* C: how many bits per pixel */
    493         DWORD   dwZBufferBitDepth;      /* C: how many bits for z buffers */
    494         DWORD   dwAlphaBitDepth;        /* C: how many bits for alpha channels*/
    495     } x;
    496     union {
    497         DWORD   dwRBitMask;             /* 10: mask for red bit*/
    498         DWORD   dwYBitMask;             /* 10: mask for Y bits*/
    499     } y;
    500     union {
    501         DWORD   dwGBitMask;             /* 14: mask for green bits*/
    502         DWORD   dwUBitMask;             /* 14: mask for U bits*/
    503     } z;
    504     union {
    505         DWORD   dwBBitMask;             /* 18: mask for blue bits*/
    506         DWORD   dwVBitMask;             /* 18: mask for V bits*/
    507     } xx;
    508     union {
    509         DWORD   dwRGBAlphaBitMask;      /* 1C: mask for alpha channel */
    510         DWORD   dwYUVAlphaBitMask;      /* 1C: mask for alpha channel */
    511         DWORD   dwRGBZBitMask;          /* 1C: mask for Z channel */
    512         DWORD   dwYUVZBitMask;          /* 1C: mask for Z channel */
    513     } xy;
    514                                         /* 20: next structure */
     575#define DDCKEYCAPS_DESTBLT                0x00000001
     576#define DDCKEYCAPS_DESTBLTCLRSPACE        0x00000002
     577#define DDCKEYCAPS_DESTBLTCLRSPACEYUV     0x00000004
     578#define DDCKEYCAPS_DESTBLTYUV             0x00000008
     579#define DDCKEYCAPS_DESTOVERLAY            0x00000010
     580#define DDCKEYCAPS_DESTOVERLAYCLRSPACE    0x00000020
     581#define DDCKEYCAPS_DESTOVERLAYCLRSPACEYUV 0x00000040
     582#define DDCKEYCAPS_DESTOVERLAYONEACTIVE   0x00000080
     583#define DDCKEYCAPS_DESTOVERLAYYUV         0x00000100
     584#define DDCKEYCAPS_SRCBLT                 0x00000200
     585#define DDCKEYCAPS_SRCBLTCLRSPACE         0x00000400
     586#define DDCKEYCAPS_SRCBLTCLRSPACEYUV      0x00000800
     587#define DDCKEYCAPS_SRCBLTYUV              0x00001000
     588#define DDCKEYCAPS_SRCOVERLAY             0x00002000
     589#define DDCKEYCAPS_SRCOVERLAYCLRSPACE     0x00004000
     590#define DDCKEYCAPS_SRCOVERLAYCLRSPACEYUV  0x00008000
     591#define DDCKEYCAPS_SRCOVERLAYONEACTIVE    0x00010000
     592#define DDCKEYCAPS_SRCOVERLAYYUV          0x00020000
     593#define DDCKEYCAPS_NOCOSTOVERLAY          0x00040000
     594
     595#ifndef MAKEFOURCC
     596    #define MAKEFOURCC(ch0, ch1, ch2, ch3)                              \
     597                ((DWORD)(BYTE)(ch0) | ((DWORD)(BYTE)(ch1) << 8) |   \
     598                ((DWORD)(BYTE)(ch2) << 16) | ((DWORD)(BYTE)(ch3) << 24 ))
     599#endif //defined(MAKEFOURCC)
     600
     601// FOURCC codes for DX compressed-texture pixel formats
     602
     603#define FOURCC_DXT1  (MAKEFOURCC('D','X','T','1'))
     604#define FOURCC_DXT2  (MAKEFOURCC('D','X','T','2'))
     605#define FOURCC_DXT3  (MAKEFOURCC('D','X','T','3'))
     606#define FOURCC_DXT4  (MAKEFOURCC('D','X','T','4'))
     607#define FOURCC_DXT5  (MAKEFOURCC('D','X','T','5'))
     608
     609typedef struct _DDPIXELFORMAT
     610{
     611  DWORD dwSize;               /* 0: size of structure */
     612  DWORD dwFlags;              /* 4: pixel format flags */
     613  DWORD dwFourCC;             /* 8: (FOURCC code) */
     614  union
     615  {
     616    DWORD dwRGBBitCount;      /* C: how many bits per pixel */
     617    DWORD dwYUVBitCount;      /* C: how many bits per pixel */
     618    DWORD dwZBufferBitDepth;  /* C: how many bits for z buffers */
     619    DWORD dwAlphaBitDepth;    /* C: how many bits for alpha channels*/
     620  };
     621  union
     622  {
     623    DWORD dwRBitMask;         /* 10: mask for red bit*/
     624    DWORD dwYBitMask;         /* 10: mask for Y bits*/
     625  };
     626  union
     627  {
     628    DWORD dwGBitMask;         /* 14: mask for green bits*/
     629    DWORD dwUBitMask;         /* 14: mask for U bits*/
     630  };
     631  union
     632  {
     633    DWORD   dwBBitMask;       /* 18: mask for blue bits*/
     634    DWORD   dwVBitMask;       /* 18: mask for V bits*/
     635  };
     636  union
     637  {
     638    DWORD dwRGBAlphaBitMask;  /* 1C: mask for alpha channel */
     639    DWORD dwYUVAlphaBitMask;  /* 1C: mask for alpha channel */
     640    DWORD dwRGBZBitMask;      /* 1C: mask for Z channel */
     641    DWORD dwYUVZBitMask;      /* 1C: mask for Z channel */
     642  };
     643                              /* 20: next structure */
    515644} DDPIXELFORMAT,*LPDDPIXELFORMAT;
    516645
    517646/* DDCAPS.dwFXCaps */
    518 #define DDFXCAPS_BLTARITHSTRETCHY       0x00000020
    519 #define DDFXCAPS_BLTARITHSTRETCHYN      0x00000010
    520 #define DDFXCAPS_BLTMIRRORLEFTRIGHT     0x00000040
    521 #define DDFXCAPS_BLTMIRRORUPDOWN        0x00000080
    522 #define DDFXCAPS_BLTROTATION            0x00000100
    523 #define DDFXCAPS_BLTROTATION90          0x00000200
    524 #define DDFXCAPS_BLTSHRINKX             0x00000400
    525 #define DDFXCAPS_BLTSHRINKXN            0x00000800
    526 #define DDFXCAPS_BLTSHRINKY             0x00001000
    527 #define DDFXCAPS_BLTSHRINKYN            0x00002000
    528 #define DDFXCAPS_BLTSTRETCHX            0x00004000
    529 #define DDFXCAPS_BLTSTRETCHXN           0x00008000
    530 #define DDFXCAPS_BLTSTRETCHY            0x00010000
    531 #define DDFXCAPS_BLTSTRETCHYN           0x00020000
    532 #define DDFXCAPS_OVERLAYARITHSTRETCHY   0x00040000
    533 #define DDFXCAPS_OVERLAYARITHSTRETCHYN  0x00000008
    534 #define DDFXCAPS_OVERLAYSHRINKX         0x00080000
    535 #define DDFXCAPS_OVERLAYSHRINKXN        0x00100000
    536 #define DDFXCAPS_OVERLAYSHRINKY         0x00200000
    537 #define DDFXCAPS_OVERLAYSHRINKYN        0x00400000
    538 #define DDFXCAPS_OVERLAYSTRETCHX        0x00800000
    539 #define DDFXCAPS_OVERLAYSTRETCHXN       0x01000000
    540 #define DDFXCAPS_OVERLAYSTRETCHY        0x02000000
    541 #define DDFXCAPS_OVERLAYSTRETCHYN       0x04000000
    542 #define DDFXCAPS_OVERLAYMIRRORLEFTRIGHT 0x08000000
    543 #define DDFXCAPS_OVERLAYMIRRORUPDOWN    0x10000000
     647#define DDFXCAPS_BLTARITHSTRETCHY 0x00000020
     648#define DDFXCAPS_BLTARITHSTRETCHYN  0x00000010
     649#define DDFXCAPS_BLTMIRRORLEFTRIGHT 0x00000040
     650#define DDFXCAPS_BLTMIRRORUPDOWN  0x00000080
     651#define DDFXCAPS_BLTROTATION    0x00000100
     652#define DDFXCAPS_BLTROTATION90    0x00000200
     653#define DDFXCAPS_BLTSHRINKX   0x00000400
     654#define DDFXCAPS_BLTSHRINKXN    0x00000800
     655#define DDFXCAPS_BLTSHRINKY   0x00001000
     656#define DDFXCAPS_BLTSHRINKYN    0x00002000
     657#define DDFXCAPS_BLTSTRETCHX    0x00004000
     658#define DDFXCAPS_BLTSTRETCHXN   0x00008000
     659#define DDFXCAPS_BLTSTRETCHY    0x00010000
     660#define DDFXCAPS_BLTSTRETCHYN   0x00020000
     661#define DDFXCAPS_OVERLAYARITHSTRETCHY 0x00040000
     662#define DDFXCAPS_OVERLAYARITHSTRETCHYN  0x00000008
     663#define DDFXCAPS_OVERLAYSHRINKX   0x00080000
     664#define DDFXCAPS_OVERLAYSHRINKXN  0x00100000
     665#define DDFXCAPS_OVERLAYSHRINKY   0x00200000
     666#define DDFXCAPS_OVERLAYSHRINKYN  0x00400000
     667#define DDFXCAPS_OVERLAYSTRETCHX  0x00800000
     668#define DDFXCAPS_OVERLAYSTRETCHXN 0x01000000
     669#define DDFXCAPS_OVERLAYSTRETCHY  0x02000000
     670#define DDFXCAPS_OVERLAYSTRETCHYN 0x04000000
     671#define DDFXCAPS_OVERLAYMIRRORLEFTRIGHT 0x08000000
     672#define DDFXCAPS_OVERLAYMIRRORUPDOWN  0x10000000
    544673
    545674/* DDCAPS.dwFXAlphaCaps */
    546 #define DDFXALPHACAPS_BLTALPHAEDGEBLEND         0x00000001
    547 #define DDFXALPHACAPS_BLTALPHAPIXELS            0x00000002
    548 #define DDFXALPHACAPS_BLTALPHAPIXELSNEG         0x00000004
    549 #define DDFXALPHACAPS_BLTALPHASURFACES          0x00000008
    550 #define DDFXALPHACAPS_BLTALPHASURFACESNEG       0x00000010
    551 #define DDFXALPHACAPS_OVERLAYALPHAEDGEBLEND     0x00000020
    552 #define DDFXALPHACAPS_OVERLAYALPHAPIXELS        0x00000040
    553 #define DDFXALPHACAPS_OVERLAYALPHAPIXELSNEG     0x00000080
    554 #define DDFXALPHACAPS_OVERLAYALPHASURFACES      0x00000100
    555 #define DDFXALPHACAPS_OVERLAYALPHASURFACESNEG   0x00000200
     675#define DDFXALPHACAPS_BLTALPHAEDGEBLEND   0x00000001
     676#define DDFXALPHACAPS_BLTALPHAPIXELS    0x00000002
     677#define DDFXALPHACAPS_BLTALPHAPIXELSNEG   0x00000004
     678#define DDFXALPHACAPS_BLTALPHASURFACES    0x00000008
     679#define DDFXALPHACAPS_BLTALPHASURFACESNEG 0x00000010
     680#define DDFXALPHACAPS_OVERLAYALPHAEDGEBLEND 0x00000020
     681#define DDFXALPHACAPS_OVERLAYALPHAPIXELS  0x00000040
     682#define DDFXALPHACAPS_OVERLAYALPHAPIXELSNEG 0x00000080
     683#define DDFXALPHACAPS_OVERLAYALPHASURFACES  0x00000100
     684#define DDFXALPHACAPS_OVERLAYALPHASURFACESNEG 0x00000200
    556685
    557686/* DDCAPS.dwPalCaps */
    558 #define DDPCAPS_4BIT                    0x00000001
    559 #define DDPCAPS_8BITENTRIES             0x00000002
    560 #define DDPCAPS_8BIT                    0x00000004
    561 #define DDPCAPS_INITIALIZE              0x00000008
    562 #define DDPCAPS_PRIMARYSURFACE          0x00000010
    563 #define DDPCAPS_PRIMARYSURFACELEFT      0x00000020
    564 #define DDPCAPS_ALLOW256                0x00000040
    565 #define DDPCAPS_VSYNC                   0x00000080
    566 #define DDPCAPS_1BIT                    0x00000100
    567 #define DDPCAPS_2BIT                    0x00000200
     687#define DDPCAPS_4BIT      0x00000001
     688#define DDPCAPS_8BITENTRIES   0x00000002
     689#define DDPCAPS_8BIT      0x00000004
     690#define DDPCAPS_INITIALIZE    0x00000008
     691#define DDPCAPS_PRIMARYSURFACE    0x00000010
     692#define DDPCAPS_PRIMARYSURFACELEFT  0x00000020
     693#define DDPCAPS_ALLOW256    0x00000040
     694#define DDPCAPS_VSYNC     0x00000080
     695#define DDPCAPS_1BIT      0x00000100
     696#define DDPCAPS_2BIT      0x00000200
    568697#define DDPCAPS_ALPHA                   0x00000400
    569698
    570699/* DDCAPS.dwSVCaps */
    571 #define DDSVCAPS_ENIGMA                 0x00000001l
    572 #define DDSVCAPS_FLICKER                0x00000002l
    573 #define DDSVCAPS_REDBLUE                0x00000004l
    574 #define DDSVCAPS_SPLIT                  0x00000008l
     700#define DDSVCAPS_ENIGMA     0x00000001l
     701#define DDSVCAPS_FLICKER    0x00000002l
     702#define DDSVCAPS_REDBLUE    0x00000004l
     703#define DDSVCAPS_SPLIT      0x00000008l
    575704
    576705/* BitDepths */
    577 #define DDBD_1                          0x00004000
    578 #define DDBD_2                          0x00002000
    579 #define DDBD_4                          0x00001000
    580 #define DDBD_8                          0x00000800
    581 #define DDBD_16                         0x00000400
    582 #define DDBD_24                         0x00000200
    583 #define DDBD_32                         0x00000100
     706#define DDBD_1        0x00004000
     707#define DDBD_2        0x00002000
     708#define DDBD_4        0x00001000
     709#define DDBD_8        0x00000800
     710#define DDBD_16       0x00000400
     711#define DDBD_24       0x00000200
     712#define DDBD_32       0x00000100
    584713
    585714/* DDOVERLAYFX.dwDDFX */
    586 #define DDOVERFX_ARITHSTRETCHY          0x00000001
    587 #define DDOVERFX_MIRRORLEFTRIGHT        0x00000002
    588 #define DDOVERFX_MIRRORUPDOWN           0x00000004
     715#define DDOVERFX_ARITHSTRETCHY    0x00000001
     716#define DDOVERFX_MIRRORLEFTRIGHT  0x00000002
     717#define DDOVERFX_MIRRORUPDOWN     0x00000004
     718
     719/* DDSPRITEFX.dwDDFX */
     720#define DDSPRITEFX_AFFINETRANSFORM    0x00000001l
     721#define DDSPRITEFX_RGBASCALING        0x00000002l
     722#define DDSPRITEFX_DEGRADERGBASCALING 0x00000004l
     723#define DDSPRITEFX_BILINEARFILTER     0x00000008l
     724#define DDSPRITEFX_BLURFILTER         0x00000010l
     725#define DDSPRITEFX_FLATFILTER         0x00000020l
     726#define DDSPRITEFX_DEGRADEFILTER      0x00000040l
     727
     728
     729/* DIRECTDRAW WAITFORVERTICALBLANK FLAGS */
     730#define DDWAITVB_BLOCKBEGIN         0x00000001l
     731#define DDWAITVB_BLOCKBEGINEVENT    0x00000002l
     732#define DDWAITVB_BLOCKEND           0x00000004l
     733
     734/* DIRECTDRAW GETFLIPSTATUS FLAGS */
     735#define DDGFS_CANFLIP       0x00000001l
     736#define DDGFS_ISFLIPDONE    0x00000002l
     737
    589738
    590739/* DDCOLORKEY.dwFlags */
    591 #define DDPF_ALPHAPIXELS                0x00000001
    592 #define DDPF_ALPHA                      0x00000002
    593 #define DDPF_FOURCC                     0x00000004
    594 #define DDPF_PALETTEINDEXED4            0x00000008
    595 #define DDPF_PALETTEINDEXEDTO8          0x00000010
    596 #define DDPF_PALETTEINDEXED8            0x00000020
    597 #define DDPF_RGB                        0x00000040
    598 #define DDPF_COMPRESSED                 0x00000080
    599 #define DDPF_RGBTOYUV                   0x00000100
    600 #define DDPF_YUV                        0x00000200
    601 #define DDPF_ZBUFFER                    0x00000400
    602 #define DDPF_PALETTEINDEXED1            0x00000800
    603 #define DDPF_PALETTEINDEXED2            0x00001000
    604 #define DDPF_ZPIXELS                    0x00002000
     740#define DDPF_ALPHAPIXELS        0x00000001
     741#define DDPF_ALPHA              0x00000002
     742#define DDPF_FOURCC             0x00000004
     743#define DDPF_PALETTEINDEXED4    0x00000008
     744#define DDPF_PALETTEINDEXEDTO8  0x00000010
     745#define DDPF_PALETTEINDEXED8    0x00000020
     746#define DDPF_RGB                0x00000040
     747#define DDPF_COMPRESSED         0x00000080
     748#define DDPF_RGBTOYUV           0x00000100
     749#define DDPF_YUV                0x00000200
     750#define DDPF_ZBUFFER            0x00000400
     751#define DDPF_PALETTEINDEXED1    0x00000800
     752#define DDPF_PALETTEINDEXED2    0x00001000
     753#define DDPF_ZPIXELS            0x00002000
    605754
    606755/* SetCooperativeLevel dwFlags */
    607 #define DDSCL_FULLSCREEN                0x00000001
    608 #define DDSCL_ALLOWREBOOT               0x00000002
    609 #define DDSCL_NOWINDOWCHANGES           0x00000004
    610 #define DDSCL_NORMAL                    0x00000008
    611 #define DDSCL_EXCLUSIVE                 0x00000010
    612 #define DDSCL_ALLOWMODEX                0x00000040
    613 #define DDSCL_SETFOCUSWINDOW            0x00000080
    614 #define DDSCL_SETDEVICEWINDOW           0x00000100
    615 #define DDSCL_CREATEDEVICEWINDOW        0x00000200
     756#define DDSCL_FULLSCREEN          0x00000001
     757#define DDSCL_ALLOWREBOOT         0x00000002
     758#define DDSCL_NOWINDOWCHANGES     0x00000004
     759#define DDSCL_NORMAL              0x00000008
     760#define DDSCL_EXCLUSIVE           0x00000010
     761#define DDSCL_ALLOWMODEX          0x00000040
     762#define DDSCL_SETFOCUSWINDOW      0x00000080
     763#define DDSCL_SETDEVICEWINDOW     0x00000100
     764#define DDSCL_CREATEDEVICEWINDOW  0x00000200
    616765
    617766
    618767/* DDSURFACEDESC.dwFlags */
    619 #define DDSD_CAPS               0x00000001
    620 #define DDSD_HEIGHT             0x00000002
    621 #define DDSD_WIDTH              0x00000004
    622 #define DDSD_PITCH              0x00000008
    623 #define DDSD_BACKBUFFERCOUNT    0x00000020
    624 #define DDSD_ZBUFFERBITDEPTH    0x00000040
    625 #define DDSD_ALPHABITDEPTH      0x00000080
    626 #define DDSD_LPSURFACE          0x00000800
    627 #define DDSD_PIXELFORMAT        0x00001000
    628 #define DDSD_CKDESTOVERLAY      0x00002000
    629 #define DDSD_CKDESTBLT          0x00004000
    630 #define DDSD_CKSRCOVERLAY       0x00008000
    631 #define DDSD_CKSRCBLT           0x00010000
    632 #define DDSD_MIPMAPCOUNT        0x00020000
    633 #define DDSD_REFRESHRATE        0x00040000
    634 #define DDSD_LINEARSIZE         0x00080000
    635 #define DDSD_ALL                0x000ff9ee
     768#define DDSD_CAPS             0x00000001
     769#define DDSD_HEIGHT           0x00000002
     770#define DDSD_WIDTH            0x00000004
     771#define DDSD_PITCH            0x00000008
     772#define DDSD_BACKBUFFERCOUNT  0x00000020
     773#define DDSD_ZBUFFERBITDEPTH  0x00000040
     774#define DDSD_ALPHABITDEPTH    0x00000080
     775#define DDSD_LPSURFACE        0x00000800
     776#define DDSD_PIXELFORMAT      0x00001000
     777#define DDSD_CKDESTOVERLAY    0x00002000
     778#define DDSD_CKDESTBLT        0x00004000
     779#define DDSD_CKSRCOVERLAY     0x00008000
     780#define DDSD_CKSRCBLT         0x00010000
     781#define DDSD_MIPMAPCOUNT      0x00020000
     782#define DDSD_REFRESHRATE      0x00040000
     783#define DDSD_LINEARSIZE       0x00080000
     784#define DDSD_TEXTURESTAGE     0x00100000
     785#define DDSD_ALL              0x001ff9ee
    636786
    637787/* EnumSurfaces flags */
     
    643793
    644794/* SetDisplayMode flags */
    645 #define DDSDM_STANDARDVGAMODE   0x00000001
     795#define DDSDM_STANDARDVGAMODE 0x00000001
    646796
    647797/* EnumDisplayModes flags */
    648 #define DDEDM_REFRESHRATES      0x00000001
    649 #define DDEDM_STANDARDVGAMODES  0x00000002
     798#define DDEDM_REFRESHRATES      0x00000001
     799#define DDEDM_STANDARDVGAMODES  0x00000002
    650800
    651801
    652802typedef struct _DDSURFACEDESC
    653803{
    654         DWORD   dwSize;         /* 0: size of the DDSURFACEDESC structure*/
    655         DWORD   dwFlags;        /* 4: determines what fields are valid*/
    656         DWORD   dwHeight;       /* 8: height of surface to be created*/
    657         DWORD   dwWidth;        /* C: width of input surface*/
    658         LONG    lPitch;         /*10: distance to start of next line (return value only)*/
    659         DWORD   dwBackBufferCount;/* 14: number of back buffers requested*/
    660         union {
    661                 DWORD   dwMipMapCount;/* 18:number of mip-map levels requested*/
    662                 DWORD   dwZBufferBitDepth;/*18: depth of Z buffer requested*/
    663                 DWORD   dwRefreshRate;/* 18:refresh rate (used when display mode is described)*/
    664         } x;           
    665         DWORD   dwAlphaBitDepth;/* 1C:depth of alpha buffer requested*/
    666         DWORD   dwReserved;     /* 20:reserved*/
    667         union {
    668                 LPVOID  lpSurface;      /* 24:pointer to the associated surface memory*/
    669                 DWORD   dwLinearSize;   /* 24:Formless late-allocated optimized surface size*/
    670         } y;
    671         DDCOLORKEY      ddckCKDestOverlay;/* 28: CK for dest overlay use*/
    672         DDCOLORKEY      ddckCKDestBlt;  /* 30: CK for destination blt use*/
    673         DDCOLORKEY      ddckCKSrcOverlay;/* 38: CK for source overlay use*/
    674         DDCOLORKEY      ddckCKSrcBlt;   /* 40: CK for source blt use*/
    675         DDPIXELFORMAT   ddpfPixelFormat;/* 48: pixel format description of the surface*/
    676         DDSCAPS         ddsCaps;        /* 68: direct draw surface caps */
     804  DWORD dwSize;   /* 0: size of the DDSURFACEDESC structure*/
     805  DWORD dwFlags;  /* 4: determines what fields are valid*/
     806  DWORD dwHeight; /* 8: height of surface to be created*/
     807  DWORD dwWidth;  /* C: width of input surface*/
     808  LONG  lPitch;   /*10: distance to start of next line (return value only)*/
     809  DWORD dwBackBufferCount;/* 14: number of back buffers requested*/
     810  union {
     811    DWORD dwMipMapCount;/* 18:number of mip-map levels requested*/
     812    DWORD dwZBufferBitDepth;/*18: depth of Z buffer requested*/
     813    DWORD dwRefreshRate;/* 18:refresh rate (used when display mode is described)*/
     814  } ;
     815  DWORD dwAlphaBitDepth;/* 1C:depth of alpha buffer requested*/
     816  DWORD dwReserved; /* 20:reserved*/
     817  union {
     818    LPVOID  lpSurface;  /* 24:pointer to the associated surface memory*/
     819    DWORD dwLinearSize; /* 24:Formless late-allocated optimized surface size*/
     820  } ;
     821  DDCOLORKEY  ddckCKDestOverlay;/* 28: CK for dest overlay use*/
     822  DDCOLORKEY  ddckCKDestBlt;  /* 30: CK for destination blt use*/
     823  DDCOLORKEY  ddckCKSrcOverlay;/* 38: CK for source overlay use*/
     824  DDCOLORKEY  ddckCKSrcBlt; /* 40: CK for source blt use*/
     825  DDPIXELFORMAT ddpfPixelFormat;/* 48: pixel format description of the surface*/
     826  DDSCAPS   ddsCaps;  /* 68: direct draw surface caps */
    677827} DDSURFACEDESC,*LPDDSURFACEDESC;
    678828
     829
     830typedef struct _DDSURFACEDESC2
     831{
     832  DWORD    dwSize;
     833  DWORD    dwFlags;
     834  DWORD    dwHeight;
     835  DWORD    dwWidth;
     836  union
     837  {
     838    LONG   lPitch;
     839    DWORD  dwLinearSize;
     840  };
     841  DWORD    dwBackBufferCount;
     842  union
     843  {
     844    DWORD  dwMipMapCount;
     845    DWORD  dwRefreshRate;
     846  };
     847  DWORD         dwAlphaBitDepth;
     848  DWORD         dwReserved;
     849  LPVOID        lpSurface;
     850  DDCOLORKEY    ddckCKDestOverlay;
     851  DDCOLORKEY    ddckCKDestBlt;
     852  DDCOLORKEY    ddckCKSrcOverlay;
     853  DDCOLORKEY    ddckCKSrcBlt;
     854  DDPIXELFORMAT ddpfPixelFormat;
     855  DDSCAPS2      ddsCaps;
     856  DWORD         dwTextureStage;
     857} DDSURFACEDESC2, *LPDDSURFACEDESC2;
     858
     859
    679860/* DDCOLORCONTROL.dwFlags */
    680 #define DDCOLOR_BRIGHTNESS      0x00000001
    681 #define DDCOLOR_CONTRAST        0x00000002
    682 #define DDCOLOR_HUE             0x00000004
    683 #define DDCOLOR_SATURATION      0x00000008
    684 #define DDCOLOR_SHARPNESS       0x00000010
    685 #define DDCOLOR_GAMMA           0x00000020
    686 #define DDCOLOR_COLORENABLE     0x00000040
     861#define DDCOLOR_BRIGHTNESS  0x00000001
     862#define DDCOLOR_CONTRAST    0x00000002
     863#define DDCOLOR_HUE         0x00000004
     864#define DDCOLOR_SATURATION  0x00000008
     865#define DDCOLOR_SHARPNESS   0x00000010
     866#define DDCOLOR_GAMMA       0x00000020
     867#define DDCOLOR_COLORENABLE 0x00000040
    687868
    688869typedef struct {
    689         DWORD   dwSize;
    690         DWORD   dwFlags;
    691         LONG    lBrightness;
    692         LONG    lContrast;
    693         LONG    lHue;
    694         LONG    lSaturation;
    695         LONG    lSharpness;
    696         LONG    lGamma;
    697         LONG    lColorEnable;
    698         DWORD   dwReserved1;
     870  DWORD dwSize;
     871  DWORD dwFlags;
     872  LONG  lBrightness;
     873  LONG  lContrast;
     874  LONG  lHue;
     875  LONG  lSaturation;
     876  LONG  lSharpness;
     877  LONG  lGamma;
     878  LONG  lColorEnable;
     879  DWORD dwReserved1;
    699880} DDCOLORCONTROL,*LPDDCOLORCONTROL;
     881
     882typedef DWORD  (CALLBACK *LPCLIPPERCALLBACK)(LPDIRECTDRAWCLIPPER , HWND , DWORD , LPVOID );
     883#ifdef STREAMING
     884  typedef DWORD  (CALLBACK *LPSURFACESTREAMINGCALLBACK)(DWORD);
     885#endif
     886
    700887
    701888typedef BOOL (CALLBACK * LPDDENUMCALLBACKA)(GUID *, LPSTR, LPSTR, LPVOID);
     
    705892typedef HRESULT (CALLBACK * LPDDENUMMODESCALLBACK)(LPDDSURFACEDESC, LPVOID);
    706893typedef HRESULT (CALLBACK * LPDDENUMSURFACESCALLBACK)(LPDIRECTDRAWSURFACE, LPDDSURFACEDESC, LPVOID);
     894typedef HRESULT (CALLBACK * LPDDENUMMODESCALLBACK2)(LPDDSURFACEDESC2, LPVOID);
     895typedef HRESULT (CALLBACK * LPDDENUMSURFACESCALLBACK2)(LPDIRECTDRAWSURFACE4, LPDDSURFACEDESC2, LPVOID);
    707896
    708897typedef BOOL (CALLBACK * LPDDENUMCALLBACKEXA)(GUID *, LPSTR, LPSTR, LPVOID, HMONITOR);
    709898typedef BOOL (CALLBACK * LPDDENUMCALLBACKEXW)(GUID *, LPWSTR, LPWSTR, LPVOID, HMONITOR);
     899
    710900DECL_WINELIB_TYPE_AW(LPDDENUMCALLBACKEX)
    711901
    712902HRESULT WINAPI DirectDrawEnumerateExA( LPDDENUMCALLBACKEXA lpCallback, LPVOID lpContext, DWORD dwFlags);
    713903HRESULT WINAPI DirectDrawEnumerateExW( LPDDENUMCALLBACKEXW lpCallback, LPVOID lpContext, DWORD dwFlags);
     904#ifndef SM_CMONITORS
     905  #define HMONITOR    HANDLE
     906#endif
    714907
    715908/* flags for DirectDrawEnumerateEx */
    716 #define DDENUM_ATTACHEDSECONDARYDEVICES 0x00000001
    717 #define DDENUM_DETACHEDSECONDARYDEVICES 0x00000002
    718 #define DDENUM_NONDISPLAYDEVICES        0x00000004
     909#define DDENUM_ATTACHEDSECONDARYDEVICES 0x00000001
     910#define DDENUM_DETACHEDSECONDARYDEVICES 0x00000002
     911#define DDENUM_NONDISPLAYDEVICES        0x00000004
     912
     913#define DDCREATE_HARDWAREONLY     0x00000001l
     914#define DDCREATE_EMULATIONONLY    0x00000002l
    719915
    720916typedef struct _DDBLTFX
    721917{
    722     DWORD       dwSize;                         /* size of structure */
    723     DWORD       dwDDFX;                         /* FX operations */
    724     DWORD       dwROP;                          /* Win32 raster operations */
    725     DWORD       dwDDROP;                        /* Raster operations new for DirectDraw */
    726     DWORD       dwRotationAngle;                /* Rotation angle for blt */
    727     DWORD       dwZBufferOpCode;                /* ZBuffer compares */
    728     DWORD       dwZBufferLow;                   /* Low limit of Z buffer */
    729     DWORD       dwZBufferHigh;                  /* High limit of Z buffer */
    730     DWORD       dwZBufferBaseDest;              /* Destination base value */
    731     DWORD       dwZDestConstBitDepth;           /* Bit depth used to specify Z constant for destination */
    732     union
    733     {
    734         DWORD   dwZDestConst;                   /* Constant to use as Z buffer for dest */
    735         LPDIRECTDRAWSURFACE lpDDSZBufferDest;   /* Surface to use as Z buffer for dest */
    736     } x;
    737     DWORD       dwZSrcConstBitDepth;            /* Bit depth used to specify Z constant for source */
    738     union
    739     {
    740         DWORD   dwZSrcConst;                    /* Constant to use as Z buffer for src */
    741         LPDIRECTDRAWSURFACE lpDDSZBufferSrc;    /* Surface to use as Z buffer for src */
    742     } y;
    743     DWORD       dwAlphaEdgeBlendBitDepth;       /* Bit depth used to specify constant for alpha edge blend */
    744     DWORD       dwAlphaEdgeBlend;               /* Alpha for edge blending */
    745     DWORD       dwReserved;
    746     DWORD       dwAlphaDestConstBitDepth;       /* Bit depth used to specify alpha constant for destination */
    747     union
    748     {
    749         DWORD   dwAlphaDestConst;               /* Constant to use as Alpha Channel */
    750         LPDIRECTDRAWSURFACE lpDDSAlphaDest;     /* Surface to use as Alpha Channel */
    751     } z;
    752     DWORD       dwAlphaSrcConstBitDepth;        /* Bit depth used to specify alpha constant for source */
    753     union
    754     {
    755         DWORD   dwAlphaSrcConst;                /* Constant to use as Alpha Channel */
    756         LPDIRECTDRAWSURFACE lpDDSAlphaSrc;      /* Surface to use as Alpha Channel */
    757     } a;
    758     union
    759     {
    760         DWORD   dwFillColor;                    /* color in RGB or Palettized */
    761         DWORD   dwFillDepth;                    /* depth value for z-buffer */
    762         DWORD   dwFillPixel;                    /* pixel val for RGBA or RGBZ */
    763         LPDIRECTDRAWSURFACE lpDDSPattern;       /* Surface to use as pattern */
    764     } b;
    765     DDCOLORKEY  ddckDestColorkey;               /* DestColorkey override */
    766     DDCOLORKEY  ddckSrcColorkey;                /* SrcColorkey override */
     918  DWORD       dwSize;                         /* size of structure */
     919  DWORD       dwDDFX;                         /* FX operations */
     920  DWORD       dwROP;                          /* Win32 raster operations */
     921  DWORD       dwDDROP;                        /* Raster operations new for DirectDraw */
     922  DWORD       dwRotationAngle;                /* Rotation angle for blt */
     923  DWORD       dwZBufferOpCode;                /* ZBuffer compares */
     924  DWORD       dwZBufferLow;                   /* Low limit of Z buffer */
     925  DWORD       dwZBufferHigh;                  /* High limit of Z buffer */
     926  DWORD       dwZBufferBaseDest;              /* Destination base value */
     927  DWORD       dwZDestConstBitDepth;           /* Bit depth used to specify Z constant for destination */
     928  union
     929  {
     930    DWORD               dwZDestConst;       /* Constant to use as Z buffer for dest */
     931    LPDIRECTDRAWSURFACE lpDDSZBufferDest;   /* Surface to use as Z buffer for dest */
     932  };
     933  DWORD       dwZSrcConstBitDepth;          /* Bit depth used to specify Z constant for source */
     934  union
     935  {
     936    DWORD               dwZSrcConst;        /* Constant to use as Z buffer for src */
     937    LPDIRECTDRAWSURFACE lpDDSZBufferSrc;    /* Surface to use as Z buffer for src */
     938  };
     939  DWORD       dwAlphaEdgeBlendBitDepth;     /* Bit depth used to specify constant for alpha edge blend */
     940  DWORD       dwAlphaEdgeBlend;             /* Alpha for edge blending */
     941  DWORD       dwReserved;
     942  DWORD       dwAlphaDestConstBitDepth;     /* Bit depth used to specify alpha constant for destination */
     943  union
     944  {
     945    DWORD   dwAlphaDestConst;               /* Constant to use as Alpha Channel */
     946    LPDIRECTDRAWSURFACE lpDDSAlphaDest;     /* Surface to use as Alpha Channel */
     947  };
     948  DWORD       dwAlphaSrcConstBitDepth;      /* Bit depth used to specify alpha constant for source */
     949  union
     950  {
     951    DWORD   dwAlphaSrcConst;                /* Constant to use as Alpha Channel */
     952    LPDIRECTDRAWSURFACE lpDDSAlphaSrc;      /* Surface to use as Alpha Channel */
     953  };
     954  union
     955  {
     956    DWORD   dwFillColor;                    /* color in RGB or Palettized */
     957    DWORD   dwFillDepth;                    /* depth value for z-buffer */
     958    DWORD   dwFillPixel;                    /* pixel val for RGBA or RGBZ */
     959    LPDIRECTDRAWSURFACE lpDDSPattern;       /* Surface to use as pattern */
     960  };
     961  DDCOLORKEY  ddckDestColorkey;             /* DestColorkey override */
     962  DDCOLORKEY  ddckSrcColorkey;              /* SrcColorkey override */
    767963} DDBLTFX,*LPDDBLTFX;
    768964
    769965/* dwDDFX */
    770966/* arithmetic stretching along y axis */
    771 #define DDBLTFX_ARITHSTRETCHY                   0x00000001
     967#define DDBLTFX_ARITHSTRETCHY     0x00000001
    772968/* mirror on y axis */
    773 #define DDBLTFX_MIRRORLEFTRIGHT                 0x00000002
     969#define DDBLTFX_MIRRORLEFTRIGHT   0x00000002
    774970/* mirror on x axis */
    775 #define DDBLTFX_MIRRORUPDOWN                    0x00000004
     971#define DDBLTFX_MIRRORUPDOWN      0x00000004
    776972/* do not tear */
    777 #define DDBLTFX_NOTEARING                       0x00000008
     973#define DDBLTFX_NOTEARING         0x00000008
    778974/* 180 degrees clockwise rotation */
    779 #define DDBLTFX_ROTATE180                       0x00000010
     975#define DDBLTFX_ROTATE180         0x00000010
    780976/* 270 degrees clockwise rotation */
    781 #define DDBLTFX_ROTATE270                       0x00000020
     977#define DDBLTFX_ROTATE270         0x00000020
    782978/* 90 degrees clockwise rotation */
    783 #define DDBLTFX_ROTATE90                        0x00000040
     979#define DDBLTFX_ROTATE90          0x00000040
    784980/* dwZBufferLow and dwZBufferHigh specify limits to the copied Z values */
    785 #define DDBLTFX_ZBUFFERRANGE                    0x00000080
     981#define DDBLTFX_ZBUFFERRANGE      0x00000080
    786982/* add dwZBufferBaseDest to every source z value before compare */
    787 #define DDBLTFX_ZBUFFERBASEDEST                 0x00000100
     983#define DDBLTFX_ZBUFFERBASEDEST   0x00000100
    788984
    789985typedef struct _DDOVERLAYFX
    790986{
    791     DWORD       dwSize;                         /* size of structure */
    792     DWORD       dwAlphaEdgeBlendBitDepth;       /* Bit depth used to specify constant for alpha edge blend */
    793     DWORD       dwAlphaEdgeBlend;               /* Constant to use as alpha for edge blend */
    794     DWORD       dwReserved;
    795     DWORD       dwAlphaDestConstBitDepth;       /* Bit depth used to specify alpha constant for destination */
    796     union
    797     {
    798         DWORD   dwAlphaDestConst;               /* Constant to use as alpha channel for dest */
    799         LPDIRECTDRAWSURFACE lpDDSAlphaDest;     /* Surface to use as alpha channel for dest */
    800     } x;
    801     DWORD       dwAlphaSrcConstBitDepth;        /* Bit depth used to specify alpha constant for source */
    802     union
    803     {
    804         DWORD   dwAlphaSrcConst;                /* Constant to use as alpha channel for src */
    805         LPDIRECTDRAWSURFACE lpDDSAlphaSrc;      /* Surface to use as alpha channel for src */
    806     } y;
    807     DDCOLORKEY  dckDestColorkey;                /* DestColorkey override */
    808     DDCOLORKEY  dckSrcColorkey;                 /* DestColorkey override */
    809     DWORD       dwDDFX;                         /* Overlay FX */
    810     DWORD       dwFlags;                        /* flags */
     987  DWORD       dwSize;                         /* size of structure */
     988  DWORD       dwAlphaEdgeBlendBitDepth;       /* Bit depth used to specify constant for alpha edge blend */
     989  DWORD       dwAlphaEdgeBlend;               /* Constant to use as alpha for edge blend */
     990  DWORD       dwReserved;
     991  DWORD       dwAlphaDestConstBitDepth;       /* Bit depth used to specify alpha constant for destination */
     992  union
     993  {
     994    DWORD   dwAlphaDestConst;               /* Constant to use as alpha channel for dest */
     995    LPDIRECTDRAWSURFACE lpDDSAlphaDest;     /* Surface to use as alpha channel for dest */
     996  };
     997  DWORD       dwAlphaSrcConstBitDepth;        /* Bit depth used to specify alpha constant for source */
     998  union
     999  {
     1000    DWORD   dwAlphaSrcConst;                /* Constant to use as alpha channel for src */
     1001    LPDIRECTDRAWSURFACE lpDDSAlphaSrc;      /* Surface to use as alpha channel for src */
     1002  };
     1003  DDCOLORKEY  dckDestColorkey;                /* DestColorkey override */
     1004  DDCOLORKEY  dckSrcColorkey;                 /* DestColorkey override */
     1005  DWORD       dwDDFX;                         /* Overlay FX */
     1006  DWORD       dwFlags;                        /* flags */
    8111007} DDOVERLAYFX,*LPDDOVERLAYFX;
     1008
     1009
     1010//
     1011// DDGAMMARAMP
     1012//
     1013
     1014typedef struct _DDGAMMARAMP
     1015{
     1016  WORD  red[256];
     1017  WORD  green[256];
     1018  WORD  blue[256];
     1019} DDGAMMARAMP,*LPDDGAMMARAMP;
    8121020
    8131021typedef struct _DDBLTBATCH
    8141022{
    815     LPRECT              lprDest;
    816     LPDIRECTDRAWSURFACE lpDDSSrc;
    817     LPRECT              lprSrc;
    818     DWORD               dwFlags;
    819     LPDDBLTFX           lpDDBltFx;
     1023  LPRECT              lprDest;
     1024  LPDIRECTDRAWSURFACE lpDDSSrc;
     1025  LPRECT              lprSrc;
     1026  DWORD               dwFlags;
     1027  LPDDBLTFX           lpDDBltFx;
    8201028} DDBLTBATCH,*LPDDBLTBATCH;
    8211029
    8221030#define MAX_DDDEVICEID_STRING          512
    8231031
    824 typedef struct tagDDDEVICEIDENTIFIER {
     1032typedef struct tagDDDEVICEIDENTIFIER
     1033{
    8251034  char    szDriver[MAX_DDDEVICEID_STRING];
    8261035  char    szDescription[MAX_DDDEVICEID_STRING];
     
    8311040  DWORD   dwRevision;
    8321041  GUID    guidDeviceIdentifier;
    833 } DDDEVICEIDENTIFIER, * LPDDDEVICEIDENTIFIER;
    834 
     1042} DDDEVICEIDENTIFIER, *LPDDDEVICEIDENTIFIER;
     1043
     1044#define DDGDI_GETHOSTIDENTIFIER         0x00000001L
    8351045
    8361046/*****************************************************************************
     
    8491059#undef ICOM_INTERFACE
    8501060
     1061
    8511062#ifdef ICOM_CINTERFACE
    852     /*** IUnknown methods ***/
     1063    // IUnknown methods
    8531064#define IDirectDrawPalette_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
    8541065#define IDirectDrawPalette_AddRef(p)             ICOM_CALL (AddRef,p)
    8551066#define IDirectDrawPalette_Release(p)            ICOM_CALL (Release,p)
    856     /*** IDirectDrawPalette methods ***/
     1067    // IDirectDrawPalette methods
    8571068#define IDirectDrawPalette_GetCaps(p,a)          ICOM_CALL1(GetCaps,p,a)
    8581069#define IDirectDrawPalette_GetEntries(p,a,b,c,d) ICOM_CALL4(GetEntries,p,a,b,c,d)
     
    8971108 * IDirectDraw interface
    8981109 */
    899 #define ICOM_INTERFACE IDirectDraw
     1110#define ICOM_INTERFACE VOID
     1111//#define ICOM_INTERFACE IDirectDraw
    9001112#define IDirectDraw_METHODS \
    9011113    ICOM_METHOD (HRESULT,Compact) \
     
    9171129    ICOM_METHOD (HRESULT,RestoreDisplayMode) \
    9181130    ICOM_METHOD2(HRESULT,SetCooperativeLevel,    HWND,hWnd, DWORD,dwFlags) \
    919     ICOM_METHOD3(HRESULT,SetDisplayMode,         DWORD,, DWORD,, DWORD,) \
     1131    ICOM_METHOD3(HRESULT,SetDisplayMode,         DWORD,dwWidth, DWORD,dwHeight, DWORD,dwBPP) \
    9201132    ICOM_METHOD2(HRESULT,WaitForVerticalBlank,   DWORD,dwFlags, HANDLE,hEvent)
    9211133#define IDirectDraw_IMETHODS \
     
    9231135    IDirectDraw_METHODS
    9241136ICOM_DEFINE(IDirectDraw,IUnknown)
    925 #undef ICOM_INTERFACE
     1137//#undef ICOM_INTERFACE
     1138
    9261139
    9271140#ifdef ICOM_CINTERFACE
    928     /*** IUnknown methods ***/
    929 #define IDirectDraw_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
    930 #define IDirectDraw_AddRef(p)             ICOM_CALL (AddRef,p)
    931 #define IDirectDraw_Release(p)            ICOM_CALL (Release,p)
    932     /*** IDirectDraw methods ***/
    933 #define IDirectDraw_Compact(p)                  ICOM_CALL (Compact,p)
    934 #define IDirectDraw_CreateClipper(p,a,b,c)      ICOM_CALL3(CreateClipper,p,a,b,c)
    935 #define IDirectDraw_CreatePalette(p,a,b,c,d)    ICOM_CALL4(CreatePalette,p,a,b,c,d)
    936 #define IDirectDraw_CreateSurface(p,a,b,c)      ICOM_CALL3(CreateSurface,p,a,b,c)
    937 #define IDirectDraw_DuplicateSurface(p,a,b)     ICOM_CALL2(DuplicateSurface,p,a,b)
    938 #define IDirectDraw_EnumDisplayModes(p,a,b,c,d) ICOM_CALL4(EnumDisplayModes,p,a,b,c,d)
    939 #define IDirectDraw_EnumSurfaces(p,a,b,c,d)     ICOM_CALL4(EnumSurfaces,p,a,b,c,d)
    940 #define IDirectDraw_FlipToGDISurface(p)         ICOM_CALL (FlipToGDISurface,p)
    941 #define IDirectDraw_GetCaps(p,a,b)              ICOM_CALL2(GetCaps,p,a,b)
    942 #define IDirectDraw_GetDisplayMode(p,a)         ICOM_CALL1(GetDisplayMode,p,a)
    943 #define IDirectDraw_GetFourCCCodes(p,a,b)       ICOM_CALL2(GetFourCCCodes,p,a,b)
    944 #define IDirectDraw_GetGDISurface(p,a)          ICOM_CALL1(GetGDISurface,p,a)
    945 #define IDirectDraw_GetMonitorFrequency(p,a)    ICOM_CALL1(GetMonitorFrequency,p,a)
    946 #define IDirectDraw_GetScanLine(p,a)            ICOM_CALL1(GetScanLine,p,a)
    947 #define IDirectDraw_GetVerticalBlankStatus(p,a) ICOM_CALL1(GetVerticalBlankStatus,p,a)
    948 #define IDirectDraw_Initialize(p,a)             ICOM_CALL1(Initialize,p,a)
    949 #define IDirectDraw_RestoreDisplayMode(p)       ICOM_CALL (RestoreDisplayMode,p)
    950 #define IDirectDraw_SetCooperativeLevel(p,a,b)  ICOM_CALL2(SetCooperativeLevel,p,a,b)
    951 #define IDirectDraw_SetDisplayMode(p,a,b,c)     ICOM_CALL3(SetDisplayMode,p,a,b,c)
    952 #define IDirectDraw_WaitForVerticalBlank(p,a,b) ICOM_CALL2(WaitForVerticalBlank,p,a,b)
     1141      /*** IUnknown methods ***/
     1142  #define IDirectDraw_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
     1143  #define IDirectDraw_AddRef(p)             ICOM_CALL (AddRef,p)
     1144  #define IDirectDraw_Release(p)            ICOM_CALL (Release,p)
     1145      /*** IDirectDraw methods ***/
     1146  #define IDirectDraw_Compact(p)                  ICOM_CALL (Compact,p)
     1147  #define IDirectDraw_CreateClipper(p,a,b,c)      ICOM_CALL3(CreateClipper,p,a,b,c)
     1148  #define IDirectDraw_CreatePalette(p,a,b,c,d)    ICOM_CALL4(CreatePalette,p,a,b,c,d)
     1149  #define IDirectDraw_CreateSurface(p,a,b,c)      ICOM_CALL3(CreateSurface,p,a,b,c)
     1150  #define IDirectDraw_DuplicateSurface(p,a,b)     ICOM_CALL2(DuplicateSurface,p,a,b)
     1151  #define IDirectDraw_EnumDisplayModes(p,a,b,c,d) ICOM_CALL4(EnumDisplayModes,p,a,b,c,d)
     1152  #define IDirectDraw_EnumSurfaces(p,a,b,c,d)     ICOM_CALL4(EnumSurfaces,p,a,b,c,d)
     1153  #define IDirectDraw_FlipToGDISurface(p)         ICOM_CALL (FlipToGDISurface,p)
     1154  #define IDirectDraw_GetCaps(p,a,b)              ICOM_CALL2(GetCaps,p,a,b)
     1155  #define IDirectDraw_GetDisplayMode(p,a)         ICOM_CALL1(GetDisplayMode,p,a)
     1156  #define IDirectDraw_GetFourCCCodes(p,a,b)       ICOM_CALL2(GetFourCCCodes,p,a,b)
     1157  #define IDirectDraw_GetGDISurface(p,a)          ICOM_CALL1(GetGDISurface,p,a)
     1158  #define IDirectDraw_GetMonitorFrequency(p,a)    ICOM_CALL1(GetMonitorFrequency,p,a)
     1159  #define IDirectDraw_GetScanLine(p,a)            ICOM_CALL1(GetScanLine,p,a)
     1160  #define IDirectDraw_GetVerticalBlankStatus(p,a) ICOM_CALL1(GetVerticalBlankStatus,p,a)
     1161  #define IDirectDraw_Initialize(p,a)             ICOM_CALL1(Initialize,p,a)
     1162  #define IDirectDraw_RestoreDisplayMode(p)       ICOM_CALL (RestoreDisplayMode,p)
     1163  #define IDirectDraw_SetCooperativeLevel(p,a,b)  ICOM_CALL2(SetCooperativeLevel,p,a,b)
     1164  #define IDirectDraw_SetDisplayMode(p,a,b,c)     ICOM_CALL3(SetDisplayMode,p,a,b,c)
     1165  #define IDirectDraw_WaitForVerticalBlank(p,a,b) ICOM_CALL2(WaitForVerticalBlank,p,a,b)
    9531166#endif
    9541167
    9551168
    9561169/* flags for Lock() */
    957 #define DDLOCK_SURFACEMEMORYPTR 0x00000000
    958 #define DDLOCK_WAIT             0x00000001
    959 #define DDLOCK_EVENT            0x00000002
    960 #define DDLOCK_READONLY         0x00000010
    961 #define DDLOCK_WRITEONLY        0x00000020
    962 #define DDLOCK_NOSYSLOCK        0x00000800
     1170#define DDLOCK_SURFACEMEMORYPTR 0x00000000
     1171#define DDLOCK_WAIT             0x00000001
     1172#define DDLOCK_EVENT            0x00000002
     1173#define DDLOCK_READONLY         0x00000010
     1174#define DDLOCK_WRITEONLY        0x00000020
     1175#define DDLOCK_NOSYSLOCK        0x00000800
    9631176
    9641177
     
    9661179 * IDirectDraw2 interface
    9671180 */
    968 /* Note: IDirectDraw2 cannot derive from IDirectDraw because the number of 
     1181/* Note: IDirectDraw2 cannot derive from IDirectDraw because the number of
    9691182 * arguments of SetDisplayMode has changed !
    9701183 */
    971 #define ICOM_INTERFACE IDirectDraw2
     1184//#define ICOM_INTERFACE IDirectDraw2
    9721185#define IDirectDraw2_METHODS \
    9731186    ICOM_METHOD (HRESULT,Compact) \
     
    9971210    IDirectDraw2_METHODS
    9981211ICOM_DEFINE(IDirectDraw2,IUnknown)
    999 #undef ICOM_INTERFACE
     1212//#undef ICOM_INTERFACE
    10001213
    10011214#ifdef ICOM_CINTERFACE
    1002     /*** IUnknown methods ***/
    1003 #define IDirectDraw2_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
    1004 #define IDirectDraw2_AddRef(p)             ICOM_CALL (AddRef,p)
    1005 #define IDirectDraw2_Release(p)            ICOM_CALL (Release,p)
    1006     /*** IDirectDraw methods ***/
    1007 #define IDirectDraw2_Compact(p)                  ICOM_CALL (Compact,p)
    1008 #define IDirectDraw2_CreateClipper(p,a,b,c)      ICOM_CALL3(CreateClipper,p,a,b,c)
    1009 #define IDirectDraw2_CreatePalette(p,a,b,c,d)    ICOM_CALL4(CreatePalette,p,a,b,c,d)
    1010 #define IDirectDraw2_CreateSurface(p,a,b,c)      ICOM_CALL3(CreateSurface,p,a,b,c)
    1011 #define IDirectDraw2_DuplicateSurface(p,a,b)     ICOM_CALL2(DuplicateSurface,p,a,b)
    1012 #define IDirectDraw2_EnumDisplayModes(p,a,b,c,d) ICOM_CALL4(EnumDisplayModes,p,a,b,c,d)
    1013 #define IDirectDraw2_EnumSurfaces(p,a,b,c,d)     ICOM_CALL4(EnumSurfaces,p,a,b,c,d)
    1014 #define IDirectDraw2_FlipToGDISurface(p)         ICOM_CALL (FlipToGDISurface,p)
    1015 #define IDirectDraw2_GetCaps(p,a,b)              ICOM_CALL2(GetCaps,p,a,b)
    1016 #define IDirectDraw2_GetDisplayMode(p,a)         ICOM_CALL1(GetDisplayMode,p,a)
    1017 #define IDirectDraw2_GetFourCCCodes(p,a,b)       ICOM_CALL2(GetFourCCCodes,p,a,b)
    1018 #define IDirectDraw2_GetGDISurface(p,a)          ICOM_CALL1(GetGDISurface,p,a)
    1019 #define IDirectDraw2_GetMonitorFrequency(p,a)    ICOM_CALL1(GetMonitorFrequency,p,a)
    1020 #define IDirectDraw2_GetScanLine(p,a)            ICOM_CALL1(GetScanLine,p,a)
    1021 #define IDirectDraw2_GetVerticalBlankStatus(p,a) ICOM_CALL1(GetVerticalBlankStatus,p,a)
    1022 #define IDirectDraw2_Initialize(p,a)             ICOM_CALL1(Initialize,p,a)
    1023 #define IDirectDraw2_RestoreDisplayMode(p)       ICOM_CALL (RestoreDisplayMode,p)
    1024 #define IDirectDraw2_SetCooperativeLevel(p,a,b)  ICOM_CALL2(SetCooperativeLevel,p,a,b)
    1025 #define IDirectDraw2_SetDisplayMode(p,a,b,c,d,e) ICOM_CALL5(SetDisplayMode,p,a,b,c,d,e)
    1026 #define IDirectDraw2_WaitForVerticalBlank(p,a,b) ICOM_CALL2(WaitForVerticalBlank,p,a,b)
    1027 /*** IDirectDraw2 methods ***/
    1028 #define IDirectDraw2_GetAvailableVidMem(p,a,b,c) ICOM_CALL3(GetAvailableVidMem,p,a,b,c)
     1215      /*** IUnknown methods ***/
     1216  #define IDirectDraw2_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
     1217  #define IDirectDraw2_AddRef(p)             ICOM_CALL (AddRef,p)
     1218  #define IDirectDraw2_Release(p)            ICOM_CALL (Release,p)
     1219      /*** IDirectDraw methods ***/
     1220  #define IDirectDraw2_Compact(p)                  ICOM_CALL (Compact,p)
     1221  #define IDirectDraw2_CreateClipper(p,a,b,c)      ICOM_CALL3(CreateClipper,p,a,b,c)
     1222  #define IDirectDraw2_CreatePalette(p,a,b,c,d)    ICOM_CALL4(CreatePalette,p,a,b,c,d)
     1223  #define IDirectDraw2_CreateSurface(p,a,b,c)      ICOM_CALL3(CreateSurface,p,a,b,c)
     1224  #define IDirectDraw2_DuplicateSurface(p,a,b)     ICOM_CALL2(DuplicateSurface,p,a,b)
     1225  #define IDirectDraw2_EnumDisplayModes(p,a,b,c,d) ICOM_CALL4(EnumDisplayModes,p,a,b,c,d)
     1226  #define IDirectDraw2_EnumSurfaces(p,a,b,c,d)     ICOM_CALL4(EnumSurfaces,p,a,b,c,d)
     1227  #define IDirectDraw2_FlipToGDISurface(p)         ICOM_CALL (FlipToGDISurface,p)
     1228  #define IDirectDraw2_GetCaps(p,a,b)              ICOM_CALL2(GetCaps,p,a,b)
     1229  #define IDirectDraw2_GetDisplayMode(p,a)         ICOM_CALL1(GetDisplayMode,p,a)
     1230  #define IDirectDraw2_GetFourCCCodes(p,a,b)       ICOM_CALL2(GetFourCCCodes,p,a,b)
     1231  #define IDirectDraw2_GetGDISurface(p,a)          ICOM_CALL1(GetGDISurface,p,a)
     1232  #define IDirectDraw2_GetMonitorFrequency(p,a)    ICOM_CALL1(GetMonitorFrequency,p,a)
     1233  #define IDirectDraw2_GetScanLine(p,a)            ICOM_CALL1(GetScanLine,p,a)
     1234  #define IDirectDraw2_GetVerticalBlankStatus(p,a) ICOM_CALL1(GetVerticalBlankStatus,p,a)
     1235  #define IDirectDraw2_Initialize(p,a)             ICOM_CALL1(Initialize,p,a)
     1236  #define IDirectDraw2_RestoreDisplayMode(p)       ICOM_CALL (RestoreDisplayMode,p)
     1237  #define IDirectDraw2_SetCooperativeLevel(p,a,b)  ICOM_CALL2(SetCooperativeLevel,p,a,b)
     1238  #define IDirectDraw2_SetDisplayMode(p,a,b,c,d,e) ICOM_CALL5(SetDisplayMode,p,a,b,c,d,e)
     1239  #define IDirectDraw2_WaitForVerticalBlank(p,a,b) ICOM_CALL2(WaitForVerticalBlank,p,a,b)
     1240  /*** IDirectDraw2 methods ***/
     1241  #define IDirectDraw2_GetAvailableVidMem(p,a,b,c) ICOM_CALL3(GetAvailableVidMem,p,a,b,c)
    10291242#endif
    10301243
     
    10331246 * IDirectDraw4 interface
    10341247 */
    1035 #define ICOM_INTERFACE IDirectDraw4
     1248//#define ICOM_INTERFACE IDirectDraw4
    10361249#define IDirectDraw4_METHODS \
    1037     ICOM_METHOD2(HRESULT,GetSurfaceFromDC,    HDC,, LPDIRECTDRAWSURFACE*,) \
     1250    ICOM_METHOD (HRESULT,Compact) \
     1251    ICOM_METHOD3(HRESULT,CreateClipper,          DWORD,dwFlags, LPDIRECTDRAWCLIPPER*,lplpDDClipper, IUnknown*,pUnkOuter) \
     1252    ICOM_METHOD4(HRESULT,CreatePalette,          DWORD,dwFlags, LPPALETTEENTRY,lpColorTable, LPDIRECTDRAWPALETTE*,lplpDDPalette, IUnknown*,pUnkOuter) \
     1253    ICOM_METHOD3(HRESULT,CreateSurface,          LPDDSURFACEDESC2,lpDDSurfaceDesc, LPDIRECTDRAWSURFACE4*,lplpDDSurface, IUnknown*,pUnkOuter) \
     1254    ICOM_METHOD2(HRESULT,DuplicateSurface,       LPDIRECTDRAWSURFACE4,lpDDSurface, LPDIRECTDRAWSURFACE4*,lplpDupDDSurface) \
     1255    ICOM_METHOD4(HRESULT,EnumDisplayModes,       DWORD,dwFlags, LPDDSURFACEDESC2,lpDDSurfaceDesc, LPVOID,lpContext, LPDDENUMMODESCALLBACK2,lpEnumModesCallback) \
     1256    ICOM_METHOD4(HRESULT,EnumSurfaces,           DWORD,dwFlags, LPDDSURFACEDESC2,lpDDSD, LPVOID,lpContext, LPDDENUMSURFACESCALLBACK2,lpEnumSurfacesCallback) \
     1257    ICOM_METHOD (HRESULT,FlipToGDISurface) \
     1258    ICOM_METHOD2(HRESULT,GetCaps,                LPDDCAPS,lpDDDriverCaps, LPDDCAPS,lpDDHELCaps) \
     1259    ICOM_METHOD1(HRESULT,GetDisplayMode,         LPDDSURFACEDESC2,lpDDSurfaceDesc) \
     1260    ICOM_METHOD2(HRESULT,GetFourCCCodes,         LPDWORD,lpNumCodes, LPDWORD,lpCodes) \
     1261    ICOM_METHOD1(HRESULT,GetGDISurface,          LPDIRECTDRAWSURFACE4*,lplpGDIDDSurface) \
     1262    ICOM_METHOD1(HRESULT,GetMonitorFrequency,    LPDWORD,lpdwFrequency) \
     1263    ICOM_METHOD1(HRESULT,GetScanLine,            LPDWORD,lpdwScanLine) \
     1264    ICOM_METHOD1(HRESULT,GetVerticalBlankStatus, BOOL*,lpbIsInVB) \
     1265    ICOM_METHOD1(HRESULT,Initialize,             GUID*,lpGUID) \
     1266    ICOM_METHOD (HRESULT,RestoreDisplayMode) \
     1267    ICOM_METHOD2(HRESULT,SetCooperativeLevel,    HWND,hWnd, DWORD,dwFlags) \
     1268    ICOM_METHOD5(HRESULT,SetDisplayMode,         DWORD,dwWidth, DWORD,dwHeight, DWORD,dwBPP, DWORD,dwRefreshRate, DWORD,dwFlags) \
     1269    ICOM_METHOD2(HRESULT,WaitForVerticalBlank,   DWORD,dwFlags, HANDLE,hEvent) \
     1270    /* added in v2 */ \
     1271    ICOM_METHOD3(HRESULT,GetAvailableVidMem, LPDDSCAPS2,lpDDCaps, LPDWORD,lpdwTotal, LPDWORD,lpdwFree)\
     1272    /* Added with V */ \
     1273    ICOM_METHOD2(HRESULT,GetSurfaceFromDC,    HDC,, LPDIRECTDRAWSURFACE4*,) \
    10381274    ICOM_METHOD (HRESULT,RestoreAllSurfaces) \
    10391275    ICOM_METHOD (HRESULT,TestCooperativeLevel) \
    10401276    ICOM_METHOD2(HRESULT,GetDeviceIdentifier, LPDDDEVICEIDENTIFIER,, DWORD,)
    10411277#define IDirectDraw4_IMETHODS \
    1042     IDirectDraw2_IMETHODS \
     1278    IUnknown_IMETHODS \
    10431279    IDirectDraw4_METHODS
    1044 ICOM_DEFINE(IDirectDraw4,IDirectDraw2)
     1280
     1281ICOM_DEFINE(IDirectDraw4,IUnknown)
    10451282#undef ICOM_INTERFACE
    10461283
    10471284#ifdef ICOM_CINTERFACE
    1048     /*** IUnknown methods ***/
    1049 #define IDirectDraw4_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
    1050 #define IDirectDraw4_AddRef(p)             ICOM_CALL (AddRef,p)
    1051 #define IDirectDraw4_Release(p)            ICOM_CALL (Release,p)
    1052     /*** IDirectDraw methods ***/
    1053 #define IDirectDraw4_Compact(p)                  ICOM_CALL (Compact,p)
    1054 #define IDirectDraw4_CreateClipper(p,a,b,c)      ICOM_CALL3(CreateClipper,p,a,b,c)
    1055 #define IDirectDraw4_CreatePalette(p,a,b,c,d)    ICOM_CALL4(CreatePalette,p,a,b,c,d)
    1056 #define IDirectDraw4_CreateSurface(p,a,b,c)      ICOM_CALL3(CreateSurface,p,a,b,c)
    1057 #define IDirectDraw4_DuplicateSurface(p,a,b)     ICOM_CALL2(DuplicateSurface,p,a,b)
    1058 #define IDirectDraw4_EnumDisplayModes(p,a,b,c,d) ICOM_CALL4(EnumDisplayModes,p,a,b,c,d)
    1059 #define IDirectDraw4_EnumSurfaces(p,a,b,c,d)     ICOM_CALL4(EnumSurfaces,p,a,b,c,d)
    1060 #define IDirectDraw4_FlipToGDISurface(p)         ICOM_CALL (FlipToGDISurface,p)
    1061 #define IDirectDraw4_GetCaps(p,a,b)              ICOM_CALL2(GetCaps,p,a,b)
    1062 #define IDirectDraw4_GetDisplayMode(p,a)         ICOM_CALL1(GetDisplayMode,p,a)
    1063 #define IDirectDraw4_GetFourCCCodes(p,a,b)       ICOM_CALL2(GetFourCCCodes,p,a,b)
    1064 #define IDirectDraw4_GetGDISurface(p,a)          ICOM_CALL1(GetGDISurface,p,a)
    1065 #define IDirectDraw4_GetMonitorFrequency(p,a)    ICOM_CALL1(GetMonitorFrequency,p,a)
    1066 #define IDirectDraw4_GetScanLine(p,a)            ICOM_CALL1(GetScanLine,p,a)
    1067 #define IDirectDraw4_GetVerticalBlankStatus(p,a) ICOM_CALL1(GetVerticalBlankStatus,p,a)
    1068 #define IDirectDraw4_Initialize(p,a)             ICOM_CALL1(Initialize,p,a)
    1069 #define IDirectDraw4_RestoreDisplayMode(p)       ICOM_CALL (RestoreDisplayMode,p)
    1070 #define IDirectDraw4_SetCooperativeLevel(p,a,b)  ICOM_CALL2(SetCooperativeLevel,p,a,b)
    1071 #define IDirectDraw4_SetDisplayMode(p,a,b,c)     ICOM_CALL3(SetDisplayMode,p,a,b,c)
    1072 #define IDirectDraw4_WaitForVerticalBlank(p,a,b) ICOM_CALL2(WaitForVerticalBlank,p,a,b)
    1073 /*** IDirectDraw2 methods ***/
    1074 #define IDirectDraw4_GetAvailableVidMem(p,a,b,c) ICOM_CALL3(GetAvailableVidMem,p,a,b,c)
    1075 /*** IDirectDraw4 methods ***/
    1076 #define IDirectDraw4_GetSurfaceFromDC(p,a,b)    ICOM_CALL2(GetSurfaceFromDC,p,a,b,c)
    1077 #define IDirectDraw4_RestoreAllSurfaces(pc)     ICOM_CALL (RestoreAllSurfaces,p)
    1078 #define IDirectDraw4_TestCooperativeLevel(p)    ICOM_CALL (TestCooperativeLevel,p)
    1079 #define IDirectDraw4_GetDeviceIdentifier(p,a,b) ICOM_CALL2(GetDeviceIdentifier,p,a,b)
     1285      /*** IUnknown methods ***/
     1286  #define IDirectDraw4_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
     1287  #define IDirectDraw4_AddRef(p)             ICOM_CALL (AddRef,p)
     1288  #define IDirectDraw4_Release(p)            ICOM_CALL (Release,p)
     1289      /*** IDirectDraw methods ***/
     1290  #define IDirectDraw4_Compact(p)                  ICOM_CALL (Compact,p)
     1291  #define IDirectDraw4_CreateClipper(p,a,b,c)      ICOM_CALL3(CreateClipper,p,a,b,c)
     1292  #define IDirectDraw4_CreatePalette(p,a,b,c,d)    ICOM_CALL4(CreatePalette,p,a,b,c,d)
     1293  #define IDirectDraw4_CreateSurface(p,a,b,c)      ICOM_CALL3(CreateSurface,p,a,b,c)
     1294  #define IDirectDraw4_DuplicateSurface(p,a,b)     ICOM_CALL2(DuplicateSurface,p,a,b)
     1295  #define IDirectDraw4_EnumDisplayModes(p,a,b,c,d) ICOM_CALL4(EnumDisplayModes,p,a,b,c,d)
     1296  #define IDirectDraw4_EnumSurfaces(p,a,b,c,d)     ICOM_CALL4(EnumSurfaces,p,a,b,c,d)
     1297  #define IDirectDraw4_FlipToGDISurface(p)         ICOM_CALL (FlipToGDISurface,p)
     1298  #define IDirectDraw4_GetCaps(p,a,b)              ICOM_CALL2(GetCaps,p,a,b)
     1299  #define IDirectDraw4_GetDisplayMode(p,a)         ICOM_CALL1(GetDisplayMode,p,a)
     1300  #define IDirectDraw4_GetFourCCCodes(p,a,b)       ICOM_CALL2(GetFourCCCodes,p,a,b)
     1301  #define IDirectDraw4_GetGDISurface(p,a)          ICOM_CALL1(GetGDISurface,p,a)
     1302  #define IDirectDraw4_GetMonitorFrequency(p,a)    ICOM_CALL1(GetMonitorFrequency,p,a)
     1303  #define IDirectDraw4_GetScanLine(p,a)            ICOM_CALL1(GetScanLine,p,a)
     1304  #define IDirectDraw4_GetVerticalBlankStatus(p,a) ICOM_CALL1(GetVerticalBlankStatus,p,a)
     1305  #define IDirectDraw4_Initialize(p,a)             ICOM_CALL1(Initialize,p,a)
     1306  #define IDirectDraw4_RestoreDisplayMode(p)       ICOM_CALL (RestoreDisplayMode,p)
     1307  #define IDirectDraw4_SetCooperativeLevel(p,a,b)  ICOM_CALL2(SetCooperativeLevel,p,a,b)
     1308  #define IDirectDraw4_SetDisplayMode(p,a,b,c)     ICOM_CALL3(SetDisplayMode,p,a,b,c)
     1309  #define IDirectDraw4_WaitForVerticalBlank(p,a,b) ICOM_CALL2(WaitForVerticalBlank,p,a,b)
     1310  /*** IDirectDraw2 methods ***/
     1311  #define IDirectDraw4_GetAvailableVidMem(p,a,b,c) ICOM_CALL3(GetAvailableVidMem,p,a,b,c)
     1312  /*** IDirectDraw4 methods ***/
     1313  #define IDirectDraw4_GetSurfaceFromDC(p,a,b)    ICOM_CALL2(GetSurfaceFromDC,p,a,b,c)
     1314  #define IDirectDraw4_RestoreAllSurfaces(pc)     ICOM_CALL (RestoreAllSurfaces,p)
     1315  #define IDirectDraw4_TestCooperativeLevel(p)    ICOM_CALL (TestCooperativeLevel,p)
     1316  #define IDirectDraw4_GetDeviceIdentifier(p,a,b) ICOM_CALL2(GetDeviceIdentifier,p,a,b)
    10801317#endif
    10811318
     
    10841321 * IDirectDrawSurface interface
    10851322 */
    1086 #define ICOM_INTERFACE IDirectDrawSurface
     1323//#define ICOM_INTERFACE IDirectDrawSurface
     1324#define ICOM_INTERFACE VOID
    10871325#define IDirectDrawSurface_METHODS \
    10881326    ICOM_METHOD1(HRESULT,AddAttachedSurface,    LPDIRECTDRAWSURFACE,lpDDSAttachedSurface) \
     
    11231361    IDirectDrawSurface_METHODS
    11241362ICOM_DEFINE(IDirectDrawSurface,IUnknown)
    1125 #undef ICOM_INTERFACE
     1363//#undef ICOM_INTERFACE
    11261364
    11271365#ifdef ICOM_CINTERFACE
    1128     /*** IUnknown methods ***/
    1129 #define IDirectDrawSurface_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
    1130 #define IDirectDrawSurface_AddRef(p)             ICOM_CALL (AddRef,p)
    1131 #define IDirectDrawSurface_Release(p)            ICOM_CALL (Release,p)
    1132     /*** IDirectDrawSurface methods ***/
    1133 #define IDirectDrawSurface_AddAttachedSurface(p,a)      ICOM_CALL1(AddAttachedSurface,p,a)
    1134 #define IDirectDrawSurface_AddOverlayDirtyRect(p,a)     ICOM_CALL1(AddOverlayDirtyRect,p,a)
    1135 #define IDirectDrawSurface_Blt(p,a,b,c,d,e)             ICOM_CALL5(Blt,p,a,b,c,d,e)
    1136 #define IDirectDrawSurface_BltBatch(p,a,b,c)            ICOM_CALL3(BltBatch,p,a,b,c)
    1137 #define IDirectDrawSurface_BltFast(p,a,b,c,d,e)         ICOM_CALL5(BltFast,p,a,b,c,d,e)
    1138 #define IDirectDrawSurface_DeleteAttachedSurface(p,a,b) ICOM_CALL2(DeleteAttachedSurface,p,a,b)
    1139 #define IDirectDrawSurface_EnumAttachedSurfaces(p,a,b)  ICOM_CALL2(EnumAttachedSurfaces,p,a,b)
    1140 #define IDirectDrawSurface_EnumOverlayZOrders(p,a,b,c)  ICOM_CALL3(EnumOverlayZOrders,p,a,b,c)
    1141 #define IDirectDrawSurface_Flip(p,a,b)                  ICOM_CALL2(Flip,p,a,b)
    1142 #define IDirectDrawSurface_GetAttachedSurface(p,a,b)    ICOM_CALL2(GetAttachedSurface,p,a,b)
    1143 #define IDirectDrawSurface_GetBltStatus(p,a)            ICOM_CALL1(GetBltStatus,p,a)
    1144 #define IDirectDrawSurface_GetCaps(p,a)                 ICOM_CALL1(GetCaps,p,a)
    1145 #define IDirectDrawSurface_GetClipper(p,a)              ICOM_CALL1(GetClipper,p,a)
    1146 #define IDirectDrawSurface_GetColorKey(p,a,b)           ICOM_CALL2(GetColorKey,p,a,b)
    1147 #define IDirectDrawSurface_GetDC(p,a)                   ICOM_CALL1(GetDC,p,a)
    1148 #define IDirectDrawSurface_GetFlipStatus(p,a)           ICOM_CALL1(GetFlipStatus,p,a)
    1149 #define IDirectDrawSurface_GetOverlayPosition(p,a,b)    ICOM_CALL2(GetOverlayPosition,p,a,b)
    1150 #define IDirectDrawSurface_GetPalette(p,a)              ICOM_CALL1(GetPalette,p,a)
    1151 #define IDirectDrawSurface_GetPixelFormat(p,a)          ICOM_CALL1(GetPixelFormat,p,a)
    1152 #define IDirectDrawSurface_GetSurfaceDesc(p,a)          ICOM_CALL1(GetSurfaceDesc,p,a)
    1153 #define IDirectDrawSurface_Initialize(p,a,b)            ICOM_CALL2(Initialize,p,a,b)
    1154 #define IDirectDrawSurface_IsLost(p)                    ICOM_CALL (IsLost,p)
    1155 #define IDirectDrawSurface_Lock(p,a,b,c,d)              ICOM_CALL4(Lock,p,a,b,c,d)
    1156 #define IDirectDrawSurface_ReleaseDC(p,a)               ICOM_CALL1(ReleaseDC,p,a)
    1157 #define IDirectDrawSurface_Restore(p,a,b)               ICOM_CALL (Restore,p,a,b)
    1158 #define IDirectDrawSurface_SetClipper(p,a,b)            ICOM_CALL1(SetClipper,p,a,b)
    1159 #define IDirectDrawSurface_SetColorKey(p,a,b)           ICOM_CALL2(SetColorKey,p,a,b)
    1160 #define IDirectDrawSurface_SetOverlayPosition(p,a,b)    ICOM_CALL2(SetOverlayPosition,p,a,b)
    1161 #define IDirectDrawSurface_SetPalette(p,a)              ICOM_CALL1(SetPalette,p,a)
    1162 #define IDirectDrawSurface_Unlock(p,a)                  ICOM_CALL1(Unlock,p,a)
    1163 #define IDirectDrawSurface_UpdateOverlay(p,a,b,c,d,e)   ICOM_CALL5(UpdateOverlay,p,a,b,c,d,e)
    1164 #define IDirectDrawSurface_UpdateOverlayDisplay(p,a)    ICOM_CALL1(UpdateOverlayDisplay,p,a)
    1165 #define IDirectDrawSurface_UpdateOverlayZOrder(p,a,b)   ICOM_CALL2(UpdateOverlayZOrder,p,a,b)
     1366      /*** IUnknown methods ***/
     1367  #define IDirectDrawSurface_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
     1368  #define IDirectDrawSurface_AddRef(p)             ICOM_CALL (AddRef,p)
     1369  #define IDirectDrawSurface_Release(p)            ICOM_CALL (Release,p)
     1370      /*** IDirectDrawSurface methods ***/
     1371  #define IDirectDrawSurface_AddAttachedSurface(p,a)      ICOM_CALL1(AddAttachedSurface,p,a)
     1372  #define IDirectDrawSurface_AddOverlayDirtyRect(p,a)     ICOM_CALL1(AddOverlayDirtyRect,p,a)
     1373  #define IDirectDrawSurface_Blt(p,a,b,c,d,e)             ICOM_CALL5(Blt,p,a,b,c,d,e)
     1374  #define IDirectDrawSurface_BltBatch(p,a,b,c)            ICOM_CALL3(BltBatch,p,a,b,c)
     1375  #define IDirectDrawSurface_BltFast(p,a,b,c,d,e)         ICOM_CALL5(BltFast,p,a,b,c,d,e)
     1376  #define IDirectDrawSurface_DeleteAttachedSurface(p,a,b) ICOM_CALL2(DeleteAttachedSurface,p,a,b)
     1377  #define IDirectDrawSurface_EnumAttachedSurfaces(p,a,b)  ICOM_CALL2(EnumAttachedSurfaces,p,a,b)
     1378  #define IDirectDrawSurface_EnumOverlayZOrders(p,a,b,c)  ICOM_CALL3(EnumOverlayZOrders,p,a,b,c)
     1379  #define IDirectDrawSurface_Flip(p,a,b)                  ICOM_CALL2(Flip,p,a,b)
     1380  #define IDirectDrawSurface_GetAttachedSurface(p,a,b)    ICOM_CALL2(GetAttachedSurface,p,a,b)
     1381  #define IDirectDrawSurface_GetBltStatus(p,a)            ICOM_CALL1(GetBltStatus,p,a)
     1382  #define IDirectDrawSurface_GetCaps(p,a)                 ICOM_CALL1(GetCaps,p,a)
     1383  #define IDirectDrawSurface_GetClipper(p,a)              ICOM_CALL1(GetClipper,p,a)
     1384  #define IDirectDrawSurface_GetColorKey(p,a,b)           ICOM_CALL2(GetColorKey,p,a,b)
     1385  #define IDirectDrawSurface_GetDC(p,a)                   ICOM_CALL1(GetDC,p,a)
     1386  #define IDirectDrawSurface_GetFlipStatus(p,a)           ICOM_CALL1(GetFlipStatus,p,a)
     1387  #define IDirectDrawSurface_GetOverlayPosition(p,a,b)    ICOM_CALL2(GetOverlayPosition,p,a,b)
     1388  #define IDirectDrawSurface_GetPalette(p,a)              ICOM_CALL1(GetPalette,p,a)
     1389  #define IDirectDrawSurface_GetPixelFormat(p,a)          ICOM_CALL1(GetPixelFormat,p,a)
     1390  #define IDirectDrawSurface_GetSurfaceDesc(p,a)          ICOM_CALL1(GetSurfaceDesc,p,a)
     1391  #define IDirectDrawSurface_Initialize(p,a,b)            ICOM_CALL2(Initialize,p,a,b)
     1392  #define IDirectDrawSurface_IsLost(p)                    ICOM_CALL (IsLost,p)
     1393  #define IDirectDrawSurface_Lock(p,a,b,c,d)              ICOM_CALL4(Lock,p,a,b,c,d)
     1394  #define IDirectDrawSurface_ReleaseDC(p,a)               ICOM_CALL1(ReleaseDC,p,a)
     1395  #define IDirectDrawSurface_Restore(p,a,b)               ICOM_CALL (Restore,p,a,b)
     1396  #define IDirectDrawSurface_SetClipper(p,a,b)            ICOM_CALL1(SetClipper,p,a,b)
     1397  #define IDirectDrawSurface_SetColorKey(p,a,b)           ICOM_CALL2(SetColorKey,p,a,b)
     1398  #define IDirectDrawSurface_SetOverlayPosition(p,a,b)    ICOM_CALL2(SetOverlayPosition,p,a,b)
     1399  #define IDirectDrawSurface_SetPalette(p,a)              ICOM_CALL1(SetPalette,p,a)
     1400  #define IDirectDrawSurface_Unlock(p,a)                  ICOM_CALL1(Unlock,p,a)
     1401  #define IDirectDrawSurface_UpdateOverlay(p,a,b,c,d,e)   ICOM_CALL5(UpdateOverlay,p,a,b,c,d,e)
     1402  #define IDirectDrawSurface_UpdateOverlayDisplay(p,a)    ICOM_CALL1(UpdateOverlayDisplay,p,a)
     1403  #define IDirectDrawSurface_UpdateOverlayZOrder(p,a,b)   ICOM_CALL2(UpdateOverlayZOrder,p,a,b)
    11661404#endif
    11671405
     
    11701408 * IDirectDrawSurface2 interface
    11711409 */
    1172 /* Cannot inherit from IDirectDrawSurface because the LPDIRECTDRAWSURFACE parameters 
     1410/* Cannot inherit from IDirectDrawSurface because the LPDIRECTDRAWSURFACE parameters
    11731411 * have been converted to LPDIRECTDRAWSURFACE2.
    11741412 */
    1175 #define ICOM_INTERFACE IDirectDrawSurface2
     1413//#define ICOM_INTERFACE IDirectDrawSurface2
    11761414#define IDirectDrawSurface2_METHODS \
    11771415    ICOM_METHOD1(HRESULT,AddAttachedSurface,    LPDIRECTDRAWSURFACE2,lpDDSAttachedSurface) \
     
    12161454    IDirectDrawSurface2_METHODS
    12171455ICOM_DEFINE(IDirectDrawSurface2,IUnknown)
    1218 #undef ICOM_INTERFACE
     1456//#undef ICOM_INTERFACE
    12191457
    12201458#ifdef ICOM_CINTERFACE
    1221     /*** IUnknown methods ***/
    1222 #define IDirectDrawSurface2_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
    1223 #define IDirectDrawSurface2_AddRef(p)             ICOM_CALL (AddRef,p)
    1224 #define IDirectDrawSurface2_Release(p)            ICOM_CALL (Release,p)
    1225 /*** IDirectDrawSurface methods (almost) ***/
    1226 #define IDirectDrawSurface2_AddAttachedSurface(p,a)      ICOM_CALL1(AddAttachedSurface,p,a)
    1227 #define IDirectDrawSurface2_AddOverlayDirtyRect(p,a)     ICOM_CALL1(AddOverlayDirtyRect,p,a)
    1228 #define IDirectDrawSurface2_Blt(p,a,b,c,d,e)             ICOM_CALL5(Blt,p,a,b,c,d,e)
    1229 #define IDirectDrawSurface2_BltBatch(p,a,b,c)            ICOM_CALL3(BltBatch,p,a,b,c)
    1230 #define IDirectDrawSurface2_BltFast(p,a,b,c,d,e)         ICOM_CALL5(BltFast,p,a,b,c,d,e)
    1231 #define IDirectDrawSurface2_DeleteAttachedSurface(p,a,b) ICOM_CALL2(DeleteAttachedSurface,p,a,b)
    1232 #define IDirectDrawSurface2_EnumAttachedSurfaces(p,a,b)  ICOM_CALL2(EnumAttachedSurfaces,p,a,b)
    1233 #define IDirectDrawSurface2_EnumOverlayZOrders(p,a,b,c)  ICOM_CALL3(EnumOverlayZOrders,p,a,b,c)
    1234 #define IDirectDrawSurface2_Flip(p,a,b)                  ICOM_CALL2(Flip,p,a,b)
    1235 #define IDirectDrawSurface2_GetAttachedSurface(p,a,b)    ICOM_CALL2(GetAttachedSurface,p,a,b)
    1236 #define IDirectDrawSurface2_GetBltStatus(p,a)            ICOM_CALL1(GetBltStatus,p,a)
    1237 #define IDirectDrawSurface2_GetCaps(p,a)                 ICOM_CALL1(GetCaps,p,a)
    1238 #define IDirectDrawSurface2_GetClipper(p,a)              ICOM_CALL1(GetClipper,p,a)
    1239 #define IDirectDrawSurface2_GetColorKey(p,a,b)           ICOM_CALL2(GetColorKey,p,a,b)
    1240 #define IDirectDrawSurface2_GetDC(p,a)                   ICOM_CALL1(GetDC,p,a)
    1241 #define IDirectDrawSurface2_GetFlipStatus(p,a)           ICOM_CALL1(GetFlipStatus,p,a)
    1242 #define IDirectDrawSurface2_GetOverlayPosition(p,a,b)    ICOM_CALL2(GetOverlayPosition,p,a,b)
    1243 #define IDirectDrawSurface2_GetPalette(p,a)              ICOM_CALL1(GetPalette,p,a)
    1244 #define IDirectDrawSurface2_GetPixelFormat(p,a)          ICOM_CALL1(GetPixelFormat,p,a)
    1245 #define IDirectDrawSurface2_GetSurfaceDesc(p,a)          ICOM_CALL1(GetSurfaceDesc,p,a)
    1246 #define IDirectDrawSurface2_Initialize(p,a,b)            ICOM_CALL2(Initialize,p,a,b)
    1247 #define IDirectDrawSurface2_IsLost(p)                    ICOM_CALL (IsLost,p)
    1248 #define IDirectDrawSurface2_Lock(p,a,b,c,d)              ICOM_CALL4(Lock,p,a,b,c,d)
    1249 #define IDirectDrawSurface2_ReleaseDC(p,a)               ICOM_CALL1(ReleaseDC,p,a)
    1250 #define IDirectDrawSurface2_Restore(p,a,b)               ICOM_CALL (Restore,p,a,b)
    1251 #define IDirectDrawSurface2_SetClipper(p,a,b)            ICOM_CALL1(SetClipper,p,a,b)
    1252 #define IDirectDrawSurface2_SetColorKey(p,a,b)           ICOM_CALL2(SetColorKey,p,a,b)
    1253 #define IDirectDrawSurface2_SetOverlayPosition(p,a,b)    ICOM_CALL2(SetOverlayPosition,p,a,b)
    1254 #define IDirectDrawSurface2_SetPalette(p,a)              ICOM_CALL1(SetPalette,p,a)
    1255 #define IDirectDrawSurface2_Unlock(p,a)                  ICOM_CALL1(Unlock,p,a)
    1256 #define IDirectDrawSurface2_UpdateOverlay(p,a,b,c,d,e)   ICOM_CALL5(UpdateOverlay,p,a,b,c,d,e)
    1257 #define IDirectDrawSurface2_UpdateOverlayDisplay(p,a)    ICOM_CALL1(UpdateOverlayDisplay,p,a)
    1258 #define IDirectDrawSurface2_UpdateOverlayZOrder(p,a,b)   ICOM_CALL2(UpdateOverlayZOrder,p,a,b)
    1259 /*** IDirectDrawSurface2 methods ***/
    1260 #define IDirectDrawSurface2_GetDDInterface(p,a) ICOM_CALL1(GetDDInterface,p,a)
    1261 #define IDirectDrawSurface2_PageLock(p,a)       ICOM_CALL1(PageLock,p,a)
    1262 #define IDirectDrawSurface2_PageUnlock(p,a)     ICOM_CALL1(PageUnlock,p,a)
     1459      /*** IUnknown methods ***/
     1460  #define IDirectDrawSurface2_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
     1461  #define IDirectDrawSurface2_AddRef(p)             ICOM_CALL (AddRef,p)
     1462  #define IDirectDrawSurface2_Release(p)            ICOM_CALL (Release,p)
     1463  /*** IDirectDrawSurface methods (almost) ***/
     1464  #define IDirectDrawSurface2_AddAttachedSurface(p,a)      ICOM_CALL1(AddAttachedSurface,p,a)
     1465  #define IDirectDrawSurface2_AddOverlayDirtyRect(p,a)     ICOM_CALL1(AddOverlayDirtyRect,p,a)
     1466  #define IDirectDrawSurface2_Blt(p,a,b,c,d,e)             ICOM_CALL5(Blt,p,a,b,c,d,e)
     1467  #define IDirectDrawSurface2_BltBatch(p,a,b,c)            ICOM_CALL3(BltBatch,p,a,b,c)
     1468  #define IDirectDrawSurface2_BltFast(p,a,b,c,d,e)         ICOM_CALL5(BltFast,p,a,b,c,d,e)
     1469  #define IDirectDrawSurface2_DeleteAttachedSurface(p,a,b) ICOM_CALL2(DeleteAttachedSurface,p,a,b)
     1470  #define IDirectDrawSurface2_EnumAttachedSurfaces(p,a,b)  ICOM_CALL2(EnumAttachedSurfaces,p,a,b)
     1471  #define IDirectDrawSurface2_EnumOverlayZOrders(p,a,b,c)  ICOM_CALL3(EnumOverlayZOrders,p,a,b,c)
     1472  #define IDirectDrawSurface2_Flip(p,a,b)                  ICOM_CALL2(Flip,p,a,b)
     1473  #define IDirectDrawSurface2_GetAttachedSurface(p,a,b)    ICOM_CALL2(GetAttachedSurface,p,a,b)
     1474  #define IDirectDrawSurface2_GetBltStatus(p,a)            ICOM_CALL1(GetBltStatus,p,a)
     1475  #define IDirectDrawSurface2_GetCaps(p,a)                 ICOM_CALL1(GetCaps,p,a)
     1476  #define IDirectDrawSurface2_GetClipper(p,a)              ICOM_CALL1(GetClipper,p,a)
     1477  #define IDirectDrawSurface2_GetColorKey(p,a,b)           ICOM_CALL2(GetColorKey,p,a,b)
     1478  #define IDirectDrawSurface2_GetDC(p,a)                   ICOM_CALL1(GetDC,p,a)
     1479  #define IDirectDrawSurface2_GetFlipStatus(p,a)           ICOM_CALL1(GetFlipStatus,p,a)
     1480  #define IDirectDrawSurface2_GetOverlayPosition(p,a,b)    ICOM_CALL2(GetOverlayPosition,p,a,b)
     1481  #define IDirectDrawSurface2_GetPalette(p,a)              ICOM_CALL1(GetPalette,p,a)
     1482  #define IDirectDrawSurface2_GetPixelFormat(p,a)          ICOM_CALL1(GetPixelFormat,p,a)
     1483  #define IDirectDrawSurface2_GetSurfaceDesc(p,a)          ICOM_CALL1(GetSurfaceDesc,p,a)
     1484  #define IDirectDrawSurface2_Initialize(p,a,b)            ICOM_CALL2(Initialize,p,a,b)
     1485  #define IDirectDrawSurface2_IsLost(p)                    ICOM_CALL (IsLost,p)
     1486  #define IDirectDrawSurface2_Lock(p,a,b,c,d)              ICOM_CALL4(Lock,p,a,b,c,d)
     1487  #define IDirectDrawSurface2_ReleaseDC(p,a)               ICOM_CALL1(ReleaseDC,p,a)
     1488  #define IDirectDrawSurface2_Restore(p,a,b)               ICOM_CALL (Restore,p,a,b)
     1489  #define IDirectDrawSurface2_SetClipper(p,a,b)            ICOM_CALL1(SetClipper,p,a,b)
     1490  #define IDirectDrawSurface2_SetColorKey(p,a,b)           ICOM_CALL2(SetColorKey,p,a,b)
     1491  #define IDirectDrawSurface2_SetOverlayPosition(p,a,b)    ICOM_CALL2(SetOverlayPosition,p,a,b)
     1492  #define IDirectDrawSurface2_SetPalette(p,a)              ICOM_CALL1(SetPalette,p,a)
     1493  #define IDirectDrawSurface2_Unlock(p,a)                  ICOM_CALL1(Unlock,p,a)
     1494  #define IDirectDrawSurface2_UpdateOverlay(p,a,b,c,d,e)   ICOM_CALL5(UpdateOverlay,p,a,b,c,d,e)
     1495  #define IDirectDrawSurface2_UpdateOverlayDisplay(p,a)    ICOM_CALL1(UpdateOverlayDisplay,p,a)
     1496  #define IDirectDrawSurface2_UpdateOverlayZOrder(p,a,b)   ICOM_CALL2(UpdateOverlayZOrder,p,a,b)
     1497  /*** IDirectDrawSurface2 methods ***/
     1498  #define IDirectDrawSurface2_GetDDInterface(p,a) ICOM_CALL1(GetDDInterface,p,a)
     1499  #define IDirectDrawSurface2_PageLock(p,a)       ICOM_CALL1(PageLock,p,a)
     1500  #define IDirectDrawSurface2_PageUnlock(p,a)     ICOM_CALL1(PageUnlock,p,a)
    12631501#endif
    12641502
     
    12671505 * IDirectDrawSurface3 interface
    12681506 */
    1269 /* Cannot inherit from IDirectDrawSurface2 because the LPDIRECTDRAWSURFACE2 parameters 
     1507/* Cannot inherit from IDirectDrawSurface2 because the LPDIRECTDRAWSURFACE2 parameters
    12701508 * have been converted to LPDIRECTDRAWSURFACE3.
    12711509 */
    1272 #define ICOM_INTERFACE IDirectDrawSurface3
     1510//#define ICOM_INTERFACE IDirectDrawSurface3
    12731511#define IDirectDrawSurface3_METHODS \
    12741512    ICOM_METHOD1(HRESULT,AddAttachedSurface,    LPDIRECTDRAWSURFACE3,lpDDSAttachedSurface) \
     
    13151553    IDirectDrawSurface3_METHODS
    13161554ICOM_DEFINE(IDirectDrawSurface3,IUnknown)
    1317 #undef ICOM_INTERFACE
     1555//#undef ICOM_INTERFACE
    13181556
    13191557#ifdef ICOM_CINTERFACE
    1320     /*** IUnknown methods ***/
    1321 #define IDirectDrawSurface3_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
    1322 #define IDirectDrawSurface3_AddRef(p)             ICOM_CALL (AddRef,p)
    1323 #define IDirectDrawSurface3_Release(p)            ICOM_CALL (Release,p)
    1324 /*** IDirectDrawSurface methods (almost) ***/
    1325 #define IDirectDrawSurface3_AddAttachedSurface(p,a)      ICOM_CALL1(AddAttachedSurface,p,a)
    1326 #define IDirectDrawSurface3_AddOverlayDirtyRect(p,a)     ICOM_CALL1(AddOverlayDirtyRect,p,a)
    1327 #define IDirectDrawSurface3_Blt(p,a,b,c,d,e)             ICOM_CALL5(Blt,p,a,b,c,d,e)
    1328 #define IDirectDrawSurface3_BltBatch(p,a,b,c)            ICOM_CALL3(BltBatch,p,a,b,c)
    1329 #define IDirectDrawSurface3_BltFast(p,a,b,c,d,e)         ICOM_CALL5(BltFast,p,a,b,c,d,e)
    1330 #define IDirectDrawSurface3_DeleteAttachedSurface(p,a,b) ICOM_CALL2(DeleteAttachedSurface,p,a,b)
    1331 #define IDirectDrawSurface3_EnumAttachedSurfaces(p,a,b)  ICOM_CALL2(EnumAttachedSurfaces,p,a,b)
    1332 #define IDirectDrawSurface3_EnumOverlayZOrders(p,a,b,c)  ICOM_CALL3(EnumOverlayZOrders,p,a,b,c)
    1333 #define IDirectDrawSurface3_Flip(p,a,b)                  ICOM_CALL2(Flip,p,a,b)
    1334 #define IDirectDrawSurface3_GetAttachedSurface(p,a,b)    ICOM_CALL2(GetAttachedSurface,p,a,b)
    1335 #define IDirectDrawSurface3_GetBltStatus(p,a)            ICOM_CALL1(GetBltStatus,p,a)
    1336 #define IDirectDrawSurface3_GetCaps(p,a)                 ICOM_CALL1(GetCaps,p,a)
    1337 #define IDirectDrawSurface3_GetClipper(p,a)              ICOM_CALL1(GetClipper,p,a)
    1338 #define IDirectDrawSurface3_GetColorKey(p,a,b)           ICOM_CALL2(GetColorKey,p,a,b)
    1339 #define IDirectDrawSurface3_GetDC(p,a)                   ICOM_CALL1(GetDC,p,a)
    1340 #define IDirectDrawSurface3_GetFlipStatus(p,a)           ICOM_CALL1(GetFlipStatus,p,a)
    1341 #define IDirectDrawSurface3_GetOverlayPosition(p,a,b)    ICOM_CALL2(GetOverlayPosition,p,a,b)
    1342 #define IDirectDrawSurface3_GetPalette(p,a)              ICOM_CALL1(GetPalette,p,a)
    1343 #define IDirectDrawSurface3_GetPixelFormat(p,a)          ICOM_CALL1(GetPixelFormat,p,a)
    1344 #define IDirectDrawSurface3_GetSurfaceDesc(p,a)          ICOM_CALL1(GetSurfaceDesc,p,a)
    1345 #define IDirectDrawSurface3_Initialize(p,a,b)            ICOM_CALL2(Initialize,p,a,b)
    1346 #define IDirectDrawSurface3_IsLost(p)                    ICOM_CALL (IsLost,p)
    1347 #define IDirectDrawSurface3_Lock(p,a,b,c,d)              ICOM_CALL4(Lock,p,a,b,c,d)
    1348 #define IDirectDrawSurface3_ReleaseDC(p,a)               ICOM_CALL1(ReleaseDC,p,a)
    1349 #define IDirectDrawSurface3_Restore(p,a,b)               ICOM_CALL (Restore,p,a,b)
    1350 #define IDirectDrawSurface3_SetClipper(p,a,b)            ICOM_CALL1(SetClipper,p,a,b)
    1351 #define IDirectDrawSurface3_SetColorKey(p,a,b)           ICOM_CALL2(SetColorKey,p,a,b)
    1352 #define IDirectDrawSurface3_SetOverlayPosition(p,a,b)    ICOM_CALL2(SetOverlayPosition,p,a,b)
    1353 #define IDirectDrawSurface3_SetPalette(p,a)              ICOM_CALL1(SetPalette,p,a)
    1354 #define IDirectDrawSurface3_Unlock(p,a)                  ICOM_CALL1(Unlock,p,a)
    1355 #define IDirectDrawSurface3_UpdateOverlay(p,a,b,c,d,e)   ICOM_CALL5(UpdateOverlay,p,a,b,c,d,e)
    1356 #define IDirectDrawSurface3_UpdateOverlayDisplay(p,a)    ICOM_CALL1(UpdateOverlayDisplay,p,a)
    1357 #define IDirectDrawSurface3_UpdateOverlayZOrder(p,a,b)   ICOM_CALL2(UpdateOverlayZOrder,p,a,b)
    1358 /*** IDirectDrawSurface2 methods ***/
    1359 #define IDirectDrawSurface3_GetDDInterface(p,a) ICOM_CALL1(GetDDInterface,p,a)
    1360 #define IDirectDrawSurface3_PageLock(p,a)       ICOM_CALL1(PageLock,p,a)
    1361 #define IDirectDrawSurface3_PageUnlock(p,a)     ICOM_CALL1(PageUnlock,p,a)
    1362 /*** IDirectDrawSurface3 methods ***/
    1363 #define IDirectDrawSurface3_SetSurfaceDesc(p,a,b) ICOM_CALL2(SetSurfaceDesc,p,a,b)
     1558      /*** IUnknown methods ***/
     1559  #define IDirectDrawSurface3_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
     1560  #define IDirectDrawSurface3_AddRef(p)             ICOM_CALL (AddRef,p)
     1561  #define IDirectDrawSurface3_Release(p)            ICOM_CALL (Release,p)
     1562  /*** IDirectDrawSurface methods (almost) ***/
     1563  #define IDirectDrawSurface3_AddAttachedSurface(p,a)      ICOM_CALL1(AddAttachedSurface,p,a)
     1564  #define IDirectDrawSurface3_AddOverlayDirtyRect(p,a)     ICOM_CALL1(AddOverlayDirtyRect,p,a)
     1565  #define IDirectDrawSurface3_Blt(p,a,b,c,d,e)             ICOM_CALL5(Blt,p,a,b,c,d,e)
     1566  #define IDirectDrawSurface3_BltBatch(p,a,b,c)            ICOM_CALL3(BltBatch,p,a,b,c)
     1567  #define IDirectDrawSurface3_BltFast(p,a,b,c,d,e)         ICOM_CALL5(BltFast,p,a,b,c,d,e)
     1568  #define IDirectDrawSurface3_DeleteAttachedSurface(p,a,b) ICOM_CALL2(DeleteAttachedSurface,p,a,b)
     1569  #define IDirectDrawSurface3_EnumAttachedSurfaces(p,a,b)  ICOM_CALL2(EnumAttachedSurfaces,p,a,b)
     1570  #define IDirectDrawSurface3_EnumOverlayZOrders(p,a,b,c)  ICOM_CALL3(EnumOverlayZOrders,p,a,b,c)
     1571  #define IDirectDrawSurface3_Flip(p,a,b)                  ICOM_CALL2(Flip,p,a,b)
     1572  #define IDirectDrawSurface3_GetAttachedSurface(p,a,b)    ICOM_CALL2(GetAttachedSurface,p,a,b)
     1573  #define IDirectDrawSurface3_GetBltStatus(p,a)            ICOM_CALL1(GetBltStatus,p,a)
     1574  #define IDirectDrawSurface3_GetCaps(p,a)                 ICOM_CALL1(GetCaps,p,a)
     1575  #define IDirectDrawSurface3_GetClipper(p,a)              ICOM_CALL1(GetClipper,p,a)
     1576  #define IDirectDrawSurface3_GetColorKey(p,a,b)           ICOM_CALL2(GetColorKey,p,a,b)
     1577  #define IDirectDrawSurface3_GetDC(p,a)                   ICOM_CALL1(GetDC,p,a)
     1578  #define IDirectDrawSurface3_GetFlipStatus(p,a)           ICOM_CALL1(GetFlipStatus,p,a)
     1579  #define IDirectDrawSurface3_GetOverlayPosition(p,a,b)    ICOM_CALL2(GetOverlayPosition,p,a,b)
     1580  #define IDirectDrawSurface3_GetPalette(p,a)              ICOM_CALL1(GetPalette,p,a)
     1581  #define IDirectDrawSurface3_GetPixelFormat(p,a)          ICOM_CALL1(GetPixelFormat,p,a)
     1582  #define IDirectDrawSurface3_GetSurfaceDesc(p,a)          ICOM_CALL1(GetSurfaceDesc,p,a)
     1583  #define IDirectDrawSurface3_Initialize(p,a,b)            ICOM_CALL2(Initialize,p,a,b)
     1584  #define IDirectDrawSurface3_IsLost(p)                    ICOM_CALL (IsLost,p)
     1585  #define IDirectDrawSurface3_Lock(p,a,b,c,d)              ICOM_CALL4(Lock,p,a,b,c,d)
     1586  #define IDirectDrawSurface3_ReleaseDC(p,a)               ICOM_CALL1(ReleaseDC,p,a)
     1587  #define IDirectDrawSurface3_Restore(p,a,b)               ICOM_CALL (Restore,p,a,b)
     1588  #define IDirectDrawSurface3_SetClipper(p,a,b)            ICOM_CALL1(SetClipper,p,a,b)
     1589  #define IDirectDrawSurface3_SetColorKey(p,a,b)           ICOM_CALL2(SetColorKey,p,a,b)
     1590  #define IDirectDrawSurface3_SetOverlayPosition(p,a,b)    ICOM_CALL2(SetOverlayPosition,p,a,b)
     1591  #define IDirectDrawSurface3_SetPalette(p,a)              ICOM_CALL1(SetPalette,p,a)
     1592  #define IDirectDrawSurface3_Unlock(p,a)                  ICOM_CALL1(Unlock,p,a)
     1593  #define IDirectDrawSurface3_UpdateOverlay(p,a,b,c,d,e)   ICOM_CALL5(UpdateOverlay,p,a,b,c,d,e)
     1594  #define IDirectDrawSurface3_UpdateOverlayDisplay(p,a)    ICOM_CALL1(UpdateOverlayDisplay,p,a)
     1595  #define IDirectDrawSurface3_UpdateOverlayZOrder(p,a,b)   ICOM_CALL2(UpdateOverlayZOrder,p,a,b)
     1596  /*** IDirectDrawSurface2 methods ***/
     1597  #define IDirectDrawSurface3_GetDDInterface(p,a) ICOM_CALL1(GetDDInterface,p,a)
     1598  #define IDirectDrawSurface3_PageLock(p,a)       ICOM_CALL1(PageLock,p,a)
     1599  #define IDirectDrawSurface3_PageUnlock(p,a)     ICOM_CALL1(PageUnlock,p,a)
     1600  /*** IDirectDrawSurface3 methods ***/
     1601  #define IDirectDrawSurface3_SetSurfaceDesc(p,a,b) ICOM_CALL2(SetSurfaceDesc,p,a,b)
    13641602#endif
    13651603
     
    13681606 * IDirectDrawSurface4 interface
    13691607 */
    1370 /* Cannot inherit from IDirectDrawSurface2 because the LPDIRECTDRAWSURFACE2 parameters 
     1608/* Cannot inherit from IDirectDrawSurface2 because the LPDIRECTDRAWSURFACE2 parameters
    13711609 * have been converted to LPDIRECTDRAWSURFACE3.
    13721610 */
    1373 /* FIXME: I assumed IDirectDrawSurface4 does not inherit from IDirectDrawSurface3 but I 
    1374  * have actually not proof of that. Can someone check and remove this comment or patch 
     1611/* FIXME: I assumed IDirectDrawSurface4 does not inherit from IDirectDrawSurface3 but I
     1612 * have actually not proof of that. Can someone check and remove this comment or patch
    13751613 * accordingly ?
    13761614 */
    1377 #define ICOM_INTERFACE IDirectDrawSurface4
     1615//#define ICOM_INTERFACE IDirectDrawSurface4
    13781616#define IDirectDrawSurface4_METHODS \
    13791617    ICOM_METHOD1(HRESULT,AddAttachedSurface,    LPDIRECTDRAWSURFACE4,lpDDSAttachedSurface) \
     
    13831621    ICOM_METHOD5(HRESULT,BltFast,               DWORD,dwX, DWORD,dwY, LPDIRECTDRAWSURFACE4,lpDDSrcSurface, LPRECT,lpSrcRect, DWORD,dwTrans) \
    13841622    ICOM_METHOD2(HRESULT,DeleteAttachedSurface, DWORD,dwFlags, LPDIRECTDRAWSURFACE4,lpDDSAttachedSurface) \
    1385     ICOM_METHOD2(HRESULT,EnumAttachedSurfaces,  LPVOID,lpContext, LPDDENUMSURFACESCALLBACK,lpEnumSurfacesCallback) \
    1386     ICOM_METHOD3(HRESULT,EnumOverlayZOrders,    DWORD,dwFlags, LPVOID,lpContext, LPDDENUMSURFACESCALLBACK,lpfnCallback) \
     1623    ICOM_METHOD2(HRESULT,EnumAttachedSurfaces,  LPVOID,lpContext, LPDDENUMSURFACESCALLBACK2,lpEnumSurfacesCallback) \
     1624    ICOM_METHOD3(HRESULT,EnumOverlayZOrders,    DWORD,dwFlags, LPVOID,lpContext, LPDDENUMSURFACESCALLBACK2,lpfnCallback) \
    13871625    ICOM_METHOD2(HRESULT,Flip,                  LPDIRECTDRAWSURFACE4,lpDDSurfaceTargetOverride, DWORD,dwFlags) \
    1388     ICOM_METHOD2(HRESULT,GetAttachedSurface,    LPDDSCAPS,lpDDSCaps, LPDIRECTDRAWSURFACE4*,lplpDDAttachedSurface) \
     1626    ICOM_METHOD2(HRESULT,GetAttachedSurface,    LPDDSCAPS2,lpDDSCaps, LPDIRECTDRAWSURFACE4*,lplpDDAttachedSurface) \
    13891627    ICOM_METHOD1(HRESULT,GetBltStatus,          DWORD,dwFlags) \
    1390     ICOM_METHOD1(HRESULT,GetCaps,               LPDDSCAPS,lpDDSCaps) \
     1628    ICOM_METHOD1(HRESULT,GetCaps,               LPDDSCAPS2,lpDDSCaps) \
    13911629    ICOM_METHOD1(HRESULT,GetClipper,            LPDIRECTDRAWCLIPPER*,lplpDDClipper) \
    13921630    ICOM_METHOD2(HRESULT,GetColorKey,           DWORD,dwFlags, LPDDCOLORKEY,lpDDColorKey) \
     
    13961634    ICOM_METHOD1(HRESULT,GetPalette,            LPDIRECTDRAWPALETTE*,lplpDDPalette) \
    13971635    ICOM_METHOD1(HRESULT,GetPixelFormat,        LPDDPIXELFORMAT,lpDDPixelFormat) \
    1398     ICOM_METHOD1(HRESULT,GetSurfaceDesc,        LPDDSURFACEDESC,lpDDSurfaceDesc) \
    1399     ICOM_METHOD2(HRESULT,Initialize,            LPDIRECTDRAW,lpDD, LPDDSURFACEDESC,lpDDSurfaceDesc) \
     1636    ICOM_METHOD1(HRESULT,GetSurfaceDesc,        LPDDSURFACEDESC2,lpDDSurfaceDesc) \
     1637    ICOM_METHOD2(HRESULT,Initialize,            LPDIRECTDRAW,lpDD, LPDDSURFACEDESC2,lpDDSurfaceDesc) \
    14001638    ICOM_METHOD (HRESULT,IsLost) \
    1401     ICOM_METHOD4(HRESULT,Lock,                  LPRECT,lpDestRect, LPDDSURFACEDESC,lpDDSurfaceDesc, DWORD,dwFlags, HANDLE,hEvent) \
     1639    ICOM_METHOD4(HRESULT,Lock,                  LPRECT,lpDestRect, LPDDSURFACEDESC2,lpDDSurfaceDesc, DWORD,dwFlags, HANDLE,hEvent) \
    14021640    ICOM_METHOD1(HRESULT,ReleaseDC,             HDC,hDC) \
    14031641    ICOM_METHOD (HRESULT,Restore) \
     
    14061644    ICOM_METHOD2(HRESULT,SetOverlayPosition,    LONG,lX, LONG,lY) \
    14071645    ICOM_METHOD1(HRESULT,SetPalette,            LPDIRECTDRAWPALETTE,lpDDPalette) \
    1408     ICOM_METHOD1(HRESULT,Unlock,                LPVOID,lpSurfaceData) \
     1646    ICOM_METHOD1(HRESULT,Unlock,                LPRECT,lpSurfaceData) \
    14091647    ICOM_METHOD5(HRESULT,UpdateOverlay,         LPRECT,lpSrcRect, LPDIRECTDRAWSURFACE4,lpDDDestSurface, LPRECT,lpDestRect, DWORD,dwFlags, LPDDOVERLAYFX,lpDDOverlayFx) \
    14101648    ICOM_METHOD1(HRESULT,UpdateOverlayDisplay,  DWORD,dwFlags) \
     
    14151653    ICOM_METHOD1(HRESULT,PageUnlock,     DWORD,dwFlags) \
    14161654    /* added in v3 */ \
    1417     ICOM_METHOD2(HRESULT,SetSurfaceDesc, LPDDSURFACEDESC,lpDDSD, DWORD,dwFlags) \
     1655    ICOM_METHOD2(HRESULT,SetSurfaceDesc, LPDDSURFACEDESC2,lpDDSD, DWORD,dwFlags) \
    14181656    /* added in v4 */ \
    14191657    ICOM_METHOD4(HRESULT,SetPrivateData,       REFGUID,, LPVOID,, DWORD,, DWORD,) \
     
    14291667
    14301668#ifdef ICOM_CINTERFACE
    1431     /*** IUnknown methods ***/
    1432 #define IDirectDrawSurface4_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
    1433 #define IDirectDrawSurface4_AddRef(p)             ICOM_CALL (AddRef,p)
    1434 #define IDirectDrawSurface4_Release(p)            ICOM_CALL (Release,p)
    1435 /*** IDirectDrawSurface (almost) methods ***/
    1436 #define IDirectDrawSurface4_AddAttachedSurface(p,a)      ICOM_CALL1(AddAttachedSurface,p,a)
    1437 #define IDirectDrawSurface4_AddOverlayDirtyRect(p,a)     ICOM_CALL1(AddOverlayDirtyRect,p,a)
    1438 #define IDirectDrawSurface4_Blt(p,a,b,c,d,e)             ICOM_CALL5(Blt,p,a,b,c,d,e)
    1439 #define IDirectDrawSurface4_BltBatch(p,a,b,c)            ICOM_CALL3(BltBatch,p,a,b,c)
    1440 #define IDirectDrawSurface4_BltFast(p,a,b,c,d,e)         ICOM_CALL5(BltFast,p,a,b,c,d,e)
    1441 #define IDirectDrawSurface4_DeleteAttachedSurface(p,a,b) ICOM_CALL2(DeleteAttachedSurface,p,a,b)
    1442 #define IDirectDrawSurface4_EnumAttachedSurfaces(p,a,b)  ICOM_CALL2(EnumAttachedSurfaces,p,a,b)
    1443 #define IDirectDrawSurface4_EnumOverlayZOrders(p,a,b,c)  ICOM_CALL3(EnumOverlayZOrders,p,a,b,c)
    1444 #define IDirectDrawSurface4_Flip(p,a,b)                  ICOM_CALL2(Flip,p,a,b)
    1445 #define IDirectDrawSurface4_GetAttachedSurface(p,a,b)    ICOM_CALL2(GetAttachedSurface,p,a,b)
    1446 #define IDirectDrawSurface4_GetBltStatus(p,a)            ICOM_CALL1(GetBltStatus,p,a)
    1447 #define IDirectDrawSurface4_GetCaps(p,a)                 ICOM_CALL1(GetCaps,p,a)
    1448 #define IDirectDrawSurface4_GetClipper(p,a)              ICOM_CALL1(GetClipper,p,a)
    1449 #define IDirectDrawSurface4_GetColorKey(p,a,b)           ICOM_CALL2(GetColorKey,p,a,b)
    1450 #define IDirectDrawSurface4_GetDC(p,a)                   ICOM_CALL1(GetDC,p,a)
    1451 #define IDirectDrawSurface4_GetFlipStatus(p,a)           ICOM_CALL1(GetFlipStatus,p,a)
    1452 #define IDirectDrawSurface4_GetOverlayPosition(p,a,b)    ICOM_CALL2(GetOverlayPosition,p,a,b)
    1453 #define IDirectDrawSurface4_GetPalette(p,a)              ICOM_CALL1(GetPalette,p,a)
    1454 #define IDirectDrawSurface4_GetPixelFormat(p,a)          ICOM_CALL1(GetPixelFormat,p,a)
    1455 #define IDirectDrawSurface4_GetSurfaceDesc(p,a)          ICOM_CALL1(GetSurfaceDesc,p,a)
    1456 #define IDirectDrawSurface4_Initialize(p,a,b)            ICOM_CALL2(Initialize,p,a,b)
    1457 #define IDirectDrawSurface4_IsLost(p)                    ICOM_CALL (IsLost,p)
    1458 #define IDirectDrawSurface4_Lock(p,a,b,c,d)              ICOM_CALL4(Lock,p,a,b,c,d)
    1459 #define IDirectDrawSurface4_ReleaseDC(p,a)               ICOM_CALL1(ReleaseDC,p,a)
    1460 #define IDirectDrawSurface4_Restore(p,a,b)               ICOM_CALL (Restore,p,a,b)
    1461 #define IDirectDrawSurface4_SetClipper(p,a,b)            ICOM_CALL1(SetClipper,p,a,b)
    1462 #define IDirectDrawSurface4_SetColorKey(p,a,b)           ICOM_CALL2(SetColorKey,p,a,b)
    1463 #define IDirectDrawSurface4_SetOverlayPosition(p,a,b)    ICOM_CALL2(SetOverlayPosition,p,a,b)
    1464 #define IDirectDrawSurface4_SetPalette(p,a)              ICOM_CALL1(SetPalette,p,a)
    1465 #define IDirectDrawSurface4_Unlock(p,a)                  ICOM_CALL1(Unlock,p,a)
    1466 #define IDirectDrawSurface4_UpdateOverlay(p,a,b,c,d,e)   ICOM_CALL5(UpdateOverlay,p,a,b,c,d,e)
    1467 #define IDirectDrawSurface4_UpdateOverlayDisplay(p,a)    ICOM_CALL1(UpdateOverlayDisplay,p,a)
    1468 #define IDirectDrawSurface4_UpdateOverlayZOrder(p,a,b)   ICOM_CALL2(UpdateOverlayZOrder,p,a,b)
    1469 /*** IDirectDrawSurface2 methods ***/
    1470 #define IDirectDrawSurface4_GetDDInterface(p,a) ICOM_CALL1(GetDDInterface,p,a)
    1471 #define IDirectDrawSurface4_PageLock(p,a)       ICOM_CALL1(PageLock,p,a)
    1472 #define IDirectDrawSurface4_PageUnlock(p,a)     ICOM_CALL1(PageUnlock,p,a)
    1473 /*** IDirectDrawSurface3 methods ***/
    1474 #define IDirectDrawSurface4_SetSurfaceDesc(p,a) ICOM_CALL(SetSurfaceDesc,p,a)
    1475 /*** IDirectDrawSurface4 methods ***/
    1476 #define IDirectDrawSurface4_SetPrivateData(p,a,b,c,d) ICOM_CALL4(SetPrivateData,p,a,b,c,d)
    1477 #define IDirectDrawSurface4_GetPrivateData(p,a,b,c)   ICOM_CALL3(GetPrivateData,p,a,b,c)
    1478 #define IDirectDrawSurface4_FreePrivateData(p,a)      ICOM_CALL1(FreePrivateData,p,a)
    1479 #define IDirectDrawSurface4_GetUniquenessValue(p,a)   ICOM_CALL1(GetUniquenessValue,p,a)
    1480 #define IDirectDrawSurface4_ChangeUniquenessValue(p)  ICOM_CALL (ChangeUniquenessValue,p)
     1669      /*** IUnknown methods ***/
     1670  #define IDirectDrawSurface4_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
     1671  #define IDirectDrawSurface4_AddRef(p)             ICOM_CALL (AddRef,p)
     1672  #define IDirectDrawSurface4_Release(p)            ICOM_CALL (Release,p)
     1673  /*** IDirectDrawSurface (almost) methods ***/
     1674  #define IDirectDrawSurface4_AddAttachedSurface(p,a)      ICOM_CALL1(AddAttachedSurface,p,a)
     1675  #define IDirectDrawSurface4_AddOverlayDirtyRect(p,a)     ICOM_CALL1(AddOverlayDirtyRect,p,a)
     1676  #define IDirectDrawSurface4_Blt(p,a,b,c,d,e)             ICOM_CALL5(Blt,p,a,b,c,d,e)
     1677  #define IDirectDrawSurface4_BltBatch(p,a,b,c)            ICOM_CALL3(BltBatch,p,a,b,c)
     1678  #define IDirectDrawSurface4_BltFast(p,a,b,c,d,e)         ICOM_CALL5(BltFast,p,a,b,c,d,e)
     1679  #define IDirectDrawSurface4_DeleteAttachedSurface(p,a,b) ICOM_CALL2(DeleteAttachedSurface,p,a,b)
     1680  #define IDirectDrawSurface4_EnumAttachedSurfaces(p,a,b)  ICOM_CALL2(EnumAttachedSurfaces,p,a,b)
     1681  #define IDirectDrawSurface4_EnumOverlayZOrders(p,a,b,c)  ICOM_CALL3(EnumOverlayZOrders,p,a,b,c)
     1682  #define IDirectDrawSurface4_Flip(p,a,b)                  ICOM_CALL2(Flip,p,a,b)
     1683  #define IDirectDrawSurface4_GetAttachedSurface(p,a,b)    ICOM_CALL2(GetAttachedSurface,p,a,b)
     1684  #define IDirectDrawSurface4_GetBltStatus(p,a)            ICOM_CALL1(GetBltStatus,p,a)
     1685  #define IDirectDrawSurface4_GetCaps(p,a)                 ICOM_CALL1(GetCaps,p,a)
     1686  #define IDirectDrawSurface4_GetClipper(p,a)              ICOM_CALL1(GetClipper,p,a)
     1687  #define IDirectDrawSurface4_GetColorKey(p,a,b)           ICOM_CALL2(GetColorKey,p,a,b)
     1688  #define IDirectDrawSurface4_GetDC(p,a)                   ICOM_CALL1(GetDC,p,a)
     1689  #define IDirectDrawSurface4_GetFlipStatus(p,a)           ICOM_CALL1(GetFlipStatus,p,a)
     1690  #define IDirectDrawSurface4_GetOverlayPosition(p,a,b)    ICOM_CALL2(GetOverlayPosition,p,a,b)
     1691  #define IDirectDrawSurface4_GetPalette(p,a)              ICOM_CALL1(GetPalette,p,a)
     1692  #define IDirectDrawSurface4_GetPixelFormat(p,a)          ICOM_CALL1(GetPixelFormat,p,a)
     1693  #define IDirectDrawSurface4_GetSurfaceDesc(p,a)          ICOM_CALL1(GetSurfaceDesc,p,a)
     1694  #define IDirectDrawSurface4_Initialize(p,a,b)            ICOM_CALL2(Initialize,p,a,b)
     1695  #define IDirectDrawSurface4_IsLost(p)                    ICOM_CALL (IsLost,p)
     1696  #define IDirectDrawSurface4_Lock(p,a,b,c,d)              ICOM_CALL4(Lock,p,a,b,c,d)
     1697  #define IDirectDrawSurface4_ReleaseDC(p,a)               ICOM_CALL1(ReleaseDC,p,a)
     1698  #define IDirectDrawSurface4_Restore(p,a,b)               ICOM_CALL (Restore,p,a,b)
     1699  #define IDirectDrawSurface4_SetClipper(p,a,b)            ICOM_CALL1(SetClipper,p,a,b)
     1700  #define IDirectDrawSurface4_SetColorKey(p,a,b)           ICOM_CALL2(SetColorKey,p,a,b)
     1701  #define IDirectDrawSurface4_SetOverlayPosition(p,a,b)    ICOM_CALL2(SetOverlayPosition,p,a,b)
     1702  #define IDirectDrawSurface4_SetPalette(p,a)              ICOM_CALL1(SetPalette,p,a)
     1703  #define IDirectDrawSurface4_Unlock(p,a)                  ICOM_CALL1(Unlock,p,a)
     1704  #define IDirectDrawSurface4_UpdateOverlay(p,a,b,c,d,e)   ICOM_CALL5(UpdateOverlay,p,a,b,c,d,e)
     1705  #define IDirectDrawSurface4_UpdateOverlayDisplay(p,a)    ICOM_CALL1(UpdateOverlayDisplay,p,a)
     1706  #define IDirectDrawSurface4_UpdateOverlayZOrder(p,a,b)   ICOM_CALL2(UpdateOverlayZOrder,p,a,b)
     1707  /*** IDirectDrawSurface2 methods ***/
     1708  #define IDirectDrawSurface4_GetDDInterface(p,a) ICOM_CALL1(GetDDInterface,p,a)
     1709  #define IDirectDrawSurface4_PageLock(p,a)       ICOM_CALL1(PageLock,p,a)
     1710  #define IDirectDrawSurface4_PageUnlock(p,a)     ICOM_CALL1(PageUnlock,p,a)
     1711  /*** IDirectDrawSurface3 methods ***/
     1712  #define IDirectDrawSurface4_SetSurfaceDesc(p,a) ICOM_CALL(SetSurfaceDesc,p,a)
     1713  /*** IDirectDrawSurface4 methods ***/
     1714  #define IDirectDrawSurface4_SetPrivateData(p,a,b,c,d) ICOM_CALL4(SetPrivateData,p,a,b,c,d)
     1715  #define IDirectDrawSurface4_GetPrivateData(p,a,b,c)   ICOM_CALL3(GetPrivateData,p,a,b,c)
     1716  #define IDirectDrawSurface4_FreePrivateData(p,a)      ICOM_CALL1(FreePrivateData,p,a)
     1717  #define IDirectDrawSurface4_GetUniquenessValue(p,a)   ICOM_CALL1(GetUniquenessValue,p,a)
     1718  #define IDirectDrawSurface4_ChangeUniquenessValue(p)  ICOM_CALL (ChangeUniquenessValue,p)
    14811719#endif
    14821720
     
    14961734
    14971735#ifdef ICOM_CINTERFACE
    1498         /*** IUnknown methods ***/
    1499 #define IDirectDrawColorControl_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
    1500 #define IDirectDrawColorControl_AddRef(p)             ICOM_CALL (AddRef,p)
    1501 #define IDirectDrawColorControl_Release(p)            ICOM_CALL (Release,p)
    1502         /*** IDirectDrawColorControl methods ***/
    1503 #define IDirectDrawColorControl_GetColorControls(p,a) ICOM_CALL(GetColorControls,p,a)
    1504 #define IDirectDrawColorControl_SetColorControls(p,a) ICOM_CALL(SetColorControls,p,a)
     1736    /*** IUnknown methods ***/
     1737  #define IDirectDrawColorControl_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
     1738  #define IDirectDrawColorControl_AddRef(p)             ICOM_CALL (AddRef,p)
     1739  #define IDirectDrawColorControl_Release(p)            ICOM_CALL (Release,p)
     1740    /*** IDirectDrawColorControl methods ***/
     1741  #define IDirectDrawColorControl_GetColorControls(p,a) ICOM_CALL(GetColorControls,p,a)
     1742  #define IDirectDrawColorControl_SetColorControls(p,a) ICOM_CALL(SetColorControls,p,a)
    15051743#endif
    15061744
     
    15131751
    15141752#endif /* __WINE_DDRAW_H */
     1753
Note: See TracChangeset for help on using the changeset viewer.