2 * DirectDraw driver interface
5 * Copyright (C) 2001 Ove Kaaven
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
22 #ifndef __WINE_DDRAWI_H
23 #define __WINE_DDRAWI_H
30 #include <dciddi.h> /* the DD HAL is layered onto DCI escapes */
32 typedef struct _DDVIDEOPORTCAPS
*LPDDVIDEOPORTCAPS
; /* should be in dvp.h */
33 typedef struct _DDKERNELCAPS
*LPDDKERNELCAPS
; /* should be in ddkernel.h */
34 typedef struct _VMEMHEAP
*LPVMEMHEAP
; /* should be in dmemmgr.h */
38 /* the DirectDraw versions */
39 #define DD_VERSION 0x0200 /* compatibility version */
40 #define DD_RUNTIME_VERSION 0x0700 /* actual version */
42 /* the HAL version returned from QUERYESCSUPPORT - DCICOMMAND */
43 #define DD_HAL_VERSION 0x0100
45 /* more DCICOMMAND escapes */
46 #define DDCREATEDRIVEROBJECT 10
47 #define DDGET32BITDRIVERNAME 11
48 #define DDNEWCALLBACKFNS 12
49 #define DDVERSIONINFO 13
51 #define MAX_DRIVER_NAME CCHDEVICENAME
53 /*****************************************************************************
54 * Initialization stuff
58 char szEntryPoint
[64];
60 } DD32BITDRIVERDATA
,*LPDD32BITDRIVERDATA
;
64 ULONG_PTR dwReserved1
;
65 ULONG_PTR dwReserved2
;
66 } DDVERSIONDATA
,*LPDDVERSIONDATA
;
68 typedef DWORD (PASCAL
*LPDD32BITDRIVERINIT
)(DWORD dwContext
);
70 /* pointer to video memory */
71 typedef ULONG_PTR FLATPTR
;
73 /* predeclare some structures */
74 typedef struct _DDHALINFO
*LPDDHALINFO
;
75 typedef struct _DDRAWI_DIRECTDRAW_INT
*LPDDRAWI_DIRECTDRAW_INT
;
76 typedef struct _DDRAWI_DIRECTDRAW_LCL
*LPDDRAWI_DIRECTDRAW_LCL
;
77 typedef struct _DDRAWI_DIRECTDRAW_GBL
*LPDDRAWI_DIRECTDRAW_GBL
;
78 typedef struct _DDRAWI_DDRAWSURFACE_INT
*LPDDRAWI_DDRAWSURFACE_INT
;
79 typedef struct _DDRAWI_DDRAWSURFACE_LCL
*LPDDRAWI_DDRAWSURFACE_LCL
;
80 typedef struct _DDRAWI_DDRAWSURFACE_GBL
*LPDDRAWI_DDRAWSURFACE_GBL
;
81 typedef struct _DDRAWI_DDRAWSURFACE_MORE
*LPDDRAWI_DDRAWSURFACE_MORE
;
82 typedef struct _DDRAWI_DDRAWSURFACE_GBL_MORE
*LPDDRAWI_DDRAWSURFACE_GBL_MORE
;
83 typedef struct _DDRAWI_DDRAWPALETTE_INT
*LPDDRAWI_DDRAWPALETTE_INT
;
84 typedef struct _DDRAWI_DDRAWPALETTE_LCL
*LPDDRAWI_DDRAWPALETTE_LCL
;
85 typedef struct _DDRAWI_DDRAWPALETTE_GBL
*LPDDRAWI_DDRAWPALETTE_GBL
;
86 typedef struct _DDRAWI_DDRAWCLIPPER_INT
*LPDDRAWI_DDRAWCLIPPER_INT
;
87 typedef struct _DDRAWI_DDRAWCLIPPER_LCL
*LPDDRAWI_DDRAWCLIPPER_LCL
;
88 typedef struct _DDRAWI_DDRAWCLIPPER_GBL
*LPDDRAWI_DDRAWCLIPPER_GBL
;
89 typedef struct _DDRAWI_DDVIDEOPORT_INT
*LPDDRAWI_DDVIDEOPORT_INT
;
90 typedef struct _DDRAWI_DDVIDEOPORT_LCL
*LPDDRAWI_DDVIDEOPORT_LCL
;
91 typedef struct _DDRAWI_DDMOTIONCOMP_INT
*LPDDRAWI_DDMOTIONCOMP_INT
;
92 typedef struct _DDRAWI_DDMOTIONCOMP_LCL
*LPDDRAWI_DDMOTIONCOMP_LCL
;
94 /* structure GUIDs for GetDriverInfo */
95 DEFINE_GUID( GUID_MiscellaneousCallbacks
, 0xEFD60CC0,0x49E7,0x11D0,0x88,0x9D,0x00,0xAA,0x00,0xBB,0xB7,0x6A );
96 /* ...videport stuff here... */
97 DEFINE_GUID( GUID_D3DCallbacks2
, 0x0BA584E1,0x70B6,0x11D0,0x88,0x9D,0x00,0xAA,0x00,0xBB,0xB7,0x6A );
98 DEFINE_GUID( GUID_D3DCallbacks3
, 0xDDF41230,0xEC0A,0x11D0,0xA9,0xB6,0x00,0xAA,0x00,0xC0,0x99,0x3E );
99 DEFINE_GUID( GUID_NonLocalVidMemCaps
, 0x86C4FA80,0x8D84,0x11D0,0x94,0xE8,0x00,0xC0,0x4F,0xC3,0x41,0x37 );
100 /* ...kernel stuff here... */
101 DEFINE_GUID( GUID_D3DExtendedCaps
, 0x7DE41F80,0x9D93,0x11D0,0x89,0xAB,0x00,0xA0,0xC9,0x05,0x41,0x29 );
102 DEFINE_GUID( GUID_ZPixelFormats
, 0x93869880,0x36CF,0x11D1,0x9B,0x1B,0x00,0xAA,0x00,0xBB,0xB8,0xAE );
103 DEFINE_GUID( GUID_DDMoreSurfaceCaps
, 0x3B8A0466,0xF269,0x11D1,0x88,0x0B,0x00,0xC0,0x4F,0xD9,0x30,0xC5 );
104 DEFINE_GUID( GUID_DDStereoMode
, 0xF828169C,0xA8E8,0x11D2,0xA1,0xF2,0x00,0xA0,0xC9,0x83,0xEA,0xF6 );
105 /* ...more stuff here... */
106 DEFINE_GUID(GUID_D3DParseUnknownCommandCallback
,0x2E04FFA0,0x98E4,0x11D1,0x8C,0xE1,0x00,0xA0,0xC9,0x06,0x29,0xA8 );
107 /* ...motioncomp stuff here... */
108 DEFINE_GUID( GUID_Miscellaneous2Callbacks
, 0x406B2F00,0x3E5A,0x11D1,0xB6,0x40,0x00,0xAA,0x00,0xA1,0xF9,0x6A );
110 /*****************************************************************************
111 * driver->ddraw callbacks
113 typedef BOOL (DDAPI
*LPDDHAL_SETINFO
)(LPDDHALINFO lpDDHalInfo
, BOOL reset
);
114 typedef FLATPTR (DDAPI
*LPDDHAL_VIDMEMALLOC
)(LPDDRAWI_DIRECTDRAW_GBL lpDD
, int heap
, DWORD dwWidth
, DWORD dwHeight
);
115 typedef void (DDAPI
*LPDDHAL_VIDMEMFREE
)(LPDDRAWI_DIRECTDRAW_GBL lpDD
, int heap
, FLATPTR fpMem
);
119 LPDDHAL_SETINFO lpSetInfo
;
120 LPDDHAL_VIDMEMALLOC lpVidMemAlloc
;
121 LPDDHAL_VIDMEMFREE lpVidMemFree
;
122 } DDHALDDRAWFNS
,*LPDDHALDDRAWFNS
;
124 /*****************************************************************************
125 * mode info structure
127 typedef struct _DDHALMODEINFO
{
137 DWORD dwAlphaBitMask
;
138 } DDHALMODEINFO
,*LPDDHALMODEINFO
;
140 #define DDMODEINFO_PALETTIZED 0x0001
141 #define DDMODEINFO_MODEX 0x0002
142 #define DDMODEINFO_UNSUPPORTED 0x0004
143 #define DDMODEINFO_STANDARDVGA 0x0008
144 #define DDMODEINFO_MAXREFRESH 0x0010
145 #define DDMODEINFO_STEREO 0x0020
147 /*****************************************************************************
148 * video memory info structure
150 typedef struct _VIDMEM
{
165 #define VIDMEM_ISLINEAR 0x00000001
166 #define VIDMEM_ISRECTANGULAR 0x00000002
167 #define VIDMEM_ISHEAP 0x00000004
168 #define VIDMEM_ISNONLOCAL 0x00000008
169 #define VIDMEM_ISWC 0x00000010
170 #define VIDMEM_ISDISABLED 0x00000020
172 typedef struct _VIDMEMINFO
{
175 DWORD dwDisplayWidth
;
176 DWORD dwDisplayHeight
;
178 DDPIXELFORMAT ddpfDisplay
;
179 DWORD dwOffscreenAlign
;
180 DWORD dwOverlayAlign
;
181 DWORD dwTextureAlign
;
182 DWORD dwZBufferAlign
;
186 } VIDMEMINFO
,*LPVIDMEMINFO
;
188 typedef struct _HEAPALIAS
{
192 } HEAPALIAS
,*LPHEAPALIAS
;
194 typedef struct _HEAPALIASINFO
{
198 LPHEAPALIAS lpAliases
;
199 } HEAPALIASINFO
,*LPHEAPALIASINFO
;
201 #define HEAPALIASINFO_MAPPEDREAL 0x00000001
202 #define HEAPALIASINFO_MAPPEDDUMMY 0x00000002
204 /*****************************************************************************
205 * capabilities structures
207 typedef struct _DDCORECAPS
{
216 DWORD dwAlphaBltConstBitDepths
;
217 DWORD dwAlphaBltPixelBitDepths
;
218 DWORD dwAlphaBltSurfaceBitDepths
;
219 DWORD dwAlphaOverlayConstBitDepths
;
220 DWORD dwAlphaOverlayPixelBitDepths
;
221 DWORD dwAlphaOverlaySurfaceBitDepths
;
222 DWORD dwZBufferBitDepths
;
225 DWORD dwMaxVisibleOverlays
;
226 DWORD dwCurrVisibleOverlays
;
227 DWORD dwNumFourCCCodes
;
228 DWORD dwAlignBoundarySrc
;
229 DWORD dwAlignSizeSrc
;
230 DWORD dwAlignBoundaryDest
;
231 DWORD dwAlignSizeDest
;
232 DWORD dwAlignStrideAlign
;
233 DWORD dwRops
[DD_ROP_SPACE
];
235 DWORD dwMinOverlayStretch
;
236 DWORD dwMaxOverlayStretch
;
237 DWORD dwMinLiveVideoStretch
;
238 DWORD dwMaxLiveVideoStretch
;
239 DWORD dwMinHwCodecStretch
;
240 DWORD dwMaxHwCodecStretch
;
247 DWORD dwSVBRops
[DD_ROP_SPACE
];
251 DWORD dwVSBRops
[DD_ROP_SPACE
];
255 DWORD dwSSBRops
[DD_ROP_SPACE
];
256 DWORD dwMaxVideoPorts
;
257 DWORD dwCurrVideoPorts
;
259 } DDCORECAPS
,*LPDDCORECAPS
;
261 typedef struct _DDNONLOCALVIDMEMCAPS
{
265 DWORD dwNLVBCKeyCaps
;
267 DWORD dwNLVBRops
[DD_ROP_SPACE
];
268 } DDNONLOCALVIDMEMCAPS
,*LPDDNONLOCALVIDMEMCAPS
;
270 typedef struct _DDSCAPSEX
{
274 } DDSCAPSEX
,*LPDDSCAPSEX
;
276 #define DDSCAPS_EXECUTEBUFFER DDSCAPS_RESERVED2
277 #define DDSCAPS2_VERTEXBUFFER DDSCAPS2_RESERVED1
278 #define DDSCAPS2_COMMANDBUFFER DDSCAPS2_RESERVED2
280 /*****************************************************************************
281 * ddraw->driver callbacks
283 #define DDHAL_DRIVER_NOTHANDLED 0
284 #define DDHAL_DRIVER_HANDLED 1
285 #define DDHAL_DRIVER_NOCKEYHW 2
287 typedef struct _DDHAL_DESTROYDRIVERDATA
*LPDDHAL_DESTROYDRIVERDATA
;
288 typedef struct _DDHAL_CREATESURFACEDATA
*LPDDHAL_CREATESURFACEDATA
;
289 typedef struct _DDHAL_DRVSETCOLORKEYDATA
*LPDDHAL_DRVSETCOLORKEYDATA
;
290 typedef struct _DDHAL_SETMODEDATA
*LPDDHAL_SETMODEDATA
;
291 typedef struct _DDHAL_WAITFORVERTICALBLANKDATA
*LPDDHAL_WAITFORVERTICALBLANKDATA
;
292 typedef struct _DDHAL_CANCREATESURFACEDATA
*LPDDHAL_CANCREATESURFACEDATA
;
293 typedef struct _DDHAL_CREATEPALETTEDATA
*LPDDHAL_CREATEPALETTEDATA
;
294 typedef struct _DDHAL_GETSCANLINEDATA
*LPDDHAL_GETSCANLINEDATA
;
295 typedef struct _DDHAL_SETEXCLUSIVEMODEDATA
*LPDDHAL_SETEXCLUSIVEMODEDATA
;
296 typedef struct _DDHAL_FLIPTOGDISURFACEDATA
*LPDDHAL_FLIPTOGDISURFACEDATA
;
298 typedef DWORD (PASCAL
*LPDDHAL_DESTROYDRIVER
) (LPDDHAL_DESTROYDRIVERDATA
);
299 typedef DWORD (PASCAL
*LPDDHAL_CREATESURFACE
) (LPDDHAL_CREATESURFACEDATA
);
300 typedef DWORD (PASCAL
*LPDDHAL_SETCOLORKEY
) (LPDDHAL_DRVSETCOLORKEYDATA
);
301 typedef DWORD (PASCAL
*LPDDHAL_SETMODE
) (LPDDHAL_SETMODEDATA
);
302 typedef DWORD (PASCAL
*LPDDHAL_WAITFORVERTICALBLANK
)(LPDDHAL_WAITFORVERTICALBLANKDATA
);
303 typedef DWORD (PASCAL
*LPDDHAL_CANCREATESURFACE
) (LPDDHAL_CANCREATESURFACEDATA
);
304 typedef DWORD (PASCAL
*LPDDHAL_CREATEPALETTE
) (LPDDHAL_CREATEPALETTEDATA
);
305 typedef DWORD (PASCAL
*LPDDHAL_GETSCANLINE
) (LPDDHAL_GETSCANLINEDATA
);
306 typedef DWORD (PASCAL
*LPDDHAL_SETEXCLUSIVEMODE
) (LPDDHAL_SETEXCLUSIVEMODEDATA
);
307 typedef DWORD (PASCAL
*LPDDHAL_FLIPTOGDISURFACE
) (LPDDHAL_FLIPTOGDISURFACEDATA
);
309 typedef struct _DDHAL_DDCALLBACKS
{
312 LPDDHAL_DESTROYDRIVER DestroyDriver
;
313 LPDDHAL_CREATESURFACE CreateSurface
;
314 LPDDHAL_SETCOLORKEY SetColorKey
;
315 LPDDHAL_SETMODE SetMode
;
316 LPDDHAL_WAITFORVERTICALBLANK WaitForVerticalBlank
;
317 LPDDHAL_CANCREATESURFACE CanCreateSurface
;
318 LPDDHAL_CREATEPALETTE CreatePalette
;
319 LPDDHAL_GETSCANLINE GetScanLine
;
321 LPDDHAL_SETEXCLUSIVEMODE SetExclusiveMode
;
322 LPDDHAL_FLIPTOGDISURFACE FlipToGDISurface
;
323 } DDHAL_DDCALLBACKS
,*LPDDHAL_DDCALLBACKS
;
325 typedef struct _DDHAL_DESTROYSURFACEDATA
*LPDDHAL_DESTROYSURFACEDATA
;
326 typedef struct _DDHAL_FLIPDATA
*LPDDHAL_FLIPDATA
;
327 typedef struct _DDHAL_SETCLIPLISTDATA
*LPDDHAL_SETCLIPLISTDATA
;
328 typedef struct _DDHAL_LOCKDATA
*LPDDHAL_LOCKDATA
;
329 typedef struct _DDHAL_UNLOCKDATA
*LPDDHAL_UNLOCKDATA
;
330 typedef struct _DDHAL_BLTDATA
*LPDDHAL_BLTDATA
;
331 typedef struct _DDHAL_SETCOLORKEYDATA
*LPDDHAL_SETCOLORKEYDATA
;
332 typedef struct _DDHAL_ADDATTACHEDSURFACEDATA
*LPDDHAL_ADDATTACHEDSURFACEDATA
;
333 typedef struct _DDHAL_GETBLTSTATUSDATA
*LPDDHAL_GETBLTSTATUSDATA
;
334 typedef struct _DDHAL_GETFLIPSTATUSDATA
*LPDDHAL_GETFLIPSTATUSDATA
;
335 typedef struct _DDHAL_UPDATEOVERLAYDATA
*LPDDHAL_UPDATEOVERLAYDATA
;
336 typedef struct _DDHAL_SETOVERLAYPOSITIONDATA
*LPDDHAL_SETOVERLAYPOSITIONDATA
;
337 typedef struct _DDHAL_SETPALETTEDATA
*LPDDHAL_SETPALETTEDATA
;
339 typedef DWORD (PASCAL
*LPDDHALSURFCB_DESTROYSURFACE
) (LPDDHAL_DESTROYSURFACEDATA
);
340 typedef DWORD (PASCAL
*LPDDHALSURFCB_FLIP
) (LPDDHAL_FLIPDATA
);
341 typedef DWORD (PASCAL
*LPDDHALSURFCB_SETCLIPLIST
) (LPDDHAL_SETCLIPLISTDATA
);
342 typedef DWORD (PASCAL
*LPDDHALSURFCB_LOCK
) (LPDDHAL_LOCKDATA
);
343 typedef DWORD (PASCAL
*LPDDHALSURFCB_UNLOCK
) (LPDDHAL_UNLOCKDATA
);
344 typedef DWORD (PASCAL
*LPDDHALSURFCB_BLT
) (LPDDHAL_BLTDATA
);
345 typedef DWORD (PASCAL
*LPDDHALSURFCB_SETCOLORKEY
) (LPDDHAL_SETCOLORKEYDATA
);
346 typedef DWORD (PASCAL
*LPDDHALSURFCB_ADDATTACHEDSURFACE
)(LPDDHAL_ADDATTACHEDSURFACEDATA
);
347 typedef DWORD (PASCAL
*LPDDHALSURFCB_GETBLTSTATUS
) (LPDDHAL_GETBLTSTATUSDATA
);
348 typedef DWORD (PASCAL
*LPDDHALSURFCB_GETFLIPSTATUS
) (LPDDHAL_GETFLIPSTATUSDATA
);
349 typedef DWORD (PASCAL
*LPDDHALSURFCB_UPDATEOVERLAY
) (LPDDHAL_UPDATEOVERLAYDATA
);
350 typedef DWORD (PASCAL
*LPDDHALSURFCB_SETOVERLAYPOSITION
)(LPDDHAL_SETOVERLAYPOSITIONDATA
);
351 typedef DWORD (PASCAL
*LPDDHALSURFCB_SETPALETTE
) (LPDDHAL_SETPALETTEDATA
);
353 typedef struct _DDHAL_DDSURFACECALLBACKS
{
356 LPDDHALSURFCB_DESTROYSURFACE DestroySurface
;
357 LPDDHALSURFCB_FLIP Flip
;
358 LPDDHALSURFCB_SETCLIPLIST SetClipList
;
359 LPDDHALSURFCB_LOCK Lock
;
360 LPDDHALSURFCB_UNLOCK Unlock
;
361 LPDDHALSURFCB_BLT Blt
;
362 LPDDHALSURFCB_SETCOLORKEY SetColorKey
;
363 LPDDHALSURFCB_ADDATTACHEDSURFACE AddAttachedSurface
;
364 LPDDHALSURFCB_GETBLTSTATUS GetBltStatus
;
365 LPDDHALSURFCB_GETFLIPSTATUS GetFlipStatus
;
366 LPDDHALSURFCB_UPDATEOVERLAY UpdateOverlay
;
367 LPDDHALSURFCB_SETOVERLAYPOSITION SetOverlayPosition
;
369 LPDDHALSURFCB_SETPALETTE SetPalette
;
370 } DDHAL_DDSURFACECALLBACKS
,*LPDDHAL_DDSURFACECALLBACKS
;
372 typedef struct _DDHAL_DESTROYPALETTEDATA
*LPDDHAL_DESTROYPALETTEDATA
;
373 typedef struct _DDHAL_SETENTRIESDATA
*LPDDHAL_SETENTRIESDATA
;
375 typedef DWORD (PASCAL
*LPDDHALPALCB_DESTROYPALETTE
)(LPDDHAL_DESTROYPALETTEDATA
);
376 typedef DWORD (PASCAL
*LPDDHALPALCB_SETENTRIES
) (LPDDHAL_SETENTRIESDATA
);
378 typedef struct _DDHAL_DDPALETTECALLBACKS
{
381 LPDDHALPALCB_DESTROYPALETTE DestroyPalette
;
382 LPDDHALPALCB_SETENTRIES SetEntries
;
383 } DDHAL_DDPALETTECALLBACKS
,*LPDDHAL_DDPALETTECALLBACKS
;
385 typedef DWORD (PASCAL
*LPDDHALEXEBUFCB_CANCREATEEXEBUF
)(LPDDHAL_CANCREATESURFACEDATA
);
386 typedef DWORD (PASCAL
*LPDDHALEXEBUFCB_CREATEEXEBUF
) (LPDDHAL_CREATESURFACEDATA
);
387 typedef DWORD (PASCAL
*LPDDHALEXEBUFCB_DESTROYEXEBUF
) (LPDDHAL_DESTROYSURFACEDATA
);
388 typedef DWORD (PASCAL
*LPDDHALEXEBUFCB_LOCKEXEBUF
) (LPDDHAL_LOCKDATA
);
389 typedef DWORD (PASCAL
*LPDDHALEXEBUFCB_UNLOCKEXEBUF
) (LPDDHAL_UNLOCKDATA
);
391 typedef struct _DDHAL_DDEXEBUFCALLBACKS
{
394 LPDDHALEXEBUFCB_CANCREATEEXEBUF CanCreateExecuteBuffer
;
395 LPDDHALEXEBUFCB_CREATEEXEBUF CreateExecuteBuffer
;
396 LPDDHALEXEBUFCB_DESTROYEXEBUF DestroyExecuteBuffer
;
397 LPDDHALEXEBUFCB_LOCKEXEBUF LockExecuteBuffer
;
398 LPDDHALEXEBUFCB_UNLOCKEXEBUF UnlockExecuteBuffer
;
399 } DDHAL_DDEXEBUFCALLBACKS
,*LPDDHAL_DDEXEBUFCALLBACKS
;
401 typedef struct _DDHAL_GETAVAILDRIVERMEMORYDATA
*LPDDHAL_GETAVAILDRIVERMEMORYDATA
;
402 typedef struct _DDHAL_UPDATENONLOCALHEAPDATA
*LPDDHAL_UPDATENONLOCALHEAPDATA
;
403 typedef struct _DDHAL_GETHEAPALIGNMENTDATA
*LPDDHAL_GETHEAPALIGNMENTDATA
;
405 typedef DWORD (PASCAL
*LPDDHAL_GETAVAILDRIVERMEMORY
)(LPDDHAL_GETAVAILDRIVERMEMORYDATA
);
406 typedef DWORD (PASCAL
*LPDDHAL_UPDATENONLOCALHEAP
) (LPDDHAL_UPDATENONLOCALHEAPDATA
);
407 typedef DWORD (PASCAL
*LPDDHAL_GETHEAPALIGNMENT
) (LPDDHAL_GETHEAPALIGNMENTDATA
);
409 typedef struct _DDHAL_DDMISCELLANEOUSCALLBACKS
{
412 LPDDHAL_GETAVAILDRIVERMEMORY GetAvailDriverMemory
;
413 LPDDHAL_UPDATENONLOCALHEAP UpdateNonLocalHeap
;
414 LPDDHAL_GETHEAPALIGNMENT GetHeapAlignment
;
415 LPDDHALSURFCB_GETBLTSTATUS GetSysmemBltStatus
;
416 } DDHAL_DDMISCELLANEOUSCALLBACKS
,*LPDDHAL_DDMISCELLANEOUSCALLBACKS
;
418 typedef struct _DDHAL_CREATESURFACEEXDATA
*LPDDHAL_CREATESURFACEEXDATA
;
419 typedef struct _DDHAL_GETDRIVERSTATEDATA
*LPDDHAL_GETDRIVERSTATEDATA
;
420 typedef struct _DDHAL_DESTROYDDLOCALDATA
*LPDDHAL_DESTROYDDLOCALDATA
;
422 typedef DWORD (PASCAL
*LPDDHAL_CREATESURFACEEX
)(LPDDHAL_CREATESURFACEEXDATA
);
423 typedef DWORD (PASCAL
*LPDDHAL_GETDRIVERSTATE
) (LPDDHAL_GETDRIVERSTATEDATA
);
424 typedef DWORD (PASCAL
*LPDDHAL_DESTROYDDLOCAL
) (LPDDHAL_DESTROYDDLOCALDATA
);
426 typedef struct _DDHAL_DDMISCELLANEOUS2CALLBACKS
{
430 LPDDHAL_CREATESURFACEEX CreateSurfaceEx
;
431 LPDDHAL_GETDRIVERSTATE GetDriverState
;
432 LPDDHAL_DESTROYDDLOCAL DestroyDDLocal
;
433 } DDHAL_DDMISCELLANEOUS2CALLBACKS
,*LPDDHAL_DDMISCELLANEOUS2CALLBACKS
;
435 typedef HRESULT (WINAPI
*LPDDGAMMACALIBRATORPROC
)(LPDDGAMMARAMP
, LPBYTE
);
437 /*****************************************************************************
438 * driver info structure
440 * The HAL is queried for additional callbacks via the GetDriverInfo callback.
442 typedef struct _DDHAL_GETDRIVERINFODATA
*LPDDHAL_GETDRIVERINFODATA
;
443 typedef DWORD (PASCAL
*LPDDHAL_GETDRIVERINFO
)(LPDDHAL_GETDRIVERINFODATA
);
445 typedef struct _DDHALINFO
{
447 LPDDHAL_DDCALLBACKS lpDDCallbacks
;
448 LPDDHAL_DDSURFACECALLBACKS lpDDSurfaceCallbacks
;
449 LPDDHAL_DDPALETTECALLBACKS lpDDPaletteCallbacks
;
452 DWORD dwMonitorFrequency
;
453 LPDDHAL_GETDRIVERINFO GetDriverInfo
;
457 LPDDHALMODEINFO lpModeInfo
;
462 ULONG_PTR lpD3DGlobalDriverData
;
463 ULONG_PTR lpD3DHALCallbacks
;
464 LPDDHAL_DDEXEBUFCALLBACKS lpDDExeBufCallbacks
;
467 #define DDHALINFO_ISPRIMARYDISPLAY 0x00000001
468 #define DDHALINFO_MODEXILLEGAL 0x00000002
469 #define DDHALINFO_GETDRIVERINFOSET 0x00000004
471 /* where the high-level ddraw implementation stores the callbacks */
472 typedef struct _DDHAL_CALLBACKS
{
473 DDHAL_DDCALLBACKS cbDDCallbacks
;
474 DDHAL_DDSURFACECALLBACKS cbDDSurfaceCallbacks
;
475 DDHAL_DDPALETTECALLBACKS cbDDPaletteCallbacks
;
476 DDHAL_DDCALLBACKS HALDD
;
477 DDHAL_DDSURFACECALLBACKS HALDDSurface
;
478 DDHAL_DDPALETTECALLBACKS HALDDPalette
;
479 DDHAL_DDCALLBACKS HELDD
;
480 DDHAL_DDSURFACECALLBACKS HELDDSurface
;
481 DDHAL_DDPALETTECALLBACKS HELDDPalette
;
482 DDHAL_DDEXEBUFCALLBACKS cbDDExeBufCallbacks
;
483 DDHAL_DDEXEBUFCALLBACKS HALDDExeBuf
;
484 DDHAL_DDEXEBUFCALLBACKS HELDDExeBuf
;
485 /* there's more... videoport, colorcontrol, misc, and motion compensation callbacks... */
486 } DDHAL_CALLBACKS
,*LPDDHAL_CALLBACKS
;
488 /*****************************************************************************
489 * parameter structures
491 typedef struct _DDHAL_DESTROYDRIVERDATA
{
492 LPDDRAWI_DIRECTDRAW_GBL lpDD
;
494 LPDDHAL_DESTROYDRIVER DestroyDriver
;
495 } DDHAL_DESTROYDRIVERDATA
;
497 typedef struct _DDHAL_SETMODEDATA
{
498 LPDDRAWI_DIRECTDRAW_GBL lpDD
;
501 LPDDHAL_SETMODE SetMode
;
506 typedef struct _DDHAL_CREATESURFACEDATA
{
507 LPDDRAWI_DIRECTDRAW_GBL lpDD
;
508 LPDDSURFACEDESC lpDDSurfaceDesc
;
509 LPDDRAWI_DDRAWSURFACE_LCL
* lplpSList
;
512 LPDDHAL_CREATESURFACE CreateSurface
;
513 } DDHAL_CREATESURFACEDATA
;
515 typedef struct _DDHAL_CANCREATESURFACEDATA
{
516 LPDDRAWI_DIRECTDRAW_GBL lpDD
;
517 LPDDSURFACEDESC lpDDSurfaceDesc
;
518 DWORD bIsDifferentPixelFormat
;
520 LPDDHAL_CANCREATESURFACE CanCreateSurface
;
521 } DDHAL_CANCREATESURFACEDATA
;
523 typedef struct _DDHAL_CREATEPALETTEDATA
{
524 LPDDRAWI_DIRECTDRAW_GBL lpDD
;
525 LPDDRAWI_DDRAWPALETTE_GBL lpDDPalette
;
526 LPPALETTEENTRY lpColorTable
;
528 LPDDHAL_CREATEPALETTE CreatePalette
;
530 } DDHAL_CREATEPALETTEDATA
;
532 typedef struct _DDHAL_SETEXCLUSIVEMODEDATA
{
533 LPDDRAWI_DIRECTDRAW_GBL lpDD
;
537 LPDDHAL_SETEXCLUSIVEMODE SetExclusiveMode
;
538 } DDHAL_SETEXCLUSIVEMODEDATA
;
541 typedef struct _DDHAL_DESTROYSURFACEDATA
{
542 LPDDRAWI_DIRECTDRAW_GBL lpDD
;
543 LPDDRAWI_DDRAWSURFACE_LCL lpDDSurface
;
545 LPDDHALSURFCB_DESTROYSURFACE DestroySurface
;
546 } DDHAL_DESTROYSURFACEDATA
;
548 typedef struct _DDHAL_FLIPDATA
{
549 LPDDRAWI_DIRECTDRAW_GBL lpDD
;
550 LPDDRAWI_DDRAWSURFACE_LCL lpSurfCurr
;
551 LPDDRAWI_DDRAWSURFACE_LCL lpSurfTarg
;
554 LPDDHALSURFCB_FLIP Flip
;
555 LPDDRAWI_DDRAWSURFACE_LCL lpSurfCurrLeft
;
556 LPDDRAWI_DDRAWSURFACE_LCL lpSurfTargLeft
;
559 typedef struct _DDHAL_LOCKDATA
{
560 LPDDRAWI_DIRECTDRAW_GBL lpDD
;
561 LPDDRAWI_DDRAWSURFACE_LCL lpDDSurface
;
566 LPDDHALSURFCB_LOCK Lock
;
570 typedef struct _DDHAL_UNLOCKDATA
{
571 LPDDRAWI_DIRECTDRAW_GBL lpDD
;
572 LPDDRAWI_DDRAWSURFACE_LCL lpDDSurface
;
574 LPDDHALSURFCB_UNLOCK Unlock
;
577 typedef struct _DDHAL_BLTDATA
{
578 LPDDRAWI_DIRECTDRAW_GBL lpDD
;
579 LPDDRAWI_DDRAWSURFACE_LCL lpDDDestSurface
;
581 LPDDRAWI_DDRAWSURFACE_LCL lpDDSrcSurface
;
587 LPDDHALSURFCB_BLT Blt
;
595 typedef struct _DDHAL_SETPALETTEDATA
{
596 LPDDRAWI_DIRECTDRAW_GBL lpDD
;
597 LPDDRAWI_DDRAWSURFACE_LCL lpDDSurface
;
598 LPDDRAWI_DDRAWPALETTE_GBL lpDDPalette
;
600 LPDDHALSURFCB_SETPALETTE SetPalette
;
602 } DDHAL_SETPALETTEDATA
;
605 typedef struct _DDHAL_DESTROYPALETTEDATA
{
606 LPDDRAWI_DIRECTDRAW_GBL lpDD
;
607 LPDDRAWI_DDRAWPALETTE_GBL lpDDPalette
;
609 LPDDHALPALCB_DESTROYPALETTE DestroyPalette
;
610 } DDHAL_DESTROYPALETTEDATA
;
612 typedef struct _DDHAL_SETENTRIESDATA
{
613 LPDDRAWI_DIRECTDRAW_GBL lpDD
;
614 LPDDRAWI_DDRAWPALETTE_GBL lpDDPalette
;
617 LPPALETTEENTRY lpEntries
;
619 LPDDHALPALCB_SETENTRIES SetEntries
;
620 } DDHAL_SETENTRIESDATA
;
622 typedef struct _DDHAL_GETDRIVERINFODATA
{
626 DWORD dwExpectedSize
;
631 } DDHAL_GETDRIVERINFODATA
;
633 /*****************************************************************************
634 * high-level ddraw implementation structures
636 typedef struct _IUNKNOWN_LIST
{
637 struct _IUNKNOWN_LIST
* lpLink
;
639 IUnknown
* lpIUnknown
;
640 } IUNKNOWN_LIST
,*LPIUNKNOWN_LIST
;
642 typedef struct _PROCESS_LIST
{
643 struct _PROCESS_LIST
* lpLink
;
648 } PROCESS_LIST
,*LPPROCESS_LIST
;
650 typedef struct _ATTACHLIST
{
652 struct _ATTACHLIST
* lpLink
;
653 LPDDRAWI_DDRAWSURFACE_LCL lpAttached
;
654 LPDDRAWI_DDRAWSURFACE_INT lpIAttached
;
655 } ATTACHLIST
,*LPATTACHLIST
;
657 #define DDAL_IMPLICIT 0x00000001
659 typedef struct _ACCESSRECTLIST
{
660 struct _ACCESSRECTLIST
* lpLink
;
662 LPDDRAWI_DIRECTDRAW_LCL lpOwner
;
663 LPVOID lpSurfaceData
;
665 LPHEAPALIASINFO lpHeapAliasInfo
;
666 } ACCESSRECTLIST
,*LPACCESSRECTLIST
;
668 #define ACCESSRECT_VRAMSTYLE 0x00000001
669 #define ACCESSRECT_NOTHOLDINGWIN16LOCK 0x00000002
670 #define ACCESSRECT_BROKEN 0x00000004
672 typedef struct _DBLNODE
{
673 struct _DBLNODE
* next
;
674 struct _DBLNODE
* prev
;
675 LPDDRAWI_DDRAWSURFACE_LCL object
;
676 LPDDRAWI_DDRAWSURFACE_INT object_int
;
677 } DBLNODE
,*LPDBLNODE
;
679 typedef struct _DDRAWI_DIRECTDRAW_INT
{
681 LPDDRAWI_DIRECTDRAW_LCL lpLcl
;
682 LPDDRAWI_DIRECTDRAW_INT lpLink
;
684 } DDRAWI_DIRECTDRAW_INT
;
686 typedef struct _DDRAWI_DIRECTDRAW_LCL
{
688 LPDDRAWI_DIRECTDRAW_GBL lpGbl
;
693 IUnknown
* pUnkOuter
;
698 LPDDRAWI_DDRAWSURFACE_INT lpPrimary
;
699 LPDDRAWI_DDRAWSURFACE_INT lpCB
;
700 DWORD dwPreferredMode
;
702 HINSTANCE hD3DInstance
;
703 IUnknown
* pD3DIUnknown
;
704 LPDDHAL_CALLBACKS lpDDCB
;
707 DWORD dwAppHackFlags
;
715 ULONG_PTR hGammaCalibrator
;
716 LPDDGAMMACALIBRATORPROC lpGammaCalibrator
;
717 } DDRAWI_DIRECTDRAW_LCL
;
719 #define DDRAWILCL_HASEXCLUSIVEMODE 0x00000001
720 #define DDRAWILCL_ISFULLSCREEN 0x00000002
721 #define DDRAWILCL_SETCOOPCALLED 0x00000004
722 #define DDRAWILCL_ACTIVEYES 0x00000008
723 #define DDRAWILCL_ACTIVENO 0x00000010
724 #define DDRAWILCL_HOOKEDHWND 0x00000020
725 #define DDRAWILCL_ALLOWMODEX 0x00000040
726 #define DDRAWILCL_V1SCLBEHAVIOUR 0x00000080
727 #define DDRAWILCL_MODEHASBEENCHANGED 0x00000100
728 #define DDRAWILCL_CREATEDWINDOW 0x00000200
729 #define DDRAWILCL_DIRTYDC 0x00000400
730 #define DDRAWILCL_DISABLEINACTIVATE 0x00000800
731 #define DDRAWILCL_CURSORCLIPPED 0x00001000
732 #define DDRAWILCL_EXPLICITMONITOR 0x00002000
733 #define DDRAWILCL_MULTITHREADED 0x00004000
734 #define DDRAWILCL_FPUSETUP 0x00008000
735 #define DDRAWILCL_POWEREDDOWN 0x00010000
736 #define DDRAWILCL_DIRECTDRAW7 0x00020000
737 #define DDRAWILCL_ATTEMPTEDD3DCONTEXT 0x00040000
738 #define DDRAWILCL_FPUPRESERVE 0x00080000
740 typedef struct _DDRAWI_DIRECTDRAW_GBL
{
743 FLATPTR fpPrimaryOrig
;
747 LPDDHAL_CALLBACKS lpDDCBtmp
;
748 LPDDRAWI_DDRAWSURFACE_INT dsList
;
749 LPDDRAWI_DDRAWPALETTE_INT palList
;
750 LPDDRAWI_DDRAWCLIPPER_INT clipperList
;
751 LPDDRAWI_DIRECTDRAW_GBL lp16DD
;
753 DWORD dwCurrOverlays
;
754 DWORD dwMonitorFrequency
;
755 DDCORECAPS ddHELCaps
;
757 DDCOLORKEY ddckCKDestOverlay
;
758 DDCOLORKEY ddckCKSrcOverlay
;
760 LPVOID lpDriverHandle
;
761 LPDDRAWI_DIRECTDRAW_LCL lpExclusiveOwner
;
763 DWORD dwModeIndexOrig
;
767 LPDDHALMODEINFO lpModeInfo
;
768 PROCESS_LIST plProcessList
;
769 DWORD dwSurfaceLockCount
;
770 DWORD dwAliasedLockCnt
;
771 ULONG_PTR dwReserved3
;
776 DBLNODE dbnOverlayRoot
;
777 volatile LPWORD lpwPDeviceFlags
;
779 DWORD dwWin16LockCnt
;
783 DWORD dwSaveNumModes
;
785 ULONG_PTR lpD3DGlobalDriverData
;
786 ULONG_PTR lpD3DHALCallbacks
;
787 DDCORECAPS ddBothCaps
;
789 LPDDVIDEOPORTCAPS lpDDVideoPortCaps
;
790 LPDDRAWI_DDVIDEOPORT_INT dvpList
;
791 ULONG_PTR lpD3DHALCallbacks2
;
796 LPHEAPALIASINFO phaiHeapAliases
;
797 ULONG_PTR hKernelHandle
;
798 ULONG_PTR pfnNotifyProc
;
799 LPDDKERNELCAPS lpDDKernelCaps
;
800 LPDDNONLOCALVIDMEMCAPS lpddNLVCaps
;
801 LPDDNONLOCALVIDMEMCAPS lpddNLVHELCaps
;
802 LPDDNONLOCALVIDMEMCAPS lpddNLVBothCaps
;
803 ULONG_PTR lpD3DExtendedCaps
;
807 char cDriverName
[MAX_DRIVER_NAME
];
809 ULONG_PTR lpD3DHALCallbacks3
;
810 DWORD dwNumZPixelFormats
;
811 LPDDPIXELFORMAT lpZPixelFormats
;
812 LPDDRAWI_DDMOTIONCOMP_INT mcList
;
814 DDSCAPSEX ddsCapsMore
;
815 } DDRAWI_DIRECTDRAW_GBL
;
817 #define DDRAWI_VIRTUALDESKTOP 0x00000008
818 #define DDRAWI_MODEX 0x00000010
819 #define DDRAWI_DISPLAYDRV 0x00000020
820 #define DDRAWI_FULLSCREEN 0x00000040
821 #define DDRAWI_MODECHANGED 0x00000080
822 #define DDRAWI_NOHARDWARE 0x00000100
823 #define DDRAWI_PALETTEINIT 0x00000200
824 #define DDRAWI_NOEMULATION 0x00000400
828 typedef struct _DDRAWI_DDRAWSURFACE_INT
{
830 LPDDRAWI_DDRAWSURFACE_LCL lpLcl
;
831 LPDDRAWI_DDRAWSURFACE_INT lpLink
;
833 } DDRAWI_DDRAWSURFACE_INT
;
835 typedef struct _DDRAWI_DDRAWSURFACE_GBL
{
839 LPACCESSRECTLIST lpRectList
;
843 LPVMEMHEAP lpVidMemHeap
;
847 LPDDRAWI_DIRECTDRAW_GBL lpDD
;
858 ULONG_PTR dwReserved1
; /* for display driver use */
859 /* optional (defaults to primary surface pixelformat) */
860 DDPIXELFORMAT ddpfSurface
;
861 } DDRAWI_DDRAWSURFACE_GBL
;
863 #define DDRAWISURFGBL_MEMFREE 0x00000001
864 #define DDRAWISURFGBL_SYSMEMREQUESTED 0x00000002
865 #define DDRAWISURFGBL_ISGDISURFACE 0x00000004
866 #define DDRAWISURFGBL_SOFTWAREAUTOFLIP 0x00000008
867 #define DDRAWISURFGBL_LOCKNOTHOLDINGWIN16LOCK 0x00000010
868 #define DDRAWISURFGBL_LOCKVRAMSTYLE 0x00000020
869 #define DDRAWISURFGBL_LOCKBROKEN 0x00000040
870 #define DDRAWISURFGBL_IMPLICITHANDLE 0x00000080
871 #define DDRAWISURFGBL_ISCLIENTMEM 0x00000100
872 #define DDRAWISURFGBL_HARDWAREOPSOURCE 0x00000200
873 #define DDRAWISURFGBL_HARDWAREOPDEST 0x00000400
874 #define DDRAWISURFGBL_HARDWAREOPSTARTED 0x00000600
875 #define DDRAWISURFGBL_VPORTINTERLEAVED 0x00000800
876 #define DDRAWISURFGBL_VPORTDATA 0x00001000
877 #define DDRAWISURFGBL_LATEALLOCATELINEAR 0x00002000
878 #define DDRAWISURFGBL_SYSMEMEXECUTEBUFFER 0x00004000
879 #define DDRAWISURFGBL_FASTLOCKHELD 0x00008000
880 #define DDRAWISURFGBL_READONLYLOCKHELD 0x00010000
882 typedef struct _DDRAWI_DDRAWSURFACE_GBL_MORE
{
885 DWORD dwPhysicalPageTable
;
886 FLATPTR fpPhysicalVidMem
;
890 ULONG_PTR dwSavedDCContext
;
891 FLATPTR fpAliasedVidMem
;
892 ULONG_PTR dwDriverReserved
;
893 ULONG_PTR dwHELReserved
;
895 ULONG_PTR hKernelSurface
;
896 DWORD dwKernelRefCnt
;
897 LPDDCOLORCONTROL lpColorInfo
;
899 DWORD dwContentsStamp
;
900 LPVOID lpvUnswappedDriverReserved
;
901 LPVOID lpDDRAWReserved2
;
902 DWORD dwDDRAWReserved1
;
903 DWORD dwDDRAWReserved2
;
904 FLATPTR fpAliasOfVidMem
;
905 } DDRAWI_DDRAWSURFACE_GBL_MORE
;
907 /* the MS version of this macro was somewhat obfuscated and unreadable
908 * (possibly because of mediocre MS coders)... so I simplified it...
909 * (and so I commit no copyright violations either, hah) */
910 #define GET_LPDDRAWSURFACE_GBL_MORE(psurf_gbl) \
911 (*(((LPDDRAWI_DDRAWSURFACE_GBL_MORE *)(psurf_gbl)) - 1))
913 typedef struct _DDRAWI_DDRAWSURFACE_MORE
{
915 IUNKNOWN_LIST
* lpIUnknowns
;
916 LPDDRAWI_DIRECTDRAW_LCL lpDD_lcl
;
917 DWORD dwPageLockCount
;
918 DWORD dwBytesAllocated
;
919 LPDDRAWI_DIRECTDRAW_INT lpDD_int
;
921 LPDDRAWI_DDRAWCLIPPER_INT lpDDIClipper
;
923 LPHEAPALIASINFO lpHeapAliasInfo
;
924 DWORD dwOverlayFlags
;
926 LPDDRAWI_DDVIDEOPORT_LCL lpVideoPort
;
927 LPDDOVERLAYFX lpddOverlayFX
;
929 DWORD dwTextureStage
;
930 LPVOID lpDDRAWReserved
;
931 LPVOID lpDDRAWReserved2
;
932 LPVOID lpDDrawReserved3
;
933 DWORD dwDDrawReserved4
;
934 LPVOID lpDDrawReserved5
;
936 LPDWORD lpOriginalGammaRamp
;
937 LPVOID lpDDrawReserved6
;
938 DWORD dwSurfaceHandle
;
939 DWORD qwDDrawReserved8
[2];
940 LPVOID lpDDrawReserved9
;
942 LPDDSURFACEDESC2 pCreatedDDSurfaceDesc2
;
943 LPDDRAWI_DDRAWSURFACE_LCL
*slist
;
946 } DDRAWI_DDRAWSURFACE_MORE
;
948 typedef struct _DDRAWI_DDRAWSURFACE_LCL
{
949 LPDDRAWI_DDRAWSURFACE_MORE lpSurfMore
;
950 LPDDRAWI_DDRAWSURFACE_GBL lpGbl
;
951 ULONG_PTR hDDSurface
;
952 LPATTACHLIST lpAttachList
;
953 LPATTACHLIST lpAttachListFrom
;
958 LPDDRAWI_DDRAWPALETTE_INT lpDDPalette
;
959 LPDDRAWI_DDRAWCLIPPER_LCL lpDDClipper
;
960 DWORD dwModeCreatedIn
;
961 DWORD dwBackBufferCount
;
962 DDCOLORKEY ddckCKDestBlt
;
963 DDCOLORKEY ddckCKSrcBlt
;
965 ULONG_PTR dwReserved1
; /* for display driver use */
967 DDCOLORKEY ddckCKSrcOverlay
;
968 DDCOLORKEY ddckCKDestOverlay
;
969 LPDDRAWI_DDRAWSURFACE_INT lpSurfaceOverlaying
;
970 DBLNODE dbnOverlayNode
;
977 } DDRAWI_DDRAWSURFACE_LCL
;
979 #define DDRAWISURF_ATTACHED 0x00000001
980 #define DDRAWISURF_IMPLICITCREATE 0x00000002
981 #define DDRAWISURF_ISFREE 0x00000004
982 #define DDRAWISURF_ATTACHED_FROM 0x00000008
983 #define DDRAWISURF_IMPLICITROOT 0x00000010
984 #define DDRAWISURF_PARTOFPRIMARYCHAIN 0x00000020
985 #define DDRAWISURF_DATAISALIASED 0x00000040
986 #define DDRAWISURF_HASDC 0x00000080
987 #define DDRAWISURF_HASCKEYDESTOVERLAY 0x00000100
988 #define DDRAWISURF_HASCKEYDESTBLT 0x00000200
989 #define DDRAWISURF_HASCKEYSRCOVERLAY 0x00000400
990 #define DDRAWISURF_HASCKEYSRCBLT 0x00000800
991 #define DDRAWISURF_LOCKEXCLUDEDCURSOR 0x00001000
992 #define DDRAWISURF_HASPIXELFORMAT 0x00002000
993 #define DDRAWISURF_HASOVERLAYDATA 0x00004000
994 #define DDRAWISURF_SETGAMMA 0x00008000
996 #define DDRAWISURF_INVALID 0x10000000
999 typedef struct _DDRAWI_DDRAWPALETTE_INT
{
1001 LPDDRAWI_DDRAWPALETTE_LCL lpLcl
;
1002 LPDDRAWI_DDRAWPALETTE_INT lpLink
;
1004 } DDRAWI_DDRAWPALETTE_INT
;
1006 typedef struct _DDRAWI_DDRAWPALETTE_GBL
{
1009 LPDDRAWI_DIRECTDRAW_LCL lpDD_lcl
;
1011 LPPALETTEENTRY lpColorTable
;
1013 ULONG_PTR dwReserved1
; /* for display driver use */
1014 HPALETTE hHELGDIPalette
;
1017 DWORD dwDriverReserved
;
1018 DWORD dwContentsStamp
;
1023 } DDRAWI_DDRAWPALETTE_GBL
;
1025 #define DDRAWIPAL_256 0x00000001
1026 #define DDRAWIPAL_16 0x00000002
1027 #define DDRAWIPAL_GDI 0x00000004
1028 #define DDRAWIPAL_STORED_8 0x00000008
1029 #define DDRAWIPAL_STORED_16 0x00000010
1030 #define DDRAWIPAL_STORED_24 0x00000020
1031 #define DDRAWIPAL_EXCLUSIVE 0x00000040
1032 #define DDRAWIPAL_INHEL 0x00000080
1033 #define DDRAWIPAL_DIRTY 0x00000100
1034 #define DDRAWIPAL_ALLOW256 0x00000200
1035 #define DDRAWIPAL_4 0x00000400
1036 #define DDRAWIPAL_2 0x00000800
1037 #define DDRAWIPAL_STORED_8INDEX 0x00001000
1038 #define DDRAWIPAL_ALPHA 0x00002000
1040 typedef struct _DDRAWI_DDRAWPALETTE_LCL
{
1042 LPDDRAWI_DDRAWPALETTE_GBL lpGbl
;
1043 ULONG_PTR dwUnused0
;
1044 DWORD dwLocalRefCnt
;
1045 IUnknown
* pUnkOuter
;
1046 LPDDRAWI_DIRECTDRAW_LCL lpDD_lcl
;
1047 ULONG_PTR dwReserved1
;
1049 ULONG_PTR dwDDRAWReserved1
;
1050 ULONG_PTR dwDDRAWReserved2
;
1051 ULONG_PTR dwDDRAWReserved3
;
1052 } DDRAWI_DDRAWPALETTE_LCL
;
1058 #endif /* __WINE_DDRAWI_H */