Subversion Repositories spacemission

Rev

Rev 1 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1 Rev 4
Line 23... Line 23...
23
 *
23
 *
24
 *    e-mail : kazuya-y@infosakyu.ne.jp
24
 *    e-mail : kazuya-y@infosakyu.ne.jp
25
 *    URL    : http://www.infosakyu.ne.jp/~kazuya-y/index.html
25
 *    URL    : http://www.infosakyu.ne.jp/~kazuya-y/index.html
26
 *
26
 *
27
 ***************************************************************************)
27
 ***************************************************************************)
-
 
28
{
-
 
29
(c)2004 Jaro Benes Recompilation with Erik Unger's headers
28
 
30
 
29
unit DirectX;
31
Join in order:
30
 
-
 
31
interface
32
  1) DirectDraw
32
 
-
 
33
{$Z4}
-
 
34
{$A+}
-
 
35
{$WEAKPACKAGEUNIT}
-
 
36
 
-
 
37
{$IFNDEF DirectX3}
33
  2) Direct3D
38
{$IFNDEF DirectX5}
34
  3) Direct3DRM
39
{$IFNDEF DirectX6}
35
  4) DirectInput
40
{$IFNDEF DirectX7}
36
  5) DirectPlay
41
  {$DEFINE DirectX7}
37
  6) DirectSetup
42
{$ENDIF}
-
 
43
{$ENDIF}
-
 
44
{$ENDIF}
38
  7) DirectSound
45
{$ENDIF}
39
  8) DirectMusic
46
 
40
}
47
{$IFDEF DirectX3}
41
Unit DirectX;
48
  {$UNDEF DirectX5}
-
 
49
  {$UNDEF DirectX6}
-
 
50
  {$UNDEF DirectX7}
-
 
51
  {$DEFINE SupportDirectX3}
-
 
52
{$ENDIF}
-
 
53
 
42
 
54
{$IFDEF DirectX5}
-
 
55
  {$UNDEF DirectX3}
-
 
56
  {$UNDEF DirectX6}
-
 
57
  {$UNDEF DirectX7}
-
 
58
  {$DEFINE SupportDirectX3}
-
 
59
  {$DEFINE SupportDirectX5}
-
 
60
{$ENDIF}
43
Interface
61
 
44
 
62
{$IFDEF DirectX6}
-
 
63
  {$UNDEF DirectX3}
-
 
64
  {$UNDEF DirectX5}
-
 
65
  {$UNDEF DirectX7}
-
 
66
  {$DEFINE SupportDirectX3}
-
 
67
  {$DEFINE SupportDirectX5}
-
 
68
  {$DEFINE SupportDirectX6}
45
{Delphi version marks}
69
{$ENDIF}
-
 
70
 
46
 
71
{$IFDEF DirectX7}
47
{$I DelphiXcfg.inc}
72
  {$UNDEF DirectX3}
-
 
73
  {$UNDEF DirectX5}
-
 
74
  {$UNDEF DirectX6}
-
 
75
  {$DEFINE SupportDirectX3}
-
 
76
  {$DEFINE SupportDirectX5}
-
 
77
  {$DEFINE SupportDirectX6}
-
 
78
  {$DEFINE SupportDirectX7}
-
 
79
{$ENDIF}
-
 
80
 
48
 
81
uses Windows, MMSystem, ActiveX;
-
 
82
 
-
 
83
const
-
 
84
{$IFDEF DirectX3}
49
{$MINENUMSIZE 4}
85
  DirectXUnitVersion = 3;
-
 
86
{$ENDIF}{$IFDEF DirectX5}
-
 
87
  DirectXUnitVersion = 5;
-
 
88
{$ENDIF}{$IFDEF DirectX6}
-
 
89
  DirectXUnitVersion = 6;
-
 
90
{$ENDIF}{$IFDEF DirectX7}
-
 
91
  DirectXUnitVersion = 7;
-
 
92
{$ENDIF}
50
{$ALIGN ON}
93
 
51
 
-
 
52
uses
-
 
53
  Windows, MMSystem;
-
 
54
//DirectDraw file
94
(*==========================================================================;
55
(*==========================================================================;
95
 *
56
 *
96
 *  Copyright (C) Microsoft Corporation.  All Rights Reserved.
57
 *  Copyright (C) 1994-1997 Microsoft Corporation.  All Rights Reserved.
-
 
58
 *
-
 
59
 *  Files:      ddraw.h dvp.h
-
 
60
 *  Content:    DirectDraw and DirectDrawVideoPort include files
-
 
61
 *
-
 
62
 *  DirectX 7.0 Delphi adaptation by Erik Unger
-
 
63
 *
-
 
64
 *  Modified: 10-Sep-2000
-
 
65
 *
-
 
66
 *  Download: http://www.delphi-jedi.org/DelphiGraphics/
-
 
67
 *  E-Mail: DelphiDirectX@next-reality.com
97
 *
68
 *
98
 *  File:       ddraw.h
-
 
99
 *  Content:    DirectDraw include file
-
 
100
 *
69
 *
101
 ***************************************************************************)
70
 ***************************************************************************)
102
 
71
 
-
 
72
var
103
{ FOURCC codes for DX compressed-texture pixel formats }
73
  DDrawDLL : HMODULE = 0;
104
 
74
 
105
const
-
 
106
  FOURCC_DXT1 = Ord('D') + Ord('X') shl 8 + Ord('T') shl 16 + Ord('1') shl 24;
75
function DDErrorString(Value: HResult) : string;
-
 
76
 
107
  FOURCC_DXT2 = Ord('D') + Ord('X') shl 8 + Ord('T') shl 16 + Ord('2') shl 24;
77
function MAKEFOURCC(ch0, ch1, ch2, ch3: Char) : DWORD;
108
  FOURCC_DXT3 = Ord('D') + Ord('X') shl 8 + Ord('T') shl 16 + Ord('3') shl 24;
-
 
109
  FOURCC_DXT4 = Ord('D') + Ord('X') shl 8 + Ord('T') shl 16 + Ord('4') shl 24;
-
 
110
  FOURCC_DXT5 = Ord('D') + Ord('X') shl 8 + Ord('T') shl 16 + Ord('5') shl 24;
-
 
111
 
78
 
-
 
79
(*
112
{ GUIDS used by DirectDraw objects }
80
 * FOURCC codes for DX compressed-texture pixel formats
-
 
81
 *)
-
 
82
const
-
 
83
  FOURCC_DXT1 = 'DXT1';
-
 
84
  FOURCC_DXT2 = 'DXT2';
-
 
85
  FOURCC_DXT3 = 'DXT3';
-
 
86
  FOURCC_DXT4 = 'DXT4';
-
 
87
  FOURCC_DXT5 = 'DXT5';
113
 
88
 
-
 
89
(*
-
 
90
 * GUIDS used by DirectDraw objects
-
 
91
 *)
114
const
92
const
115
  CLSID_DirectDraw: TGUID = '{D7B70EE0-4340-11CF-B063-0020AFC2CD35}';
93
  CLSID_DirectDraw: TGUID = '{D7B70EE0-4340-11CF-B063-0020AFC2CD35}';
116
  CLSID_DirectDraw7: TGUID = '{3C305196-50DB-11D3-9CFE-00C04FD930C5}';
94
  CLSID_DirectDraw7: TGUID = '{3c305196-50db-11d3-9cfe-00c04fd930c5}';
117
  CLSID_DirectDrawClipper: TGUID = '{593817A0-7DB3-11CF-A2DE-00AA00B93356}';
95
  CLSID_DirectDrawClipper: TGUID = '{593817A0-7DB3-11CF-A2DE-00AA00b93356}';
118
  IID_IDirectDraw: TGUID = '{6C14DB80-A733-11CE-A521-0020AF0BE560}';
-
 
119
  IID_IDirectDraw2: TGUID = '{B3A6F3E0-2B43-11CF-A2DE-00AA00B93356}';
-
 
120
  IID_IDirectDraw4: TGUID = '{9C59509A-39BD-11D1-8C4A-00C04FD930C5}';
-
 
121
  IID_IDirectDraw7: TGUID = '{15E65EC0-3B9C-11D2-B92F-00609797EA5B}';
-
 
122
  IID_IDirectDrawSurface: TGUID = '{6C14DB81-A733-11CE-A521-0020AF0BE560}';
-
 
123
  IID_IDirectDrawSurface2: TGUID = '{57805885-6EEC-11CF-9441-A82303C10E27}';
-
 
124
  IID_IDirectDrawSurface3: TGUID = '{DA044E00-69B2-11D0-A1D5-00AA00B8DFBB}';
-
 
125
  IID_IDirectDrawSurface4: TGUID = '{0B2B8630-AD35-11D0-8EA6-00609797EA5B}';
-
 
126
  IID_IDirectDrawSurface7: TGUID = '{06675A80-3B9B-11D2-B92F-00609797EA5B}';
-
 
127
  IID_IDirectDrawPalette: TGUID = '{6C14DB84-A733-11CE-A521-0020AF0BE560}';
-
 
128
  IID_IDirectDrawClipper: TGUID = '{6C14DB85-A733-11CE-A521-0020AF0BE560}';
-
 
129
  IID_IDirectDrawColorControl: TGUID = '{4B9F0EE0-0D7E-11D0-9B06-00A0C903A3B8}';
-
 
130
  IID_IDirectDrawGammaControl: TGUID = '{69C11C3E-B46B-11D1-AD7A-00C04FC29B4E}';
-
 
131
 
96
 
132
const
97
const
133
  DD_ROP_SPACE = 256 div 32;       // space required to store ROP array
98
  DD_ROP_SPACE = (256 div 32);       // space required to store ROP array
134
 
99
 
135
  MAX_DDDEVICEID_STRING = 512;
100
  MAX_DDDEVICEID_STRING = 512;
136
 
101
 
-
 
102
(*
-
 
103
 * Flags for the IDirectDraw4::GetDeviceIdentifier method
-
 
104
 *)
-
 
105
 
-
 
106
(*
-
 
107
 * This flag causes GetDeviceIdentifier to return information about the host (typically 2D) adapter in a system equipped
-
 
108
 * with a stacked secondary 3D adapter. Such an adapter appears to the application as if it were part of the
-
 
109
 * host adapter, but is typically physcially located on a separate card. The stacked secondary's information is
-
 
110
 * returned when GetDeviceIdentifier's dwFlags field is zero, since this most accurately reflects the qualities
-
 
111
 * of the DirectDraw object involved.
-
 
112
 *)
-
 
113
  DDGDI_GETHOSTIDENTIFIER         = $00000001;
-
 
114
 
-
 
115
(*============================================================================
-
 
116
 *
137
{ DirectDraw Structures }
117
 * DirectDraw Structures
-
 
118
 *
-
 
119
 * Various structures used to invoke DirectDraw.
-
 
120
 *
-
 
121
 *==========================================================================*)
-
 
122
 
-
 
123
var
-
 
124
  NilGUID : TGUID{$IfNDef VER6UP} absolute 0{$EndIf};
138
 
125
 
139
type
126
type
-
 
127
  TRefGUID = packed record
-
 
128
    case integer of
-
 
129
    1: (guid : PGUID);
-
 
130
    2: (dwFlags : DWORD);
-
 
131
  end;
-
 
132
 
140
  IDirectDraw = interface;
133
  IDirectDraw = interface;
141
  IDirectDraw2 = interface;
134
  IDirectDraw2 = interface;
142
  IDirectDraw4 = interface;
135
  IDirectDraw4 = interface;
143
  IDirectDraw7 = interface;
136
  IDirectDraw7 = interface;
144
  IDirectDrawSurface = interface;
137
  IDirectDrawSurface = interface;
145
  IDirectDrawSurface2 = interface;
138
  IDirectDrawSurface2 = interface;
146
  IDirectDrawSurface3 = interface;
139
  IDirectDrawSurface3 = interface;
147
  IDirectDrawSurface4 = interface;
140
  IDirectDrawSurface4 = interface;
148
  IDirectDrawSurface7 = interface;
141
  IDirectDrawSurface7 = interface;
-
 
142
 
149
  IDirectDrawPalette = interface;
143
  IDirectDrawPalette = interface;
150
  IDirectDrawClipper = interface;
144
  IDirectDrawClipper = interface;
151
  IDirectDrawColorControl = interface;
145
  IDirectDrawColorControl = interface;
152
  IDirectDrawGammaControl = interface;
146
  IDirectDrawGammaControl = interface;
153
 
147
 
-
 
148
(*
154
{ TDDARGB structure }
149
 * Generic pixel format with 8-bit RGB and alpha components
155
 
150
 *)
156
  PDDARGB = ^TDDARGB;
151
  PDDARGB = ^TDDARGB;
157
  TDDARGB = record
152
  TDDARGB = packed record
158
    Blue: Byte;
153
    blue:     BYTE;
159
    Green: Byte;
154
    green:    BYTE;
160
    Red: Byte;
155
    red:      BYTE;
161
    Alpha: Byte;
156
    alpha:    BYTE;
162
  end;
157
  end;
163
 
158
 
164
  DDARGB = TDDARGB;
-
 
165
  LPDDARGB = PDDARGB;
-
 
166
 
159
(*
-
 
160
 * This version of the structure remains for backwards source compatibility.
167
{ TDDRGBA structure }
161
 * The DDARGB structure is the one that should be used for all DirectDraw APIs.
168
 
162
 *)
169
  PDDRGBA = ^TDDRGBA;
163
  PDDRGBA = ^TDDRGBA;
170
  TDDRGBA = record
164
  TDDRGBA = packed record
171
    Red: Byte;
165
    red   : BYTE;
172
    Green: Byte;
166
    green : BYTE;
173
    Blue: Byte;
167
    blue  : BYTE;
174
    Alpha: Byte;
168
    alpha : BYTE;
175
  end;
169
  end;
176
 
170
 
177
  DDRGBA = TDDRGBA;
-
 
178
  LPDDRGBA = PDDRGBA;
-
 
179
 
171
(*
180
{ TDDColorKey structure }
172
 * TDDColorKey
181
 
173
 *)
182
  PDDColorKey = ^TDDColorKey;
174
  PDDColorKey = ^TDDColorKey;
183
  TDDColorKey = record
175
  TDDColorKey = packed record
184
    dwColorSpaceLowValue: DWORD;   // low boundary of color space that is to
176
    dwColorSpaceLowValue: DWORD;   // low boundary of color space that is to
185
                                   //  be treated as Color Key, inclusive
177
                                   // be treated as Color Key, inclusive
186
    dwColorSpaceHighValue: DWORD;  // high boundary of color space that is
178
    dwColorSpaceHighValue: DWORD;  // high boundary of color space that is
187
                                   //  to be treated as Color Key, inclusive
179
                                   // to be treated as Color Key, inclusive
188
  end;
180
  end;
189
 
181
 
190
  DDCOLORKEY = TDDColorKey;
182
// Delphi 5 can't handle interface in variant records
191
  LPDDCOLORKEY = PDDColorKey;
183
// so we have to use pointers instead (which can be type-casted into interfaces):
192
 
184
 
193
{ TDDBltFX structure }
185
{$IFDEF VER5UP}
-
 
186
  PDirectDrawSurface = Pointer;              
-
 
187
{$ELSE}
-
 
188
  PDirectDrawSurface = IDirectDrawSurface;
-
 
189
{$ENDIF}
194
 
190
 
-
 
191
(*
-
 
192
 * TDDBltFX
-
 
193
 * Used to pass override information to the DIRECTDRAWSURFACE callback Blt.
-
 
194
 *)
195
  PDDBltFX = ^TDDBltFX;
195
  PDDBltFX = ^TDDBltFX;
196
  TDDBltFX = record
196
  TDDBltFX = packed record
197
    dwSize: DWORD;                           // size of structure
197
    dwSize                        : DWORD;     // size of structure
198
    dwDDFX: DWORD;                           // FX operations
198
    dwDDFX                        : DWORD;     // FX operations
199
    dwROP: DWORD;                            // Win32 raster operations
199
    dwROP                         : DWORD;     // Win32 raster operations
200
    dwDDROP: DWORD;                          // Raster operations new for DirectDraw
200
    dwDDROP                       : DWORD;     // Raster operations new for DirectDraw
201
    dwRotationAngle: DWORD;                  // Rotation angle for blt
201
    dwRotationAngle               : DWORD;     // Rotation angle for blt
202
    dwZBufferOpCode: DWORD;                  // ZBuffer compares
202
    dwZBufferOpCode               : DWORD;     // ZBuffer compares
203
    dwZBufferLow: DWORD;                     // Low limit of Z buffer
203
    dwZBufferLow                  : DWORD;     // Low limit of Z buffer
204
    dwZBufferHigh: DWORD;                    // High limit of Z buffer
204
    dwZBufferHigh                 : DWORD;     // High limit of Z buffer
205
    dwZBufferBaseDest: DWORD;                // Destination base value
205
    dwZBufferBaseDest             : DWORD;     // Destination base value
206
    dwZDestConstBitDepth: DWORD;             // Bit depth used to specify Z constant for destination
206
    dwZDestConstBitDepth          : DWORD;     // Bit depth used to specify Z constant for destination
207
    case Integer of
207
    case integer of
208
    0: (
208
    0: (
209
      dwZDestConst: DWORD;                   // Constant to use as Z buffer for dest
209
      dwZDestConst                : DWORD      // Constant to use as Z buffer for dest
-
 
210
     );
-
 
211
    1: (
-
 
212
      lpDDSZBufferDest            : PDirectDrawSurface; // Surface to use as Z buffer for dest
210
      dwZSrcConstBitDepth: DWORD;            // Bit depth used to specify Z constant for source
213
      dwZSrcConstBitDepth         : DWORD;     // Bit depth used to specify Z constant for source
-
 
214
      case integer of
-
 
215
      0: (
211
      dwZSrcConst: DWORD;                    // Constant to use as Z buffer for src
216
        dwZSrcConst               : DWORD;     // Constant to use as Z buffer for src
-
 
217
       );
-
 
218
      1: (
-
 
219
        lpDDSZBufferSrc           : PDirectDrawSurface; // Surface to use as Z buffer for src
212
      dwAlphaEdgeBlendBitDepth: DWORD;       // Bit depth used to specify constant for alpha edge blend
220
        dwAlphaEdgeBlendBitDepth  : DWORD;     // Bit depth used to specify constant for alpha edge blend
213
      dwAlphaEdgeBlend: DWORD;               // Alpha for edge blending
221
        dwAlphaEdgeBlend          : DWORD;     // Alpha for edge blending
214
      dwReserved: DWORD;
222
        dwReserved                : DWORD;
215
      dwAlphaDestConstBitDepth: DWORD;       // Bit depth used to specify alpha constant for destination
223
        dwAlphaDestConstBitDepth  : DWORD;     // Bit depth used to specify alpha constant for destination
-
 
224
        case integer of
-
 
225
        0: (
216
      dwAlphaDestConst: DWORD;               // Constant to use as Alpha Channel
226
          dwAlphaDestConst        : DWORD;     // Constant to use as Alpha Channel
-
 
227
         );
-
 
228
        1: (
-
 
229
          lpDDSAlphaDest          : PDirectDrawSurface; // Surface to use as Alpha Channel
217
      dwAlphaSrcConstBitDepth: DWORD;        // Bit depth used to specify alpha constant for source
230
          dwAlphaSrcConstBitDepth : DWORD;     // Bit depth used to specify alpha constant for source
-
 
231
          case integer of
-
 
232
          0: (
218
      dwAlphaSrcConst: DWORD;                // Constant to use as Alpha Channel
233
            dwAlphaSrcConst       : DWORD;     // Constant to use as Alpha Channel
-
 
234
          );
-
 
235
          1: (
-
 
236
            lpDDSAlphaSrc         : PDirectDrawSurface; // Surface to use as Alpha Channel
-
 
237
            case integer of
-
 
238
            0: (
219
      dwFillColor: DWORD;                    // color in RGB or Palettized
239
              dwFillColor         : DWORD;     // color in RGB or Palettized
220
      ddckDestColorkey: TDDColorKey;          // DestColorkey override
-
 
221
      ddckSrcColorkey: TDDColorKey;           // SrcColorkey override
-
 
222
      );
240
            );
223
    1: (
241
            1: (
224
      lpDDSZBufferDest: Pointer{IDirectDrawSurface};  // Surface to use as Z buffer for dest
-
 
225
      _union1b: DWORD;
-
 
226
      lpDDSZBufferSrc: Pointer{IDirectDrawSurface};   // Surface to use as Z buffer for src
-
 
227
      _union1d: DWORD;
-
 
228
      _union1e: DWORD;
-
 
229
      _union1f: DWORD;
-
 
230
      _union1g: DWORD;
-
 
231
      lpDDSAlphaDest: Pointer{IDirectDrawSurface};    // Surface to use as Alpha Channel
-
 
232
      _union1i: DWORD;
-
 
233
      lpDDSAlphaSrc: Pointer{IDirectDrawSurface};     // Surface to use as Alpha Channel
-
 
234
      dwFillDepth: DWORD;                    // depth value for z-buffer
242
              dwFillDepth         : DWORD;     // depth value for z-buffer
235
      );
243
            );
236
    2: (
244
            2: (
237
      _union2a: DWORD;
-
 
238
      _union2b: DWORD;
-
 
239
      _union2c: DWORD;
-
 
240
      _union2d: DWORD;
-
 
241
      _union2e: DWORD;
-
 
242
      _union2f: DWORD;
-
 
243
      _union2g: DWORD;
-
 
244
      _union2h: DWORD;
-
 
245
      _union2i: DWORD;
-
 
246
      _union2j: DWORD;
-
 
247
      lpDDSPattern: Pointer{IDirectDrawSurface};       // Surface to use as pattern
245
              dwFillPixel         : DWORD;     // pixel value
248
      );
246
            );
-
 
247
            3: (
-
 
248
              lpDDSPattern        : PDirectDrawSurface; // Surface to use as pattern
-
 
249
              ddckDestColorkey    : TDDColorKey; // DestColorkey override
-
 
250
              ddckSrcColorkey     : TDDColorKey; // SrcColorkey override
-
 
251
            )
-
 
252
        )
-
 
253
      )
-
 
254
    )
-
 
255
  )
249
  end;
256
  end;
250
 
257
 
251
  DDBLTFX = TDDBltFX;
-
 
252
  LPDDBLTFX = PDDBltFX;
-
 
253
 
258
(*
254
{ TDDSCaps structure }
259
 * TDDSCaps
255
 
260
 *)
256
  PDDSCaps = ^TDDSCaps;
261
  PDDSCaps = ^TDDSCaps;
257
  TDDSCaps = record
262
  TDDSCaps = packed record
258
    dwCaps: DWORD;         // capabilities of surface wanted
263
    dwCaps: DWORD;         // capabilities of surface wanted
259
  end;
264
  end;
260
 
265
 
-
 
266
(*
261
  DDSCAPS = TDDSCaps;
267
 * TDDOSCaps
262
  LPDDSCAPS = PDDSCaps;
-
 
263
{ TDDOSCaps structure }
-
 
264
 
268
 *)
265
  PDDOSCaps = ^TDDOSCaps;
269
  PDDOSCaps = ^TDDOSCaps;
266
  TDDOSCaps = record
270
  TDDOSCaps = packed record
267
    dwCaps: DWORD;         // capabilities of surface wanted
271
    dwCaps: DWORD;         // capabilities of surface wanted
268
  end;
272
  end;
269
 
273
 
270
  DDOSCAPS = TDDOSCaps;
-
 
271
  LPDDOSCAPS = PDDOSCaps;
-
 
272
 
-
 
273
 
274
(*
274
{ TDDSCapsEx structure }
275
 * This structure is used internally by DirectDraw.
275
 
276
 *)
276
  PDDSCapsEx = ^TDDSCapsEx;
277
  PDDSCapsEx = ^TDDSCapsEx;
277
  TDDSCapsEx = record
278
  TDDSCapsEx = packed record
278
    dwCaps2: DWORD;
279
    dwCaps2 : DWORD;
279
    dwCaps3: DWORD;
280
    dwCaps3 : DWORD;
280
    dwCaps4: DWORD;
281
    dwCaps4 : DWORD;
281
  end;
282
  end;
282
 
283
 
283
  DDSCAPSEX = TDDSCapsEx;
-
 
284
  LPDDSCAPSEX = PDDSCapsEx;
-
 
285
 
284
(*
286
{ TDDSCaps2 structure }
285
 * TDDSCaps2
287
 
286
 *)
288
  PDDSCaps2 = ^TDDSCaps2;
287
  PDDSCaps2 = ^TDDSCaps2;
289
  TDDSCaps2 = record
288
  TDDSCaps2 = packed record
290
    dwCaps: DWORD;         // capabilities of surface wanted
289
    dwCaps: DWORD;         // capabilities of surface wanted
291
    dwCaps2: DWORD;
290
    dwCaps2 : DWORD;
292
    dwCaps3: DWORD;
291
    dwCaps3 : DWORD;
293
    dwCaps4: DWORD;
292
    dwCaps4 : DWORD;
294
  end;
293
  end;
295
 
294
 
296
  DDSCAPS2 = TDDSCaps2;
-
 
297
  LPDDSCAPS2 = PDDSCaps2;
-
 
298
 
295
(*
299
{ TDDCaps structure }
296
 * TDDCaps
-
 
297
 *)
300
 
298
(*
301
  PDDCaps_DX1 = ^TDDCaps_DX1;
-
 
302
  TDDCaps_DX1 = record
-
 
303
    dwSize: DWORD;                 // size of the DDDRIVERCAPS structure
-
 
304
    dwCaps: DWORD;                 // driver specific capabilities
-
 
305
    dwCaps2: DWORD;                // more driver specific capabilites
-
 
306
    dwCKeyCaps: DWORD;             // color key capabilities of the surface
-
 
307
    dwFXCaps: DWORD;               // driver specific stretching and effects capabilites
-
 
308
    dwFXAlphaCaps: DWORD;          // alpha driver specific capabilities
-
 
309
    dwPalCaps: DWORD;              // palette capabilities
-
 
310
    dwSVCaps: DWORD;               // stereo vision capabilities
-
 
311
    dwAlphaBltConstBitDepths: DWORD;       // DDBD_2,4,8
-
 
312
    dwAlphaBltPixelBitDepths: DWORD;       // DDBD_1,2,4,8
-
 
313
    dwAlphaBltSurfaceBitDepths: DWORD;     // DDBD_1,2,4,8
-
 
314
    dwAlphaOverlayConstBitDepths: DWORD;   // DDBD_2,4,8
-
 
315
    dwAlphaOverlayPixelBitDepths: DWORD;   // DDBD_1,2,4,8
-
 
316
    dwAlphaOverlaySurfaceBitDepths: DWORD; // DDBD_1,2,4,8
-
 
317
    dwZBufferBitDepths: DWORD;             // DDBD_8,16,24,32
-
 
318
    dwVidMemTotal: DWORD;          // total amount of video memory
-
 
319
    dwVidMemFree: DWORD;           // amount of free video memory
-
 
320
    dwMaxVisibleOverlays: DWORD;   // maximum number of visible overlays
-
 
321
    dwCurrVisibleOverlays: DWORD;  // current number of visible overlays
-
 
322
    dwNumFourCCCodes: DWORD;       // number of four cc codes
-
 
323
    dwAlignBoundarySrc: DWORD;     // source rectangle alignment
-
 
324
    dwAlignSizeSrc: DWORD;         // source rectangle byte size
-
 
325
    dwAlignBoundaryDest: DWORD;    // dest rectangle alignment
-
 
326
    dwAlignSizeDest: DWORD;        // dest rectangle byte size
-
 
327
    dwAlignStrideAlign: DWORD;     // stride alignment
-
 
328
    dwRops: array[0..DD_ROP_SPACE-1] of DWORD;   // ROPS supported
-
 
329
    ddsCaps: TDDSCaps;             // TDDSCaps structure has all the general capabilities
299
 * This structure is the TDDCaps structure as it was in version 2 and 3 of Direct X.
330
    dwMinOverlayStretch: DWORD;    // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
-
 
331
    dwMaxOverlayStretch: DWORD;    // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
-
 
332
    dwMinLiveVideoStretch: DWORD;  // minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
-
 
333
    dwMaxLiveVideoStretch: DWORD;  // maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
-
 
334
    dwMinHwCodecStretch: DWORD;    // minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
-
 
335
    dwMaxHwCodecStretch: DWORD;    // maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
-
 
336
    dwReserved1: DWORD;            // reserved
-
 
337
    dwReserved2: DWORD;            // reserved
-
 
338
    dwReserved3: DWORD;            // reserved
300
 * It is present for back compatability.
339
  end;
301
 *)
340
 
-
 
341
  PDDCaps_DX3 = ^TDDCaps_DX3;
302
  PDDCaps_DX3 = ^TDDCaps_DX3;
342
  TDDCaps_DX3 = record
303
  TDDCaps_DX3 = packed record
343
    dwSize: DWORD;                 // size of the DDDRIVERCAPS structure
304
    dwSize: DWORD;                 // size of the DDDRIVERCAPS structure
344
    dwCaps: DWORD;                 // driver specific capabilities
305
    dwCaps: DWORD;                 // driver specific capabilities
345
    dwCaps2: DWORD;                // more driver specific capabilites
306
    dwCaps2: DWORD;                // more driver specific capabilites
346
    dwCKeyCaps: DWORD;             // color key capabilities of the surface
307
    dwCKeyCaps: DWORD;             // color key capabilities of the surface
347
    dwFXCaps: DWORD;               // driver specific stretching and effects capabilites
308
    dwFXCaps: DWORD;               // driver specific stretching and effects capabilites
Line 363... Line 324...
363
    dwAlignBoundarySrc: DWORD;     // source rectangle alignment
324
    dwAlignBoundarySrc: DWORD;     // source rectangle alignment
364
    dwAlignSizeSrc: DWORD;         // source rectangle byte size
325
    dwAlignSizeSrc: DWORD;         // source rectangle byte size
365
    dwAlignBoundaryDest: DWORD;    // dest rectangle alignment
326
    dwAlignBoundaryDest: DWORD;    // dest rectangle alignment
366
    dwAlignSizeDest: DWORD;        // dest rectangle byte size
327
    dwAlignSizeDest: DWORD;        // dest rectangle byte size
367
    dwAlignStrideAlign: DWORD;     // stride alignment
328
    dwAlignStrideAlign: DWORD;     // stride alignment
368
    dwRops: array[0..DD_ROP_SPACE-1] of DWORD;   // ROPS supported
329
    dwRops: Array [0..DD_ROP_SPACE-1] of DWORD;   // ROPS supported
369
    ddsCaps: TDDSCaps;             // TDDSCaps structure has all the general capabilities
330
    ddsCaps: TDDSCaps;             // TDDSCaps structure has all the general capabilities
370
    dwMinOverlayStretch: DWORD;    // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
331
    dwMinOverlayStretch: DWORD;    // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
371
    dwMaxOverlayStretch: DWORD;    // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
332
    dwMaxOverlayStretch: DWORD;    // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
372
    dwMinLiveVideoStretch: DWORD;  // minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
333
    dwMinLiveVideoStretch: DWORD;  // minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
373
    dwMaxLiveVideoStretch: DWORD;  // maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
334
    dwMaxLiveVideoStretch: DWORD;  // maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
Line 377... Line 338...
377
    dwReserved2: DWORD;            // reserved
338
    dwReserved2: DWORD;            // reserved
378
    dwReserved3: DWORD;            // reserved
339
    dwReserved3: DWORD;            // reserved
379
    dwSVBCaps: DWORD;              // driver specific capabilities for System->Vmem blts
340
    dwSVBCaps: DWORD;              // driver specific capabilities for System->Vmem blts
380
    dwSVBCKeyCaps: DWORD;          // driver color key capabilities for System->Vmem blts
341
    dwSVBCKeyCaps: DWORD;          // driver color key capabilities for System->Vmem blts
381
    dwSVBFXCaps: DWORD;            // driver FX capabilities for System->Vmem blts
342
    dwSVBFXCaps: DWORD;            // driver FX capabilities for System->Vmem blts
382
    dwSVBRops: array[0..DD_ROP_SPACE-1] of DWORD;// ROPS supported for System->Vmem blts
343
    dwSVBRops: Array [0..DD_ROP_SPACE-1] of DWORD;// ROPS supported for System->Vmem blts
383
    dwVSBCaps: DWORD;              // driver specific capabilities for Vmem->System blts
344
    dwVSBCaps: DWORD;              // driver specific capabilities for Vmem->System blts
384
    dwVSBCKeyCaps: DWORD;          // driver color key capabilities for Vmem->System blts
345
    dwVSBCKeyCaps: DWORD;          // driver color key capabilities for Vmem->System blts
385
    dwVSBFXCaps: DWORD;            // driver FX capabilities for Vmem->System blts
346
    dwVSBFXCaps: DWORD;            // driver FX capabilities for Vmem->System blts
386
    dwVSBRops: array[0..DD_ROP_SPACE-1] of DWORD;// ROPS supported for Vmem->System blts
347
    dwVSBRops: Array [0..DD_ROP_SPACE-1] of DWORD;// ROPS supported for Vmem->System blts
387
    dwSSBCaps: DWORD;              // driver specific capabilities for System->System blts
348
    dwSSBCaps: DWORD;              // driver specific capabilities for System->System blts
388
    dwSSBCKeyCaps: DWORD;          // driver color key capabilities for System->System blts
349
    dwSSBCKeyCaps: DWORD;          // driver color key capabilities for System->System blts
389
    dwSSBFXCaps: DWORD;            // driver FX capabilities for System->System blts
350
    dwSSBFXCaps: DWORD;            // driver FX capabilities for System->System blts
390
    dwSSBRops: array[0..DD_ROP_SPACE-1] of DWORD;// ROPS supported for System->System blts
351
    dwSSBRops: Array [0..DD_ROP_SPACE-1] of DWORD;// ROPS supported for System->System blts
391
    dwReserved4: DWORD;            // reserved
352
    dwReserved4 : DWORD;
392
    dwReserved5: DWORD;            // reserved
353
    dwReserved5 : DWORD;
393
    dwReserved6: DWORD;            // reserved
354
    dwReserved6 : DWORD;
394
  end;
355
  end;
395
 
356
 
-
 
357
(*
-
 
358
 * This structure is the TDDCaps structure as it was in version 5 of Direct X.
-
 
359
 * It is present for back compatability.
-
 
360
 *)
396
  PDDCaps_DX5 = ^TDDCaps_DX5;
361
  PDDCaps_DX5 = ^TDDCaps_DX5;
397
  TDDCaps_DX5 = record
362
  TDDCaps_DX5 = packed record
398
    dwSize: DWORD;                 // size of the DDDRIVERCAPS structure
363
    dwSize: DWORD;                 // size of the DDDRIVERCAPS structure
399
    dwCaps: DWORD;                 // driver specific capabilities
364
    dwCaps: DWORD;                 // driver specific capabilities
400
    dwCaps2: DWORD;                // more driver specific capabilites
365
    dwCaps2: DWORD;                // more driver specific capabilites
401
    dwCKeyCaps: DWORD;             // color key capabilities of the surface
366
    dwCKeyCaps: DWORD;             // color key capabilities of the surface
402
    dwFXCaps: DWORD;               // driver specific stretching and effects capabilites
367
    dwFXCaps: DWORD;               // driver specific stretching and effects capabilites
Line 418... Line 383...
418
    dwAlignBoundarySrc: DWORD;     // source rectangle alignment
383
    dwAlignBoundarySrc: DWORD;     // source rectangle alignment
419
    dwAlignSizeSrc: DWORD;         // source rectangle byte size
384
    dwAlignSizeSrc: DWORD;         // source rectangle byte size
420
    dwAlignBoundaryDest: DWORD;    // dest rectangle alignment
385
    dwAlignBoundaryDest: DWORD;    // dest rectangle alignment
421
    dwAlignSizeDest: DWORD;        // dest rectangle byte size
386
    dwAlignSizeDest: DWORD;        // dest rectangle byte size
422
    dwAlignStrideAlign: DWORD;     // stride alignment
387
    dwAlignStrideAlign: DWORD;     // stride alignment
423
    dwRops: array[0..DD_ROP_SPACE-1] of DWORD;   // ROPS supported
388
    dwRops: Array [0..DD_ROP_SPACE-1] of DWORD;   // ROPS supported
424
    ddsCaps: TDDSCaps;             // TDDSCaps structure has all the general capabilities
389
    ddsCaps: TDDSCaps;             // TDDSCaps structure has all the general capabilities
425
    dwMinOverlayStretch: DWORD;    // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
390
    dwMinOverlayStretch: DWORD;    // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
426
    dwMaxOverlayStretch: DWORD;    // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
391
    dwMaxOverlayStretch: DWORD;    // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
427
    dwMinLiveVideoStretch: DWORD;  // minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
392
    dwMinLiveVideoStretch: DWORD;  // minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
428
    dwMaxLiveVideoStretch: DWORD;  // maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
393
    dwMaxLiveVideoStretch: DWORD;  // maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
Line 432... Line 397...
432
    dwReserved2: DWORD;            // reserved
397
    dwReserved2: DWORD;            // reserved
433
    dwReserved3: DWORD;            // reserved
398
    dwReserved3: DWORD;            // reserved
434
    dwSVBCaps: DWORD;              // driver specific capabilities for System->Vmem blts
399
    dwSVBCaps: DWORD;              // driver specific capabilities for System->Vmem blts
435
    dwSVBCKeyCaps: DWORD;          // driver color key capabilities for System->Vmem blts
400
    dwSVBCKeyCaps: DWORD;          // driver color key capabilities for System->Vmem blts
436
    dwSVBFXCaps: DWORD;            // driver FX capabilities for System->Vmem blts
401
    dwSVBFXCaps: DWORD;            // driver FX capabilities for System->Vmem blts
437
    dwSVBRops: array[0..DD_ROP_SPACE-1] of DWORD;// ROPS supported for System->Vmem blts
402
    dwSVBRops: Array [0..DD_ROP_SPACE-1] of DWORD;// ROPS supported for System->Vmem blts
438
    dwVSBCaps: DWORD;              // driver specific capabilities for Vmem->System blts
403
    dwVSBCaps: DWORD;              // driver specific capabilities for Vmem->System blts
439
    dwVSBCKeyCaps: DWORD;          // driver color key capabilities for Vmem->System blts
404
    dwVSBCKeyCaps: DWORD;          // driver color key capabilities for Vmem->System blts
440
    dwVSBFXCaps: DWORD;            // driver FX capabilities for Vmem->System blts
405
    dwVSBFXCaps: DWORD;            // driver FX capabilities for Vmem->System blts
441
    dwVSBRops: array[0..DD_ROP_SPACE-1] of DWORD;// ROPS supported for Vmem->System blts
406
    dwVSBRops: Array [0..DD_ROP_SPACE-1] of DWORD;// ROPS supported for Vmem->System blts
442
    dwSSBCaps: DWORD;              // driver specific capabilities for System->System blts
407
    dwSSBCaps: DWORD;              // driver specific capabilities for System->System blts
443
    dwSSBCKeyCaps: DWORD;          // driver color key capabilities for System->System blts
408
    dwSSBCKeyCaps: DWORD;          // driver color key capabilities for System->System blts
444
    dwSSBFXCaps: DWORD;            // driver FX capabilities for System->System blts
409
    dwSSBFXCaps: DWORD;            // driver FX capabilities for System->System blts
445
    dwSSBRops: array[0..DD_ROP_SPACE-1] of DWORD;// ROPS supported for System->System blts
410
    dwSSBRops: Array [0..DD_ROP_SPACE-1] of DWORD;// ROPS supported for System->System blts
446
    { Members added for DX5 }
411
    // Members added for DX5:
447
    dwMaxVideoPorts: DWORD;        // maximum number of usable video ports
412
    dwMaxVideoPorts: DWORD;        // maximum number of usable video ports
448
    dwCurrVideoPorts: DWORD;       // current number of video ports used
413
    dwCurrVideoPorts: DWORD;       // current number of video ports used
449
    dwSVBCaps2: DWORD;             // more driver specific capabilities for System->Vmem blts
414
    dwSVBCaps2: DWORD;             // more driver specific capabilities for System->Vmem blts
450
    dwNLVBCaps: DWORD;             // driver specific capabilities for non-local->local vidmem blts
415
    dwNLVBCaps: DWORD;             // driver specific capabilities for non-local->local vidmem blts
451
    dwNLVBCaps2: DWORD;            // more driver specific capabilities non-local->local vidmem blts
416
    dwNLVBCaps2: DWORD;            // more driver specific capabilities non-local->local vidmem blts
452
    dwNLVBCKeyCaps: DWORD;         // driver color key capabilities for non-local->local vidmem blts
417
    dwNLVBCKeyCaps: DWORD;         // driver color key capabilities for non-local->local vidmem blts
453
    dwNLVBFXCaps: DWORD;           // driver FX capabilities for non-local->local blts
418
    dwNLVBFXCaps: DWORD;           // driver FX capabilities for non-local->local blts
454
    dwNLVBRops: array[0..DD_ROP_SPACE-1] of DWORD; // ROPS supported for non-local->local blts
419
    dwNLVBRops: Array [0..DD_ROP_SPACE-1] of DWORD; // ROPS supported for non-local->local blts
455
  end;
420
  end;
456
 
421
 
457
  PDDCaps_DX6 = ^TDDCaps_DX6;
422
  PDDCaps_DX6 = ^TDDCaps_DX6;
458
  TDDCaps_DX6 = record
423
  TDDCaps_DX6 = packed record
459
    dwSize: DWORD;                 // size of the DDDRIVERCAPS structure
-
 
460
    dwCaps: DWORD;                 // driver specific capabilities
-
 
461
    dwCaps2: DWORD;                // more driver specific capabilites
-
 
462
    dwCKeyCaps: DWORD;             // color key capabilities of the surface
-
 
463
    dwFXCaps: DWORD;               // driver specific stretching and effects capabilites
-
 
464
    dwFXAlphaCaps: DWORD;          // alpha caps
-
 
465
    dwPalCaps: DWORD;              // palette capabilities
-
 
466
    dwSVCaps: DWORD;               // stereo vision capabilities
-
 
467
    dwAlphaBltConstBitDepths: DWORD;       // DDBD_2,4,8
-
 
468
    dwAlphaBltPixelBitDepths: DWORD;       // DDBD_1,2,4,8
-
 
469
    dwAlphaBltSurfaceBitDepths: DWORD;     // DDBD_1,2,4,8
-
 
470
    dwAlphaOverlayConstBitDepths: DWORD;   // DDBD_2,4,8
-
 
471
    dwAlphaOverlayPixelBitDepths: DWORD;   // DDBD_1,2,4,8
-
 
472
    dwAlphaOverlaySurfaceBitDepths: DWORD; // DDBD_1,2,4,8
-
 
473
    dwZBufferBitDepths: DWORD;             // DDBD_8,16,24,32
-
 
474
    dwVidMemTotal: DWORD;          // total amount of video memory
-
 
475
    dwVidMemFree: DWORD;           // amount of free video memory
-
 
476
    dwMaxVisibleOverlays: DWORD;   // maximum number of visible overlays
-
 
477
    dwCurrVisibleOverlays: DWORD;  // current number of visible overlays
-
 
478
    dwNumFourCCCodes: DWORD;       // number of four cc codes
-
 
479
    dwAlignBoundarySrc: DWORD;     // source rectangle alignment
-
 
480
    dwAlignSizeSrc: DWORD;         // source rectangle byte size
-
 
481
    dwAlignBoundaryDest: DWORD;    // dest rectangle alignment
-
 
482
    dwAlignSizeDest: DWORD;        // dest rectangle byte size
-
 
483
    dwAlignStrideAlign: DWORD;     // stride alignment
-
 
484
    dwRops: array[0..DD_ROP_SPACE-1] of DWORD;   // ROPS supported
-
 
485
    ddsOldCaps: TDDSCaps;          // Was TDDSCaps ddsCaps. ddsCaps is of type DDSCAPS2 for DX6
-
 
486
    dwMinOverlayStretch: DWORD;    // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
-
 
487
    dwMaxOverlayStretch: DWORD;    // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
-
 
488
    dwMinLiveVideoStretch: DWORD;  // minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
-
 
489
    dwMaxLiveVideoStretch: DWORD;  // maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
-
 
490
    dwMinHwCodecStretch: DWORD;    // minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
-
 
491
    dwMaxHwCodecStretch: DWORD;    // maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
-
 
492
    dwReserved1: DWORD;            // reserved
-
 
493
    dwReserved2: DWORD;            // reserved
-
 
494
    dwReserved3: DWORD;            // reserved
-
 
495
    dwSVBCaps: DWORD;              // driver specific capabilities for System->Vmem blts
-
 
496
    dwSVBCKeyCaps: DWORD;          // driver color key capabilities for System->Vmem blts
-
 
497
    dwSVBFXCaps: DWORD;            // driver FX capabilities for System->Vmem blts
-
 
498
    dwSVBRops: array[0..DD_ROP_SPACE-1] of DWORD;// ROPS supported for System->Vmem blts
-
 
499
    dwVSBCaps: DWORD;              // driver specific capabilities for Vmem->System blts
-
 
500
    dwVSBCKeyCaps: DWORD;          // driver color key capabilities for Vmem->System blts
-
 
501
    dwVSBFXCaps: DWORD;            // driver FX capabilities for Vmem->System blts
-
 
502
    dwVSBRops: array[0..DD_ROP_SPACE-1] of DWORD;// ROPS supported for Vmem->System blts
-
 
503
    dwSSBCaps: DWORD;              // driver specific capabilities for System->System blts
-
 
504
    dwSSBCKeyCaps: DWORD;          // driver color key capabilities for System->System blts
-
 
505
    dwSSBFXCaps: DWORD;            // driver FX capabilities for System->System blts
-
 
506
    dwSSBRops: array[0..DD_ROP_SPACE-1] of DWORD;// ROPS supported for System->System blts
-
 
507
    { Members added for DX5 }
-
 
508
    dwMaxVideoPorts: DWORD;        // maximum number of usable video ports
-
 
509
    dwCurrVideoPorts: DWORD;       // current number of video ports used
-
 
510
    dwSVBCaps2: DWORD;             // more driver specific capabilities for System->Vmem blts
-
 
511
    dwNLVBCaps: DWORD;             // driver specific capabilities for non-local->local vidmem blts
-
 
512
    dwNLVBCaps2: DWORD;            // more driver specific capabilities non-local->local vidmem blts
-
 
513
    dwNLVBCKeyCaps: DWORD;         // driver color key capabilities for non-local->local vidmem blts
-
 
514
    dwNLVBFXCaps: DWORD;           // driver FX capabilities for non-local->local blts
-
 
515
    dwNLVBRops: array[0..DD_ROP_SPACE-1] of DWORD; // ROPS supported for non-local->local blts
-
 
516
    { Members added for DX6 }
-
 
517
    ddsCaps: TDDSCaps2;            // Surface Caps
-
 
518
  end;
-
 
519
 
-
 
520
  PDDCaps_DX7 = ^TDDCaps_DX7;
-
 
521
  TDDCaps_DX7 = record
-
 
522
    dwSize: DWORD;                 // size of the DDDRIVERCAPS structure
424
    dwSize: DWORD;                 // size of the DDDRIVERCAPS structure
523
    dwCaps: DWORD;                 // driver specific capabilities
425
    dwCaps: DWORD;                 // driver specific capabilities
524
    dwCaps2: DWORD;                // more driver specific capabilites
426
    dwCaps2: DWORD;                // more driver specific capabilites
525
    dwCKeyCaps: DWORD;             // color key capabilities of the surface
427
    dwCKeyCaps: DWORD;             // color key capabilities of the surface
526
    dwFXCaps: DWORD;               // driver specific stretching and effects capabilites
428
    dwFXCaps: DWORD;               // driver specific stretching and effects capabilites
Line 542... Line 444...
542
    dwAlignBoundarySrc: DWORD;     // source rectangle alignment
444
    dwAlignBoundarySrc: DWORD;     // source rectangle alignment
543
    dwAlignSizeSrc: DWORD;         // source rectangle byte size
445
    dwAlignSizeSrc: DWORD;         // source rectangle byte size
544
    dwAlignBoundaryDest: DWORD;    // dest rectangle alignment
446
    dwAlignBoundaryDest: DWORD;    // dest rectangle alignment
545
    dwAlignSizeDest: DWORD;        // dest rectangle byte size
447
    dwAlignSizeDest: DWORD;        // dest rectangle byte size
546
    dwAlignStrideAlign: DWORD;     // stride alignment
448
    dwAlignStrideAlign: DWORD;     // stride alignment
547
    dwRops: array[0..DD_ROP_SPACE-1] of DWORD;   // ROPS supported
449
    dwRops: Array [0..DD_ROP_SPACE-1] of DWORD;   // ROPS supported
548
    ddsOldCaps: TDDSCaps;          // Was TDDSCaps ddsCaps. ddsCaps is of type DDSCAPS2 for DX6
450
    ddsOldCaps: TDDSCaps;          // Was dssCaps: TDDSCaps. ddsCaps is of type TDDScaps2 for DX6
549
    dwMinOverlayStretch: DWORD;    // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
451
    dwMinOverlayStretch: DWORD;    // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
550
    dwMaxOverlayStretch: DWORD;    // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
452
    dwMaxOverlayStretch: DWORD;    // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
551
    dwMinLiveVideoStretch: DWORD;  // minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
453
    dwMinLiveVideoStretch: DWORD;  // minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
552
    dwMaxLiveVideoStretch: DWORD;  // maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
454
    dwMaxLiveVideoStretch: DWORD;  // maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
553
    dwMinHwCodecStretch: DWORD;    // minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
455
    dwMinHwCodecStretch: DWORD;    // minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
Line 556... Line 458...
556
    dwReserved2: DWORD;            // reserved
458
    dwReserved2: DWORD;            // reserved
557
    dwReserved3: DWORD;            // reserved
459
    dwReserved3: DWORD;            // reserved
558
    dwSVBCaps: DWORD;              // driver specific capabilities for System->Vmem blts
460
    dwSVBCaps: DWORD;              // driver specific capabilities for System->Vmem blts
559
    dwSVBCKeyCaps: DWORD;          // driver color key capabilities for System->Vmem blts
461
    dwSVBCKeyCaps: DWORD;          // driver color key capabilities for System->Vmem blts
560
    dwSVBFXCaps: DWORD;            // driver FX capabilities for System->Vmem blts
462
    dwSVBFXCaps: DWORD;            // driver FX capabilities for System->Vmem blts
561
    dwSVBRops: array[0..DD_ROP_SPACE-1] of DWORD;// ROPS supported for System->Vmem blts
463
    dwSVBRops: Array [0..DD_ROP_SPACE-1] of DWORD;// ROPS supported for System->Vmem blts
562
    dwVSBCaps: DWORD;              // driver specific capabilities for Vmem->System blts
464
    dwVSBCaps: DWORD;              // driver specific capabilities for Vmem->System blts
563
    dwVSBCKeyCaps: DWORD;          // driver color key capabilities for Vmem->System blts
465
    dwVSBCKeyCaps: DWORD;          // driver color key capabilities for Vmem->System blts
564
    dwVSBFXCaps: DWORD;            // driver FX capabilities for Vmem->System blts
466
    dwVSBFXCaps: DWORD;            // driver FX capabilities for Vmem->System blts
565
    dwVSBRops: array[0..DD_ROP_SPACE-1] of DWORD;// ROPS supported for Vmem->System blts
467
    dwVSBRops: Array [0..DD_ROP_SPACE-1] of DWORD;// ROPS supported for Vmem->System blts
566
    dwSSBCaps: DWORD;              // driver specific capabilities for System->System blts
468
    dwSSBCaps: DWORD;              // driver specific capabilities for System->System blts
567
    dwSSBCKeyCaps: DWORD;          // driver color key capabilities for System->System blts
469
    dwSSBCKeyCaps: DWORD;          // driver color key capabilities for System->System blts
568
    dwSSBFXCaps: DWORD;            // driver FX capabilities for System->System blts
470
    dwSSBFXCaps: DWORD;            // driver FX capabilities for System->System blts
569
    dwSSBRops: array[0..DD_ROP_SPACE-1] of DWORD;// ROPS supported for System->System blts
471
    dwSSBRops: Array [0..DD_ROP_SPACE-1] of DWORD;// ROPS supported for System->System blts
570
    { Members added for DX5 }
472
    // Members added for DX5:
571
    dwMaxVideoPorts: DWORD;        // maximum number of usable video ports
473
    dwMaxVideoPorts: DWORD;        // maximum number of usable video ports
572
    dwCurrVideoPorts: DWORD;       // current number of video ports used
474
    dwCurrVideoPorts: DWORD;       // current number of video ports used
573
    dwSVBCaps2: DWORD;             // more driver specific capabilities for System->Vmem blts
475
    dwSVBCaps2: DWORD;             // more driver specific capabilities for System->Vmem blts
574
    dwNLVBCaps: DWORD;             // driver specific capabilities for non-local->local vidmem blts
476
    dwNLVBCaps: DWORD;             // driver specific capabilities for non-local->local vidmem blts
575
    dwNLVBCaps2: DWORD;            // more driver specific capabilities non-local->local vidmem blts
477
    dwNLVBCaps2: DWORD;            // more driver specific capabilities non-local->local vidmem blts
576
    dwNLVBCKeyCaps: DWORD;         // driver color key capabilities for non-local->local vidmem blts
478
    dwNLVBCKeyCaps: DWORD;         // driver color key capabilities for non-local->local vidmem blts
577
    dwNLVBFXCaps: DWORD;           // driver FX capabilities for non-local->local blts
479
    dwNLVBFXCaps: DWORD;           // driver FX capabilities for non-local->local blts
578
    dwNLVBRops: array[0..DD_ROP_SPACE-1] of DWORD; // ROPS supported for non-local->local blts
480
    dwNLVBRops: Array [0..DD_ROP_SPACE-1] of DWORD; // ROPS supported for non-local->local blts
579
    { Members added for DX6 }
481
    // Members added for DX6 release
580
    ddsCaps: TDDSCaps2;            // Surface Caps
482
    ddsCaps : TDDSCaps2 ;          // Surface Caps
581
  end;
483
  end;
582
 
484
 
583
{$IFDEF DirectX1}
-
 
584
  TDDCaps = TDDCaps_DX1;
485
  TDDCaps_DX7 = TDDCaps_DX6;
-
 
486
 
585
  PDDCaps = PDDCaps_DX1;
487
  PDDCaps = ^TDDCaps;
-
 
488
 
586
{$ENDIF}{$IFDEF DirectX3}
489
{$IFDEF DIRECTX3}
587
  TDDCaps = TDDCaps_DX3;
490
  TDDCaps = TDDCaps_DX3;
588
  PDDCaps = PDDCaps_DX3;
491
{$ELSE}
589
{$ENDIF}{$IFDEF DirectX5}
492
  {$IFDEF DIRECTX5}
590
  TDDCaps = TDDCaps_DX5;
493
    TDDCaps = TDDCaps_DX5;
591
  PDDCaps = PDDCaps_DX5;
494
  {$ELSE}
592
{$ENDIF}{$IFDEF DirectX6}
495
    {$IFDEF DIRECTX6}
593
  TDDCaps = TDDCaps_DX6;
496
      TDDCaps = TDDCaps_DX6;
594
  PDDCaps = PDDCaps_DX6;
497
    {$ELSE}
595
{$ENDIF}{$IFDEF DirectX7}
-
 
596
  TDDCaps = TDDCaps_DX7;
498
      TDDCaps = TDDCaps_DX7;
597
  PDDCaps = PDDCaps_DX7;
499
    {$ENDIF}
-
 
500
  {$ENDIF}
598
{$ENDIF}
501
{$ENDIF}
599
 
502
 
600
  DDCAPS = TDDCaps;
-
 
601
  LPDDCAPS = PDDCaps;
-
 
602
 
503
 
603
{ TDDPixelFormat structure }
-
 
604
 
504
 
-
 
505
 
-
 
506
(*
-
 
507
 * TDDPixelFormat
-
 
508
 *)
605
  PDDPixelFormat = ^TDDPixelFormat;
509
  PDDPixelFormat_DX5 = ^TDDPixelFormat_DX5;
606
  TDDPixelFormat = record
510
  TDDPixelFormat_DX5 = packed record
607
    dwSize: DWORD;                // size of structure
511
    dwSize: DWORD;                 // size of structure
608
    dwFlags: DWORD;               // pixel format flags
512
    dwFlags: DWORD;                // pixel format flags
609
    dwFourCC: DWORD;              // (FOURCC code)
513
    dwFourCC: DWORD;               // (FOURCC code)
610
    case Integer of
514
    case Integer of
611
      0: (
515
    0: (
-
 
516
      dwZBufferBitDepth: DWORD;      // how many bits for z buffers
-
 
517
     );
-
 
518
    1: (
-
 
519
      dwAlphaBitDepth: DWORD;        // how many bits for alpha channels
-
 
520
     );
-
 
521
    2: (
612
        dwRGBBitCount: DWORD;          // how many bits per pixel
522
      dwRGBBitCount: DWORD;          // how many bits per pixel
613
        dwRBitMask: DWORD;             // mask for red bit
523
      dwRBitMask: DWORD;             // mask for red bit
614
        dwGBitMask: DWORD;             // mask for green bits
524
      dwGBitMask: DWORD;             // mask for green bits
615
        dwBBitMask: DWORD;             // mask for blue bits
525
      dwBBitMask: DWORD;             // mask for blue bits
616
        dwRGBAlphaBitMask: DWORD;      // mask for alpha channel
526
      dwRGBAlphaBitMask: DWORD;      // mask for alpha channel
617
        );
527
     );
-
 
528
    3: (
-
 
529
      dwYUVBitCount: DWORD;          // how many bits per pixel
-
 
530
      dwYBitMask: DWORD;             // mask for Y bits
-
 
531
      dwUBitMask: DWORD;             // mask for U bits
-
 
532
      dwVBitMask: DWORD;             // mask for V bits
-
 
533
      case Integer of
-
 
534
      0: (
-
 
535
        dwYUVAlphaBitMask: DWORD;      // mask for alpha channel
-
 
536
       );
618
      1: (
537
      1: (
619
        _union1a: DWORD;
538
        dwRGBZBitMask: DWORD;
-
 
539
       );
-
 
540
      2: (
620
        _union1b: DWORD;
541
        dwYUVZBitMask: DWORD;
-
 
542
       );
-
 
543
     );
-
 
544
  end;
-
 
545
 
-
 
546
  PDDPixelFormat_DX6 = ^TDDPixelFormat_DX6;
-
 
547
  TDDPixelFormat_DX6 = packed record
-
 
548
    dwSize: DWORD;                 // size of structure
-
 
549
    dwFlags: DWORD;                // pixel format flags
-
 
550
    dwFourCC: DWORD;               // (FOURCC code)
621
        _union1c: DWORD;
551
    case Integer of
622
        _union1d: DWORD;
552
      1: (
-
 
553
          dwRGBBitCount : DWORD;  // how many bits per pixel
-
 
554
          dwRBitMask : DWORD;  // mask for red bit
-
 
555
          dwGBitMask : DWORD;  // mask for green bits
-
 
556
          dwBBitMask : DWORD;  // mask for blue bits
623
        dwRGBZBitMask: DWORD;          // mask for Z channel
557
          dwRGBAlphaBitMask : DWORD; // mask for alpha channel
624
        );
558
          );
625
      2: (
559
      2: (
626
        dwYUVBitCount: DWORD;          // how many bits per pixel
560
          dwYUVBitCount : DWORD;  // how many bits per pixel
627
        dwYBitMask: DWORD;             // mask for Y bits
561
          dwYBitMask : DWORD;  // mask for Y bits
628
        dwUBitMask: DWORD;             // mask for U bits
562
          dwUBitMask : DWORD;  // mask for U bits
629
        dwVBitMask: DWORD;             // mask for V bits
563
          dwVBitMask : DWORD;  // mask for V bits
630
        dwYUVAlphaBitMask: DWORD;      // mask for alpha channel
564
          dwYUVAlphaBitMask : DWORD; // mask for alpha channel
631
        );
565
          );
632
      3: (
566
      3: (
633
        _union3a: DWORD;
-
 
634
        _union3b: DWORD;
-
 
635
        _union3c: DWORD;
-
 
636
        _union3d: DWORD;
-
 
637
        dwYUVZBitMask: DWORD;          // mask for Z channel
-
 
638
        );
-
 
639
      4: (
-
 
640
        dwZBufferBitDepth: DWORD;      // how many bits for z buffers
567
          dwZBufferBitDepth : DWORD; // how many total bits/pixel in z buffer (including any stencil bits)
641
        dwStencilBitDepth: DWORD;      // how many stencil bits (note: dwZBufferBitDepth-dwStencilBitDepth is total Z-only bits)
568
          dwStencilBitDepth : DWORD; // how many stencil bits (note: dwZBufferBitDepth-dwStencilBitDepth is total Z-only bits)
642
        dwZBitMask: DWORD;             // mask for Z bits
569
          dwZBitMask : DWORD;  // mask for Z bits
643
        dwStencilBitMask: DWORD;       // mask for stencil bits
570
          dwStencilBitMask : DWORD; // mask for stencil bits
-
 
571
          dwLuminanceAlphaBitMask : DWORD;// mask for alpha channel
644
        );
572
          );
645
      5: (
573
      4: (
646
        dwAlphaBitDepth: DWORD;        // how many bits for alpha channels
574
          dwAlphaBitDepth : DWORD; // how many bits for alpha channels
647
        );
-
 
648
      6: (
-
 
649
        dwLuminanceBitCount: DWORD;    // how many bits per pixel
-
 
650
        dwLuminanceBitMask: DWORD;     // mask for luminance bits
575
          dwLuminanceBitMask : DWORD; // mask for luminance bits
651
        _union6c: DWORD;
-
 
652
        _union6d: DWORD;
-
 
653
        dwLuminanceAlphaBitMask: DWORD;
-
 
654
       );
-
 
655
      7: (
-
 
656
        dwBumpBitCount: DWORD;         // how many bits per "buxel", total
-
 
657
        dwBumpDuBitMask: DWORD;        // mask for bump map U delta bits
-
 
658
        dwBumpDvBitMask: DWORD;        // mask for bump map V delta bits
576
          dwBumpDvBitMask : DWORD;        // mask for bump map V delta bits
659
        dwBumpLuminanceBitMask: DWORD; // mask for luminance in bump map
577
          dwBumpLuminanceBitMask : DWORD; // mask for luminance in bump map
-
 
578
          dwRGBZBitMask : DWORD;  // mask for Z channel
-
 
579
          );
-
 
580
      5: (
-
 
581
           dwLuminanceBitCount : DWORD; // how many bits per pixel
-
 
582
           dwBumpDuBitMask : DWORD;       // mask for bump map U delta bits
-
 
583
           Fill1, Fill2    : DWORD;
-
 
584
           dwYUVZBitMask   : DWORD;  // mask for Z channel
-
 
585
         );
-
 
586
      6: ( dwBumpBitCount  : DWORD;         // how many bits per "buxel", total
660
       );
587
         );
661
  end;
588
  end;
662
 
589
 
663
  DDPIXELFORMAT = TDDPixelFormat;
590
  TDDPixelFormat_DX3 = TDDPixelFormat_DX5;
664
  LPDDPIXELFORMAT = PDDPixelFormat;
591
  TDDPixelFormat_DX7 = TDDPixelFormat_DX6;
665
 
592
 
-
 
593
  PDDPixelFormat = ^TDDPixelFormat;
-
 
594
{$IFDEF DIRECTX3}
-
 
595
  TDDPixelFormat = TDDPixelFormat_DX3;
-
 
596
{$ELSE}
-
 
597
  {$IFDEF DIRECTX5}
-
 
598
    TDDPixelFormat = TDDPixelFormat_DX5;
-
 
599
  {$ELSE}
666
{ DDOVERLAYFX structure }
600
    {$IFDEF DIRECTX6}
-
 
601
      TDDPixelFormat = TDDPixelFormat_DX6;
-
 
602
    {$ELSE}
-
 
603
      TDDPixelFormat = TDDPixelFormat_DX7;
-
 
604
    {$ENDIF}
-
 
605
  {$ENDIF}
-
 
606
{$ENDIF}
667
 
607
 
-
 
608
(*
-
 
609
 * TDDOverlayFX
-
 
610
 *)
668
  PDDOverlayFx = ^TDDOverlayFx;
611
  PDDOverlayFX = ^TDDOverlayFX;
669
  TDDOverlayFx = record
612
  TDDOverlayFX = packed record
670
    dwSize: DWORD;                         // size of structure
613
    dwSize: DWORD;                         // size of structure
671
    dwAlphaEdgeBlendBitDepth: DWORD;       // Bit depth used to specify constant for alpha edge blend
614
    dwAlphaEdgeBlendBitDepth: DWORD;       // Bit depth used to specify constant for alpha edge blend
672
    dwAlphaEdgeBlend: DWORD;               // Constant to use as alpha for edge blend
615
    dwAlphaEdgeBlend: DWORD;               // Constant to use as alpha for edge blend
673
    dwReserved: DWORD;
616
    dwReserved: DWORD;
674
    dwAlphaDestConstBitDepth: DWORD;       // Bit depth used to specify alpha constant for destination
617
    dwAlphaDestConstBitDepth: DWORD;       // Bit depth used to specify alpha constant for destination
Line 681... Line 624...
681
      dckSrcColorkey: TDDColorKey;         // DestColorkey override
624
      dckSrcColorkey: TDDColorKey;                 // DestColorkey override
682
      dwDDFX: DWORD;                       // Overlay FX
625
      dwDDFX: DWORD;                         // Overlay FX
683
      dwFlags: DWORD;                      // flags
626
      dwFlags: DWORD;                        // flags
684
      );
627
     );
685
    1: (
628
    1: (
686
      lpDDSAlphaDest: Pointer{IDirectDrawSurface};  // Surface to use as alpha channel for dest
629
      lpDDSAlphaDest: PDirectDrawSurface;     // Surface to use as alpha channel for dest
687
      _union1b: DWORD;
630
      filler: DWORD;
688
      lpDDSAlphaSrc: Pointer{IDirectDrawSurface};   // Surface to use as alpha channel for src
631
      lpDDSAlphaSrc: PDirectDrawSurface;      // Surface to use as alpha channel for src
689
      );
632
     );
690
  end;
633
  end;
691
 
634
 
692
  DDOVERLAYFX = TDDOverlayFx;
-
 
693
  LPDDOVERLAYFX = PDDOverlayFx;
-
 
694
 
635
(*
695
{ TDDBltBatch structure }
636
 * TDDBltBatch: BltBatch entry structure
696
 
637
 *)
697
  PDDBltBatch = ^TDDBltBatch;
638
  PDDBltBatch = ^TDDBltBatch;
698
  TDDBltBatch = record
639
  TDDBltBatch = packed record
699
    lprDest: PRect;
640
    lprDest: PRect;
700
    lpDDSSrc: IDirectDrawSurface;
641
    lpDDSSrc: IDirectDrawSurface;
701
    lprSrc: PRect;
642
    lprSrc: PRect;
702
    dwFlags: DWORD;
643
    dwFlags: DWORD;
703
    lpDDBltFx: PDDBltFX;
644
    lpDDBltFx: TDDBltFX;
704
  end;
-
 
705
 
-
 
706
  DDBLTBATCH = TDDBltBatch;
-
 
707
  LPDDBLTBATCH = PDDBltBatch;
-
 
708
 
-
 
709
{ TDDSurfaceDesc structure }
-
 
710
 
-
 
711
  PDDSurfaceDesc = ^TDDSurfaceDesc;
-
 
712
  TDDSurfaceDesc = record
-
 
713
    dwSize: DWORD;                   // size of the TDDSurfaceDesc structure
-
 
714
    dwFlags: DWORD;                  // determines what fields are valid
-
 
715
    dwHeight: DWORD;                 // height of surface to be created
-
 
716
    dwWidth: DWORD;                  // width of input surface
-
 
717
    case Integer of
-
 
718
      0: (
-
 
719
        lPitch: Longint;
-
 
720
        dwBackBufferCount: DWORD;        // number of back buffers requested
-
 
721
        case Integer of
-
 
722
        0: (
-
 
723
          dwMipMapCount: DWORD;          // number of mip-map levels requested
-
 
724
          dwAlphaBitDepth: DWORD;        // depth of alpha buffer requested
-
 
725
          dwReserved: DWORD;             // reserved
-
 
726
          lpSurface: Pointer;            // pointer to the associated surface memory
-
 
727
          ddckCKDestOverlay: TDDColorKey;// color key for destination overlay use
-
 
728
          ddckCKDestBlt: TDDColorKey;    // color key for destination blt use
-
 
729
          ddckCKSrcOverlay: TDDColorKey; // color key for source overlay use
-
 
730
          ddckCKSrcBlt: TDDColorKey;     // color key for source blt use
-
 
731
          ddpfPixelFormat: TDDPixelFormat;// pixel format description of the surface
-
 
732
          ddsCaps: TDDSCaps;             // direct draw surface capabilities
-
 
733
          );
-
 
734
        1: (
-
 
735
          dwZBufferBitDepth: DWORD;      // depth of Z buffer requested
-
 
736
          );
-
 
737
        2: (
-
 
738
          dwRefreshRate: DWORD;          // refresh rate (used when display mode is described)
-
 
739
          );
-
 
740
      );
-
 
741
      1: (
-
 
742
        dwLinearSize: DWORD
-
 
743
      );
-
 
744
  end;
-
 
745
 
-
 
746
  DDSURFACEDESC = TDDSurfaceDesc;
-
 
747
  LPDDSURFACEDESC = PDDSurfaceDesc;
-
 
748
 
-
 
749
{ TDDSurfaceDesc2 structure }
-
 
750
 
-
 
751
  PDDSurfaceDesc2 = ^TDDSurfaceDesc2;
-
 
752
  TDDSurfaceDesc2 = record
-
 
753
    dwSize: DWORD;                   // size of the TDDSurfaceDesc2 structure
-
 
754
    dwFlags: DWORD;                  // determines what fields are valid
-
 
755
    dwHeight: DWORD;                 // height of surface to be created
-
 
756
    dwWidth: DWORD;                  // width of input surface
-
 
757
    case Integer of
-
 
758
      0: (
-
 
759
        lPitch: Longint;
-
 
760
        dwBackBufferCount: DWORD;        // number of back buffers requested
-
 
761
        case Integer of
-
 
762
        0: (
-
 
763
          dwMipMapCount: DWORD;          // number of mip-map levels requested
-
 
764
          dwAlphaBitDepth: DWORD;        // depth of alpha buffer requested
-
 
765
          dwReserved: DWORD;             // reserved
-
 
766
          lpSurface: Pointer;            // pointer to the associated surface memory
-
 
767
          ddckCKDestOverlay: TDDColorKey;// color key for destination overlay use
-
 
768
          ddckCKDestBlt: TDDColorKey;    // color key for destination blt use
-
 
769
          ddckCKSrcOverlay: TDDColorKey; // color key for source overlay use
-
 
770
          ddckCKSrcBlt: TDDColorKey;     // color key for source blt use
-
 
771
          ddpfPixelFormat: TDDPixelFormat;// pixel format description of the surface
-
 
772
          ddsCaps: TDDSCaps2;            // direct draw surface capabilities
-
 
773
          dwTextureStage: DWORD;         // stage in multitexture cascade
-
 
774
          );
-
 
775
        1: (
-
 
776
          dwRefreshRate: DWORD;          // refresh rate (used when display mode is described)
-
 
777
          );
-
 
778
      );
-
 
779
      1: (
-
 
780
        dwLinearSize: DWORD
-
 
781
      );
-
 
782
  end;
-
 
783
 
-
 
784
  DDSURFACEDESC2 = TDDSurfaceDesc2;
-
 
785
  LPDDSURFACEDESC2 = PDDSurfaceDesc2;
-
 
786
 
-
 
787
{ TDDOptSurfaceDesc structure }
-
 
788
 
-
 
789
  PDDOptSurfaceDesc = ^TDDOptSurfaceDesc;
-
 
790
  TDDOptSurfaceDesc = record
-
 
791
    dwSize: DWORD;             // size of the DDOPTSURFACEDESC structure
-
 
792
    dwFlags: DWORD;            // determines what fields are valid
-
 
793
    ddSCaps: TDDSCaps2;        // Common caps like: Memory type
-
 
794
    ddOSCaps: TDDOSCaps;       // Common caps like: Memory type
-
 
795
    guid: TGUID;               // Compression technique GUID
-
 
796
    dwCompressionRatio: DWORD; // Compression ratio
-
 
797
  end;
-
 
798
 
-
 
799
  DDOPTSURFACEDESC = TDDOptSurfaceDesc;
-
 
800
  LPDDOPTSURFACEDESC = PDDOptSurfaceDesc;
-
 
801
 
-
 
802
{ TDDColorControl structure }
-
 
803
 
-
 
804
  PDDColorControl = ^TDDColorControl;
-
 
805
  TDDColorControl = record
-
 
806
    dwSize: DWORD;
-
 
807
    dwFlags: DWORD;
-
 
808
    lBrightness: Longint;
-
 
809
    lContrast: Longint;
-
 
810
    lHue: Longint;
-
 
811
    lSaturation: Longint;
-
 
812
    lSharpness: Longint;
-
 
813
    lGamma: Longint;
-
 
814
    lColorEnable: Longint;
-
 
815
    dwReserved1: DWORD;
-
 
816
  end;
645
  end;
817
 
646
 
818
  DDCOLORCONTROL = TDDColorControl;
-
 
819
  LPDDCOLORCONTROL = PDDCOLORCONTROL;
-
 
820
 
647
(*
821
{ TDDGammaRamp structure }
648
 * TDDGammaRamp
822
 
649
 *)
823
  PDDGammaRamp = ^TDDGammaRamp;
650
  PDDGammaRamp = ^TDDGammaRamp;
824
  TDDGammaRamp = record
651
  TDDGammaRamp = packed record
825
    Red: array[0..255] of Word;
652
    red   : array[0..255] of WORD;
826
    Green: array[0..255] of Word;
653
    green : array[0..255] of WORD;
827
    Blue: array[0..255] of Word;
654
    blue  : array[0..255] of WORD;
828
  end;
655
  end;
829
 
656
 
830
  DDGAMMARAMP = TDDGammaRamp;
-
 
831
  LPDDGAMMARAMP = PDDGammaRamp;
-
 
832
 
657
(*
833
{ TDDDeviceIdentifier structure }
658
 *  This is the structure within which DirectDraw returns data about the current graphics driver and chipset
-
 
659
 *)
834
 
660
 
835
  PDDDeviceIdentifier = ^TDDDeviceIdentifier;
661
  PDDDeviceIdentifier = ^TDDDeviceIdentifier;
836
  TDDDeviceIdentifier = record
662
  TDDDeviceIdentifier = packed record
837
    //
663
    //
838
    // These elements are for presentation to the user only. They should not be used to identify particular
664
    // These elements are for presentation to the user only. They should not be used to identify particular
839
    // drivers, since this is unreliable and many different strings may be associated with the same
665
    // drivers, since this is unreliable and many different strings may be associated with the same
840
    // device, and the same driver from different vendors.
666
    // device, and the same driver from different vendors.
841
    //
667
    //
Line 874... Line 700...
874
    // This element can also be used to identify particular problematic drivers.
700
    // This element can also be used to identify particular problematic drivers.
875
    //
701
    //
876
    guidDeviceIdentifier: TGUID;
702
    guidDeviceIdentifier: TGUID;
877
  end;
703
  end;
878
 
704
 
879
  DDDEVICEIDENTIFIER = TDDDeviceIdentifier;
-
 
880
  LPDDDEVICEIDENTIFIER = PDDDeviceIdentifier;
-
 
881
 
-
 
882
{ TDDDeviceIdentifier2 structure }
-
 
883
 
-
 
884
  PDDDeviceIdentifier2 = ^TDDDeviceIdentifier2;
705
  PDDDeviceIdentifier2 = ^TDDDeviceIdentifier2;
885
  TDDDeviceIdentifier2 = record
706
  TDDDeviceIdentifier2 = packed record
886
    //
707
    //
887
    // These elements are for presentation to the user only. They should not be used to identify particular
708
    // These elements are for presentation to the user only. They should not be used to identify particular
888
    // drivers, since this is unreliable and many different strings may be associated with the same
709
    // drivers, since this is unreliable and many different strings may be associated with the same
889
    // device, and the same driver from different vendors.
710
    // device, and the same driver from different vendors.
890
    //
711
    //
Line 922... Line 743...
922
    // reprofile the graphics subsystem.
743
    // reprofile the graphics subsystem.
923
    // This element can also be used to identify particular problematic drivers.
744
    // This element can also be used to identify particular problematic drivers.
924
    //
745
    //
925
    guidDeviceIdentifier: TGUID;
746
    guidDeviceIdentifier: TGUID;
926
 
747
 
927
    //
748
    (*
928
    // This element is used to determine the Windows Hardware Quality Lab (WHQL)
749
     * This element is used to determine the Windows Hardware Quality Lab (WHQL)
929
    // certification level for this driver/device pair.
750
     * certification level for this driver/device pair.
930
    //
751
     *)
931
    dwWHQLLevel: DWORD;
752
    dwWHQLLevel: DWORD;
932
  end;
753
  end;
933
 
754
 
934
  DDDEVICEIDENTIFIER2 = TDDDeviceIdentifier2;
-
 
935
  LPDDDEVICEIDENTIFIER2 = PDDDeviceIdentifier2;
-
 
936
 
755
(*
937
{ Callbacks }
756
 * callbacks
938
 
757
 *)
939
  TClipperCallback = function(lpDDClipper: IDirectDrawClipper; hWnd: HWND;
758
  TClipperCallback = function(lpDDClipper: IDirectDrawClipper; hWnd: HWND;
940
      Code: DWORD; lpContext: Pointer): HResult; stdcall;
759
      Code: DWORD; lpContext: Pointer): HResult; stdcall;
941
  LPCLIPPERCALLBACK = TClipperCallback;
-
 
942
 
-
 
943
  TSurfacesStreamingCallback = function(Arg: DWORD): HResult; stdcall;
760
  TSurfacesStreamingCallback = function(Arg: DWORD): HResult; stdcall;
944
  LPSURFACESTREAMINGCALLBACK =TSurfacesStreamingCallback;
-
 
945
 
761
 
-
 
762
(*
-
 
763
 * TDDSurfaceDesc
-
 
764
 *)
-
 
765
  PDDSurfaceDesc_DX5 = ^TDDSurfaceDesc_DX5;
-
 
766
  TDDSurfaceDesc_DX5 = packed record
-
 
767
    dwSize: DWORD;                 // size of the TDDSurfaceDesc structure
-
 
768
    dwFlags: DWORD;                // determines what fields are valid
-
 
769
    dwHeight: DWORD;               // height of surface to be created
-
 
770
    dwWidth: DWORD;                // width of input surface
-
 
771
    case Integer of
-
 
772
    0: (
-
 
773
      dwLinearSize : DWORD;       // unused at the moment
-
 
774
     );
-
 
775
    1: (
-
 
776
      lPitch: LongInt;                 // distance to start of next line (return value only)
-
 
777
      dwBackBufferCount: DWORD;      // number of back buffers requested
-
 
778
      case Integer of
-
 
779
      0: (
-
 
780
        dwMipMapCount: DWORD;          // number of mip-map levels requested
-
 
781
        dwAlphaBitDepth: DWORD;        // depth of alpha buffer requested
-
 
782
        dwReserved: DWORD;             // reserved
-
 
783
        lpSurface: Pointer;              // pointer to the associated surface memory
-
 
784
        ddckCKDestOverlay: TDDColorKey;      // color key for destination overlay use
-
 
785
        ddckCKDestBlt: TDDColorKey;          // color key for destination blt use
-
 
786
        ddckCKSrcOverlay: TDDColorKey;       // color key for source overlay use
-
 
787
        ddckCKSrcBlt: TDDColorKey;           // color key for source blt use
-
 
788
        ddpfPixelFormat: TDDPixelFormat_DX5; // pixel format description of the surface
-
 
789
        ddsCaps: TDDSCaps;                // direct draw surface capabilities
-
 
790
       );
-
 
791
      1: (
-
 
792
        dwZBufferBitDepth: DWORD;      // depth of Z buffer requested
-
 
793
       );
-
 
794
      2: (
-
 
795
        dwRefreshRate: DWORD;          // refresh rate (used when display mode is described)
-
 
796
       );
-
 
797
     );
-
 
798
  end;
-
 
799
 
-
 
800
  PDDSurfaceDesc_DX6 = ^TDDSurfaceDesc_DX6;
-
 
801
  TDDSurfaceDesc_DX6 = packed record
-
 
802
    dwSize: DWORD;                 // size of the TDDSurfaceDesc structure
-
 
803
    dwFlags: DWORD;                // determines what fields are valid
-
 
804
    dwHeight: DWORD;               // height of surface to be created
-
 
805
    dwWidth: DWORD;                // width of input surface
-
 
806
    case Integer of
-
 
807
    0: (
-
 
808
      dwLinearSize : DWORD;       // unused at the moment
-
 
809
     );
-
 
810
    1: (
-
 
811
      lPitch: LongInt;                 // distance to start of next line (return value only)
-
 
812
      dwBackBufferCount: DWORD;      // number of back buffers requested
-
 
813
      case Integer of
-
 
814
      0: (
-
 
815
        dwMipMapCount: DWORD;          // number of mip-map levels requested
-
 
816
        dwAlphaBitDepth: DWORD;        // depth of alpha buffer requested
-
 
817
        dwReserved: DWORD;             // reserved
-
 
818
        lpSurface: Pointer;              // pointer to the associated surface memory
-
 
819
        ddckCKDestOverlay: TDDColorKey;      // color key for destination overlay use
-
 
820
        ddckCKDestBlt: TDDColorKey;          // color key for destination blt use
-
 
821
        ddckCKSrcOverlay: TDDColorKey;       // color key for source overlay use
-
 
822
        ddckCKSrcBlt: TDDColorKey;           // color key for source blt use
-
 
823
        ddpfPixelFormat: TDDPixelFormat_DX6; // pixel format description of the surface
-
 
824
        ddsCaps: TDDSCaps;                // direct draw surface capabilities
-
 
825
       );
-
 
826
      1: (
-
 
827
        dwZBufferBitDepth: DWORD;      // depth of Z buffer requested
-
 
828
       );
-
 
829
      2: (
-
 
830
        dwRefreshRate: DWORD;          // refresh rate (used when display mode is described)
-
 
831
       );
-
 
832
     );
-
 
833
  end;
-
 
834
 
-
 
835
  PDDSurfaceDesc = ^TDDSurfaceDesc;
-
 
836
{$IFDEF DIRECTX5}
-
 
837
  TDDSurfaceDesc = TDDSurfaceDesc_DX5;
-
 
838
{$ELSE}
-
 
839
  TDDSurfaceDesc = TDDSurfaceDesc_DX6;
-
 
840
{$ENDIF}
-
 
841
 
-
 
842
 
-
 
843
(*
-
 
844
 * TDDSurfaceDesc2
-
 
845
 *)
-
 
846
  PDDSurfaceDesc2 = ^TDDSurfaceDesc2;
-
 
847
  TDDSurfaceDesc2 = packed record
-
 
848
    dwSize: DWORD;                 // size of the TDDSurfaceDesc structure
-
 
849
    dwFlags: DWORD;                // determines what fields are valid
-
 
850
    dwHeight: DWORD;               // height of surface to be created
-
 
851
    dwWidth: DWORD;                // width of input surface
-
 
852
    case Integer of
-
 
853
    0: (
-
 
854
      lPitch : LongInt;                  // distance to start of next line (return value only)
-
 
855
     );
-
 
856
    1: (
-
 
857
      dwLinearSize : DWORD;              // Formless late-allocated optimized surface size
-
 
858
      dwBackBufferCount: DWORD;          // number of back buffers requested
-
 
859
      case Integer of
-
 
860
      0: (
-
 
861
        dwMipMapCount: DWORD;            // number of mip-map levels requested
-
 
862
        dwAlphaBitDepth: DWORD;          // depth of alpha buffer requested
-
 
863
        dwReserved: DWORD;               // reserved
-
 
864
        lpSurface: Pointer;              // pointer to the associated surface memory
-
 
865
        ddckCKDestOverlay: TDDColorKey;  // color key for destination overlay use
-
 
866
        ddckCKDestBlt: TDDColorKey;      // color key for destination blt use
-
 
867
        ddckCKSrcOverlay: TDDColorKey;   // color key for source overlay use
-
 
868
        ddckCKSrcBlt: TDDColorKey;       // color key for source blt use
-
 
869
        ddpfPixelFormat: TDDPixelFormat; // pixel format description of the surface
-
 
870
        ddsCaps: TDDSCaps2;              // direct draw surface capabilities
-
 
871
        dwTextureStage: DWORD;           // stage in multitexture cascade
-
 
872
       );
-
 
873
      1: (
-
 
874
        dwRefreshRate: DWORD;          // refresh rate (used when display mode is described)
-
 
875
       );
-
 
876
     );
-
 
877
  end;
-
 
878
 
-
 
879
(*
-
 
880
 * TDDOptSurfaceDesc
-
 
881
 *)
-
 
882
 
-
 
883
  PDDOptSurfaceDesc = ^TDDOptSurfaceDesc;
-
 
884
  TDDOptSurfaceDesc = packed record
-
 
885
    dwSize : DWORD;             // size of the DDOPTSURFACEDESC structure
-
 
886
    dwFlags : DWORD;            // determines what fields are valid
-
 
887
    ddSCaps : TDDSCaps2;        // Common caps like: Memory type
-
 
888
    ddOSCaps : TDDOSCaps;       // Common caps like: Memory type
-
 
889
    guid : TGUID;               // Compression technique GUID
-
 
890
    dwCompressionRatio : DWORD; // Compression ratio
-
 
891
  end;
-
 
892
 
-
 
893
(*
-
 
894
 * DDCOLORCONTROL
-
 
895
 *)
-
 
896
  PDDColorControl = ^TDDColorControl;
-
 
897
  TDDColorControl = packed record
-
 
898
    dwSize: DWORD;
-
 
899
    dwFlags: DWORD;
-
 
900
    lBrightness: LongInt;
-
 
901
    lContrast: LongInt;
-
 
902
    lHue: LongInt;
-
 
903
    lSaturation: LongInt;
-
 
904
    lSharpness: LongInt;
-
 
905
    lGamma: LongInt;
-
 
906
    lColorEnable: LongInt;
-
 
907
    dwReserved1: DWORD;
-
 
908
  end;
-
 
909
 
-
 
910
(*
-
 
911
 * callbacks
-
 
912
 *)
-
 
913
 
-
 
914
{$IFNDEF WINNT}
946
  TDDEnumModesCallback = function(const lpDDSurfaceDesc: TDDSurfaceDesc;
915
  TDDEnumModesCallback = function (const lpDDSurfaceDesc: TDDSurfaceDesc;
947
      lpContext: Pointer): HResult; stdcall;
916
      lpContext: Pointer) : HResult; stdcall;
948
  LPDDENUMMODESCALLBACK = TDDEnumModesCallback;
-
 
949
 
-
 
950
  TDDEnumModesCallback2 = function(const lpDDSurfaceDesc: TDDSurfaceDesc2;
917
  TDDEnumModesCallback2 = function (const lpDDSurfaceDesc: TDDSurfaceDesc2;
951
      lpContext: Pointer): HResult; stdcall;
918
      lpContext: Pointer) : HResult; stdcall;
952
  LPDDENUMMODESCALLBACK2 = TDDEnumModesCallback2;
-
 
953
 
-
 
954
  TDDEnumSurfacesCallback = function(lpDDSurface: IDirectDrawSurface;
919
  TDDEnumSurfacesCallback = function (lpDDSurface: IDirectDrawSurface;
955
      const lpDDSurfaceDesc: TDDSurfaceDesc; lpContext: Pointer): HResult; stdcall;
920
      const lpDDSurfaceDesc: TDDSurfaceDesc; lpContext: Pointer) : HResult; stdcall;
956
  LPDDENUMSURFACESCALLBACK = TDDEnumSurfacesCallback;
-
 
957
 
-
 
958
  TDDEnumSurfacesCallback2 = function(lpDDSurface: IDirectDrawSurface4;
921
  TDDEnumSurfacesCallback2 = function (lpDDSurface: IDirectDrawSurface4;
959
      const lpDDSurfaceDesc: TDDSurfaceDesc2; lpContext: Pointer): HResult; stdcall;
922
      const lpDDSurfaceDesc: TDDSurfaceDesc2; lpContext: Pointer) : HResult; stdcall;
960
  LPDDENUMSURFACESCALLBACK2 = TDDEnumSurfacesCallback2;
-
 
961
 
-
 
962
  TDDEnumSurfacesCallback7 = function(lpDDSurface: IDirectDrawSurface7;
923
  TDDEnumSurfacesCallback7 = function (lpDDSurface: IDirectDrawSurface7;
963
      const lpDDSurfaceDesc: TDDSurfaceDesc2; lpContext: Pointer): HResult; stdcall;
924
      const lpDDSurfaceDesc: TDDSurfaceDesc2; lpContext: Pointer) : HResult; stdcall;
-
 
925
{$ENDIF}
-
 
926
 
-
 
927
(*
-
 
928
 * INTERACES FOLLOW:
-
 
929
 *      IDirectDraw
-
 
930
 *      IDirectDrawClipper
-
 
931
 *      IDirectDrawPalette
964
  LPDDENUMSURFACESCALLBACK7 = TDDEnumSurfacesCallback7;
932
 *      IDirectDrawSurface
-
 
933
 *)
965
 
934
 
-
 
935
(*
966
{ IDirectDraw Interface }
936
 * IDirectDraw
-
 
937
 *)
967
 
938
 
968
  IDirectDraw = interface(IUnknown)
939
  IDirectDraw = interface (IUnknown)
969
    ['{6C14DB80-A733-11CE-A521-0020AF0BE560}']
940
    ['{6C14DB80-A733-11CE-A521-0020AF0BE560}']
970
    // IDirectDraw methods
941
    (*** IDirectDraw methods ***)
971
    function Compact: HResult; stdcall;
942
    function Compact: HResult; stdcall;
-
 
943
    function CreateClipper (dwFlags: DWORD;
-
 
944
        out lplpDDClipper: IDirectDrawClipper;
-
 
945
        pUnkOuter: IUnknown) : HResult; stdcall;
972
    function CreateClipper(dwFlags: DWORD; out lplpDDClipper: IDirectDrawClipper;
946
    function CreatePalette (dwFlags: DWORD; lpColorTable: pointer;
-
 
947
        out lplpDDPalette: IDirectDrawPalette;
-
 
948
        pUnkOuter: IUnknown) : HResult; stdcall;
-
 
949
    function CreateSurface (var lpDDSurfaceDesc: TDDSurfaceDesc;
-
 
950
        out lplpDDSurface: IDirectDrawSurface;
973
        pUnkOuter: IUnknown): HResult; stdcall;
951
        pUnkOuter: IUnknown) : HResult; stdcall;
974
    function CreatePalette(dwFlags: DWORD; lpColorTable: PPaletteEntry;
-
 
975
        out lplpDDPalette: IDirectDrawPalette; pUnkOuter: IUnknown): HResult; stdcall;
-
 
976
    function CreateSurface(const lpDDSurfaceDesc: TDDSurfaceDesc;
-
 
977
        out lplpDDSurface: IDirectDrawSurface; pUnkOuter: IUnknown): HResult; stdcall;
-
 
978
    function DuplicateSurface(lpDDSurface: IDirectDrawSurface;
952
    function DuplicateSurface (lpDDSurface: IDirectDrawSurface;
979
        out lplpDupDDSurface: IDirectDrawSurface): HResult; stdcall;
953
        out lplpDupDDSurface: IDirectDrawSurface) : HResult; stdcall;
980
    function EnumDisplayModes(dwFlags: DWORD;
954
    function EnumDisplayModes (dwFlags: DWORD;
981
        const lpDDSurfaceDesc: TDDSurfaceDesc; lpContext: Pointer;
955
        lpDDSurfaceDesc: PDDSurfaceDesc; lpContext: Pointer;
982
        lpEnumModesCallback: TDDEnumModesCallback): HResult; stdcall;
956
        lpEnumModesCallback: TDDEnumModesCallback) : HResult; stdcall;
983
    function EnumSurfaces(dwFlags: DWORD; const lpDDSD: TDDSurfaceDesc;
957
    function EnumSurfaces (dwFlags: DWORD; const lpDDSD: TDDSurfaceDesc;
984
        lpContext: Pointer; lpEnumCallback: TDDEnumSurfacesCallback): HResult; stdcall;
958
        lpContext: Pointer; lpEnumCallback: TDDEnumSurfacesCallback) :
-
 
959
        HResult; stdcall;
985
    function FlipToGDISurface: HResult; stdcall;
960
    function FlipToGDISurface: HResult; stdcall;
986
    function GetCaps(var lpDDDriverCaps: TDDCaps; var lpDDHELCaps: TDDCaps): HResult; stdcall;
961
    function GetCaps (lpDDDriverCaps: PDDCaps; lpDDHELCaps: PDDCaps) : HResult; stdcall;
987
    function GetDisplayMode(var lpDDSurfaceDesc: TDDSurfaceDesc): HResult; stdcall;
962
    function GetDisplayMode (out lpDDSurfaceDesc: TDDSurfaceDesc) : HResult; stdcall;
988
    function GetFourCCCodes(var lpNumCodes, lpCodes: DWORD): HResult; stdcall;
963
    function GetFourCCCodes (var lpNumCodes: DWORD; lpCodes: PDWORD) : HResult; stdcall;
989
    function GetGDISurface(out lplpGDIDDSSurface: IDirectDrawSurface): HResult; stdcall;
964
    function GetGDISurface (out lplpGDIDDSSurface: IDirectDrawSurface) :
-
 
965
        HResult; stdcall;
990
    function GetMonitorFrequency(var lpdwFrequency: DWORD): HResult; stdcall;
966
    function GetMonitorFrequency (out lpdwFrequency: DWORD) : HResult; stdcall;
991
    function GetScanLine(var lpdwScanLine: DWORD): HResult; stdcall;
967
    function GetScanLine (out lpdwScanLine: DWORD) : HResult; stdcall;
992
    function GetVerticalBlankStatus(var lpbIsInVB: BOOL): HResult; stdcall;
968
    function GetVerticalBlankStatus (out lpbIsInVB: BOOL) : HResult; stdcall;
993
    function Initialize(lpGUID: PGUID): HResult; stdcall;
969
    function Initialize (lpGUID: PGUID) : HResult; stdcall;
994
    function RestoreDisplayMode: HResult; stdcall;
970
    function RestoreDisplayMode: HResult; stdcall;
995
    function SetCooperativeLevel(hWnd: HWND; dwFlags: DWORD): HResult; stdcall;
971
    function SetCooperativeLevel (hWnd: HWND; dwFlags: DWORD) : HResult; stdcall;
-
 
972
    (*** Warning!  SetDisplayMode differs between DirectDraw 1 and DirectDraw 2 ***)
996
    function SetDisplayMode(dwWidth, dwHeight, dwBpp: DWORD): HResult; stdcall;
973
    function SetDisplayMode (dwWidth: DWORD; dwHeight: DWORD;
-
 
974
        dwBpp: DWORD) : HResult; stdcall;
997
    function WaitForVerticalBlank(dwFlags: DWORD; hEvent: THandle): HResult; stdcall;
975
    function WaitForVerticalBlank (dwFlags: DWORD; hEvent: THandle) :
-
 
976
        HResult; stdcall;
998
  end;
977
  end;
999
 
978
 
1000
{ IDirectDraw2 Interface }
-
 
1001
 
-
 
1002
  IDirectDraw2 = interface(IUnknown)
979
  IDirectDraw2 = interface (IUnknown)
1003
    ['{B3A6F3E0-2B43-11CF-A2DE-00AA00B93356}']
980
    ['{B3A6F3E0-2B43-11CF-A2DE-00AA00B93356}']
1004
    // IDirectDraw methods
981
    (*** IDirectDraw methods ***)
1005
    function Compact: HResult; stdcall;
982
    function Compact: HResult; stdcall;
-
 
983
    function CreateClipper (dwFlags: DWORD;
-
 
984
        out lplpDDClipper: IDirectDrawClipper;
-
 
985
        pUnkOuter: IUnknown) : HResult; stdcall;
1006
    function CreateClipper(dwFlags: DWORD; out lplpDDClipper: IDirectDrawClipper;
986
    function CreatePalette (dwFlags: DWORD; lpColorTable: pointer;
-
 
987
        out lplpDDPalette: IDirectDrawPalette;
-
 
988
        pUnkOuter: IUnknown) : HResult; stdcall;
-
 
989
    function CreateSurface (var lpDDSurfaceDesc: TDDSurfaceDesc;
-
 
990
        out lplpDDSurface: IDirectDrawSurface;
1007
        pUnkOuter: IUnknown): HResult; stdcall;
991
        pUnkOuter: IUnknown) : HResult; stdcall;
1008
    function CreatePalette(dwFlags: DWORD; lpColorTable: PPaletteEntry;
-
 
1009
        out lplpDDPalette: IDirectDrawPalette; pUnkOuter: IUnknown): HResult; stdcall;
-
 
1010
    function CreateSurface(const lpDDSurfaceDesc: TDDSurfaceDesc;
-
 
1011
        out lplpDDSurface: IDirectDrawSurface; pUnkOuter: IUnknown): HResult; stdcall;
-
 
1012
    function DuplicateSurface(lpDDSurface: IDirectDrawSurface;
992
    function DuplicateSurface (lpDDSurface: IDirectDrawSurface;
1013
        out lplpDupDDSurface: IDirectDrawSurface): HResult; stdcall;
993
        out lplpDupDDSurface: IDirectDrawSurface) : HResult; stdcall;
1014
    function EnumDisplayModes(dwFlags: DWORD;
994
    function EnumDisplayModes (dwFlags: DWORD;
1015
        const lpDDSurfaceDesc: TDDSurfaceDesc; lpContext: Pointer;
995
        lpDDSurfaceDesc: PDDSurfaceDesc; lpContext: Pointer;
1016
        lpEnumModesCallback: TDDEnumModesCallback): HResult; stdcall;
996
        lpEnumModesCallback: TDDEnumModesCallback) : HResult; stdcall;
1017
    function EnumSurfaces(dwFlags: DWORD; const lpDDSD: TDDSurfaceDesc;
997
    function EnumSurfaces (dwFlags: DWORD; var lpDDSD: TDDSurfaceDesc;
1018
        lpContext: Pointer; lpEnumCallback: TDDEnumSurfacesCallback): HResult; stdcall;
998
        lpContext: Pointer; lpEnumCallback: TDDEnumSurfacesCallback) :
-
 
999
        HResult; stdcall;
1019
    function FlipToGDISurface: HResult; stdcall;
1000
    function FlipToGDISurface: HResult; stdcall;
1020
    function GetCaps(var lpDDDriverCaps: TDDCaps; var lpDDHELCaps: TDDCaps): HResult; stdcall;
1001
    function GetCaps (lpDDDriverCaps: PDDCaps; lpDDHELCaps: PDDCaps) : HResult; stdcall;
1021
    function GetDisplayMode(var lpDDSurfaceDesc: TDDSurfaceDesc): HResult; stdcall;
1002
    function GetDisplayMode (out lpDDSurfaceDesc: TDDSurfaceDesc) : HResult; stdcall;
1022
    function GetFourCCCodes(var lpNumCodes, lpCodes: DWORD): HResult; stdcall;
1003
    function GetFourCCCodes (var lpNumCodes: DWORD; lpCodes: PDWORD) : HResult; stdcall;
1023
    function GetGDISurface(out lplpGDIDDSSurface: IDirectDrawSurface): HResult; stdcall;
1004
    function GetGDISurface (out lplpGDIDDSSurface: IDirectDrawSurface) : HResult; stdcall;
1024
    function GetMonitorFrequency(var lpdwFrequency: DWORD): HResult; stdcall;
1005
    function GetMonitorFrequency (out lpdwFrequency: DWORD) : HResult; stdcall;
1025
    function GetScanLine(var lpdwScanLine: DWORD): HResult; stdcall;
1006
    function GetScanLine (out lpdwScanLine: DWORD) : HResult; stdcall;
1026
    function GetVerticalBlankStatus(var lpbIsInVB: BOOL): HResult; stdcall;
1007
    function GetVerticalBlankStatus (out lpbIsInVB: BOOL) : HResult; stdcall;
1027
    function Initialize(lpGUID: PGUID): HResult; stdcall;
1008
    function Initialize (lpGUID: PGUID) : HResult; stdcall;
1028
    function RestoreDisplayMode: HResult; stdcall;
1009
    function RestoreDisplayMode: HResult; stdcall;
1029
    function SetCooperativeLevel(hWnd: HWND; dwFlags: DWORD): HResult; stdcall;
1010
    function SetCooperativeLevel (hWnd: HWND; dwFlags: DWORD) : HResult; stdcall;
-
 
1011
(*** Warning!  SetDisplayMode differs between DirectDraw 1 and DirectDraw 2 ***)
1030
    function SetDisplayMode(dwWidth, dwHeight, dwBPP, dwRefreshRate: DWORD;
1012
    function SetDisplayMode (dwWidth: DWORD; dwHeight: DWORD; dwBPP: DWORD;
1031
        dwFlags: DWORD): HResult; stdcall;
1013
        dwRefreshRate: DWORD; dwFlags: DWORD) : HResult; stdcall;
1032
    function WaitForVerticalBlank(dwFlags: DWORD; hEvent: THandle): HResult; stdcall;
1014
    function WaitForVerticalBlank (dwFlags: DWORD; hEvent: THandle) :
1033
    // IDirectDraw2 methods
1015
        HResult; stdcall;
-
 
1016
    (*** Added in the v2 interface ***)
1034
    function GetAvailableVidMem(var lpDDSCaps: TDDSCaps;
1017
    function GetAvailableVidMem (var lpDDSCaps: TDDSCaps;
1035
        var lpdwTotal, lpdwFree: DWORD): HResult; stdcall;
1018
        out lpdwTotal, lpdwFree: DWORD) : HResult; stdcall;
1036
  end;
1019
  end;
1037
 
1020
 
1038
{ IDirectDraw4 Interface }
-
 
1039
 
-
 
1040
  IDirectDraw4 = interface(IUnknown)
1021
  IDirectDraw4 = interface (IUnknown)
1041
    ['{9C59509A-39BD-11D1-8C4A-00C04FD930C5}']
1022
    ['{9c59509a-39bd-11d1-8c4a-00c04fd930c5}']
1042
    // IDirectDraw methods
1023
    (*** IDirectDraw methods ***)
1043
    function Compact: HResult; stdcall;
1024
    function Compact: HResult; stdcall;
-
 
1025
    function CreateClipper (dwFlags: DWORD;
-
 
1026
        out lplpDDClipper: IDirectDrawClipper;
-
 
1027
        pUnkOuter: IUnknown) : HResult; stdcall;
1044
    function CreateClipper(dwFlags: DWORD; out lplpDDClipper: IDirectDrawClipper;
1028
    function CreatePalette (dwFlags: DWORD; lpColorTable: pointer;
-
 
1029
        out lplpDDPalette: IDirectDrawPalette;
1045
        pUnkOuter: IUnknown): HResult; stdcall;
1030
        pUnkOuter: IUnknown) : HResult; stdcall;
1046
    function CreatePalette(dwFlags: DWORD; lpColorTable: PPaletteEntry;
-
 
1047
        out lplpDDPalette: IDirectDrawPalette; pUnkOuter: IUnknown): HResult; stdcall;
-
 
1048
    function CreateSurface(const lpDDSurfaceDesc: TDDSurfaceDesc2;
1031
    function CreateSurface (const lpDDSurfaceDesc: TDDSurfaceDesc2;
1049
        out lplpDDSurface: IDirectDrawSurface4; pUnkOuter: IUnknown): HResult; stdcall;
1032
        out lplpDDSurface: IDirectDrawSurface4;
-
 
1033
        pUnkOuter: IUnknown) : HResult; stdcall;
1050
    function DuplicateSurface(lpDDSurface: IDirectDrawSurface4;
1034
    function DuplicateSurface (lpDDSurface: IDirectDrawSurface4;
1051
        out lplpDupDDSurface: IDirectDrawSurface4): HResult; stdcall;
1035
        out lplpDupDDSurface: IDirectDrawSurface4) : HResult; stdcall;
1052
    function EnumDisplayModes(dwFlags: DWORD;
1036
    function EnumDisplayModes (dwFlags: DWORD;
1053
        const lpDDSurfaceDesc: TDDSurfaceDesc2; lpContext: Pointer;
1037
        lpDDSurfaceDesc: PDDSurfaceDesc2; lpContext: Pointer;
1054
        lpEnumModesCallback: TDDEnumModesCallback2): HResult; stdcall;
1038
        lpEnumModesCallback: TDDEnumModesCallback2) : HResult; stdcall;
1055
    function EnumSurfaces(dwFlags: DWORD; const lpDDSD: TDDSurfaceDesc2;
1039
    function EnumSurfaces (dwFlags: DWORD; const lpDDSD: TDDSurfaceDesc2;
1056
        lpContext: Pointer; lpEnumCallback: TDDEnumSurfacesCallback2): HResult; stdcall;
1040
        lpContext: Pointer; lpEnumCallback: TDDEnumSurfacesCallback2) :
-
 
1041
        HResult; stdcall;
1057
    function FlipToGDISurface: HResult; stdcall;
1042
    function FlipToGDISurface: HResult; stdcall;
1058
    function GetCaps(var lpDDDriverCaps: TDDCaps; var lpDDHELCaps: TDDCaps): HResult; stdcall;
1043
    function GetCaps (lpDDDriverCaps: PDDCaps; lpDDHELCaps: PDDCaps) : HResult; stdcall;
1059
    function GetDisplayMode(var lpDDSurfaceDesc: TDDSurfaceDesc2): HResult; stdcall;
1044
    function GetDisplayMode (out lpDDSurfaceDesc: TDDSurfaceDesc2) : HResult; stdcall;
1060
    function GetFourCCCodes(var lpNumCodes, lpCodes: DWORD): HResult; stdcall;
1045
    function GetFourCCCodes (var lpNumCodes: DWORD; lpCodes: PDWORD) : HResult; stdcall;
1061
    function GetGDISurface(out lplpGDIDDSSurface: IDirectDrawSurface2): HResult; stdcall;
1046
    function GetGDISurface (out lplpGDIDDSSurface: IDirectDrawSurface4) :
-
 
1047
        HResult; stdcall;
1062
    function GetMonitorFrequency(var lpdwFrequency: DWORD): HResult; stdcall;
1048
    function GetMonitorFrequency (out lpdwFrequency: DWORD) : HResult; stdcall;
1063
    function GetScanLine(var lpdwScanLine: DWORD): HResult; stdcall;
1049
    function GetScanLine (out lpdwScanLine: DWORD) : HResult; stdcall;
1064
    function GetVerticalBlankStatus(var lpbIsInVB: BOOL): HResult; stdcall;
1050
    function GetVerticalBlankStatus (out lpbIsInVB: BOOL) : HResult; stdcall;
1065
    function Initialize(lpGUID: PGUID): HResult; stdcall;
1051
    function Initialize (lpGUID: PGUID) : HResult; stdcall;
1066
    function RestoreDisplayMode: HResult; stdcall;
1052
    function RestoreDisplayMode: HResult; stdcall;
1067
    function SetCooperativeLevel(hWnd: HWND; dwFlags: DWORD): HResult; stdcall;
1053
    function SetCooperativeLevel (hWnd: HWND; dwFlags: DWORD) : HResult; stdcall;
-
 
1054
(*** Warning!  SetDisplayMode differs between DirectDraw 1 and DirectDraw 2 ***)
1068
    function SetDisplayMode(dwWidth, dwHeight, dwBPP, dwRefreshRate: DWORD;
1055
    function SetDisplayMode (dwWidth: DWORD; dwHeight: DWORD; dwBPP: DWORD;
1069
        dwFlags: DWORD): HResult; stdcall;
1056
        dwRefreshRate: DWORD; dwFlags: DWORD) : HResult; stdcall;
1070
    function WaitForVerticalBlank(dwFlags: DWORD; hEvent: THandle): HResult; stdcall;
1057
    function WaitForVerticalBlank (dwFlags: DWORD; hEvent: THandle) :
1071
    // IDirectDraw2 methods
1058
        HResult; stdcall;
-
 
1059
    (*** Added in the v2 interface ***)
1072
    function GetAvailableVidMem(var lpDDSCaps: TDDSCaps;
1060
    function GetAvailableVidMem (const lpDDSCaps: TDDSCaps2;
1073
        var lpdwTotal, lpdwFree: DWORD): HResult; stdcall;
1061
        out lpdwTotal, lpdwFree: DWORD) : HResult; stdcall;
1074
    // IDirectDraw4 methods
1062
    (*** Added in the V4 Interface ***)
-
 
1063
    function GetSurfaceFromDC (hdc : Windows.HDC;
1075
    function GetSurfaceFromDC(hdc: HDC; lpDDS: IDirectDrawSurface4): HResult; stdcall;
1064
        out lpDDS4: IDirectDrawSurface4) : HResult; stdcall;
1076
    function RestoreAllSurfaces: HResult; stdcall;
1065
    function RestoreAllSurfaces : HResult; stdcall;
1077
    function TestCooperativeLevel: HResult; stdcall;
1066
    function TestCooperativeLevel : HResult; stdcall;
1078
    function GetDeviceIdentifier(var lpdddi: TDDDeviceIdentifier; dwFlags: DWORD): HResult; stdcall;
1067
    function GetDeviceIdentifier (out lpdddi: TDDDeviceIdentifier;
-
 
1068
        dwFlags: DWORD) : HResult; stdcall;
1079
  end;
1069
  end;
1080
 
1070
 
1081
{ IDirectDraw7 Interface }
-
 
1082
 
-
 
1083
  IDirectDraw7 = interface(IUnknown)
1071
  IDirectDraw7 = interface (IUnknown)
1084
    ['{15E65EC0-3B9C-11D2-B92F-00609797EA5B}']
1072
    ['{15e65ec0-3b9c-11d2-b92f-00609797ea5b}']
1085
    // IDirectDraw methods
1073
    (*** IDirectDraw methods ***)
1086
    function Compact: HResult; stdcall;
1074
    function Compact: HResult; stdcall;
-
 
1075
    function CreateClipper (dwFlags: DWORD;
-
 
1076
        out lplpDDClipper: IDirectDrawClipper;
-
 
1077
        pUnkOuter: IUnknown) : HResult; stdcall;
1087
    function CreateClipper(dwFlags: DWORD; out lplpDDClipper: IDirectDrawClipper;
1078
    function CreatePalette (dwFlags: DWORD; lpColorTable: pointer;
-
 
1079
        out lplpDDPalette: IDirectDrawPalette;
1088
        pUnkOuter: IUnknown): HResult; stdcall;
1080
        pUnkOuter: IUnknown) : HResult; stdcall;
1089
    function CreatePalette(dwFlags: DWORD; lpColorTable: PPaletteEntry;
-
 
1090
        out lplpDDPalette: IDirectDrawPalette; pUnkOuter: IUnknown): HResult; stdcall;
-
 
1091
    function CreateSurface(const lpDDSurfaceDesc: TDDSurfaceDesc2;
1081
    function CreateSurface (const lpDDSurfaceDesc: TDDSurfaceDesc2;
1092
        out lplpDDSurface: IDirectDrawSurface7; pUnkOuter: IUnknown): HResult; stdcall;
1082
        out lplpDDSurface: IDirectDrawSurface7;
-
 
1083
        pUnkOuter: IUnknown) : HResult; stdcall;
1093
    function DuplicateSurface(lpDDSurface: IDirectDrawSurface7;
1084
    function DuplicateSurface (lpDDSurface: IDirectDrawSurface7;
1094
        out lplpDupDDSurface: IDirectDrawSurface7): HResult; stdcall;
1085
        out lplpDupDDSurface: IDirectDrawSurface7) : HResult; stdcall;
1095
    function EnumDisplayModes(dwFlags: DWORD;
1086
    function EnumDisplayModes (dwFlags: DWORD;
1096
        const lpDDSurfaceDesc: TDDSurfaceDesc2; lpContext: Pointer;
1087
        lpDDSurfaceDesc: PDDSurfaceDesc2; lpContext: Pointer;
1097
        lpEnumModesCallback: TDDEnumModesCallback2): HResult; stdcall;
1088
        lpEnumModesCallback: TDDEnumModesCallback2) : HResult; stdcall;
1098
    function EnumSurfaces(dwFlags: DWORD; const lpDDSD: TDDSurfaceDesc2;
1089
    function EnumSurfaces (dwFlags: DWORD; const lpDDSD: TDDSurfaceDesc2;
1099
        lpContext: Pointer; lpEnumCallback: TDDEnumSurfacesCallback7): HResult; stdcall;
1090
        lpContext: Pointer; lpEnumCallback: TDDEnumSurfacesCallback7) :
-
 
1091
        HResult; stdcall;
1100
    function FlipToGDISurface: HResult; stdcall;
1092
    function FlipToGDISurface: HResult; stdcall;
1101
    function GetCaps(var lpDDDriverCaps: TDDCaps; var lpDDHELCaps: TDDCaps): HResult; stdcall;
1093
    function GetCaps (lpDDDriverCaps: PDDCaps; lpDDHELCaps: PDDCaps) : HResult; stdcall;
1102
    function GetDisplayMode(var lpDDSurfaceDesc: TDDSurfaceDesc2): HResult; stdcall;
1094
    function GetDisplayMode (out lpDDSurfaceDesc: TDDSurfaceDesc2) : HResult; stdcall;
1103
    function GetFourCCCodes(var lpNumCodes, lpCodes: DWORD): HResult; stdcall;
1095
    function GetFourCCCodes (var lpNumCodes: DWORD; lpCodes: PDWORD) : HResult; stdcall;
1104
    function GetGDISurface(out lplpGDIDDSSurface: IDirectDrawSurface7): HResult; stdcall;
1096
    function GetGDISurface (out lplpGDIDDSSurface: IDirectDrawSurface7) :
-
 
1097
        HResult; stdcall;
1105
    function GetMonitorFrequency(var lpdwFrequency: DWORD): HResult; stdcall;
1098
    function GetMonitorFrequency (out lpdwFrequency: DWORD) : HResult; stdcall;
1106
    function GetScanLine(var lpdwScanLine: DWORD): HResult; stdcall;
1099
    function GetScanLine (out lpdwScanLine: DWORD) : HResult; stdcall;
1107
    function GetVerticalBlankStatus(var lpbIsInVB: BOOL): HResult; stdcall;
1100
    function GetVerticalBlankStatus (out lpbIsInVB: BOOL) : HResult; stdcall;
1108
    function Initialize(lpGUID: PGUID): HResult; stdcall;
1101
    function Initialize (lpGUID: PGUID) : HResult; stdcall;
1109
    function RestoreDisplayMode: HResult; stdcall;
1102
    function RestoreDisplayMode: HResult; stdcall;
1110
    function SetCooperativeLevel(hWnd: HWND; dwFlags: DWORD): HResult; stdcall;
1103
    function SetCooperativeLevel (hWnd: HWND; dwFlags: DWORD) : HResult; stdcall;
1111
    function SetDisplayMode(dwWidth, dwHeight, dwBPP, dwRefreshRate: DWORD;
1104
    function SetDisplayMode (dwWidth: DWORD; dwHeight: DWORD; dwBPP: DWORD;
1112
        dwFlags: DWORD): HResult; stdcall;
1105
        dwRefreshRate: DWORD; dwFlags: DWORD) : HResult; stdcall;
1113
    function WaitForVerticalBlank(dwFlags: DWORD; hEvent: THandle): HResult; stdcall;
1106
    function WaitForVerticalBlank (dwFlags: DWORD; hEvent: THandle) :
1114
    // IDirectDraw2 methods
1107
        HResult; stdcall;
-
 
1108
    (*** Added in the v2 interface ***)
1115
    function GetAvailableVidMem(var lpDDSCaps: TDDSCaps;
1109
    function GetAvailableVidMem (const lpDDSCaps: TDDSCaps2;
1116
        var lpdwTotal, lpdwFree: DWORD): HResult; stdcall;
1110
        out lpdwTotal, lpdwFree: DWORD) : HResult; stdcall;
1117
    // IDirectDraw4 methods
1111
    (*** Added in the V4 Interface ***)
-
 
1112
    function GetSurfaceFromDC (hdc : Windows.HDC;
1118
    function GetSurfaceFromDC(hdc: HDC; lpDDS: IDirectDrawSurface4): HResult; stdcall;
1113
        out lpDDS: IDirectDrawSurface7) : HResult; stdcall;
1119
    function RestoreAllSurfaces: HResult; stdcall;
1114
    function RestoreAllSurfaces : HResult; stdcall;
1120
    function TestCooperativeLevel: HResult; stdcall;
1115
    function TestCooperativeLevel : HResult; stdcall;
1121
    function GetDeviceIdentifier(var lpdddi: TDDDeviceIdentifier; dwFlags: DWORD): HResult; stdcall;
1116
    function GetDeviceIdentifier (out lpdddi: TDDDeviceIdentifier2;
1122
    // IDirectDraw7 methods
1117
        dwFlags: DWORD) : HResult; stdcall;
1123
    function StartModeTest(var lpModesToTest: TSize; dwNumEntries: DWORD; dwFlags: DWORD): HResult; stdcall;
1118
    function StartModeTest(const lpModesToTest; dwNumEntries, dwFlags: DWORD) : HResult; stdcall;
1124
    function EvaluateMode(dwFlags: DWORD; var pSecondsUntilTimeout: DWORD): HResult; stdcall;
1119
    function EvaluateMode(dwFlags: DWORD; out pSecondsUntilTimeout: DWORD) : HResult; stdcall;
1125
  end;
1120
  end;
1126
 
1121
 
-
 
1122
 
-
 
1123
 
-
 
1124
(*
1127
{ IDirectDrawPalette Interface }
1125
 * IDirectDrawPalette
-
 
1126
 *)
1128
 
1127
 
1129
  IDirectDrawPalette = interface(IUnknown)
1128
  IDirectDrawPalette = interface (IUnknown)
1130
    ['{6C14DB84-A733-11CE-A521-0020AF0BE560}']
1129
    ['{6C14DB84-A733-11CE-A521-0020AF0BE560}']
1131
    // IDirectDrawPalette methods
1130
    (*** IDirectDrawPalette methods ***)
1132
    function GetCaps(varlpdwCaps: DWORD): HResult; stdcall;
1131
    function GetCaps (out lpdwCaps: DWORD) : HResult; stdcall;
1133
    function GetEntries(dwFlags: DWORD; dwBase: DWORD; dwNumEntries: DWORD;
1132
    function GetEntries (dwFlags: DWORD; dwBase: DWORD; dwNumEntries: DWORD;
1134
        lpEntries: PPaletteEntry): HResult; stdcall;
1133
        lpEntries: pointer) : HResult; stdcall;
1135
    function Initialize(lpDD: IDirectDraw; dwFlags: DWORD;
1134
    function Initialize (lpDD: IDirectDraw; dwFlags: DWORD;
1136
        lpDDColorTable: PPaletteEntry): HResult; stdcall;
1135
        lpDDColorTable: pointer) : HResult; stdcall;
1137
    function SetEntries(dwFlags: DWORD; dwStartingEntry: DWORD;
1136
    function SetEntries (dwFlags: DWORD; dwStartingEntry: DWORD;
1138
        dwCount: DWORD; lpEntries: PPaletteEntry): HResult; stdcall;
1137
        dwCount: DWORD; lpEntries: pointer) : HResult; stdcall;
1139
  end;
1138
  end;
1140
 
1139
 
-
 
1140
(*
1141
{ IDirectDrawClipper Interface }
1141
 * IDirectDrawClipper
-
 
1142
 *)
1142
 
1143
 
1143
  IDirectDrawClipper = interface(IUnknown)
1144
  IDirectDrawClipper = interface (IUnknown)
1144
    ['{6C14DB85-A733-11CE-A521-0020AF0BE560}']
1145
    ['{6C14DB85-A733-11CE-A521-0020AF0BE560}']
1145
    // IDirectDrawClipper methods
1146
    (*** IDirectDrawClipper methods ***)
1146
    function GetClipList(const lpRect: TRect; lpClipList: PRgnData;
1147
    function GetClipList (lpRect: PRect; lpClipList: PRgnData;
1147
        var lpdwSize: DWORD): HResult; stdcall;
1148
        var lpdwSize: DWORD) : HResult; stdcall;
1148
    function GetHWnd(var lphWnd: HWND): HResult; stdcall;
1149
    function GetHWnd (out lphWnd: HWND) : HResult; stdcall;
1149
    function Initialize(lpDD: IDirectDraw; dwFlags: DWORD): HResult; stdcall;
1150
    function Initialize (lpDD: IDirectDraw; dwFlags: DWORD) : HResult; stdcall;
1150
    function IsClipListChanged(var lpbChanged: BOOL): HResult; stdcall;
1151
    function IsClipListChanged (out lpbChanged: BOOL) : HResult; stdcall;
1151
    function SetClipList(lpClipList: PRgnData; dwFlags: DWORD): HResult; stdcall;
1152
    function SetClipList (lpClipList: PRgnData; dwFlags: DWORD) : HResult; stdcall;
1152
    function SetHWnd(dwFlags: DWORD; hWnd: HWND): HResult; stdcall;
1153
    function SetHWnd (dwFlags: DWORD; hWnd: HWND) : HResult; stdcall;
1153
  end;
1154
  end;
1154
 
1155
 
-
 
1156
(*
1155
{ IDirectDrawSurface Interface }
1157
 * IDirectDrawSurface and related interfaces
-
 
1158
 *)
1156
 
1159
 
1157
  IDirectDrawSurface = interface(IUnknown)
1160
  IDirectDrawSurface = interface (IUnknown)
1158
    ['{6C14DB81-A733-11CE-A521-0020AF0BE560}']
1161
    ['{6C14DB81-A733-11CE-A521-0020AF0BE560}']
1159
    // IDirectDrawSurface methods
1162
    (*** IDirectDrawSurface methods ***)
1160
    function AddAttachedSurface(lpDDSAttachedSurface: IDirectDrawSurface): HResult; stdcall;
1163
    function AddAttachedSurface (lpDDSAttachedSurface: IDirectDrawSurface) :
-
 
1164
        HResult; stdcall;
1161
    function AddOverlayDirtyRect(const lpRect: TRect): HResult; stdcall;
1165
    function AddOverlayDirtyRect (const lpRect: TRect) : HResult; stdcall;
-
 
1166
    function Blt (lpDestRect: PRect;
1162
    function Blt(const lpDestRect: TRect; lpDDSrcSurface: IDirectDrawSurface;
1167
        lpDDSrcSurface: IDirectDrawSurface; lpSrcRect: PRect;
1163
        const lpSrcRect: TRect; dwFlags: DWORD; const lpDDBltFx: TDDBltFX): HResult; stdcall;
1168
        dwFlags: DWORD; lpDDBltFx: PDDBltFX) : HResult; stdcall;
1164
    function BltBatch(const lpDDBltBatch: TDDBltBatch; dwCount: DWORD;
1169
    function BltBatch (const lpDDBltBatch: TDDBltBatch; dwCount: DWORD;
1165
        dwFlags: DWORD): HResult; stdcall;
1170
        dwFlags: DWORD) : HResult; stdcall;
1166
    function BltFast(dwX, dwY: DWORD; lpDDSrcSurface: IDirectDrawSurface;
1171
    function BltFast (dwX: DWORD; dwY: DWORD;
-
 
1172
        lpDDSrcSurface: IDirectDrawSurface; lpSrcRect: PRect;
1167
        const lpSrcRect: TRect; dwTrans: DWORD): HResult; stdcall;
1173
        dwTrans: DWORD) : HResult; stdcall;
1168
    function DeleteAttachedSurface(dwFlags: DWORD;
1174
    function DeleteAttachedSurface (dwFlags: DWORD;
1169
        lpDDSAttachedSurface: IDirectDrawSurface): HResult; stdcall;
1175
        lpDDSAttachedSurface: IDirectDrawSurface) : HResult; stdcall;
1170
    function EnumAttachedSurfaces(lpContext: Pointer;
1176
    function EnumAttachedSurfaces (lpContext: Pointer;
1171
        lpEnumSurfacesCallback: TDDEnumSurfacesCallback): HResult; stdcall;
1177
        lpEnumSurfacesCallback: TDDEnumSurfacesCallback) : HResult; stdcall;
1172
    function EnumOverlayZOrders(dwFlags: DWORD; lpContext: Pointer;
1178
    function EnumOverlayZOrders (dwFlags: DWORD; lpContext: Pointer;
1173
        lpfnCallback: TDDEnumSurfacesCallback): HResult; stdcall;
1179
        lpfnCallback: TDDEnumSurfacesCallback) : HResult; stdcall;
1174
    function Flip(lpDDSurfaceTargetOverride: IDirectDrawSurface;
1180
    function Flip (lpDDSurfaceTargetOverride: IDirectDrawSurface;
1175
        dwFlags: DWORD): HResult; stdcall;
1181
        dwFlags: DWORD) : HResult; stdcall;
1176
    function GetAttachedSurface(var lpDDSCaps: TDDSCaps;
1182
    function GetAttachedSurface (var lpDDSCaps: TDDSCaps;
1177
        out lplpDDAttachedSurface: IDirectDrawSurface): HResult; stdcall;
1183
        (*out*)var lplpDDAttachedSurface: IDirectDrawSurface) : HResult; stdcall;
1178
    function GetBltStatus(dwFlags: DWORD): HResult; stdcall;
1184
    function GetBltStatus (dwFlags: DWORD) : HResult; stdcall;
1179
    function GetCaps(var lpDDSCaps: TDDSCaps): HResult; stdcall;
1185
    function GetCaps (out lpDDSCaps: TDDSCaps) : HResult; stdcall;
1180
    function GetClipper(out lplpDDClipper: IDirectDrawClipper): HResult; stdcall;
1186
    function GetClipper (out lplpDDClipper: IDirectDrawClipper) : HResult; stdcall;
1181
    function GetColorKey(dwFlags: DWORD; var lpDDColorKey: TDDColorKey): HResult; stdcall;
1187
    function GetColorKey (dwFlags: DWORD; out lpDDColorKey: TDDColorKey) :
-
 
1188
        HResult; stdcall;
1182
    function GetDC(var lphDC: HDC): HResult; stdcall;
1189
    function GetDC (out lphDC: HDC) : HResult; stdcall;
1183
    function GetFlipStatus(dwFlags: DWORD): HResult; stdcall;
1190
    function GetFlipStatus (dwFlags: DWORD) : HResult; stdcall;
1184
    function GetOverlayPosition(var lplX, lplY: Longint): HResult; stdcall;
1191
    function GetOverlayPosition (out lplX, lplY: LongInt) : HResult; stdcall;
1185
    function GetPalette(out lplpDDPalette: IDirectDrawPalette): HResult; stdcall;
1192
    function GetPalette (out lplpDDPalette: IDirectDrawPalette) : HResult; stdcall;
1186
    function GetPixelFormat(var lpDDPixelFormat: TDDPixelFormat): HResult; stdcall;
1193
    function GetPixelFormat (out lpDDPixelFormat: TDDPixelFormat) : HResult; stdcall;
1187
    function GetSurfaceDesc(var lpDDSurfaceDesc: TDDSurfaceDesc): HResult; stdcall;
1194
    function GetSurfaceDesc (out lpDDSurfaceDesc: TDDSurfaceDesc) : HResult; stdcall;
1188
    function Initialize(lpDD: IDirectDraw;
1195
    function Initialize (lpDD: IDirectDraw;
1189
        const lpDDSurfaceDesc: TDDSurfaceDesc): HResult; stdcall;
1196
        out lpDDSurfaceDesc: TDDSurfaceDesc) : HResult; stdcall;
1190
    function IsLost: HResult; stdcall;
1197
    function IsLost: HResult; stdcall;
1191
    function Lock(lpDestRect: PRect; var lpDDSurfaceDesc: TDDSurfaceDesc;
1198
    function Lock (lpDestRect: PRect; out lpDDSurfaceDesc:
1192
        dwFlags: DWORD; hEvent: THandle): HResult; stdcall;
1199
        TDDSurfaceDesc; dwFlags: DWORD; hEvent: THandle) : HResult; stdcall;
1193
    function ReleaseDC(hDC: HDC): HResult; stdcall;
1200
    function ReleaseDC (hDC: Windows.HDC) : HResult; stdcall;
1194
    function Restore: HResult; stdcall;
1201
    function _Restore: HResult; stdcall;
1195
    function SetClipper(lpDDClipper: IDirectDrawClipper): HResult; stdcall;
1202
    function SetClipper (lpDDClipper: IDirectDrawClipper) : HResult; stdcall;
1196
    function SetColorKey(dwFlags: DWORD; const lpDDColorKey: TDDColorKey): HResult; stdcall;
1203
    function SetColorKey (dwFlags: DWORD; lpDDColorKey: PDDColorKey) :
-
 
1204
        HResult; stdcall;
1197
    function SetOverlayPosition(lX, lY: Longint): HResult; stdcall;
1205
    function SetOverlayPosition (lX, lY: LongInt) : HResult; stdcall;
1198
    function SetPalette(lpDDPalette: IDirectDrawPalette): HResult; stdcall;
1206
    function SetPalette (lpDDPalette: IDirectDrawPalette) : HResult; stdcall;
1199
    function Unlock(lpSurfaceData: Pointer): HResult; stdcall;
1207
    function Unlock (lpSurfaceData: Pointer) : HResult; stdcall;
1200
    function UpdateOverlay(const lpSrcRect: TRect;
1208
    function UpdateOverlay (lpSrcRect: PRect;
1201
        lpDDDestSurface: IDirectDrawSurface; const lpDestRect: TRect;
1209
        lpDDDestSurface: IDirectDrawSurface; lpDestRect: PRect;
1202
        dwFlags: DWORD; const lpDDOverlayFx: TDDOverlayFX): HResult; stdcall;
1210
        dwFlags: DWORD; lpDDOverlayFx: PDDOverlayFX) : HResult; stdcall;
1203
    function UpdateOverlayDisplay(dwFlags: DWORD): HResult; stdcall;
1211
    function UpdateOverlayDisplay (dwFlags: DWORD) : HResult; stdcall;
1204
    function UpdateOverlayZOrder(dwFlags: DWORD;
1212
    function UpdateOverlayZOrder (dwFlags: DWORD;
1205
        lpDDSReference: IDirectDrawSurface): HResult; stdcall;
1213
        lpDDSReference: IDirectDrawSurface) : HResult; stdcall;
1206
  end;
1214
  end;
1207
 
1215
 
-
 
1216
(*
1208
{ IDirectDrawSurface2 Interface }
1217
 * IDirectDrawSurface2 and related interfaces
-
 
1218
 *)
1209
 
1219
 
1210
  IDirectDrawSurface2 = interface(IUnknown)
1220
  IDirectDrawSurface2 = interface (IUnknown)
1211
    ['{57805885-6EEC-11CF-9441-A82303C10E27}']
1221
    ['{57805885-6eec-11cf-9441-a82303c10e27}']
1212
    // IDirectDrawSurface methods
1222
    (*** IDirectDrawSurface methods ***)
1213
    function AddAttachedSurface(lpDDSAttachedSurface: IDirectDrawSurface2): HResult; stdcall;
1223
    function AddAttachedSurface (lpDDSAttachedSurface: IDirectDrawSurface2) :
-
 
1224
        HResult; stdcall;
1214
    function AddOverlayDirtyRect(const lpRect: TRect): HResult; stdcall;
1225
    function AddOverlayDirtyRect (const lpRect: TRect) : HResult; stdcall;
-
 
1226
    function Blt (lpDestRect: PRect;
1215
    function Blt(const lpDestRect: TRect; lpDDSrcSurface: IDirectDrawSurface2;
1227
        lpDDSrcSurface: IDirectDrawSurface2; lpSrcRect: PRect;
1216
        const lpSrcRect: TRect; dwFlags: DWORD; const lpDDBltFx: TDDBltFX): HResult; stdcall;
1228
        dwFlags: DWORD; lpDDBltFx: PDDBltFX) : HResult; stdcall;
1217
    function BltBatch(const lpDDBltBatch: TDDBltBatch; dwCount: DWORD;
1229
    function BltBatch (const lpDDBltBatch: TDDBltBatch; dwCount: DWORD;
1218
        dwFlags: DWORD): HResult; stdcall;
1230
        dwFlags: DWORD) : HResult; stdcall;
1219
    function BltFast(dwX, dwY: DWORD; lpDDSrcSurface: IDirectDrawSurface2;
1231
    function BltFast (dwX: DWORD; dwY: DWORD;
-
 
1232
        lpDDSrcSurface: IDirectDrawSurface2; lpSrcRect: PRect;
1220
        const lpSrcRect: TRect; dwTrans: DWORD): HResult; stdcall;
1233
        dwTrans: DWORD) : HResult; stdcall;
1221
    function DeleteAttachedSurface(dwFlags: DWORD;
1234
    function DeleteAttachedSurface (dwFlags: DWORD;
1222
        lpDDSAttachedSurface: IDirectDrawSurface2): HResult; stdcall;
1235
        lpDDSAttachedSurface: IDirectDrawSurface2) : HResult; stdcall;
1223
    function EnumAttachedSurfaces(lpContext: Pointer;
1236
    function EnumAttachedSurfaces (lpContext: Pointer;
1224
        lpEnumSurfacesCallback: TDDEnumSurfacesCallback): HResult; stdcall;
1237
        lpEnumSurfacesCallback: TDDEnumSurfacesCallback) : HResult; stdcall;
1225
    function EnumOverlayZOrders(dwFlags: DWORD; lpContext: Pointer;
1238
    function EnumOverlayZOrders (dwFlags: DWORD; lpContext: Pointer;
Line 1227... Line 1240...
1227
    function Flip(lpDDSurfaceTargetOverride: IDirectDrawSurface2;
1240
    function Flip (lpDDSurfaceTargetOverride: IDirectDrawSurface2;
1228
        dwFlags: DWORD): HResult; stdcall;
1241
        dwFlags: DWORD) : HResult; stdcall;
1229
    function GetAttachedSurface(var lpDDSCaps: TDDSCaps;
1242
    function GetAttachedSurface (var lpDDSCaps: TDDSCaps;
1230
        out lplpDDAttachedSurface: IDirectDrawSurface2): HResult; stdcall;
1243
        out lplpDDAttachedSurface: IDirectDrawSurface2) : HResult; stdcall;
1231
    function GetBltStatus(dwFlags: DWORD): HResult; stdcall;
1244
    function GetBltStatus (dwFlags: DWORD) : HResult; stdcall;
1232
    function GetCaps(var lpDDSCaps: TDDSCaps): HResult; stdcall;
1245
    function GetCaps (out lpDDSCaps: TDDSCaps) : HResult; stdcall;
1233
    function GetClipper(out lplpDDClipper: IDirectDrawClipper): HResult; stdcall;
1246
    function GetClipper (out lplpDDClipper: IDirectDrawClipper) : HResult; stdcall;
1234
    function GetColorKey(dwFlags: DWORD; var lpDDColorKey: TDDColorKey): HResult; stdcall;
1247
    function GetColorKey (dwFlags: DWORD; out lpDDColorKey: TDDColorKey) :
-
 
1248
        HResult; stdcall;
1235
    function GetDC(var lphDC: HDC): HResult; stdcall;
1249
    function GetDC (out lphDC: HDC) : HResult; stdcall;
1236
    function GetFlipStatus(dwFlags: DWORD): HResult; stdcall;
1250
    function GetFlipStatus (dwFlags: DWORD) : HResult; stdcall;
1237
    function GetOverlayPosition(var lplX, lplY: Longint): HResult; stdcall;
1251
    function GetOverlayPosition (out lplX, lplY: LongInt) : HResult; stdcall;
1238
    function GetPalette(out lplpDDPalette: IDirectDrawPalette): HResult; stdcall;
1252
    function GetPalette (out lplpDDPalette: IDirectDrawPalette) : HResult; stdcall;
1239
    function GetPixelFormat(var lpDDPixelFormat: TDDPixelFormat): HResult; stdcall;
1253
    function GetPixelFormat (out lpDDPixelFormat: TDDPixelFormat) : HResult; stdcall;
1240
    function GetSurfaceDesc(var lpDDSurfaceDesc: TDDSurfaceDesc): HResult; stdcall;
1254
    function GetSurfaceDesc (out lpDDSurfaceDesc: TDDSurfaceDesc) : HResult; stdcall;
-
 
1255
    function Initialize (lpDD: IDirectDraw;
1241
    function Initialize(lpDD: IDirectDraw; const lpDDSurfaceDesc: TDDSurfaceDesc): HResult; stdcall;
1256
        out lpDDSurfaceDesc: TDDSurfaceDesc) : HResult; stdcall;
1242
    function IsLost: HResult; stdcall;
1257
    function IsLost: HResult; stdcall;
1243
    function Lock(lpDestRect: PRect; const lpDDSurfaceDesc: TDDSurfaceDesc;
1258
    function Lock (lpDestRect: PRect;
-
 
1259
        out lpDDSurfaceDesc: TDDSurfaceDesc; dwFlags: DWORD;
1244
        dwFlags: DWORD; hEvent: THandle): HResult; stdcall;
1260
        hEvent: THandle) : HResult; stdcall;
1245
    function ReleaseDC(hDC: HDC): HResult; stdcall;
1261
    function ReleaseDC (hDC: Windows.HDC) : HResult; stdcall;
1246
    function Restore: HResult; stdcall;
1262
    function _Restore: HResult; stdcall;
1247
    function SetClipper(lpDDClipper: IDirectDrawClipper): HResult; stdcall;
1263
    function SetClipper (lpDDClipper: IDirectDrawClipper) : HResult; stdcall;
1248
    function SetColorKey(dwFlags: DWORD; const lpDDColorKey: TDDColorKey): HResult; stdcall;
1264
    function SetColorKey (dwFlags: DWORD; lpDDColorKey: PDDColorKey) :
-
 
1265
        HResult; stdcall;
1249
    function SetOverlayPosition(lX, lY: Longint): HResult; stdcall;
1266
    function SetOverlayPosition (lX, lY: LongInt) : HResult; stdcall;
1250
    function SetPalette(lpDDPalette: IDirectDrawPalette): HResult; stdcall;
1267
    function SetPalette (lpDDPalette: IDirectDrawPalette) : HResult; stdcall;
1251
    function Unlock(lpSurfaceData: Pointer): HResult; stdcall;
1268
    function Unlock (lpSurfaceData: Pointer) : HResult; stdcall;
1252
    function UpdateOverlay(const lpSrcRect: TRect;
1269
    function UpdateOverlay (lpSrcRect: PRect;
1253
        lpDDDestSurface: IDirectDrawSurface2; const lpDestRect: TRect;
1270
        lpDDDestSurface: IDirectDrawSurface2; lpDestRect: PRect;
1254
        dwFlags: DWORD; const lpDDOverlayFx: TDDOverlayFX): HResult; stdcall;
1271
        dwFlags: DWORD; lpDDOverlayFx: PDDOverlayFX) : HResult; stdcall;
1255
    function UpdateOverlayDisplay(dwFlags: DWORD): HResult; stdcall;
1272
    function UpdateOverlayDisplay (dwFlags: DWORD) : HResult; stdcall;
1256
    function UpdateOverlayZOrder(dwFlags: DWORD;
1273
    function UpdateOverlayZOrder (dwFlags: DWORD;
1257
        lpDDSReference: IDirectDrawSurface2): HResult; stdcall;
1274
        lpDDSReference: IDirectDrawSurface2) : HResult; stdcall;
1258
    // IDirectDrawSurface2 methods
1275
    (*** Added in the v2 interface ***)
1259
    function GetDDInterface(out lplpDD: IUnknown): HResult; stdcall;
1276
    function GetDDInterface (var lplpDD: IDirectDraw) : HResult; stdcall;
1260
    function PageLock(dwFlags: DWORD): HResult; stdcall;
1277
    function PageLock (dwFlags: DWORD) : HResult; stdcall;
1261
    function PageUnlock(dwFlags: DWORD): HResult; stdcall;
1278
    function PageUnlock (dwFlags: DWORD) : HResult; stdcall;
1262
  end;
1279
  end;
1263
 
1280
 
1264
{ IDirectDrawSurface3 Interface }
-
 
1265
 
-
 
1266
  IDirectDrawSurface3 = interface(IUnknown)
1281
  IDirectDrawSurface3 = interface (IUnknown)
1267
    ['{DA044E00-69B2-11D0-A1D5-00AA00B8DFBB}']
1282
    ['{DA044E00-69B2-11D0-A1D5-00AA00B8DFBB}']
1268
    // IDirectDrawSurface methods
1283
    (*** IDirectDrawSurface methods ***)
1269
    function AddAttachedSurface(lpDDSAttachedSurface: IDirectDrawSurface3): HResult; stdcall;
1284
    function AddAttachedSurface (lpDDSAttachedSurface: IDirectDrawSurface3) :
-
 
1285
        HResult; stdcall;
1270
    function AddOverlayDirtyRect(const lpRect: TRect): HResult; stdcall;
1286
    function AddOverlayDirtyRect (const lpRect: TRect) : HResult; stdcall;
-
 
1287
    function Blt (lpDestRect: PRect;
1271
    function Blt(const lpDestRect: TRect; lpDDSrcSurface: IDirectDrawSurface3;
1288
        lpDDSrcSurface: IDirectDrawSurface3; lpSrcRect: PRect;
1272
        const lpSrcRect: TRect; dwFlags: DWORD; const lpDDBltFx: TDDBltFX): HResult; stdcall;
1289
        dwFlags: DWORD; lpDDBltFx: PDDBltFX) : HResult; stdcall;
1273
    function BltBatch(const lpDDBltBatch: TDDBltBatch; dwCount: DWORD;
1290
    function BltBatch (const lpDDBltBatch: TDDBltBatch; dwCount: DWORD;
1274
        dwFlags: DWORD): HResult; stdcall;
1291
        dwFlags: DWORD) : HResult; stdcall;
1275
    function BltFast(dwX, dwY: DWORD; lpDDSrcSurface: IDirectDrawSurface3;
1292
    function BltFast (dwX: DWORD; dwY: DWORD;
-
 
1293
        lpDDSrcSurface: IDirectDrawSurface3; lpSrcRect: PRect;
1276
        const lpSrcRect: TRect; dwTrans: DWORD): HResult; stdcall;
1294
        dwTrans: DWORD) : HResult; stdcall;
1277
    function DeleteAttachedSurface(dwFlags: DWORD;
1295
    function DeleteAttachedSurface (dwFlags: DWORD;
1278
        lpDDSAttachedSurface: IDirectDrawSurface3): HResult; stdcall;
1296
        lpDDSAttachedSurface: IDirectDrawSurface3) : HResult; stdcall;
1279
    function EnumAttachedSurfaces(lpContext: Pointer;
1297
    function EnumAttachedSurfaces (lpContext: Pointer;
1280
        lpEnumSurfacesCallback: TDDEnumSurfacesCallback): HResult; stdcall;
1298
        lpEnumSurfacesCallback: TDDEnumSurfacesCallback) : HResult; stdcall;
1281
    function EnumOverlayZOrders(dwFlags: DWORD; lpContext: Pointer;
1299
    function EnumOverlayZOrders (dwFlags: DWORD; lpContext: Pointer;
Line 1283... Line 1301...
1283
    function Flip(lpDDSurfaceTargetOverride: IDirectDrawSurface3;
1301
    function Flip (lpDDSurfaceTargetOverride: IDirectDrawSurface3;
1284
        dwFlags: DWORD): HResult; stdcall;
1302
        dwFlags: DWORD) : HResult; stdcall;
1285
    function GetAttachedSurface(var lpDDSCaps: TDDSCaps;
1303
    function GetAttachedSurface (var lpDDSCaps: TDDSCaps;
1286
        out lplpDDAttachedSurface: IDirectDrawSurface3): HResult; stdcall;
1304
        out lplpDDAttachedSurface: IDirectDrawSurface3) : HResult; stdcall;
1287
    function GetBltStatus(dwFlags: DWORD): HResult; stdcall;
1305
    function GetBltStatus (dwFlags: DWORD) : HResult; stdcall;
1288
    function GetCaps(var lpDDSCaps: TDDSCaps): HResult; stdcall;
1306
    function GetCaps (out lpDDSCaps: TDDSCaps) : HResult; stdcall;
1289
    function GetClipper(out lplpDDClipper: IDirectDrawClipper): HResult; stdcall;
1307
    function GetClipper (out lplpDDClipper: IDirectDrawClipper) : HResult; stdcall;
1290
    function GetColorKey(dwFlags: DWORD; var lpDDColorKey: TDDColorKey): HResult; stdcall;
1308
    function GetColorKey (dwFlags: DWORD; out lpDDColorKey: TDDColorKey) :
-
 
1309
        HResult; stdcall;
1291
    function GetDC(var lphDC: HDC): HResult; stdcall;
1310
    function GetDC (out lphDC: HDC) : HResult; stdcall;
1292
    function GetFlipStatus(dwFlags: DWORD): HResult; stdcall;
1311
    function GetFlipStatus (dwFlags: DWORD) : HResult; stdcall;
1293
    function GetOverlayPosition(var lplX, lplY: Longint): HResult; stdcall;
1312
    function GetOverlayPosition (out lplX, lplY: LongInt) : HResult; stdcall;
1294
    function GetPalette(out lplpDDPalette: IDirectDrawPalette): HResult; stdcall;
1313
    function GetPalette (out lplpDDPalette: IDirectDrawPalette) : HResult; stdcall;
1295
    function GetPixelFormat(var lpDDPixelFormat: TDDPixelFormat): HResult; stdcall;
1314
    function GetPixelFormat (out lpDDPixelFormat: TDDPixelFormat) : HResult; stdcall;
1296
    function GetSurfaceDesc(var lpDDSurfaceDesc: TDDSurfaceDesc): HResult; stdcall;
1315
    function GetSurfaceDesc (out lpDDSurfaceDesc: TDDSurfaceDesc) : HResult; stdcall;
-
 
1316
    function Initialize (lpDD: IDirectDraw;
1297
    function Initialize(lpDD: IDirectDraw; const lpDDSurfaceDesc: TDDSurfaceDesc): HResult; stdcall;
1317
        out lpDDSurfaceDesc: TDDSurfaceDesc) : HResult; stdcall;
1298
    function IsLost: HResult; stdcall;
1318
    function IsLost: HResult; stdcall;
1299
    function Lock(lpDestRect: PRect; const lpDDSurfaceDesc: TDDSurfaceDesc;
1319
    function Lock (lpDestRect: PRect;
-
 
1320
        out lpDDSurfaceDesc: TDDSurfaceDesc; dwFlags: DWORD;
1300
        dwFlags: DWORD; hEvent: THandle): HResult; stdcall;
1321
        hEvent: THandle) : HResult; stdcall;
1301
    function ReleaseDC(hDC: HDC): HResult; stdcall;
1322
    function ReleaseDC (hDC: Windows.HDC) : HResult; stdcall;
1302
    function Restore: HResult; stdcall;
1323
    function _Restore: HResult; stdcall;
1303
    function SetClipper(lpDDClipper: IDirectDrawClipper): HResult; stdcall;
1324
    function SetClipper (lpDDClipper: IDirectDrawClipper) : HResult; stdcall;
1304
    function SetColorKey(dwFlags: DWORD; const lpDDColorKey: TDDColorKey): HResult; stdcall;
1325
    function SetColorKey (dwFlags: DWORD; lpDDColorKey: PDDColorKey) :
-
 
1326
        HResult; stdcall;
1305
    function SetOverlayPosition(lX, lY: Longint): HResult; stdcall;
1327
    function SetOverlayPosition (lX, lY: LongInt) : HResult; stdcall;
1306
    function SetPalette(lpDDPalette: IDirectDrawPalette): HResult; stdcall;
1328
    function SetPalette (lpDDPalette: IDirectDrawPalette) : HResult; stdcall;
1307
    function Unlock(lpSurfaceData: Pointer): HResult; stdcall;
1329
    function Unlock (lpSurfaceData: Pointer) : HResult; stdcall;
1308
    function UpdateOverlay(const lpSrcRect: TRect;
1330
    function UpdateOverlay (lpSrcRect: PRect;
1309
        lpDDDestSurface: IDirectDrawSurface3; const lpDestRect: TRect;
1331
        lpDDDestSurface: IDirectDrawSurface3; lpDestRect: PRect;
1310
        dwFlags: DWORD; const lpDDOverlayFx: TDDOverlayFX): HResult; stdcall;
1332
        dwFlags: DWORD; lpDDOverlayFx: PDDOverlayFX) : HResult; stdcall;
1311
    function UpdateOverlayDisplay(dwFlags: DWORD): HResult; stdcall;
1333
    function UpdateOverlayDisplay (dwFlags: DWORD) : HResult; stdcall;
1312
    function UpdateOverlayZOrder(dwFlags: DWORD;
1334
    function UpdateOverlayZOrder (dwFlags: DWORD;
1313
        lpDDSReference: IDirectDrawSurface3): HResult; stdcall;
1335
        lpDDSReference: IDirectDrawSurface3) : HResult; stdcall;
1314
    // IDirectDrawSurface2 methods
1336
    (*** Added in the v2 interface ***)
1315
    function GetDDInterface(out lplpDD: IUnknown): HResult; stdcall;
1337
    function GetDDInterface (out lplpDD: IDirectDraw) : HResult; stdcall;
1316
    function PageLock(dwFlags: DWORD): HResult; stdcall;
1338
    function PageLock (dwFlags: DWORD) : HResult; stdcall;
1317
    function PageUnlock(dwFlags: DWORD): HResult; stdcall;
1339
    function PageUnlock (dwFlags: DWORD) : HResult; stdcall;
1318
    // IDirectDrawSurface3 methods
1340
    (*** Added in the V3 interface ***)
1319
    function SetSurfaceDesc(const lpddsd: TDDSurfaceDesc; dwFlags: DWORD): HResult; stdcall;
1341
    function SetSurfaceDesc(const lpddsd: TDDSurfaceDesc; dwFlags: DWORD) : HResult; stdcall;
1320
  end;
1342
  end;
1321
 
1343
 
-
 
1344
(*
1322
{ IDirectDrawSurface4 Interface }
1345
 * IDirectDrawSurface4 and related interfaces
1323
 
1346
 *)
1324
  IDirectDrawSurface4 = interface(IUnknown)
1347
  IDirectDrawSurface4 = interface (IUnknown)
1325
    ['{0B2B8630-AD35-11D0-8EA6-00609797EA5B}']
1348
    ['{0B2B8630-AD35-11D0-8EA6-00609797EA5B}']
1326
    // IDirectDrawSurface methods
1349
    (*** IDirectDrawSurface methods ***)
1327
    function AddAttachedSurface(lpDDSAttachedSurface: IDirectDrawSurface4): HResult; stdcall;
1350
    function AddAttachedSurface (lpDDSAttachedSurface: IDirectDrawSurface4) :
-
 
1351
        HResult; stdcall;
1328
    function AddOverlayDirtyRect(const lpRect: TRect): HResult; stdcall;
1352
    function AddOverlayDirtyRect (const lpRect: TRect) : HResult; stdcall;
-
 
1353
    function Blt (lpDestRect: PRect;
1329
    function Blt(const lpDestRect: TRect; lpDDSrcSurface: IDirectDrawSurface4;
1354
        lpDDSrcSurface: IDirectDrawSurface4; lpSrcRect: PRect;
1330
        const lpSrcRect: TRect; dwFlags: DWORD; const lpDDBltFx: TDDBltFX): HResult; stdcall;
1355
        dwFlags: DWORD; lpDDBltFx: PDDBltFX) : HResult; stdcall;
1331
    function BltBatch(const lpDDBltBatch: TDDBltBatch; dwCount: DWORD;
1356
    function BltBatch (const lpDDBltBatch: TDDBltBatch; dwCount: DWORD;
1332
        dwFlags: DWORD): HResult; stdcall;
1357
        dwFlags: DWORD) : HResult; stdcall;
1333
    function BltFast(dwX, dwY: DWORD; lpDDSrcSurface: IDirectDrawSurface4;
1358
    function BltFast (dwX: DWORD; dwY: DWORD;
-
 
1359
        lpDDSrcSurface: IDirectDrawSurface4; lpSrcRect: PRect;
1334
        const lpSrcRect: TRect; dwTrans: DWORD): HResult; stdcall;
1360
        dwTrans: DWORD) : HResult; stdcall;
1335
    function DeleteAttachedSurface(dwFlags: DWORD;
1361
    function DeleteAttachedSurface (dwFlags: DWORD;
1336
        lpDDSAttachedSurface: IDirectDrawSurface4): HResult; stdcall;
1362
        lpDDSAttachedSurface: IDirectDrawSurface4) : HResult; stdcall;
1337
    function EnumAttachedSurfaces(lpContext: Pointer;
1363
    function EnumAttachedSurfaces (lpContext: Pointer;
1338
        lpEnumSurfacesCallback: TDDEnumSurfacesCallback2): HResult; stdcall;
1364
        lpEnumSurfacesCallback: TDDEnumSurfacesCallback2) : HResult; stdcall;
1339
    function EnumOverlayZOrders(dwFlags: DWORD; lpContext: Pointer;
1365
    function EnumOverlayZOrders (dwFlags: DWORD; lpContext: Pointer;
1340
        lpfnCallback: TDDEnumSurfacesCallback2): HResult; stdcall;
1366
        lpfnCallback: TDDEnumSurfacesCallback2) : HResult; stdcall;
1341
    function Flip(lpDDSurfaceTargetOverride: IDirectDrawSurface4;
1367
    function Flip (lpDDSurfaceTargetOverride: IDirectDrawSurface4;
1342
        dwFlags: DWORD): HResult; stdcall;
1368
        dwFlags: DWORD) : HResult; stdcall;
1343
    function GetAttachedSurface(var lpDDSCaps: TDDSCaps2;
1369
    function GetAttachedSurface (const lpDDSCaps: TDDSCaps2;
1344
        out lplpDDAttachedSurface: IDirectDrawSurface4): HResult; stdcall;
1370
        out lplpDDAttachedSurface: IDirectDrawSurface4) : HResult; stdcall;
1345
    function GetBltStatus(dwFlags: DWORD): HResult; stdcall;
1371
    function GetBltStatus (dwFlags: DWORD) : HResult; stdcall;
1346
    function GetCaps(var lpDDSCaps: TDDSCaps2): HResult; stdcall;
1372
    function GetCaps (out lpDDSCaps: TDDSCaps2) : HResult; stdcall;
1347
    function GetClipper(out lplpDDClipper: IDirectDrawClipper): HResult; stdcall;
1373
    function GetClipper (out lplpDDClipper: IDirectDrawClipper) : HResult; stdcall;
1348
    function GetColorKey(dwFlags: DWORD; var lpDDColorKey: TDDColorKey): HResult; stdcall;
1374
    function GetColorKey (dwFlags: DWORD; out lpDDColorKey: TDDColorKey) :
-
 
1375
        HResult; stdcall;
1349
    function GetDC(var lphDC: HDC): HResult; stdcall;
1376
    function GetDC (out lphDC: HDC) : HResult; stdcall;
1350
    function GetFlipStatus(dwFlags: DWORD): HResult; stdcall;
1377
    function GetFlipStatus (dwFlags: DWORD) : HResult; stdcall;
1351
    function GetOverlayPosition(var lplX, lplY: Longint): HResult; stdcall;
1378
    function GetOverlayPosition (out lplX, lplY: LongInt) : HResult; stdcall;
1352
    function GetPalette(out lplpDDPalette: IDirectDrawPalette): HResult; stdcall;
1379
    function GetPalette (out lplpDDPalette: IDirectDrawPalette) : HResult; stdcall;
1353
    function GetPixelFormat(var lpDDPixelFormat: TDDPixelFormat): HResult; stdcall;
1380
    function GetPixelFormat (out lpDDPixelFormat: TDDPixelFormat) : HResult; stdcall;
1354
    function GetSurfaceDesc(var lpDDSurfaceDesc: TDDSurfaceDesc2): HResult; stdcall;
1381
    function GetSurfaceDesc (out lpDDSurfaceDesc: TDDSurfaceDesc2) : HResult; stdcall;
-
 
1382
    function Initialize (lpDD: IDirectDraw;
1355
    function Initialize(lpDD: IDirectDraw; const lpDDSurfaceDesc: TDDSurfaceDesc2): HResult; stdcall;
1383
        out lpDDSurfaceDesc: TDDSurfaceDesc2) : HResult; stdcall;
1356
    function IsLost: HResult; stdcall;
1384
    function IsLost: HResult; stdcall;
-
 
1385
    function Lock (lpDestRect: PRect;
1357
    function Lock(lpDestRect: PRect; const lpDDSurfaceDesc: TDDSurfaceDesc2;
1386
        out lpDDSurfaceDesc: TDDSurfaceDesc2; dwFlags: DWORD;
1358
        dwFlags: DWORD; hEvent: THandle): HResult; stdcall;
1387
        hEvent: THandle) : HResult; stdcall;
1359
    function ReleaseDC(hDC: HDC): HResult; stdcall;
1388
    function ReleaseDC (hDC: Windows.HDC) : HResult; stdcall;
1360
    function Restore: HResult; stdcall;
1389
    function _Restore: HResult; stdcall;
1361
    function SetClipper(lpDDClipper: IDirectDrawClipper): HResult; stdcall;
1390
    function SetClipper (lpDDClipper: IDirectDrawClipper) : HResult; stdcall;
1362
    function SetColorKey(dwFlags: DWORD; const lpDDColorKey: TDDColorKey): HResult; stdcall;
1391
    function SetColorKey (dwFlags: DWORD; lpDDColorKey: PDDColorKey) :
-
 
1392
        HResult; stdcall;
1363
    function SetOverlayPosition(lX, lY: Longint): HResult; stdcall;
1393
    function SetOverlayPosition (lX, lY: LongInt) : HResult; stdcall;
1364
    function SetPalette(lpDDPalette: IDirectDrawPalette): HResult; stdcall;
1394
    function SetPalette (lpDDPalette: IDirectDrawPalette) : HResult; stdcall;
1365
    function Unlock(lpSurfaceData: Pointer): HResult; stdcall;
1395
    function Unlock (lpRect: PRect) : HResult; stdcall;
1366
    function UpdateOverlay(const lpSrcRect: TRect; lpDDDestSurface: IDirectDrawSurface4;
1396
    function UpdateOverlay (lpSrcRect: PRect;
-
 
1397
        lpDDDestSurface: IDirectDrawSurface4; lpDestRect: PRect;
1367
        const lpDestRect: TRect; dwFlags: DWORD; const lpDDOverlayFx: TDDOverlayFX): HResult; stdcall;
1398
        dwFlags: DWORD; lpDDOverlayFx: PDDOverlayFX) : HResult; stdcall;
1368
    function UpdateOverlayDisplay(dwFlags: DWORD): HResult; stdcall;
1399
    function UpdateOverlayDisplay (dwFlags: DWORD) : HResult; stdcall;
-
 
1400
    function UpdateOverlayZOrder (dwFlags: DWORD;
1369
    function UpdateOverlayZOrder(dwFlags: DWORD; lpDDSReference: IDirectDrawSurface4): HResult; stdcall;
1401
        lpDDSReference: IDirectDrawSurface4) : HResult; stdcall;
1370
    // IDirectDrawSurface2 methods
1402
    (*** Added in the v2 interface ***)
1371
    function GetDDInterface(out lplpDD: IUnknown): HResult; stdcall;
1403
    function GetDDInterface (out lplpDD: IUnknown) : HResult; stdcall;
1372
    function PageLock(dwFlags: DWORD): HResult; stdcall;
1404
    function PageLock (dwFlags: DWORD) : HResult; stdcall;
1373
    function PageUnlock(dwFlags: DWORD): HResult; stdcall;
1405
    function PageUnlock (dwFlags: DWORD) : HResult; stdcall;
1374
    // IDirectDrawSurface3 methods
1406
    (*** Added in the V3 interface ***)
1375
    function SetSurfaceDesc(const lpddsd: TDDSurfaceDesc2; dwFlags: DWORD): HResult; stdcall;
1407
    function SetSurfaceDesc(const lpddsd2: TDDSurfaceDesc2; dwFlags: DWORD) : HResult; stdcall;
1376
    // IDirectDrawSurface4 methods
1408
    (*** Added in the v4 interface ***)
1377
    function SetPrivateData(const guidTag: TGUID; lpData: Pointer;
1409
    function SetPrivateData(const guidTag: TGUID; lpData: pointer;
1378
      cbSize: DWORD; dwFlags: DWORD): HResult; stdcall;
1410
        cbSize: DWORD; dwFlags: DWORD) : HResult; stdcall;
1379
    function GetPrivateData(const guidTag: TGUID; lpData: Pointer;
1411
    function GetPrivateData(const guidTag: TGUID; lpBuffer: pointer;
1380
      var cbSize: DWORD): HResult; stdcall;
1412
        var lpcbBufferSize: DWORD) : HResult; stdcall;
1381
    function FreePrivateData(const guidTag: TGUID): HResult; stdcall;
1413
    function FreePrivateData(const guidTag: TGUID) : HResult; stdcall;
1382
    function GetUniquenessValue(var lpValue: DWORD): HResult; stdcall;
1414
    function GetUniquenessValue(out lpValue: DWORD) : HResult; stdcall;
1383
    function ChangeUniquenessValue: HResult; stdcall;
1415
    function ChangeUniquenessValue : HResult; stdcall;
1384
  end;
1416
  end;
1385
 
1417
 
1386
{ IDirectDrawSurface7 Interface }
-
 
1387
 
-
 
1388
  IDirectDrawSurface7 = interface(IUnknown)
1418
  IDirectDrawSurface7 = interface (IUnknown)
1389
    ['{06675A80-3B9B-11D2-B92F-00609797EA5B}']
1419
    ['{06675a80-3b9b-11d2-b92f-00609797ea5b}']
1390
    // IDirectDrawSurface methods
1420
    (*** IDirectDrawSurface methods ***)
1391
    function AddAttachedSurface(lpDDSAttachedSurface: IDirectDrawSurface7): HResult; stdcall;
1421
    function AddAttachedSurface (lpDDSAttachedSurface: IDirectDrawSurface7) :
-
 
1422
        HResult; stdcall;
1392
    function AddOverlayDirtyRect(const lpRect: TRect): HResult; stdcall;
1423
    function AddOverlayDirtyRect (const lpRect: TRect) : HResult; stdcall;
-
 
1424
    function Blt (lpDestRect: PRect;
1393
    function Blt(const lpDestRect: TRect; lpDDSrcSurface: IDirectDrawSurface7;
1425
        lpDDSrcSurface: IDirectDrawSurface7; lpSrcRect: PRect;
1394
        const lpSrcRect: TRect; dwFlags: DWORD; const lpDDBltFx: TDDBltFX): HResult; stdcall;
1426
        dwFlags: DWORD; lpDDBltFx: PDDBltFX) : HResult; stdcall;
1395
    function BltBatch(const lpDDBltBatch: TDDBltBatch; dwCount: DWORD;
1427
    function BltBatch (const lpDDBltBatch: TDDBltBatch; dwCount: DWORD;
1396
        dwFlags: DWORD): HResult; stdcall;
1428
        dwFlags: DWORD) : HResult; stdcall;
1397
    function BltFast(dwX, dwY: DWORD; lpDDSrcSurface: IDirectDrawSurface7;
1429
    function BltFast (dwX: DWORD; dwY: DWORD;
-
 
1430
        lpDDSrcSurface: IDirectDrawSurface7; lpSrcRect: PRect;
1398
        const lpSrcRect: TRect; dwTrans: DWORD): HResult; stdcall;
1431
        dwTrans: DWORD) : HResult; stdcall;
1399
    function DeleteAttachedSurface(dwFlags: DWORD;
1432
    function DeleteAttachedSurface (dwFlags: DWORD;
1400
        lpDDSAttachedSurface: IDirectDrawSurface7): HResult; stdcall;
1433
        lpDDSAttachedSurface: IDirectDrawSurface7) : HResult; stdcall;
1401
    function EnumAttachedSurfaces(lpContext: Pointer;
1434
    function EnumAttachedSurfaces (lpContext: Pointer;
1402
        lpEnumSurfacesCallback: TDDEnumSurfacesCallback7): HResult; stdcall;
1435
        lpEnumSurfacesCallback: TDDEnumSurfacesCallback7) : HResult; stdcall;
1403
    function EnumOverlayZOrders(dwFlags: DWORD; lpContext: Pointer;
1436
    function EnumOverlayZOrders (dwFlags: DWORD; lpContext: Pointer;
1404
        lpfnCallback: TDDEnumSurfacesCallback7): HResult; stdcall;
1437
        lpfnCallback: TDDEnumSurfacesCallback7) : HResult; stdcall;
1405
    function Flip(lpDDSurfaceTargetOverride: IDirectDrawSurface7;
1438
    function Flip (lpDDSurfaceTargetOverride: IDirectDrawSurface7;
1406
        dwFlags: DWORD): HResult; stdcall;
1439
        dwFlags: DWORD) : HResult; stdcall;
1407
    function GetAttachedSurface(var lpDDSCaps: TDDSCaps2;
1440
    function GetAttachedSurface (const lpDDSCaps: TDDSCaps2;
1408
        out lplpDDAttachedSurface: IDirectDrawSurface7): HResult; stdcall;
1441
        out lplpDDAttachedSurface: IDirectDrawSurface7) : HResult; stdcall;
1409
    function GetBltStatus(dwFlags: DWORD): HResult; stdcall;
1442
    function GetBltStatus (dwFlags: DWORD) : HResult; stdcall;
1410
    function GetCaps(var lpDDSCaps: TDDSCaps2): HResult; stdcall;
1443
    function GetCaps (out lpDDSCaps: TDDSCaps2) : HResult; stdcall;
1411
    function GetClipper(out lplpDDClipper: IDirectDrawClipper): HResult; stdcall;
1444
    function GetClipper (out lplpDDClipper: IDirectDrawClipper) : HResult; stdcall;
1412
    function GetColorKey(dwFlags: DWORD; var lpDDColorKey: TDDColorKey): HResult; stdcall;
1445
    function GetColorKey (dwFlags: DWORD; out lpDDColorKey: TDDColorKey) :
-
 
1446
        HResult; stdcall;
1413
    function GetDC(var lphDC: HDC): HResult; stdcall;
1447
    function GetDC (out lphDC: HDC) : HResult; stdcall;
1414
    function GetFlipStatus(dwFlags: DWORD): HResult; stdcall;
1448
    function GetFlipStatus (dwFlags: DWORD) : HResult; stdcall;
1415
    function GetOverlayPosition(var lplX, lplY: Longint): HResult; stdcall;
1449
    function GetOverlayPosition (out lplX, lplY: LongInt) : HResult; stdcall;
1416
    function GetPalette(out lplpDDPalette: IDirectDrawPalette): HResult; stdcall;
1450
    function GetPalette (out lplpDDPalette: IDirectDrawPalette) : HResult; stdcall;
1417
    function GetPixelFormat(var lpDDPixelFormat: TDDPixelFormat): HResult; stdcall;
1451
    function GetPixelFormat (out lpDDPixelFormat: TDDPixelFormat) : HResult; stdcall;
1418
    function GetSurfaceDesc(var lpDDSurfaceDesc: TDDSurfaceDesc2): HResult; stdcall;
1452
    function GetSurfaceDesc (out lpDDSurfaceDesc: TDDSurfaceDesc2) : HResult; stdcall;
-
 
1453
    function Initialize (lpDD: IDirectDraw;
1419
    function Initialize(lpDD: IDirectDraw; const lpDDSurfaceDesc: TDDSurfaceDesc2): HResult; stdcall;
1454
        out lpDDSurfaceDesc: TDDSurfaceDesc2) : HResult; stdcall;
1420
    function IsLost: HResult; stdcall;
1455
    function IsLost: HResult; stdcall;
-
 
1456
    function Lock (lpDestRect: PRect;
1421
    function Lock(lpDestRect: PRect; const lpDDSurfaceDesc: TDDSurfaceDesc2;
1457
        out lpDDSurfaceDesc: TDDSurfaceDesc2; dwFlags: DWORD;
1422
        dwFlags: DWORD; hEvent: THandle): HResult; stdcall;
1458
        hEvent: THandle) : HResult; stdcall;
1423
    function ReleaseDC(hDC: HDC): HResult; stdcall;
1459
    function ReleaseDC (hDC: Windows.HDC) : HResult; stdcall;
1424
    function Restore: HResult; stdcall;
1460
    function _Restore: HResult; stdcall;
1425
    function SetClipper(lpDDClipper: IDirectDrawClipper): HResult; stdcall;
1461
    function SetClipper (lpDDClipper: IDirectDrawClipper) : HResult; stdcall;
1426
    function SetColorKey(dwFlags: DWORD; const lpDDColorKey: TDDColorKey): HResult; stdcall;
1462
    function SetColorKey (dwFlags: DWORD; lpDDColorKey: PDDColorKey) :
-
 
1463
        HResult; stdcall;
1427
    function SetOverlayPosition(lX, lY: Longint): HResult; stdcall;
1464
    function SetOverlayPosition (lX, lY: LongInt) : HResult; stdcall;
1428
    function SetPalette(lpDDPalette: IDirectDrawPalette): HResult; stdcall;
1465
    function SetPalette (lpDDPalette: IDirectDrawPalette) : HResult; stdcall;
1429
    function Unlock(lpSurfaceData: Pointer): HResult; stdcall;
1466
    function Unlock (lpRect: PRect) : HResult; stdcall;
1430
    function UpdateOverlay(const lpSrcRect: TRect; lpDDDestSurface: IDirectDrawSurface7;
1467
    function UpdateOverlay (lpSrcRect: PRect;
-
 
1468
        lpDDDestSurface: IDirectDrawSurface7; lpDestRect: PRect;
1431
        const lpDestRect: TRect; dwFlags: DWORD; const lpDDOverlayFx: TDDOverlayFX): HResult; stdcall;
1469
        dwFlags: DWORD; lpDDOverlayFx: PDDOverlayFX) : HResult; stdcall;
1432
    function UpdateOverlayDisplay(dwFlags: DWORD): HResult; stdcall;
1470
    function UpdateOverlayDisplay (dwFlags: DWORD) : HResult; stdcall;
-
 
1471
    function UpdateOverlayZOrder (dwFlags: DWORD;
1433
    function UpdateOverlayZOrder(dwFlags: DWORD; lpDDSReference: IDirectDrawSurface7): HResult; stdcall;
1472
        lpDDSReference: IDirectDrawSurface7) : HResult; stdcall;
1434
    // IDirectDrawSurface2 methods
1473
    (*** Added in the v2 interface ***)
1435
    function GetDDInterface(out lplpDD: IUnknown): HResult; stdcall;
1474
    function GetDDInterface (out lplpDD: IUnknown) : HResult; stdcall;
1436
    function PageLock(dwFlags: DWORD): HResult; stdcall;
1475
    function PageLock (dwFlags: DWORD) : HResult; stdcall;
1437
    function PageUnlock(dwFlags: DWORD): HResult; stdcall;
1476
    function PageUnlock (dwFlags: DWORD) : HResult; stdcall;
1438
    // IDirectDrawSurface3 methods
1477
    (*** Added in the V3 interface ***)
1439
    function SetSurfaceDesc(const lpddsd: TDDSurfaceDesc2; dwFlags: DWORD): HResult; stdcall;
1478
    function SetSurfaceDesc(const lpddsd2: TDDSurfaceDesc2; dwFlags: DWORD) : HResult; stdcall;
1440
    // IDirectDrawSurface4 methods
1479
    (*** Added in the v4 interface ***)
1441
    function SetPrivateData(const guidTag: TGUID; lpData: Pointer;
1480
    function SetPrivateData(const guidTag: TGUID; lpData: pointer;
1442
      cbSize: DWORD; dwFlags: DWORD): HResult; stdcall;
1481
        cbSize: DWORD; dwFlags: DWORD) : HResult; stdcall;
1443
    function GetPrivateData(const guidTag: TGUID; lpData: Pointer;
1482
    function GetPrivateData(const guidTag: TGUID; lpBuffer: pointer;
1444
      var cbSize: DWORD): HResult; stdcall;
1483
        var lpcbBufferSize: DWORD) : HResult; stdcall;
1445
    function FreePrivateData(const guidTag: TGUID): HResult; stdcall;
1484
    function FreePrivateData(const guidTag: TGUID) : HResult; stdcall;
1446
    function GetUniquenessValue(var lpValue: DWORD): HResult; stdcall;
1485
    function GetUniquenessValue(out lpValue: DWORD) : HResult; stdcall;
1447
    function ChangeUniquenessValue: HResult; stdcall;
1486
    function ChangeUniquenessValue : HResult; stdcall;
1448
    // Moved Texture7 methods here
1487
    (*** Moved Texture7 methods here ***)
1449
    function SetPriority(dwPriority: DWORD): HResult; stdcall;
1488
    function SetPriority(dwPriority: DWORD) : HResult; stdcall;
1450
    function GetPriority(var lpdwPriority: DWORD): HResult; stdcall;
1489
    function GetPriority(out lpdwPriority: DWORD) : HResult; stdcall;
1451
    function SetLOD(dwMaxLOD: DWORD): HResult; stdcall;
1490
    function SetLOD(dwMaxLOD: DWORD) : HResult; stdcall;
1452
    function GetLOD(var lpdwMaxLOD: DWORD): HResult; stdcall;
1491
    function GetLOD(out lpdwMaxLOD: DWORD) : HResult; stdcall;
1453
  end;
1492
  end;
1454
 
1493
 
1455
{ IDirectDrawColorControl Interface }
-
 
1456
 
-
 
1457
  IDirectDrawColorControl = interface(IUnknown)
1494
  IDirectDrawColorControl = interface (IUnknown)
1458
    ['{4B9F0EE0-0D7E-11D0-9B06-00A0C903A3B8}']
1495
    ['{4B9F0EE0-0D7E-11D0-9B06-00A0C903A3B8}']
1459
    // IDirectDrawColorControl methods
-
 
1460
    function GetColorControl