forked from hifi/cnc-ddraw
-
Notifications
You must be signed in to change notification settings - Fork 1
/
ddraw.h
3791 lines (3241 loc) · 134 KB
/
ddraw.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*==========================================================================;
*
* Copyright (C) 1994-1997 Microsoft Corporation. All Rights Reserved.
*
* File: ddraw.h
* Content: DirectDraw include file
*
***************************************************************************/
#ifndef __DDRAW_INCLUDED__
#define __DDRAW_INCLUDED__
/*
* If you wish an application built against the newest version of DirectDraw
* to run against an older DirectDraw run time then define DIRECTDRAW_VERSION
* to be the earlies version of DirectDraw you wish to run against. For,
* example if you wish an application to run against a DX 3 runtime define
* DIRECTDRAW_VERSION to be 0x0300.
*/
#ifndef DIRECTDRAW_VERSION
#define DIRECTDRAW_VERSION 0x0500
#endif /* DIRECTDRAW_VERSION */
#if defined( _WIN32 ) && !defined( _NO_COM )
#define COM_NO_WINDOWS_H
#include <objbase.h>
#else
#define IUnknown void
#if !defined( NT_BUILD_ENVIRONMENT ) && !defined(WINNT)
#define CO_E_NOTINITIALIZED 0x800401F0L
#endif
#endif
#define _FACDD 0x876
#define MAKE_DDHRESULT( code ) MAKE_HRESULT( 1, _FACDD, code )
#ifdef __cplusplus
extern "C" {
#endif
/*
* GUIDS used by DirectDraw objects
*/
#if defined( _WIN32 ) && !defined( _NO_COM )
DEFINE_GUID( CLSID_DirectDraw, 0xD7B70EE0,0x4340,0x11CF,0xB0,0x63,0x00,0x20,0xAF,0xC2,0xCD,0x35 );
DEFINE_GUID( CLSID_DirectDrawClipper, 0x593817A0,0x7DB3,0x11CF,0xA2,0xDE,0x00,0xAA,0x00,0xb9,0x33,0x56 );
DEFINE_GUID( IID_IDirectDraw, 0x6C14DB80,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
DEFINE_GUID( IID_IDirectDraw2, 0xB3A6F3E0,0x2B43,0x11CF,0xA2,0xDE,0x00,0xAA,0x00,0xB9,0x33,0x56 );
DEFINE_GUID( IID_IDirectDrawSurface, 0x6C14DB81,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
DEFINE_GUID( IID_IDirectDrawSurface2, 0x57805885,0x6eec,0x11cf,0x94,0x41,0xa8,0x23,0x03,0xc1,0x0e,0x27 );
DEFINE_GUID( IID_IDirectDrawSurface3, 0xDA044E00,0x69B2,0x11D0,0xA1,0xD5,0x00,0xAA,0x00,0xB8,0xDF,0xBB );
DEFINE_GUID( IID_IDirectDrawPalette, 0x6C14DB84,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
DEFINE_GUID( IID_IDirectDrawClipper, 0x6C14DB85,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
DEFINE_GUID( IID_IDirectDrawColorControl, 0x4B9F0EE0,0x0D7E,0x11D0,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8 );
#endif
/*============================================================================
*
* DirectDraw Structures
*
* Various structures used to invoke DirectDraw.
*
*==========================================================================*/
struct IDirectDraw;
struct IDirectDrawSurface;
struct IDirectDrawPalette;
struct IDirectDrawClipper;
typedef struct IDirectDraw FAR *LPDIRECTDRAW;
typedef struct IDirectDraw2 FAR *LPDIRECTDRAW2;
typedef struct IDirectDrawSurface FAR *LPDIRECTDRAWSURFACE;
typedef struct IDirectDrawSurface2 FAR *LPDIRECTDRAWSURFACE2;
typedef struct IDirectDrawSurface3 FAR *LPDIRECTDRAWSURFACE3;
typedef struct IDirectDrawPalette FAR *LPDIRECTDRAWPALETTE;
typedef struct IDirectDrawClipper FAR *LPDIRECTDRAWCLIPPER;
typedef struct IDirectDrawColorControl FAR *LPDIRECTDRAWCOLORCONTROL;
typedef struct _DDFXROP FAR *LPDDFXROP;
typedef struct _DDSURFACEDESC FAR *LPDDSURFACEDESC;
typedef struct _DDCOLORCONTROL FAR *LPDDCOLORCONTROL;
/*
* API's
*/
#if (defined (WIN32) || defined( _WIN32 ) ) && !defined( _NO_COM )
//#if defined( _WIN32 ) && !defined( _NO_ENUM )
typedef BOOL (FAR PASCAL * LPDDENUMCALLBACKA)(GUID FAR *, LPSTR, LPSTR, LPVOID);
typedef BOOL (FAR PASCAL * LPDDENUMCALLBACKW)(GUID FAR *, LPWSTR, LPWSTR, LPVOID);
extern HRESULT WINAPI DirectDrawEnumerateW( LPDDENUMCALLBACKW lpCallback, LPVOID lpContext );
extern HRESULT WINAPI DirectDrawEnumerateA( LPDDENUMCALLBACKA lpCallback, LPVOID lpContext );
#ifdef UNICODE
typedef LPDDENUMCALLBACKW LPDDENUMCALLBACK;
#define DirectDrawEnumerate DirectDrawEnumerateW
#else
typedef LPDDENUMCALLBACKA LPDDENUMCALLBACK;
#define DirectDrawEnumerate DirectDrawEnumerateA
#endif
extern HRESULT WINAPI DirectDrawCreate( GUID FAR *lpGUID, LPDIRECTDRAW FAR *lplpDD, IUnknown FAR *pUnkOuter );
extern HRESULT WINAPI DirectDrawCreateClipper( DWORD dwFlags, LPDIRECTDRAWCLIPPER FAR *lplpDDClipper, IUnknown FAR *pUnkOuter );
#endif
#define REGSTR_KEY_DDHW_DESCRIPTION "Description"
#define REGSTR_KEY_DDHW_DRIVERNAME "DriverName"
#define REGSTR_PATH_DDHW "Hardware\\DirectDrawDrivers"
#define DDCREATE_HARDWAREONLY 0x00000001l
#define DDCREATE_EMULATIONONLY 0x00000002l
#if defined(WINNT) || !defined(WIN32)
typedef long HRESULT;
#endif
//#ifndef WINNT
typedef HRESULT (FAR PASCAL * LPDDENUMMODESCALLBACK)(LPDDSURFACEDESC, LPVOID);
typedef HRESULT (FAR PASCAL * LPDDENUMSURFACESCALLBACK)(LPDIRECTDRAWSURFACE, LPDDSURFACEDESC, LPVOID);
//#endif
/*
* DDCOLORKEY
*/
typedef struct _DDCOLORKEY
{
DWORD dwColorSpaceLowValue; // low boundary of color space that is to
// be treated as Color Key, inclusive
DWORD dwColorSpaceHighValue; // high boundary of color space that is
// to be treated as Color Key, inclusive
} DDCOLORKEY;
typedef DDCOLORKEY FAR* LPDDCOLORKEY;
/*
* DDBLTFX
* Used to pass override information to the DIRECTDRAWSURFACE callback Blt.
*/
typedef struct _DDBLTFX
{
DWORD dwSize; // size of structure
DWORD dwDDFX; // FX operations
DWORD dwROP; // Win32 raster operations
DWORD dwDDROP; // Raster operations new for DirectDraw
DWORD dwRotationAngle; // Rotation angle for blt
DWORD dwZBufferOpCode; // ZBuffer compares
DWORD dwZBufferLow; // Low limit of Z buffer
DWORD dwZBufferHigh; // High limit of Z buffer
DWORD dwZBufferBaseDest; // Destination base value
DWORD dwZDestConstBitDepth; // Bit depth used to specify Z constant for destination
union
{
DWORD dwZDestConst; // Constant to use as Z buffer for dest
LPDIRECTDRAWSURFACE lpDDSZBufferDest; // Surface to use as Z buffer for dest
};
DWORD dwZSrcConstBitDepth; // Bit depth used to specify Z constant for source
union
{
DWORD dwZSrcConst; // Constant to use as Z buffer for src
LPDIRECTDRAWSURFACE lpDDSZBufferSrc; // Surface to use as Z buffer for src
};
DWORD dwAlphaEdgeBlendBitDepth; // Bit depth used to specify constant for alpha edge blend
DWORD dwAlphaEdgeBlend; // Alpha for edge blending
DWORD dwReserved;
DWORD dwAlphaDestConstBitDepth; // Bit depth used to specify alpha constant for destination
union
{
DWORD dwAlphaDestConst; // Constant to use as Alpha Channel
LPDIRECTDRAWSURFACE lpDDSAlphaDest; // Surface to use as Alpha Channel
};
DWORD dwAlphaSrcConstBitDepth; // Bit depth used to specify alpha constant for source
union
{
DWORD dwAlphaSrcConst; // Constant to use as Alpha Channel
LPDIRECTDRAWSURFACE lpDDSAlphaSrc; // Surface to use as Alpha Channel
};
union
{
DWORD dwFillColor; // color in RGB or Palettized
DWORD dwFillDepth; // depth value for z-buffer
DWORD dwFillPixel; // pixel value for RGBA or RGBZ
LPDIRECTDRAWSURFACE lpDDSPattern; // Surface to use as pattern
};
DDCOLORKEY ddckDestColorkey; // DestColorkey override
DDCOLORKEY ddckSrcColorkey; // SrcColorkey override
} DDBLTFX;
typedef DDBLTFX FAR* LPDDBLTFX;
/*
* DDSCAPS
*/
typedef struct _DDSCAPS
{
DWORD dwCaps; // capabilities of surface wanted
} DDSCAPS;
typedef DDSCAPS FAR* LPDDSCAPS;
/*
* DDCAPS
*/
#define DD_ROP_SPACE (256/32) // space required to store ROP array
#if DIRECTDRAW_VERSION >= 0x0500
/*
* This structure is the DDCAPS structure as it was in version 2 and 3 of Direct X.
* It is present for back compatability.
*/
typedef struct _DDCAPS_DX3
{
DWORD dwSize; // size of the DDDRIVERCAPS structure
DWORD dwCaps; // driver specific capabilities
DWORD dwCaps2; // more driver specific capabilites
DWORD dwCKeyCaps; // color key capabilities of the surface
DWORD dwFXCaps; // driver specific stretching and effects capabilites
DWORD dwFXAlphaCaps; // alpha driver specific capabilities
DWORD dwPalCaps; // palette capabilities
DWORD dwSVCaps; // stereo vision capabilities
DWORD dwAlphaBltConstBitDepths; // DDBD_2,4,8
DWORD dwAlphaBltPixelBitDepths; // DDBD_1,2,4,8
DWORD dwAlphaBltSurfaceBitDepths; // DDBD_1,2,4,8
DWORD dwAlphaOverlayConstBitDepths; // DDBD_2,4,8
DWORD dwAlphaOverlayPixelBitDepths; // DDBD_1,2,4,8
DWORD dwAlphaOverlaySurfaceBitDepths; // DDBD_1,2,4,8
DWORD dwZBufferBitDepths; // DDBD_8,16,24,32
DWORD dwVidMemTotal; // total amount of video memory
DWORD dwVidMemFree; // amount of free video memory
DWORD dwMaxVisibleOverlays; // maximum number of visible overlays
DWORD dwCurrVisibleOverlays; // current number of visible overlays
DWORD dwNumFourCCCodes; // number of four cc codes
DWORD dwAlignBoundarySrc; // source rectangle alignment
DWORD dwAlignSizeSrc; // source rectangle byte size
DWORD dwAlignBoundaryDest; // dest rectangle alignment
DWORD dwAlignSizeDest; // dest rectangle byte size
DWORD dwAlignStrideAlign; // stride alignment
DWORD dwRops[DD_ROP_SPACE]; // ROPS supported
DDSCAPS ddsCaps; // DDSCAPS structure has all the general capabilities
DWORD dwMinOverlayStretch; // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
DWORD dwMaxOverlayStretch; // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
DWORD dwMinLiveVideoStretch; // minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
DWORD dwMaxLiveVideoStretch; // maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
DWORD dwMinHwCodecStretch; // minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
DWORD dwMaxHwCodecStretch; // maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
DWORD dwReserved1; // reserved
DWORD dwReserved2; // reserved
DWORD dwReserved3; // reserved
DWORD dwSVBCaps; // driver specific capabilities for System->Vmem blts
DWORD dwSVBCKeyCaps; // driver color key capabilities for System->Vmem blts
DWORD dwSVBFXCaps; // driver FX capabilities for System->Vmem blts
DWORD dwSVBRops[DD_ROP_SPACE];// ROPS supported for System->Vmem blts
DWORD dwVSBCaps; // driver specific capabilities for Vmem->System blts
DWORD dwVSBCKeyCaps; // driver color key capabilities for Vmem->System blts
DWORD dwVSBFXCaps; // driver FX capabilities for Vmem->System blts
DWORD dwVSBRops[DD_ROP_SPACE];// ROPS supported for Vmem->System blts
DWORD dwSSBCaps; // driver specific capabilities for System->System blts
DWORD dwSSBCKeyCaps; // driver color key capabilities for System->System blts
DWORD dwSSBFXCaps; // driver FX capabilities for System->System blts
DWORD dwSSBRops[DD_ROP_SPACE];// ROPS supported for System->System blts
DWORD dwReserved4; // reserved
DWORD dwReserved5; // reserved
DWORD dwReserved6; // reserved
} DDCAPS_DX3;
typedef DDCAPS_DX3 FAR* LPDDCAPS_DX3;
#endif /* DIRECTDRAW_VERSION >= 0x0500 */
typedef struct _DDCAPS
{
/* 0*/ DWORD dwSize; // size of the DDDRIVERCAPS structure
/* 4*/ DWORD dwCaps; // driver specific capabilities
/* 8*/ DWORD dwCaps2; // more driver specific capabilites
/* c*/ DWORD dwCKeyCaps; // color key capabilities of the surface
/* 10*/ DWORD dwFXCaps; // driver specific stretching and effects capabilites
/* 14*/ DWORD dwFXAlphaCaps; // alpha driver specific capabilities
/* 18*/ DWORD dwPalCaps; // palette capabilities
/* 1c*/ DWORD dwSVCaps; // stereo vision capabilities
/* 20*/ DWORD dwAlphaBltConstBitDepths; // DDBD_2,4,8
/* 24*/ DWORD dwAlphaBltPixelBitDepths; // DDBD_1,2,4,8
/* 28*/ DWORD dwAlphaBltSurfaceBitDepths; // DDBD_1,2,4,8
/* 2c*/ DWORD dwAlphaOverlayConstBitDepths; // DDBD_2,4,8
/* 30*/ DWORD dwAlphaOverlayPixelBitDepths; // DDBD_1,2,4,8
/* 34*/ DWORD dwAlphaOverlaySurfaceBitDepths; // DDBD_1,2,4,8
/* 38*/ DWORD dwZBufferBitDepths; // DDBD_8,16,24,32
/* 3c*/ DWORD dwVidMemTotal; // total amount of video memory
/* 40*/ DWORD dwVidMemFree; // amount of free video memory
/* 44*/ DWORD dwMaxVisibleOverlays; // maximum number of visible overlays
/* 48*/ DWORD dwCurrVisibleOverlays; // current number of visible overlays
/* 4c*/ DWORD dwNumFourCCCodes; // number of four cc codes
/* 50*/ DWORD dwAlignBoundarySrc; // source rectangle alignment
/* 54*/ DWORD dwAlignSizeSrc; // source rectangle byte size
/* 58*/ DWORD dwAlignBoundaryDest; // dest rectangle alignment
/* 5c*/ DWORD dwAlignSizeDest; // dest rectangle byte size
/* 60*/ DWORD dwAlignStrideAlign; // stride alignment
/* 64*/ DWORD dwRops[DD_ROP_SPACE]; // ROPS supported
/* 84*/ DDSCAPS ddsCaps; // DDSCAPS structure has all the general capabilities
/* 88*/ DWORD dwMinOverlayStretch; // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
/* 8c*/ DWORD dwMaxOverlayStretch; // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
/* 90*/ DWORD dwMinLiveVideoStretch; // minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
/* 94*/ DWORD dwMaxLiveVideoStretch; // maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
/* 98*/ DWORD dwMinHwCodecStretch; // minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
/* 9c*/ DWORD dwMaxHwCodecStretch; // maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
/* a0*/ DWORD dwReserved1; // reserved
/* a4*/ DWORD dwReserved2; // reserved
/* a8*/ DWORD dwReserved3; // reserved
/* ac*/ DWORD dwSVBCaps; // driver specific capabilities for System->Vmem blts
/* b0*/ DWORD dwSVBCKeyCaps; // driver color key capabilities for System->Vmem blts
/* b4*/ DWORD dwSVBFXCaps; // driver FX capabilities for System->Vmem blts
/* b8*/ DWORD dwSVBRops[DD_ROP_SPACE];// ROPS supported for System->Vmem blts
/* d8*/ DWORD dwVSBCaps; // driver specific capabilities for Vmem->System blts
/* dc*/ DWORD dwVSBCKeyCaps; // driver color key capabilities for Vmem->System blts
/* e0*/ DWORD dwVSBFXCaps; // driver FX capabilities for Vmem->System blts
/* e4*/ DWORD dwVSBRops[DD_ROP_SPACE];// ROPS supported for Vmem->System blts
/*104*/ DWORD dwSSBCaps; // driver specific capabilities for System->System blts
/*108*/ DWORD dwSSBCKeyCaps; // driver color key capabilities for System->System blts
/*10c*/ DWORD dwSSBFXCaps; // driver FX capabilities for System->System blts
/*110*/ DWORD dwSSBRops[DD_ROP_SPACE];// ROPS supported for System->System blts
#if DIRECTDRAW_VERSION >= 0x0500
/*130*/ DWORD dwMaxVideoPorts; // maximum number of usable video ports
/*134*/ DWORD dwCurrVideoPorts; // current number of video ports used
/*138*/ DWORD dwSVBCaps2; // more driver specific capabilities for System->Vmem blts
/*13c*/ DWORD dwNLVBCaps; // driver specific capabilities for non-local->local vidmem blts
/*140*/ DWORD dwNLVBCaps2; // more driver specific capabilities non-local->local vidmem blts
/*144*/ DWORD dwNLVBCKeyCaps; // driver color key capabilities for non-local->local vidmem blts
/*148*/ DWORD dwNLVBFXCaps; // driver FX capabilities for non-local->local blts
/*14c*/ DWORD dwNLVBRops[DD_ROP_SPACE]; // ROPS supported for non-local->local blts
#else /* DIRECTDRAW_VERSION >= 0x0500 */
/*130*/ DWORD dwReserved4; // reserved
/*134*/ DWORD dwReserved5; // reserved
/*138*/ DWORD dwReserved6; // reserved
#endif /* DIRECTDRAW_VERSION >= 0x0500 */
} DDCAPS;
typedef DDCAPS FAR* LPDDCAPS;
/*
* DDPIXELFORMAT
*/
typedef struct _DDPIXELFORMAT
{
DWORD dwSize; // size of structure
DWORD dwFlags; // pixel format flags
DWORD dwFourCC; // (FOURCC code)
union
{
DWORD dwRGBBitCount; // how many bits per pixel
DWORD dwYUVBitCount; // how many bits per pixel
DWORD dwZBufferBitDepth; // how many bits for z buffers
DWORD dwAlphaBitDepth; // how many bits for alpha channels
};
union
{
DWORD dwRBitMask; // mask for red bit
DWORD dwYBitMask; // mask for Y bits
};
union
{
DWORD dwGBitMask; // mask for green bits
DWORD dwUBitMask; // mask for U bits
};
union
{
DWORD dwBBitMask; // mask for blue bits
DWORD dwVBitMask; // mask for V bits
};
union
{
DWORD dwRGBAlphaBitMask; // mask for alpha channel
DWORD dwYUVAlphaBitMask; // mask for alpha channel
DWORD dwRGBZBitMask; // mask for Z channel
DWORD dwYUVZBitMask; // mask for Z channel
};
} DDPIXELFORMAT;
typedef DDPIXELFORMAT FAR* LPDDPIXELFORMAT;
/*
* DDOVERLAYFX
*/
typedef struct _DDOVERLAYFX
{
DWORD dwSize; // size of structure
DWORD dwAlphaEdgeBlendBitDepth; // Bit depth used to specify constant for alpha edge blend
DWORD dwAlphaEdgeBlend; // Constant to use as alpha for edge blend
DWORD dwReserved;
DWORD dwAlphaDestConstBitDepth; // Bit depth used to specify alpha constant for destination
union
{
DWORD dwAlphaDestConst; // Constant to use as alpha channel for dest
LPDIRECTDRAWSURFACE lpDDSAlphaDest; // Surface to use as alpha channel for dest
};
DWORD dwAlphaSrcConstBitDepth; // Bit depth used to specify alpha constant for source
union
{
DWORD dwAlphaSrcConst; // Constant to use as alpha channel for src
LPDIRECTDRAWSURFACE lpDDSAlphaSrc; // Surface to use as alpha channel for src
};
DDCOLORKEY dckDestColorkey; // DestColorkey override
DDCOLORKEY dckSrcColorkey; // DestColorkey override
DWORD dwDDFX; // Overlay FX
DWORD dwFlags; // flags
} DDOVERLAYFX;
typedef DDOVERLAYFX FAR *LPDDOVERLAYFX;
/*
* DDBLTBATCH: BltBatch entry structure
*/
typedef struct _DDBLTBATCH
{
LPRECT lprDest;
LPDIRECTDRAWSURFACE lpDDSSrc;
LPRECT lprSrc;
DWORD dwFlags;
LPDDBLTFX lpDDBltFx;
} DDBLTBATCH;
typedef DDBLTBATCH FAR * LPDDBLTBATCH;
/*
* callbacks
*/
typedef DWORD (FAR PASCAL *LPCLIPPERCALLBACK)(LPDIRECTDRAWCLIPPER lpDDClipper, HWND hWnd, DWORD code, LPVOID lpContext );
#ifdef STREAMING
typedef DWORD (FAR PASCAL *LPSURFACESTREAMINGCALLBACK)(DWORD);
#endif
/*
* INTERACES FOLLOW:
* IDirectDraw
* IDirectDrawClipper
* IDirectDrawPalette
* IDirectDrawSurface
*/
/*
* IDirectDraw
*/
#if defined( _WIN32 ) && !defined( _NO_COM )
#undef INTERFACE
#define INTERFACE IDirectDraw
DECLARE_INTERFACE_( IDirectDraw, IUnknown )
{
/*** IUnknown methods ***/
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
/*** IDirectDraw methods ***/
STDMETHOD(Compact)(THIS) PURE;
STDMETHOD(CreateClipper)(THIS_ DWORD, LPDIRECTDRAWCLIPPER FAR*, IUnknown FAR * ) PURE;
STDMETHOD(CreatePalette)(THIS_ DWORD, LPPALETTEENTRY, LPDIRECTDRAWPALETTE FAR*, IUnknown FAR * ) PURE;
STDMETHOD(CreateSurface)(THIS_ LPDDSURFACEDESC, LPDIRECTDRAWSURFACE FAR *, IUnknown FAR *) PURE;
STDMETHOD(DuplicateSurface)( THIS_ LPDIRECTDRAWSURFACE, LPDIRECTDRAWSURFACE FAR * ) PURE;
STDMETHOD(EnumDisplayModes)( THIS_ DWORD, LPDDSURFACEDESC, LPVOID, LPDDENUMMODESCALLBACK ) PURE;
STDMETHOD(EnumSurfaces)(THIS_ DWORD, LPDDSURFACEDESC, LPVOID,LPDDENUMSURFACESCALLBACK ) PURE;
STDMETHOD(FlipToGDISurface)(THIS) PURE;
STDMETHOD(GetCaps)( THIS_ LPDDCAPS, LPDDCAPS) PURE;
STDMETHOD(GetDisplayMode)( THIS_ LPDDSURFACEDESC) PURE;
STDMETHOD(GetFourCCCodes)(THIS_ LPDWORD, LPDWORD ) PURE;
STDMETHOD(GetGDISurface)(THIS_ LPDIRECTDRAWSURFACE FAR *) PURE;
STDMETHOD(GetMonitorFrequency)(THIS_ LPDWORD) PURE;
STDMETHOD(GetScanLine)(THIS_ LPDWORD) PURE;
STDMETHOD(GetVerticalBlankStatus)(THIS_ LPBOOL ) PURE;
STDMETHOD(Initialize)(THIS_ GUID FAR *) PURE;
STDMETHOD(RestoreDisplayMode)(THIS) PURE;
STDMETHOD(SetCooperativeLevel)(THIS_ HWND, DWORD) PURE;
STDMETHOD(SetDisplayMode)(THIS_ DWORD, DWORD,DWORD) PURE;
STDMETHOD(WaitForVerticalBlank)(THIS_ DWORD, HANDLE ) PURE;
};
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectDraw_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
#define IDirectDraw_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDirectDraw_Release(p) (p)->lpVtbl->Release(p)
#define IDirectDraw_Compact(p) (p)->lpVtbl->Compact(p)
#define IDirectDraw_CreateClipper(p, a, b, c) (p)->lpVtbl->CreateClipper(p, a, b, c)
#define IDirectDraw_CreatePalette(p, a, b, c, d) (p)->lpVtbl->CreatePalette(p, a, b, c, d)
#define IDirectDraw_CreateSurface(p, a, b, c) (p)->lpVtbl->CreateSurface(p, a, b, c)
#define IDirectDraw_DuplicateSurface(p, a, b) (p)->lpVtbl->DuplicateSurface(p, a, b)
#define IDirectDraw_EnumDisplayModes(p, a, b, c, d) (p)->lpVtbl->EnumDisplayModes(p, a, b, c, d)
#define IDirectDraw_EnumSurfaces(p, a, b, c, d) (p)->lpVtbl->EnumSurfaces(p, a, b, c, d)
#define IDirectDraw_FlipToGDISurface(p) (p)->lpVtbl->FlipToGDISurface(p)
#define IDirectDraw_GetCaps(p, a, b) (p)->lpVtbl->GetCaps(p, a, b)
#define IDirectDraw_GetDisplayMode(p, a) (p)->lpVtbl->GetDisplayMode(p, a)
#define IDirectDraw_GetFourCCCodes(p, a, b) (p)->lpVtbl->GetFourCCCodes(p, a, b)
#define IDirectDraw_GetGDISurface(p, a) (p)->lpVtbl->GetGDISurface(p, a)
#define IDirectDraw_GetMonitorFrequency(p, a) (p)->lpVtbl->GetMonitorFrequency(p, a)
#define IDirectDraw_GetScanLine(p, a) (p)->lpVtbl->GetScanLine(p, a)
#define IDirectDraw_GetVerticalBlankStatus(p, a) (p)->lpVtbl->GetVerticalBlankStatus(p, a)
#define IDirectDraw_Initialize(p, a) (p)->lpVtbl->Initialize(p, a)
#define IDirectDraw_RestoreDisplayMode(p) (p)->lpVtbl->RestoreDisplayMode(p)
#define IDirectDraw_SetCooperativeLevel(p, a, b) (p)->lpVtbl->SetCooperativeLevel(p, a, b)
#define IDirectDraw_SetDisplayMode(p, a, b, c) (p)->lpVtbl->SetDisplayMode(p, a, b, c)
#define IDirectDraw_WaitForVerticalBlank(p, a, b) (p)->lpVtbl->WaitForVerticalBlank(p, a, b)
#else
#define IDirectDraw_QueryInterface(p, a, b) (p)->QueryInterface(a, b)
#define IDirectDraw_AddRef(p) (p)->AddRef()
#define IDirectDraw_Release(p) (p)->Release()
#define IDirectDraw_Compact(p) (p)->Compact()
#define IDirectDraw_CreateClipper(p, a, b, c) (p)->CreateClipper(a, b, c)
#define IDirectDraw_CreatePalette(p, a, b, c, d) (p)->CreatePalette(a, b, c, d)
#define IDirectDraw_CreateSurface(p, a, b, c) (p)->CreateSurface(a, b, c)
#define IDirectDraw_DuplicateSurface(p, a, b) (p)->DuplicateSurface(a, b)
#define IDirectDraw_EnumDisplayModes(p, a, b, c, d) (p)->EnumDisplayModes(a, b, c, d)
#define IDirectDraw_EnumSurfaces(p, a, b, c, d) (p)->EnumSurfaces(a, b, c, d)
#define IDirectDraw_FlipToGDISurface(p) (p)->FlipToGDISurface()
#define IDirectDraw_GetCaps(p, a, b) (p)->GetCaps(a, b)
#define IDirectDraw_GetDisplayMode(p, a) (p)->GetDisplayMode(a)
#define IDirectDraw_GetFourCCCodes(p, a, b) (p)->GetFourCCCodes(a, b)
#define IDirectDraw_GetGDISurface(p, a) (p)->GetGDISurface(a)
#define IDirectDraw_GetMonitorFrequency(p, a) (p)->GetMonitorFrequency(a)
#define IDirectDraw_GetScanLine(p, a) (p)->GetScanLine(a)
#define IDirectDraw_GetVerticalBlankStatus(p, a) (p)->GetVerticalBlankStatus(a)
#define IDirectDraw_Initialize(p, a) (p)->Initialize(a)
#define IDirectDraw_RestoreDisplayMode(p) (p)->RestoreDisplayMode()
#define IDirectDraw_SetCooperativeLevel(p, a, b) (p)->SetCooperativeLevel(a, b)
#define IDirectDraw_SetDisplayMode(p, a, b, c) (p)->SetDisplayMode(a, b, c)
#define IDirectDraw_WaitForVerticalBlank(p, a, b) (p)->WaitForVerticalBlank(a, b)
#endif
#endif
#if defined( _WIN32 ) && !defined( _NO_COM )
#undef INTERFACE
#define INTERFACE IDirectDraw2
DECLARE_INTERFACE_( IDirectDraw2, IUnknown )
{
/*** IUnknown methods ***/
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
/*** IDirectDraw methods ***/
STDMETHOD(Compact)(THIS) PURE;
STDMETHOD(CreateClipper)(THIS_ DWORD, LPDIRECTDRAWCLIPPER FAR*, IUnknown FAR * ) PURE;
STDMETHOD(CreatePalette)(THIS_ DWORD, LPPALETTEENTRY, LPDIRECTDRAWPALETTE FAR*, IUnknown FAR * ) PURE;
STDMETHOD(CreateSurface)(THIS_ LPDDSURFACEDESC, LPDIRECTDRAWSURFACE FAR *, IUnknown FAR *) PURE;
STDMETHOD(DuplicateSurface)( THIS_ LPDIRECTDRAWSURFACE, LPDIRECTDRAWSURFACE FAR * ) PURE;
STDMETHOD(EnumDisplayModes)( THIS_ DWORD, LPDDSURFACEDESC, LPVOID, LPDDENUMMODESCALLBACK ) PURE;
STDMETHOD(EnumSurfaces)(THIS_ DWORD, LPDDSURFACEDESC, LPVOID,LPDDENUMSURFACESCALLBACK ) PURE;
STDMETHOD(FlipToGDISurface)(THIS) PURE;
STDMETHOD(GetCaps)( THIS_ LPDDCAPS, LPDDCAPS) PURE;
STDMETHOD(GetDisplayMode)( THIS_ LPDDSURFACEDESC) PURE;
STDMETHOD(GetFourCCCodes)(THIS_ LPDWORD, LPDWORD ) PURE;
STDMETHOD(GetGDISurface)(THIS_ LPDIRECTDRAWSURFACE FAR *) PURE;
STDMETHOD(GetMonitorFrequency)(THIS_ LPDWORD) PURE;
STDMETHOD(GetScanLine)(THIS_ LPDWORD) PURE;
STDMETHOD(GetVerticalBlankStatus)(THIS_ LPBOOL ) PURE;
STDMETHOD(Initialize)(THIS_ GUID FAR *) PURE;
STDMETHOD(RestoreDisplayMode)(THIS) PURE;
STDMETHOD(SetCooperativeLevel)(THIS_ HWND, DWORD) PURE;
STDMETHOD(SetDisplayMode)(THIS_ DWORD, DWORD,DWORD, DWORD, DWORD) PURE;
STDMETHOD(WaitForVerticalBlank)(THIS_ DWORD, HANDLE ) PURE;
/*** Added in the v2 interface ***/
STDMETHOD(GetAvailableVidMem)(THIS_ LPDDSCAPS, LPDWORD, LPDWORD) PURE;
};
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectDraw2_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
#define IDirectDraw2_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDirectDraw2_Release(p) (p)->lpVtbl->Release(p)
#define IDirectDraw2_Compact(p) (p)->lpVtbl->Compact(p)
#define IDirectDraw2_CreateClipper(p, a, b, c) (p)->lpVtbl->CreateClipper(p, a, b, c)
#define IDirectDraw2_CreatePalette(p, a, b, c, d) (p)->lpVtbl->CreatePalette(p, a, b, c, d)
#define IDirectDraw2_CreateSurface(p, a, b, c) (p)->lpVtbl->CreateSurface(p, a, b, c)
#define IDirectDraw2_DuplicateSurface(p, a, b) (p)->lpVtbl->DuplicateSurface(p, a, b)
#define IDirectDraw2_EnumDisplayModes(p, a, b, c, d) (p)->lpVtbl->EnumDisplayModes(p, a, b, c, d)
#define IDirectDraw2_EnumSurfaces(p, a, b, c, d) (p)->lpVtbl->EnumSurfaces(p, a, b, c, d)
#define IDirectDraw2_FlipToGDISurface(p) (p)->lpVtbl->FlipToGDISurface(p)
#define IDirectDraw2_GetCaps(p, a, b) (p)->lpVtbl->GetCaps(p, a, b)
#define IDirectDraw2_GetDisplayMode(p, a) (p)->lpVtbl->GetDisplayMode(p, a)
#define IDirectDraw2_GetFourCCCodes(p, a, b) (p)->lpVtbl->GetFourCCCodes(p, a, b)
#define IDirectDraw2_GetGDISurface(p, a) (p)->lpVtbl->GetGDISurface(p, a)
#define IDirectDraw2_GetMonitorFrequency(p, a) (p)->lpVtbl->GetMonitorFrequency(p, a)
#define IDirectDraw2_GetScanLine(p, a) (p)->lpVtbl->GetScanLine(p, a)
#define IDirectDraw2_GetVerticalBlankStatus(p, a) (p)->lpVtbl->GetVerticalBlankStatus(p, a)
#define IDirectDraw2_Initialize(p, a) (p)->lpVtbl->Initialize(p, a)
#define IDirectDraw2_RestoreDisplayMode(p) (p)->lpVtbl->RestoreDisplayMode(p)
#define IDirectDraw2_SetCooperativeLevel(p, a, b) (p)->lpVtbl->SetCooperativeLevel(p, a, b)
#define IDirectDraw2_SetDisplayMode(p, a, b, c, d, e) (p)->lpVtbl->SetDisplayMode(p, a, b, c, d, e)
#define IDirectDraw2_WaitForVerticalBlank(p, a, b) (p)->lpVtbl->WaitForVerticalBlank(p, a, b)
#define IDirectDraw2_GetAvailableVidMem(p, a, b, c) (p)->lpVtbl->GetAvailableVidMem(p, a, b, c)
#else
#define IDirectDraw2_QueryInterface(p, a, b) (p)->QueryInterface(a, b)
#define IDirectDraw2_AddRef(p) (p)->AddRef()
#define IDirectDraw2_Release(p) (p)->Release()
#define IDirectDraw2_Compact(p) (p)->Compact()
#define IDirectDraw2_CreateClipper(p, a, b, c) (p)->CreateClipper(a, b, c)
#define IDirectDraw2_CreatePalette(p, a, b, c, d) (p)->CreatePalette(a, b, c, d)
#define IDirectDraw2_CreateSurface(p, a, b, c) (p)->CreateSurface(a, b, c)
#define IDirectDraw2_DuplicateSurface(p, a, b) (p)->DuplicateSurface(a, b)
#define IDirectDraw2_EnumDisplayModes(p, a, b, c, d) (p)->EnumDisplayModes(a, b, c, d)
#define IDirectDraw2_EnumSurfaces(p, a, b, c, d) (p)->EnumSurfaces(a, b, c, d)
#define IDirectDraw2_FlipToGDISurface(p) (p)->FlipToGDISurface()
#define IDirectDraw2_GetCaps(p, a, b) (p)->GetCaps(a, b)
#define IDirectDraw2_GetDisplayMode(p, a) (p)->GetDisplayMode(a)
#define IDirectDraw2_GetFourCCCodes(p, a, b) (p)->GetFourCCCodes(a, b)
#define IDirectDraw2_GetGDISurface(p, a) (p)->GetGDISurface(a)
#define IDirectDraw2_GetMonitorFrequency(p, a) (p)->GetMonitorFrequency(a)
#define IDirectDraw2_GetScanLine(p, a) (p)->GetScanLine(a)
#define IDirectDraw2_GetVerticalBlankStatus(p, a) (p)->GetVerticalBlankStatus(a)
#define IDirectDraw2_Initialize(p, a) (p)->Initialize(a)
#define IDirectDraw2_RestoreDisplayMode(p) (p)->RestoreDisplayMode()
#define IDirectDraw2_SetCooperativeLevel(p, a, b) (p)->SetCooperativeLevel(a, b)
#define IDirectDraw2_SetDisplayMode(p, a, b, c, d, e) (p)->SetDisplayMode(a, b, c, d, e)
#define IDirectDraw2_WaitForVerticalBlank(p, a, b) (p)->WaitForVerticalBlank(a, b)
#define IDirectDraw2_GetAvailableVidMem(p, a, b, c) (p)->GetAvailableVidMem(a, b, c)
#endif
#endif
/*
* IDirectDrawPalette
*/
#if defined( _WIN32 ) && !defined( _NO_COM )
#undef INTERFACE
#define INTERFACE IDirectDrawPalette
DECLARE_INTERFACE_( IDirectDrawPalette, IUnknown )
{
/*** IUnknown methods ***/
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
/*** IDirectDrawPalette methods ***/
STDMETHOD(GetCaps)(THIS_ LPDWORD) PURE;
STDMETHOD(GetEntries)(THIS_ DWORD,DWORD,DWORD,LPPALETTEENTRY) PURE;
STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, DWORD, LPPALETTEENTRY) PURE;
STDMETHOD(SetEntries)(THIS_ DWORD,DWORD,DWORD,LPPALETTEENTRY) PURE;
};
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectDrawPalette_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
#define IDirectDrawPalette_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDirectDrawPalette_Release(p) (p)->lpVtbl->Release(p)
#define IDirectDrawPalette_GetCaps(p, a) (p)->lpVtbl->GetCaps(p, a)
#define IDirectDrawPalette_GetEntries(p, a, b, c, d) (p)->lpVtbl->GetEntries(p, a, b, c, d)
#define IDirectDrawPalette_Initialize(p, a, b, c) (p)->lpVtbl->Initialize(p, a, b, c)
#define IDirectDrawPalette_SetEntries(p, a, b, c, d) (p)->lpVtbl->SetEntries(p, a, b, c, d)
#else
#define IDirectDrawPalette_QueryInterface(p, a, b) (p)->QueryInterface(a, b)
#define IDirectDrawPalette_AddRef(p) (p)->AddRef()
#define IDirectDrawPalette_Release(p) (p)->Release()
#define IDirectDrawPalette_GetCaps(p, a) (p)->GetCaps(a)
#define IDirectDrawPalette_GetEntries(p, a, b, c, d) (p)->GetEntries(a, b, c, d)
#define IDirectDrawPalette_Initialize(p, a, b, c) (p)->Initialize(a, b, c)
#define IDirectDrawPalette_SetEntries(p, a, b, c, d) (p)->SetEntries(a, b, c, d)
#endif
#endif
/*
* IDirectDrawClipper
*/
#if defined( _WIN32 ) && !defined( _NO_COM )
#undef INTERFACE
#define INTERFACE IDirectDrawClipper
DECLARE_INTERFACE_( IDirectDrawClipper, IUnknown )
{
/*** IUnknown methods ***/
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
/*** IDirectDrawClipper methods ***/
STDMETHOD(GetClipList)(THIS_ LPRECT, LPRGNDATA, LPDWORD) PURE;
STDMETHOD(GetHWnd)(THIS_ HWND FAR *) PURE;
STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, DWORD) PURE;
STDMETHOD(IsClipListChanged)(THIS_ BOOL FAR *) PURE;
STDMETHOD(SetClipList)(THIS_ LPRGNDATA,DWORD) PURE;
STDMETHOD(SetHWnd)(THIS_ DWORD, HWND ) PURE;
};
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectDrawClipper_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
#define IDirectDrawClipper_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDirectDrawClipper_Release(p) (p)->lpVtbl->Release(p)
#define IDirectDrawClipper_GetClipList(p, a, b, c) (p)->lpVtbl->GetClipList(p, a, b, c)
#define IDirectDrawClipper_GetHWnd(p, a) (p)->lpVtbl->GetHWnd(p, a)
#define IDirectDrawClipper_Initialize(p, a, b) (p)->lpVtbl->Initialize(p, a, b)
#define IDirectDrawClipper_IsClipListChanged(p, a) (p)->lpVtbl->IsClipListChanged(p, a)
#define IDirectDrawClipper_SetClipList(p, a, b) (p)->lpVtbl->SetClipList(p, a, b)
#define IDirectDrawClipper_SetHWnd(p, a, b) (p)->lpVtbl->SetHWnd(p, a, b)
#else
#define IDirectDrawClipper_QueryInterface(p, a, b) (p)->QueryInterface(a, b)
#define IDirectDrawClipper_AddRef(p) (p)->AddRef()
#define IDirectDrawClipper_Release(p) (p)->Release()
#define IDirectDrawClipper_GetClipList(p, a, b, c) (p)->GetClipList(a, b, c)
#define IDirectDrawClipper_GetHWnd(p, a) (p)->GetHWnd(a)
#define IDirectDrawClipper_Initialize(p, a, b) (p)->Initialize(a, b)
#define IDirectDrawClipper_IsClipListChanged(p, a) (p)->IsClipListChanged(a)
#define IDirectDrawClipper_SetClipList(p, a, b) (p)->SetClipList(a, b)
#define IDirectDrawClipper_SetHWnd(p, a, b) (p)->SetHWnd(a, b)
#endif
#endif
/*
* IDirectDrawSurface and related interfaces
*/
#if defined( _WIN32 ) && !defined( _NO_COM )
#undef INTERFACE
#define INTERFACE IDirectDrawSurface
DECLARE_INTERFACE_( IDirectDrawSurface, IUnknown )
{
/*** IUnknown methods ***/
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
/*** IDirectDrawSurface methods ***/
STDMETHOD(AddAttachedSurface)(THIS_ LPDIRECTDRAWSURFACE) PURE;
STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT) PURE;
STDMETHOD(Blt)(THIS_ LPRECT,LPDIRECTDRAWSURFACE, LPRECT,DWORD, LPDDBLTFX) PURE;
STDMETHOD(BltBatch)(THIS_ LPDDBLTBATCH, DWORD, DWORD ) PURE;
STDMETHOD(BltFast)(THIS_ DWORD,DWORD,LPDIRECTDRAWSURFACE, LPRECT,DWORD) PURE;
STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD,LPDIRECTDRAWSURFACE) PURE;
STDMETHOD(EnumAttachedSurfaces)(THIS_ LPVOID,LPDDENUMSURFACESCALLBACK) PURE;
STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD,LPVOID,LPDDENUMSURFACESCALLBACK) PURE;
STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE, DWORD) PURE;
STDMETHOD(GetAttachedSurface)(THIS_ LPDDSCAPS, LPDIRECTDRAWSURFACE FAR *) PURE;
STDMETHOD(GetBltStatus)(THIS_ DWORD) PURE;
STDMETHOD(GetCaps)(THIS_ LPDDSCAPS) PURE;
STDMETHOD(GetClipper)(THIS_ LPDIRECTDRAWCLIPPER FAR*) PURE;
STDMETHOD(GetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
STDMETHOD(GetDC)(THIS_ HDC FAR *) PURE;
STDMETHOD(GetFlipStatus)(THIS_ DWORD) PURE;
STDMETHOD(GetOverlayPosition)(THIS_ LPLONG, LPLONG ) PURE;
STDMETHOD(GetPalette)(THIS_ LPDIRECTDRAWPALETTE FAR*) PURE;
STDMETHOD(GetPixelFormat)(THIS_ LPDDPIXELFORMAT) PURE;
STDMETHOD(GetSurfaceDesc)(THIS_ LPDDSURFACEDESC) PURE;
STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, LPDDSURFACEDESC) PURE;
STDMETHOD(IsLost)(THIS) PURE;
STDMETHOD(Lock)(THIS_ LPRECT,LPDDSURFACEDESC,DWORD,HANDLE) PURE;
STDMETHOD(ReleaseDC)(THIS_ HDC) PURE;
STDMETHOD(Restore)(THIS) PURE;
STDMETHOD(SetClipper)(THIS_ LPDIRECTDRAWCLIPPER) PURE;
STDMETHOD(SetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
STDMETHOD(SetOverlayPosition)(THIS_ LONG, LONG ) PURE;
STDMETHOD(SetPalette)(THIS_ LPDIRECTDRAWPALETTE) PURE;
STDMETHOD(Unlock)(THIS_ LPVOID) PURE;
STDMETHOD(UpdateOverlay)(THIS_ LPRECT, LPDIRECTDRAWSURFACE,LPRECT,DWORD, LPDDOVERLAYFX) PURE;
STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD) PURE;
STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD, LPDIRECTDRAWSURFACE) PURE;
};
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectDrawSurface_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IDirectDrawSurface_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDirectDrawSurface_Release(p) (p)->lpVtbl->Release(p)
#define IDirectDrawSurface_AddAttachedSurface(p,a) (p)->lpVtbl->AddAttachedSurface(p,a)
#define IDirectDrawSurface_AddOverlayDirtyRect(p,a) (p)->lpVtbl->AddOverlayDirtyRect(p,a)
#define IDirectDrawSurface_Blt(p,a,b,c,d,e) (p)->lpVtbl->Blt(p,a,b,c,d,e)
#define IDirectDrawSurface_BltBatch(p,a,b,c) (p)->lpVtbl->BltBatch(p,a,b,c)
#define IDirectDrawSurface_BltFast(p,a,b,c,d,e) (p)->lpVtbl->BltFast(p,a,b,c,d,e)
#define IDirectDrawSurface_DeleteAttachedSurface(p,a,b) (p)->lpVtbl->DeleteAttachedSurface(p,a,b)
#define IDirectDrawSurface_EnumAttachedSurfaces(p,a,b) (p)->lpVtbl->EnumAttachedSurfaces(p,a,b)
#define IDirectDrawSurface_EnumOverlayZOrders(p,a,b,c) (p)->lpVtbl->EnumOverlayZOrders(p,a,b,c)
#define IDirectDrawSurface_Flip(p,a,b) (p)->lpVtbl->Flip(p,a,b)
#define IDirectDrawSurface_GetAttachedSurface(p,a,b) (p)->lpVtbl->GetAttachedSurface(p,a,b)
#define IDirectDrawSurface_GetBltStatus(p,a) (p)->lpVtbl->GetBltStatus(p,a)
#define IDirectDrawSurface_GetCaps(p,b) (p)->lpVtbl->GetCaps(p,b)
#define IDirectDrawSurface_GetClipper(p,a) (p)->lpVtbl->GetClipper(p,a)
#define IDirectDrawSurface_GetColorKey(p,a,b) (p)->lpVtbl->GetColorKey(p,a,b)
#define IDirectDrawSurface_GetDC(p,a) (p)->lpVtbl->GetDC(p,a)
#define IDirectDrawSurface_GetFlipStatus(p,a) (p)->lpVtbl->GetFlipStatus(p,a)
#define IDirectDrawSurface_GetOverlayPosition(p,a,b) (p)->lpVtbl->GetOverlayPosition(p,a,b)
#define IDirectDrawSurface_GetPalette(p,a) (p)->lpVtbl->GetPalette(p,a)
#define IDirectDrawSurface_GetPixelFormat(p,a) (p)->lpVtbl->GetPixelFormat(p,a)
#define IDirectDrawSurface_GetSurfaceDesc(p,a) (p)->lpVtbl->GetSurfaceDesc(p,a)
#define IDirectDrawSurface_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
#define IDirectDrawSurface_IsLost(p) (p)->lpVtbl->IsLost(p)
#define IDirectDrawSurface_Lock(p,a,b,c,d) (p)->lpVtbl->Lock(p,a,b,c,d)
#define IDirectDrawSurface_ReleaseDC(p,a) (p)->lpVtbl->ReleaseDC(p,a)
#define IDirectDrawSurface_Restore(p) (p)->lpVtbl->Restore(p)
#define IDirectDrawSurface_SetClipper(p,a) (p)->lpVtbl->SetClipper(p,a)
#define IDirectDrawSurface_SetColorKey(p,a,b) (p)->lpVtbl->SetColorKey(p,a,b)
#define IDirectDrawSurface_SetOverlayPosition(p,a,b) (p)->lpVtbl->SetOverlayPosition(p,a,b)
#define IDirectDrawSurface_SetPalette(p,a) (p)->lpVtbl->SetPalette(p,a)
#define IDirectDrawSurface_Unlock(p,b) (p)->lpVtbl->Unlock(p,b)
#define IDirectDrawSurface_UpdateOverlay(p,a,b,c,d,e) (p)->lpVtbl->UpdateOverlay(p,a,b,c,d,e)
#define IDirectDrawSurface_UpdateOverlayDisplay(p,a) (p)->lpVtbl->UpdateOverlayDisplay(p,a)
#define IDirectDrawSurface_UpdateOverlayZOrder(p,a,b) (p)->lpVtbl->UpdateOverlayZOrder(p,a,b)
#else
#define IDirectDrawSurface_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
#define IDirectDrawSurface_AddRef(p) (p)->AddRef()
#define IDirectDrawSurface_Release(p) (p)->Release()
#define IDirectDrawSurface_AddAttachedSurface(p,a) (p)->AddAttachedSurface(a)
#define IDirectDrawSurface_AddOverlayDirtyRect(p,a) (p)->AddOverlayDirtyRect(a)
#define IDirectDrawSurface_Blt(p,a,b,c,d,e) (p)->Blt(a,b,c,d,e)
#define IDirectDrawSurface_BltBatch(p,a,b,c) (p)->BltBatch(a,b,c)
#define IDirectDrawSurface_BltFast(p,a,b,c,d,e) (p)->BltFast(a,b,c,d,e)
#define IDirectDrawSurface_DeleteAttachedSurface(p,a,b) (p)->DeleteAttachedSurface(a,b)
#define IDirectDrawSurface_EnumAttachedSurfaces(p,a,b) (p)->EnumAttachedSurfaces(a,b)
#define IDirectDrawSurface_EnumOverlayZOrders(p,a,b,c) (p)->EnumOverlayZOrders(a,b,c)
#define IDirectDrawSurface_Flip(p,a,b) (p)->Flip(a,b)
#define IDirectDrawSurface_GetAttachedSurface(p,a,b) (p)->GetAttachedSurface(a,b)
#define IDirectDrawSurface_GetBltStatus(p,a) (p)->GetBltStatus(a)
#define IDirectDrawSurface_GetCaps(p,b) (p)->GetCaps(b)
#define IDirectDrawSurface_GetClipper(p,a) (p)->GetClipper(a)
#define IDirectDrawSurface_GetColorKey(p,a,b) (p)->GetColorKey(a,b)
#define IDirectDrawSurface_GetDC(p,a) (p)->GetDC(a)
#define IDirectDrawSurface_GetFlipStatus(p,a) (p)->GetFlipStatus(a)
#define IDirectDrawSurface_GetOverlayPosition(p,a,b) (p)->GetOverlayPosition(a,b)
#define IDirectDrawSurface_GetPalette(p,a) (p)->GetPalette(a)
#define IDirectDrawSurface_GetPixelFormat(p,a) (p)->GetPixelFormat(a)
#define IDirectDrawSurface_GetSurfaceDesc(p,a) (p)->GetSurfaceDesc(a)
#define IDirectDrawSurface_Initialize(p,a,b) (p)->Initialize(a,b)
#define IDirectDrawSurface_IsLost(p) (p)->IsLost()
#define IDirectDrawSurface_Lock(p,a,b,c,d) (p)->Lock(a,b,c,d)
#define IDirectDrawSurface_ReleaseDC(p,a) (p)->ReleaseDC(a)
#define IDirectDrawSurface_Restore(p) (p)->Restore()
#define IDirectDrawSurface_SetClipper(p,a) (p)->SetClipper(a)
#define IDirectDrawSurface_SetColorKey(p,a,b) (p)->SetColorKey(a,b)
#define IDirectDrawSurface_SetOverlayPosition(p,a,b) (p)->SetOverlayPosition(a,b)
#define IDirectDrawSurface_SetPalette(p,a) (p)->SetPalette(a)
#define IDirectDrawSurface_Unlock(p,b) (p)->Unlock(b)
#define IDirectDrawSurface_UpdateOverlay(p,a,b,c,d,e) (p)->UpdateOverlay(a,b,c,d,e)
#define IDirectDrawSurface_UpdateOverlayDisplay(p,a) (p)->UpdateOverlayDisplay(a)
#define IDirectDrawSurface_UpdateOverlayZOrder(p,a,b) (p)->UpdateOverlayZOrder(a,b)
#endif
/*
* IDirectDrawSurface2 and related interfaces
*/
#undef INTERFACE
#define INTERFACE IDirectDrawSurface2
DECLARE_INTERFACE_( IDirectDrawSurface2, IUnknown )
{
/*** IUnknown methods ***/
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
/*** IDirectDrawSurface methods ***/
STDMETHOD(AddAttachedSurface)(THIS_ LPDIRECTDRAWSURFACE2) PURE;
STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT) PURE;
STDMETHOD(Blt)(THIS_ LPRECT,LPDIRECTDRAWSURFACE2, LPRECT,DWORD, LPDDBLTFX) PURE;
STDMETHOD(BltBatch)(THIS_ LPDDBLTBATCH, DWORD, DWORD ) PURE;
STDMETHOD(BltFast)(THIS_ DWORD,DWORD,LPDIRECTDRAWSURFACE2, LPRECT,DWORD) PURE;
STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD,LPDIRECTDRAWSURFACE2) PURE;
STDMETHOD(EnumAttachedSurfaces)(THIS_ LPVOID,LPDDENUMSURFACESCALLBACK) PURE;
STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD,LPVOID,LPDDENUMSURFACESCALLBACK) PURE;
STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE2, DWORD) PURE;
STDMETHOD(GetAttachedSurface)(THIS_ LPDDSCAPS, LPDIRECTDRAWSURFACE2 FAR *) PURE;
STDMETHOD(GetBltStatus)(THIS_ DWORD) PURE;
STDMETHOD(GetCaps)(THIS_ LPDDSCAPS) PURE;
STDMETHOD(GetClipper)(THIS_ LPDIRECTDRAWCLIPPER FAR*) PURE;
STDMETHOD(GetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
STDMETHOD(GetDC)(THIS_ HDC FAR *) PURE;
STDMETHOD(GetFlipStatus)(THIS_ DWORD) PURE;
STDMETHOD(GetOverlayPosition)(THIS_ LPLONG, LPLONG ) PURE;
STDMETHOD(GetPalette)(THIS_ LPDIRECTDRAWPALETTE FAR*) PURE;
STDMETHOD(GetPixelFormat)(THIS_ LPDDPIXELFORMAT) PURE;
STDMETHOD(GetSurfaceDesc)(THIS_ LPDDSURFACEDESC) PURE;
STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, LPDDSURFACEDESC) PURE;
STDMETHOD(IsLost)(THIS) PURE;
STDMETHOD(Lock)(THIS_ LPRECT,LPDDSURFACEDESC,DWORD,HANDLE) PURE;
STDMETHOD(ReleaseDC)(THIS_ HDC) PURE;
STDMETHOD(Restore)(THIS) PURE;
STDMETHOD(SetClipper)(THIS_ LPDIRECTDRAWCLIPPER) PURE;
STDMETHOD(SetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
STDMETHOD(SetOverlayPosition)(THIS_ LONG, LONG ) PURE;
STDMETHOD(SetPalette)(THIS_ LPDIRECTDRAWPALETTE) PURE;
STDMETHOD(Unlock)(THIS_ LPVOID) PURE;
STDMETHOD(UpdateOverlay)(THIS_ LPRECT, LPDIRECTDRAWSURFACE2,LPRECT,DWORD, LPDDOVERLAYFX) PURE;
STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD) PURE;
STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD, LPDIRECTDRAWSURFACE2) PURE;
/*** Added in the v2 interface ***/
STDMETHOD(GetDDInterface)(THIS_ LPVOID FAR *) PURE;
STDMETHOD(PageLock)(THIS_ DWORD) PURE;
STDMETHOD(PageUnlock)(THIS_ DWORD) PURE;
};
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectDrawSurface2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IDirectDrawSurface2_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDirectDrawSurface2_Release(p) (p)->lpVtbl->Release(p)
#define IDirectDrawSurface2_AddAttachedSurface(p,a) (p)->lpVtbl->AddAttachedSurface(p,a)
#define IDirectDrawSurface2_AddOverlayDirtyRect(p,a) (p)->lpVtbl->AddOverlayDirtyRect(p,a)
#define IDirectDrawSurface2_Blt(p,a,b,c,d,e) (p)->lpVtbl->Blt(p,a,b,c,d,e)
#define IDirectDrawSurface2_BltBatch(p,a,b,c) (p)->lpVtbl->BltBatch(p,a,b,c)
#define IDirectDrawSurface2_BltFast(p,a,b,c,d,e) (p)->lpVtbl->BltFast(p,a,b,c,d,e)
#define IDirectDrawSurface2_DeleteAttachedSurface(p,a,b) (p)->lpVtbl->DeleteAttachedSurface(p,a,b)
#define IDirectDrawSurface2_EnumAttachedSurfaces(p,a,b) (p)->lpVtbl->EnumAttachedSurfaces(p,a,b)
#define IDirectDrawSurface2_EnumOverlayZOrders(p,a,b,c) (p)->lpVtbl->EnumOverlayZOrders(p,a,b,c)
#define IDirectDrawSurface2_Flip(p,a,b) (p)->lpVtbl->Flip(p,a,b)
#define IDirectDrawSurface2_GetAttachedSurface(p,a,b) (p)->lpVtbl->GetAttachedSurface(p,a,b)
#define IDirectDrawSurface2_GetBltStatus(p,a) (p)->lpVtbl->GetBltStatus(p,a)
#define IDirectDrawSurface2_GetCaps(p,b) (p)->lpVtbl->GetCaps(p,b)
#define IDirectDrawSurface2_GetClipper(p,a) (p)->lpVtbl->GetClipper(p,a)
#define IDirectDrawSurface2_GetColorKey(p,a,b) (p)->lpVtbl->GetColorKey(p,a,b)
#define IDirectDrawSurface2_GetDC(p,a) (p)->lpVtbl->GetDC(p,a)
#define IDirectDrawSurface2_GetFlipStatus(p,a) (p)->lpVtbl->GetFlipStatus(p,a)
#define IDirectDrawSurface2_GetOverlayPosition(p,a,b) (p)->lpVtbl->GetOverlayPosition(p,a,b)
#define IDirectDrawSurface2_GetPalette(p,a) (p)->lpVtbl->GetPalette(p,a)
#define IDirectDrawSurface2_GetPixelFormat(p,a) (p)->lpVtbl->GetPixelFormat(p,a)
#define IDirectDrawSurface2_GetSurfaceDesc(p,a) (p)->lpVtbl->GetSurfaceDesc(p,a)
#define IDirectDrawSurface2_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
#define IDirectDrawSurface2_IsLost(p) (p)->lpVtbl->IsLost(p)
#define IDirectDrawSurface2_Lock(p,a,b,c,d) (p)->lpVtbl->Lock(p,a,b,c,d)
#define IDirectDrawSurface2_ReleaseDC(p,a) (p)->lpVtbl->ReleaseDC(p,a)
#define IDirectDrawSurface2_Restore(p) (p)->lpVtbl->Restore(p)
#define IDirectDrawSurface2_SetClipper(p,a) (p)->lpVtbl->SetClipper(p,a)
#define IDirectDrawSurface2_SetColorKey(p,a,b) (p)->lpVtbl->SetColorKey(p,a,b)
#define IDirectDrawSurface2_SetOverlayPosition(p,a,b) (p)->lpVtbl->SetOverlayPosition(p,a,b)
#define IDirectDrawSurface2_SetPalette(p,a) (p)->lpVtbl->SetPalette(p,a)
#define IDirectDrawSurface2_Unlock(p,b) (p)->lpVtbl->Unlock(p,b)
#define IDirectDrawSurface2_UpdateOverlay(p,a,b,c,d,e) (p)->lpVtbl->UpdateOverlay(p,a,b,c,d,e)
#define IDirectDrawSurface2_UpdateOverlayDisplay(p,a) (p)->lpVtbl->UpdateOverlayDisplay(p,a)
#define IDirectDrawSurface2_UpdateOverlayZOrder(p,a,b) (p)->lpVtbl->UpdateOverlayZOrder(p,a,b)
#define IDirectDrawSurface2_GetDDInterface(p,a) (p)->lpVtbl->GetDDInterface(p,a)
#define IDirectDrawSurface2_PageLock(p,a) (p)->lpVtbl->PageLock(p,a)
#define IDirectDrawSurface2_PageUnlock(p,a) (p)->lpVtbl->PageUnlock(p,a)
#else
#define IDirectDrawSurface2_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
#define IDirectDrawSurface2_AddRef(p) (p)->AddRef()
#define IDirectDrawSurface2_Release(p) (p)->Release()
#define IDirectDrawSurface2_AddAttachedSurface(p,a) (p)->AddAttachedSurface(a)
#define IDirectDrawSurface2_AddOverlayDirtyRect(p,a) (p)->AddOverlayDirtyRect(a)
#define IDirectDrawSurface2_Blt(p,a,b,c,d,e) (p)->Blt(a,b,c,d,e)
#define IDirectDrawSurface2_BltBatch(p,a,b,c) (p)->BltBatch(a,b,c)
#define IDirectDrawSurface2_BltFast(p,a,b,c,d,e) (p)->BltFast(a,b,c,d,e)
#define IDirectDrawSurface2_DeleteAttachedSurface(p,a,b) (p)->DeleteAttachedSurface(a,b)
#define IDirectDrawSurface2_EnumAttachedSurfaces(p,a,b) (p)->EnumAttachedSurfaces(a,b)
#define IDirectDrawSurface2_EnumOverlayZOrders(p,a,b,c) (p)->EnumOverlayZOrders(a,b,c)
#define IDirectDrawSurface2_Flip(p,a,b) (p)->Flip(a,b)
#define IDirectDrawSurface2_GetAttachedSurface(p,a,b) (p)->GetAttachedSurface(a,b)
#define IDirectDrawSurface2_GetBltStatus(p,a) (p)->GetBltStatus(a)
#define IDirectDrawSurface2_GetCaps(p,b) (p)->GetCaps(b)
#define IDirectDrawSurface2_GetClipper(p,a) (p)->GetClipper(a)
#define IDirectDrawSurface2_GetColorKey(p,a,b) (p)->GetColorKey(a,b)
#define IDirectDrawSurface2_GetDC(p,a) (p)->GetDC(a)
#define IDirectDrawSurface2_GetFlipStatus(p,a) (p)->GetFlipStatus(a)
#define IDirectDrawSurface2_GetOverlayPosition(p,a,b) (p)->GetOverlayPosition(a,b)
#define IDirectDrawSurface2_GetPalette(p,a) (p)->GetPalette(a)
#define IDirectDrawSurface2_GetPixelFormat(p,a) (p)->GetPixelFormat(a)
#define IDirectDrawSurface2_GetSurfaceDesc(p,a) (p)->GetSurfaceDesc(a)
#define IDirectDrawSurface2_Initialize(p,a,b) (p)->Initialize(a,b)
#define IDirectDrawSurface2_IsLost(p) (p)->IsLost()
#define IDirectDrawSurface2_Lock(p,a,b,c,d) (p)->Lock(a,b,c,d)
#define IDirectDrawSurface2_ReleaseDC(p,a) (p)->ReleaseDC(a)
#define IDirectDrawSurface2_Restore(p) (p)->Restore()
#define IDirectDrawSurface2_SetClipper(p,a) (p)->SetClipper(a)
#define IDirectDrawSurface2_SetColorKey(p,a,b) (p)->SetColorKey(a,b)
#define IDirectDrawSurface2_SetOverlayPosition(p,a,b) (p)->SetOverlayPosition(a,b)
#define IDirectDrawSurface2_SetPalette(p,a) (p)->SetPalette(a)
#define IDirectDrawSurface2_Unlock(p,b) (p)->Unlock(b)
#define IDirectDrawSurface2_UpdateOverlay(p,a,b,c,d,e) (p)->UpdateOverlay(a,b,c,d,e)
#define IDirectDrawSurface2_UpdateOverlayDisplay(p,a) (p)->UpdateOverlayDisplay(a)
#define IDirectDrawSurface2_UpdateOverlayZOrder(p,a,b) (p)->UpdateOverlayZOrder(a,b)
#define IDirectDrawSurface2_GetDDInterface(p,a) (p)->GetDDInterface(a)
#define IDirectDrawSurface2_PageLock(p,a) (p)->PageLock(a)
#define IDirectDrawSurface2_PageUnlock(p,a) (p)->PageUnlock(a)
#endif
/*
* IDirectDrawSurface3 and related interfaces
*/
#undef INTERFACE
#define INTERFACE IDirectDrawSurface3
DECLARE_INTERFACE_( IDirectDrawSurface3, IUnknown )
{
/*** IUnknown methods ***/
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
/*** IDirectDrawSurface methods ***/
STDMETHOD(AddAttachedSurface)(THIS_ LPDIRECTDRAWSURFACE3) PURE;
STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT) PURE;
STDMETHOD(Blt)(THIS_ LPRECT,LPDIRECTDRAWSURFACE3, LPRECT,DWORD, LPDDBLTFX) PURE;
STDMETHOD(BltBatch)(THIS_ LPDDBLTBATCH, DWORD, DWORD ) PURE;
STDMETHOD(BltFast)(THIS_ DWORD,DWORD,LPDIRECTDRAWSURFACE3, LPRECT,DWORD) PURE;
STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD,LPDIRECTDRAWSURFACE3) PURE;
STDMETHOD(EnumAttachedSurfaces)(THIS_ LPVOID,LPDDENUMSURFACESCALLBACK) PURE;
STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD,LPVOID,LPDDENUMSURFACESCALLBACK) PURE;
STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE3, DWORD) PURE;
STDMETHOD(GetAttachedSurface)(THIS_ LPDDSCAPS, LPDIRECTDRAWSURFACE3 FAR *) PURE;
STDMETHOD(GetBltStatus)(THIS_ DWORD) PURE;
STDMETHOD(GetCaps)(THIS_ LPDDSCAPS) PURE;
STDMETHOD(GetClipper)(THIS_ LPDIRECTDRAWCLIPPER FAR*) PURE;
STDMETHOD(GetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
STDMETHOD(GetDC)(THIS_ HDC FAR *) PURE;
STDMETHOD(GetFlipStatus)(THIS_ DWORD) PURE;
STDMETHOD(GetOverlayPosition)(THIS_ LPLONG, LPLONG ) PURE;
STDMETHOD(GetPalette)(THIS_ LPDIRECTDRAWPALETTE FAR*) PURE;
STDMETHOD(GetPixelFormat)(THIS_ LPDDPIXELFORMAT) PURE;
STDMETHOD(GetSurfaceDesc)(THIS_ LPDDSURFACEDESC) PURE;
STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, LPDDSURFACEDESC) PURE;
STDMETHOD(IsLost)(THIS) PURE;
STDMETHOD(Lock)(THIS_ LPRECT,LPDDSURFACEDESC,DWORD,HANDLE) PURE;
STDMETHOD(ReleaseDC)(THIS_ HDC) PURE;
STDMETHOD(Restore)(THIS) PURE;
STDMETHOD(SetClipper)(THIS_ LPDIRECTDRAWCLIPPER) PURE;
STDMETHOD(SetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
STDMETHOD(SetOverlayPosition)(THIS_ LONG, LONG ) PURE;
STDMETHOD(SetPalette)(THIS_ LPDIRECTDRAWPALETTE) PURE;
STDMETHOD(Unlock)(THIS_ LPVOID) PURE;
STDMETHOD(UpdateOverlay)(THIS_ LPRECT, LPDIRECTDRAWSURFACE3,LPRECT,DWORD, LPDDOVERLAYFX) PURE;
STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD) PURE;
STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD, LPDIRECTDRAWSURFACE3) PURE;
/*** Added in the v2 interface ***/
STDMETHOD(GetDDInterface)(THIS_ LPVOID FAR *) PURE;