directdr.pp 76 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755
  1. {
  2. Free Pascal port of the OpenPTC C++ library.
  3. Copyright (C) 2001-2003 Nikolay Nikolov ([email protected])
  4. Original C++ version by Glenn Fiedler ([email protected])
  5. This library is free software; you can redistribute it and/or
  6. modify it under the terms of the GNU Lesser General Public
  7. License as published by the Free Software Foundation; either
  8. version 2.1 of the License, or (at your option) any later version.
  9. This library is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. Lesser General Public License for more details.
  13. You should have received a copy of the GNU Lesser General Public
  14. License along with this library; if not, write to the Free Software
  15. Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  16. }
  17. {$MACRO ON}
  18. {$DEFINE DXCall:=StdCall}
  19. {$PACKRECORDS 1}
  20. Unit DirectDraw;
  21. Interface
  22. Uses
  23. Windows;
  24. Type
  25. LPGUID = ^GUID;
  26. GUID = Packed Record
  27. Data1 : DWord;
  28. Data2 : Word;
  29. Data3 : Word;
  30. Data4 : Array[0..7] Of Byte;
  31. End;
  32. {;
  33. ; FOURCC codes for DX compressed-texture pixel formats
  34. ;
  35. FOURCC_DXT1 = '1TXD'
  36. FOURCC_DXT2 = '2TXD'
  37. FOURCC_DXT3 = '3TXD'
  38. FOURCC_DXT4 = '4TXD'
  39. FOURCC_DXT5 = '5TXD'
  40. ;
  41. ; GUIDS used by DirectDraw objects
  42. ;
  43. macro Define_CLSID_DirectDraw
  44. public CLSID_DirectDraw
  45. CLSID_DirectDraw GUID <0D7B70EE0h,04340h,011CFh,\
  46. 0B0h,063h,000h,020h,0AFh,0C2h,0CDh,035h>
  47. endm
  48. macro Define_CLSID_DirectDrawClipper
  49. public CLSID_DirectDrawClipper
  50. CLSID_DirectDrawClipper GUID <0593817A0h,07DB3h,011CFh,\
  51. 0A2h,0DEh,000h,0AAh,000h,0b9h,033h,056h>
  52. endm
  53. macro Define_IID_IDirectDraw
  54. public IID_IDirectDraw
  55. IID_IDirectDraw GUID <06C14DB80h,0A733h,011CEh,\
  56. 0A5h,021h,000h,020h,0AFh,00Bh,0E5h,060h>
  57. endm
  58. macro Define_IID_IDirectDraw2
  59. public IID_IDirectDraw2
  60. IID_IDirectDraw2 GUID <0B3A6F3E0h,02B43h,011CFh,\
  61. 0A2h,0DEh,000h,0AAh,000h,0B9h,033h,056h>
  62. endm
  63. macro Define_IID_IDirectDraw4
  64. public IID_IDirectDraw4
  65. IID_IDirectDraw4 GUID <09c59509ah,039bdh,011d1h,\
  66. 08ch,04ah,000h,0c0h,04fh,0d9h,030h,0c5h>
  67. endm
  68. macro Define_IID_IDirectDrawSurface
  69. public IID_IDirectDrawSurface
  70. IID_IDirectDrawSurface GUID <06C14DB81h,0A733h,011CEh,\
  71. 0A5h,021h,000h,020h,0AFh,00Bh,0E5h,060h>
  72. endm
  73. macro Define_IID_IDirectDrawSurface2
  74. public IID_IDirectDrawSurface2
  75. IID_IDirectDrawSurface2 GUID <057805885h,06eech,011cfh,\
  76. 094h,041h,0a8h,023h,003h,0c1h,00eh,027h>
  77. endm
  78. macro Define_IID_IDirectDrawSurface3
  79. public IID_IDirectDrawSurface3
  80. IID_IDirectDrawSurface3 GUID <0DA044E00h,069B2h,011D0h,\
  81. 0A1h,0D5h,000h,0AAh,000h,0B8h,0DFh,0BBh>
  82. endm
  83. macro Define_IID_IDirectDrawSurface4
  84. public IID_IDirectDrawSurface4
  85. IID_IDirectDrawSurface4 GUID <00B2B8630h,0AD35h,011D0h,\
  86. 08Eh,0A6h,000h,060h,097h,097h,0EAh,05Bh>
  87. endm
  88. macro Define_IID_IDirectDrawPalette
  89. public IID_IDirectDrawPalette
  90. IID_IDirectDrawPalette GUID <06C14DB84h,0A733h,011CEh,\
  91. 0A5h,021h,000h,020h,0AFh,00Bh,0E5h,060h>
  92. endm
  93. macro Define_IID_IDirectDrawClipper
  94. public IID_IDirectDrawClipper
  95. IID_IDirectDrawClipper GUID <06C14DB85h,0A733h,011CEh,\
  96. 0A5h,021h,000h,020h,0AFh,00Bh,0E5h,060h>
  97. endm
  98. macro Define_IID_IDirectDrawColorControl
  99. public IID_IDirectDrawColorControl
  100. IID_IDirectDrawColorControl GUID <04B9F0EE0h,00D7Eh,011D0h,\
  101. 09Bh,006h,000h,0A0h,0C9h,003h,0A3h,0B8h>
  102. endm
  103. macro Define_IID_IDirectDrawGammaControl
  104. public IID_IDirectDrawGammaControl
  105. IID_IDirectDrawGammaControl GUID <069C11C3Eh,0B46Bh,011D1h,\
  106. 0ADh,07Ah,000h,0C0h,04Fh,0C2h,09Bh,04Eh>
  107. endm}
  108. Const
  109. CO_E_NOTINITIALIZED = $800401F0;
  110. _FACDD = $0876;
  111. {
  112. Flags for DirectDrawEnumerateEx
  113. DirectDrawEnumerateEx supercedes DirectDrawEnumerate. You must use GetProcAddress to
  114. obtain a function pointer (of type LPDIRECTDRAWENUMERATEEX) to DirectDrawEnumerateEx.
  115. By default, only the primary display device is enumerated.
  116. DirectDrawEnumerate is equivalent to DirectDrawEnumerate(,,DDENUM_NONDISPLAYDEVICES)
  117. }
  118. DDENUM_ATTACHEDSECONDARYDEVICES = $00000001;
  119. DDENUM_DETACHEDSECONDARYDEVICES = $00000002;
  120. DDENUM_NONDISPLAYDEVICES = $00000004;
  121. {REGSTR_KEY_DDHW_DESCRIPTION equ <'Description', 0>
  122. REGSTR_KEY_DDHW_DRIVERNAME equ <'DriverName', 0>
  123. REGSTR_PATH_DDHW equ <'Hardware\DirectDrawDrivers', 0>}
  124. DDCREATE_HARDWAREONLY = $00000001;
  125. DDCREATE_EMULATIONONLY = $00000002;
  126. {proctype DDENUMMODESCALLBACK :dword, :dword
  127. proctype DDENUMMODESCALLBACK2 :dword, :dword
  128. proctype DDENUMSURFACESCALLBACK :dword, :dword, :dword
  129. proctype DDENUMSURFACESCALLBACK2 :dword, :dword, :dword}
  130. DD_ROP_SPACE = (256 Div 32); {space required to store ROP array}
  131. DDSD_CAPS = $00000001; {default}
  132. DDSD_HEIGHT = $00000002;
  133. DDSD_WIDTH = $00000004;
  134. DDSD_PITCH = $00000008;
  135. DDSD_BACKBUFFERCOUNT = $00000020;
  136. DDSD_ZBUFFERBITDEPTH = $00000040;
  137. DDSD_ALPHABITDEPTH = $00000080;
  138. DDSD_LPSURFACE = $00000800;
  139. DDSD_PIXELFORMAT = $00001000;
  140. DDSD_CKDESTOVERLAY = $00002000;
  141. DDSD_CKDESTBLT = $00004000;
  142. DDSD_CKSRCOVERLAY = $00008000;
  143. DDSD_CKSRCBLT = $00010000;
  144. DDSD_MIPMAPCOUNT = $00020000;
  145. DDSD_REFRESHRATE = $00040000;
  146. DDSD_LINEARSIZE = $00080000;
  147. DDSD_TEXTURESTAGE = $00100000;
  148. DDSD_ALL = $001ff9ee;
  149. DDOSD_GUID = $00000001;
  150. DDOSD_COMPRESSION_RATIO = $00000002;
  151. DDOSD_SCAPS = $00000004;
  152. DDOSD_OSCAPS = $00000008;
  153. DDOSD_ALL = $0000000f;
  154. DDOSDCAPS_OPTCOMPRESSED = $00000001;
  155. DDOSDCAPS_OPTREORDERED = $00000002;
  156. DDOSDCAPS_MONOLITHICMIPMAP = $00000004;
  157. DDOSDCAPS_VALIDSCAPS = $30004800;
  158. DDOSDCAPS_VALIDOSCAPS = $00000007;
  159. DDCOLOR_BRIGHTNESS = $00000001;
  160. DDCOLOR_CONTRAST = $00000002;
  161. DDCOLOR_HUE = $00000004;
  162. DDCOLOR_SATURATION = $00000008;
  163. DDCOLOR_SHARPNESS = $00000010;
  164. DDCOLOR_GAMMA = $00000020;
  165. DDCOLOR_COLORENABLE = $00000040;
  166. {============================================================================
  167. Direct Draw Capability Flags
  168. These flags are used to describe the capabilities of a given Surface.
  169. All flags are bit flags.
  170. ==========================================================================}
  171. {***************************************************************************
  172. *
  173. * DIRECTDRAWSURFACE CAPABILITY FLAGS
  174. *
  175. ***************************************************************************}
  176. DDSCAPS_RESERVED1 = $00000001;
  177. DDSCAPS_ALPHA = $00000002;
  178. DDSCAPS_BACKBUFFER = $00000004;
  179. DDSCAPS_COMPLEX = $00000008;
  180. DDSCAPS_FLIP = $00000010;
  181. DDSCAPS_FRONTBUFFER = $00000020;
  182. DDSCAPS_OFFSCREENPLAIN = $00000040;
  183. DDSCAPS_OVERLAY = $00000080;
  184. DDSCAPS_PALETTE = $00000100;
  185. DDSCAPS_PRIMARYSURFACE = $00000200;
  186. DDSCAPS_PRIMARYSURFACELEFT = $00000400;
  187. DDSCAPS_SYSTEMMEMORY = $00000800;
  188. DDSCAPS_TEXTURE = $00001000;
  189. DDSCAPS_3DDEVICE = $00002000;
  190. DDSCAPS_VIDEOMEMORY = $00004000;
  191. DDSCAPS_VISIBLE = $00008000;
  192. DDSCAPS_WRITEONLY = $00010000;
  193. DDSCAPS_ZBUFFER = $00020000;
  194. DDSCAPS_OWNDC = $00040000;
  195. DDSCAPS_LIVEVIDEO = $00080000;
  196. DDSCAPS_HWCODEC = $00100000;
  197. DDSCAPS_MODEX = $00200000;
  198. DDSCAPS_MIPMAP = $00400000;
  199. DDSCAPS_RESERVED2 = $00800000;
  200. DDSCAPS_ALLOCONLOAD = $04000000;
  201. DDSCAPS_VIDEOPORT = $08000000;
  202. DDSCAPS_LOCALVIDMEM = $10000000;
  203. DDSCAPS_NONLOCALVIDMEM = $20000000;
  204. DDSCAPS_STANDARDVGAMODE = $40000000;
  205. DDSCAPS_OPTIMIZED = $80000000;
  206. DDSCAPS2_HARDWAREDEINTERLACE = $00000002;
  207. DDSCAPS2_HINTDYNAMIC = $00000004;
  208. DDSCAPS2_HINTSTATIC = $00000008;
  209. DDSCAPS2_TEXTUREMANAGE = $00000010;
  210. DDSCAPS2_RESERVED1 = $00000020;
  211. DDSCAPS2_RESERVED2 = $00000040;
  212. DDSCAPS2_OPAQUE = $00000080;
  213. DDSCAPS2_HINTANTIALIASING = $00000100;
  214. {***************************************************************************
  215. *
  216. * DIRECTDRAW DRIVER CAPABILITY FLAGS
  217. *
  218. ***************************************************************************}
  219. DDCAPS_3D = $00000001;
  220. DDCAPS_ALIGNBOUNDARYDEST = $00000002;
  221. DDCAPS_ALIGNSIZEDEST = $00000004;
  222. DDCAPS_ALIGNBOUNDARYSRC = $00000008;
  223. DDCAPS_ALIGNSIZESRC = $00000010;
  224. DDCAPS_ALIGNSTRIDE = $00000020;
  225. DDCAPS_BLT = $00000040;
  226. DDCAPS_BLTQUEUE = $00000080;
  227. DDCAPS_BLTFOURCC = $00000100;
  228. DDCAPS_BLTSTRETCH = $00000200;
  229. DDCAPS_GDI = $00000400;
  230. DDCAPS_OVERLAY = $00000800;
  231. DDCAPS_OVERLAYCANTCLIP = $00001000;
  232. DDCAPS_OVERLAYFOURCC = $00002000;
  233. DDCAPS_OVERLAYSTRETCH = $00004000;
  234. DDCAPS_PALETTE = $00008000;
  235. DDCAPS_PALETTEVSYNC = $00010000;
  236. DDCAPS_READSCANLINE = $00020000;
  237. DDCAPS_STEREOVIEW = $00040000;
  238. DDCAPS_VBI = $00080000;
  239. DDCAPS_ZBLTS = $00100000;
  240. DDCAPS_ZOVERLAYS = $00200000;
  241. DDCAPS_COLORKEY = $00400000;
  242. DDCAPS_ALPHA = $00800000;
  243. DDCAPS_COLORKEYHWASSIST = $01000000;
  244. DDCAPS_NOHARDWARE = $02000000;
  245. DDCAPS_BLTCOLORFILL = $04000000;
  246. DDCAPS_BANKSWITCHED = $08000000;
  247. DDCAPS_BLTDEPTHFILL = $10000000;
  248. DDCAPS_CANCLIP = $20000000;
  249. DDCAPS_CANCLIPSTRETCHED = $40000000;
  250. DDCAPS_CANBLTSYSMEM = $80000000;
  251. {***************************************************************************
  252. *
  253. * MORE DIRECTDRAW DRIVER CAPABILITY FLAGS (dwCaps2)
  254. *
  255. ***************************************************************************}
  256. DDCAPS2_CERTIFIED = $00000001;
  257. DDCAPS2_NO2DDURING3DSCENE = $00000002;
  258. DDCAPS2_VIDEOPORT = $00000004;
  259. DDCAPS2_AUTOFLIPOVERLAY = $00000008;
  260. DDCAPS2_CANBOBINTERLEAVED = $00000010;
  261. DDCAPS2_CANBOBNONINTERLEAVED = $00000020;
  262. DDCAPS2_COLORCONTROLOVERLAY = $00000040;
  263. DDCAPS2_COLORCONTROLPRIMARY = $00000080;
  264. DDCAPS2_CANDROPZ16BIT = $00000100;
  265. DDCAPS2_NONLOCALVIDMEM = $00000200;
  266. DDCAPS2_NONLOCALVIDMEMCAPS = $00000400;
  267. DDCAPS2_NOPAGELOCKREQUIRED = $00000800;
  268. DDCAPS2_WIDESURFACES = $00001000;
  269. DDCAPS2_CANFLIPODDEVEN = $00002000;
  270. DDCAPS2_CANBOBHARDWARE = $00004000;
  271. DDCAPS2_COPYFOURCC = $00008000;
  272. DDCAPS2_PRIMARYGAMMA = $00020000;
  273. DDCAPS2_CANRENDERWINDOWED = $00080000;
  274. DDCAPS2_CANCALIBRATEGAMMA = $00100000;
  275. DDCAPS2_FLIPINTERVAL = $00200000;
  276. DDCAPS2_FLIPNOVSYNC = $00400000;
  277. {***************************************************************************
  278. *
  279. * DIRECTDRAW FX ALPHA CAPABILITY FLAGS
  280. *
  281. ***************************************************************************}
  282. DDFXALPHACAPS_BLTALPHAEDGEBLEND = $00000001;
  283. DDFXALPHACAPS_BLTALPHAPIXELS = $00000002;
  284. DDFXALPHACAPS_BLTALPHAPIXELSNEG = $00000004;
  285. DDFXALPHACAPS_BLTALPHASURFACES = $00000008;
  286. DDFXALPHACAPS_BLTALPHASURFACESNEG = $00000010;
  287. DDFXALPHACAPS_OVERLAYALPHAEDGEBLEND = $00000020;
  288. DDFXALPHACAPS_OVERLAYALPHAPIXELS = $00000040;
  289. DDFXALPHACAPS_OVERLAYALPHAPIXELSNEG = $00000080;
  290. DDFXALPHACAPS_OVERLAYALPHASURFACES = $00000100;
  291. DDFXALPHACAPS_OVERLAYALPHASURFACESNEG = $00000200;
  292. {***************************************************************************
  293. *
  294. * DIRECTDRAW FX CAPABILITY FLAGS
  295. *
  296. ***************************************************************************}
  297. DDFXCAPS_BLTARITHSTRETCHY = $00000020;
  298. DDFXCAPS_BLTARITHSTRETCHYN = $00000010;
  299. DDFXCAPS_BLTMIRRORLEFTRIGHT = $00000040;
  300. DDFXCAPS_BLTMIRRORUPDOWN = $00000080;
  301. DDFXCAPS_BLTROTATION = $00000100;
  302. DDFXCAPS_BLTROTATION90 = $00000200;
  303. DDFXCAPS_BLTSHRINKX = $00000400;
  304. DDFXCAPS_BLTSHRINKXN = $00000800;
  305. DDFXCAPS_BLTSHRINKY = $00001000;
  306. DDFXCAPS_BLTSHRINKYN = $00002000;
  307. DDFXCAPS_BLTSTRETCHX = $00004000;
  308. DDFXCAPS_BLTSTRETCHXN = $00008000;
  309. DDFXCAPS_BLTSTRETCHY = $00010000;
  310. DDFXCAPS_BLTSTRETCHYN = $00020000;
  311. DDFXCAPS_OVERLAYARITHSTRETCHY = $00040000;
  312. DDFXCAPS_OVERLAYARITHSTRETCHYN = $00000008;
  313. DDFXCAPS_OVERLAYSHRINKX = $00080000;
  314. DDFXCAPS_OVERLAYSHRINKXN = $00100000;
  315. DDFXCAPS_OVERLAYSHRINKY = $00200000;
  316. DDFXCAPS_OVERLAYSHRINKYN = $00400000;
  317. DDFXCAPS_OVERLAYSTRETCHX = $00800000;
  318. DDFXCAPS_OVERLAYSTRETCHXN = $01000000;
  319. DDFXCAPS_OVERLAYSTRETCHY = $02000000;
  320. DDFXCAPS_OVERLAYSTRETCHYN = $04000000;
  321. DDFXCAPS_OVERLAYMIRRORLEFTRIGHT = $08000000;
  322. DDFXCAPS_OVERLAYMIRRORUPDOWN = $10000000;
  323. DDFXCAPS_BLTALPHA = $00000001;
  324. DDFXCAPS_BLTTRANSFORM = $00000002;
  325. DDFXCAPS_BLTFILTER = DDFXCAPS_BLTARITHSTRETCHY;
  326. DDFXCAPS_OVERLAYALPHA = $00000004;
  327. DDFXCAPS_OVERLAYTRANSFORM = $20000000;
  328. DDFXCAPS_OVERLAYFILTER = DDFXCAPS_OVERLAYARITHSTRETCHY;
  329. {***************************************************************************
  330. *
  331. * DIRECTDRAW STEREO VIEW CAPABILITIES
  332. *
  333. ***************************************************************************}
  334. DDSVCAPS_ENIGMA = $00000001;
  335. DDSVCAPS_FLICKER = $00000002;
  336. DDSVCAPS_REDBLUE = $00000004;
  337. DDSVCAPS_SPLIT = $00000008;
  338. {***************************************************************************
  339. *
  340. * DIRECTDRAWPALETTE CAPABILITIES
  341. *
  342. ***************************************************************************}
  343. DDPCAPS_4BIT = $00000001;
  344. DDPCAPS_8BITENTRIES = $00000002;
  345. DDPCAPS_8BIT = $00000004;
  346. DDPCAPS_INITIALIZE = $00000008;
  347. DDPCAPS_PRIMARYSURFACE = $00000010;
  348. DDPCAPS_PRIMARYSURFACELEFT = $00000020;
  349. DDPCAPS_ALLOW256 = $00000040;
  350. DDPCAPS_VSYNC = $00000080;
  351. DDPCAPS_1BIT = $00000100;
  352. DDPCAPS_2BIT = $00000200;
  353. DDPCAPS_ALPHA = $00000400;
  354. {***************************************************************************
  355. *
  356. * DIRECTDRAWSURFACE SETPRIVATEDATA CONSTANTS
  357. *
  358. ***************************************************************************}
  359. DDSPD_IUNKNOWNPOINTER = $00000001;
  360. DDSPD_VOLATILE = $00000002;
  361. {***************************************************************************
  362. *
  363. * DIRECTDRAW BITDEPTH CONSTANTS
  364. *
  365. * NOTE: These are only used to indicate supported bit depths. These
  366. * are flags only, they are not to be used as an actual bit depth. The
  367. * absolute numbers 1, 2, 4, 8, 16, 24 and 32 are used to indicate actual
  368. * bit depths in a surface or for changing the display mode.
  369. *
  370. ***************************************************************************}
  371. DDBD_1 = $00004000;
  372. DDBD_2 = $00002000;
  373. DDBD_4 = $00001000;
  374. DDBD_8 = $00000800;
  375. DDBD_16 = $00000400;
  376. DDBD_24 = $00000200;
  377. DDBD_32 = $00000100;
  378. {***************************************************************************
  379. *
  380. * DIRECTDRAWSURFACE SET/GET COLOR KEY FLAGS
  381. *
  382. ***************************************************************************}
  383. DDCKEY_COLORSPACE = $00000001;
  384. DDCKEY_DESTBLT = $00000002;
  385. DDCKEY_DESTOVERLAY = $00000004;
  386. DDCKEY_SRCBLT = $00000008;
  387. DDCKEY_SRCOVERLAY = $00000010;
  388. {***************************************************************************
  389. *
  390. * DIRECTDRAW COLOR KEY CAPABILITY FLAGS
  391. *
  392. ***************************************************************************}
  393. DDCKEYCAPS_DESTBLT = $00000001;
  394. DDCKEYCAPS_DESTBLTCLRSPACE = $00000002;
  395. DDCKEYCAPS_DESTBLTCLRSPACEYUV = $00000004;
  396. DDCKEYCAPS_DESTBLTYUV = $00000008;
  397. DDCKEYCAPS_DESTOVERLAY = $00000010;
  398. DDCKEYCAPS_DESTOVERLAYCLRSPACE = $00000020;
  399. DDCKEYCAPS_DESTOVERLAYCLRSPACEYUV = $00000040;
  400. DDCKEYCAPS_DESTOVERLAYONEACTIVE = $00000080;
  401. DDCKEYCAPS_DESTOVERLAYYUV = $00000100;
  402. DDCKEYCAPS_SRCBLT = $00000200;
  403. DDCKEYCAPS_SRCBLTCLRSPACE = $00000400;
  404. DDCKEYCAPS_SRCBLTCLRSPACEYUV = $00000800;
  405. DDCKEYCAPS_SRCBLTYUV = $00001000;
  406. DDCKEYCAPS_SRCOVERLAY = $00002000;
  407. DDCKEYCAPS_SRCOVERLAYCLRSPACE = $00004000;
  408. DDCKEYCAPS_SRCOVERLAYCLRSPACEYUV = $00008000;
  409. DDCKEYCAPS_SRCOVERLAYONEACTIVE = $00010000;
  410. DDCKEYCAPS_SRCOVERLAYYUV = $00020000;
  411. DDCKEYCAPS_NOCOSTOVERLAY = $00040000;
  412. {***************************************************************************
  413. *
  414. * DIRECTDRAW PIXELFORMAT FLAGS
  415. *
  416. ***************************************************************************}
  417. DDPF_ALPHAPIXELS = $00000001;
  418. DDPF_ALPHA = $00000002;
  419. DDPF_FOURCC = $00000004;
  420. DDPF_PALETTEINDEXED4 = $00000008;
  421. DDPF_PALETTEINDEXEDTO8 = $00000010;
  422. DDPF_PALETTEINDEXED8 = $00000020;
  423. DDPF_RGB = $00000040;
  424. DDPF_COMPRESSED = $00000080;
  425. DDPF_RGBTOYUV = $00000100;
  426. DDPF_YUV = $00000200;
  427. DDPF_ZBUFFER = $00000400;
  428. DDPF_PALETTEINDEXED1 = $00000800;
  429. DDPF_PALETTEINDEXED2 = $00001000;
  430. DDPF_ZPIXELS = $00002000;
  431. DDPF_STENCILBUFFER = $00004000;
  432. DDPF_ALPHAPREMULT = $00008000;
  433. DDPF_LUMINANCE = $00020000;
  434. DDPF_BUMPLUMINANCE = $00040000;
  435. DDPF_BUMPDUDV = $00080000;
  436. {===========================================================================
  437. DIRECTDRAW CALLBACK FLAGS
  438. ===========================================================================}
  439. {***************************************************************************
  440. *
  441. * DIRECTDRAW ENUMSURFACES FLAGS
  442. *
  443. ***************************************************************************}
  444. DDENUMSURFACES_ALL = $00000001;
  445. DDENUMSURFACES_MATCH = $00000002;
  446. DDENUMSURFACES_NOMATCH = $00000004;
  447. DDENUMSURFACES_CANBECREATED = $00000008;
  448. DDENUMSURFACES_DOESEXIST = $00000010;
  449. {***************************************************************************
  450. *
  451. * DIRECTDRAW SETDISPLAYMODE FLAGS
  452. *
  453. ***************************************************************************}
  454. DDSDM_STANDARDVGAMODE = $00000001;
  455. {***************************************************************************
  456. *
  457. * DIRECTDRAW ENUMDISPLAYMODES FLAGS
  458. *
  459. ***************************************************************************}
  460. DDEDM_REFRESHRATES = $00000001;
  461. DDEDM_STANDARDVGAMODES = $00000002;
  462. {***************************************************************************
  463. *
  464. * DIRECTDRAW SETCOOPERATIVELEVEL FLAGS
  465. *
  466. ***************************************************************************}
  467. DDSCL_FULLSCREEN = $00000001;
  468. DDSCL_ALLOWREBOOT = $00000002;
  469. DDSCL_NOWINDOWCHANGES = $00000004;
  470. DDSCL_NORMAL = $00000008;
  471. DDSCL_EXCLUSIVE = $00000010;
  472. DDSCL_ALLOWMODEX = $00000040;
  473. DDSCL_SETFOCUSWINDOW = $00000080;
  474. DDSCL_SETDEVICEWINDOW = $00000100;
  475. DDSCL_CREATEDEVICEWINDOW = $00000200;
  476. DDSCL_MULTITHREADED = $00000400;
  477. DDSCL_FPUSETUP = $00000800;
  478. {***************************************************************************
  479. *
  480. * DIRECTDRAW BLT FLAGS
  481. *
  482. ***************************************************************************}
  483. DDBLT_ALPHADEST = $00000001;
  484. DDBLT_ALPHADESTCONSTOVERRIDE = $00000002;
  485. DDBLT_ALPHADESTNEG = $00000004;
  486. DDBLT_ALPHADESTSURFACEOVERRIDE = $00000008;
  487. DDBLT_ALPHAEDGEBLEND = $00000010;
  488. DDBLT_ALPHASRC = $00000020;
  489. DDBLT_ALPHASRCCONSTOVERRIDE = $00000040;
  490. DDBLT_ALPHASRCNEG = $00000080;
  491. DDBLT_ALPHASRCSURFACEOVERRIDE = $00000100;
  492. DDBLT_ASYNC = $00000200;
  493. DDBLT_COLORFILL = $00000400;
  494. DDBLT_DDFX = $00000800;
  495. DDBLT_DDROPS = $00001000;
  496. DDBLT_KEYDEST = $00002000;
  497. DDBLT_KEYDESTOVERRIDE = $00004000;
  498. DDBLT_KEYSRC = $00008000;
  499. DDBLT_KEYSRCOVERRIDE = $00010000;
  500. DDBLT_ROP = $00020000;
  501. DDBLT_ROTATIONANGLE = $00040000;
  502. DDBLT_ZBUFFER = $00080000;
  503. DDBLT_ZBUFFERDESTCONSTOVERRIDE = $00100000;
  504. DDBLT_ZBUFFERDESTOVERRIDE = $00200000;
  505. DDBLT_ZBUFFERSRCCONSTOVERRIDE = $00400000;
  506. DDBLT_ZBUFFERSRCOVERRIDE = $00800000;
  507. DDBLT_WAIT = $01000000;
  508. DDBLT_DEPTHFILL = $02000000;
  509. {***************************************************************************
  510. *
  511. * BLTFAST FLAGS
  512. *
  513. ***************************************************************************}
  514. DDBLTFAST_NOCOLORKEY = $00000000;
  515. DDBLTFAST_SRCCOLORKEY = $00000001;
  516. DDBLTFAST_DESTCOLORKEY = $00000002;
  517. DDBLTFAST_WAIT = $00000010;
  518. {***************************************************************************
  519. *
  520. * FLIP FLAGS
  521. *
  522. ***************************************************************************}
  523. DDFLIP_WAIT = $00000001;
  524. DDFLIP_EVEN = $00000002;
  525. DDFLIP_ODD = $00000004;
  526. DDFLIP_NOVSYNC = $00000008;
  527. DDFLIP_INTERVAL2 = $02000000;
  528. DDFLIP_INTERVAL3 = $03000000;
  529. DDFLIP_INTERVAL4 = $04000000;
  530. {***************************************************************************
  531. *
  532. * DIRECTDRAW SURFACE OVERLAY FLAGS
  533. *
  534. ***************************************************************************}
  535. DDOVER_ALPHADEST = $00000001;
  536. DDOVER_ALPHADESTCONSTOVERRIDE = $00000002;
  537. DDOVER_ALPHADESTNEG = $00000004;
  538. DDOVER_ALPHADESTSURFACEOVERRIDE = $00000008;
  539. DDOVER_ALPHAEDGEBLEND = $00000010;
  540. DDOVER_ALPHASRC = $00000020;
  541. DDOVER_ALPHASRCCONSTOVERRIDE = $00000040;
  542. DDOVER_ALPHASRCNEG = $00000080;
  543. DDOVER_ALPHASRCSURFACEOVERRIDE = $00000100;
  544. DDOVER_HIDE = $00000200;
  545. DDOVER_KEYDEST = $00000400;
  546. DDOVER_KEYDESTOVERRIDE = $00000800;
  547. DDOVER_KEYSRC = $00001000;
  548. DDOVER_KEYSRCOVERRIDE = $00002000;
  549. DDOVER_SHOW = $00004000;
  550. DDOVER_ADDDIRTYRECT = $00008000;
  551. DDOVER_REFRESHDIRTYRECTS = $00010000;
  552. DDOVER_REFRESHALL = $00020000;
  553. DDOVER_DDFX = $00080000;
  554. DDOVER_AUTOFLIP = $00100000;
  555. DDOVER_BOB = $00200000;
  556. DDOVER_OVERRIDEBOBWEAVE = $00400000;
  557. DDOVER_INTERLEAVED = $00800000;
  558. DDOVER_BOBHARDWARE = $01000000;
  559. {***************************************************************************
  560. *
  561. * DIRECTDRAWSURFACE LOCK FLAGS
  562. *
  563. ***************************************************************************}
  564. DDLOCK_SURFACEMEMORYPTR = $00000000; {default}
  565. DDLOCK_WAIT = $00000001;
  566. DDLOCK_EVENT = $00000002;
  567. DDLOCK_READONLY = $00000010;
  568. DDLOCK_WRITEONLY = $00000020;
  569. DDLOCK_NOSYSLOCK = $00000800;
  570. {***************************************************************************
  571. *
  572. * DIRECTDRAWSURFACE BLT FX FLAGS
  573. *
  574. ***************************************************************************}
  575. DDBLTFX_ARITHSTRETCHY = $00000001;
  576. DDBLTFX_MIRRORLEFTRIGHT = $00000002;
  577. DDBLTFX_MIRRORUPDOWN = $00000004;
  578. DDBLTFX_NOTEARING = $00000008;
  579. DDBLTFX_ROTATE180 = $00000010;
  580. DDBLTFX_ROTATE270 = $00000020;
  581. DDBLTFX_ROTATE90 = $00000040;
  582. DDBLTFX_ZBUFFERRANGE = $00000080;
  583. DDBLTFX_ZBUFFERBASEDEST = $00000100;
  584. {***************************************************************************
  585. *
  586. * DIRECTDRAWSURFACE OVERLAY FX FLAGS
  587. *
  588. ***************************************************************************}
  589. DDOVERFX_ARITHSTRETCHY = $00000001;
  590. DDOVERFX_MIRRORLEFTRIGHT = $00000002;
  591. DDOVERFX_MIRRORUPDOWN = $00000004;
  592. {***************************************************************************
  593. *
  594. * Flags for dwDDFX member of DDSPRITEFX structure
  595. *
  596. ***************************************************************************}
  597. DDSPRITEFX_AFFINETRANSFORM = $00000001;
  598. DDSPRITEFX_RGBASCALING = $00000002;
  599. DDSPRITEFX_DEGRADERGBASCALING = $00000004;
  600. DDSPRITEFX_BILINEARFILTER = $00000008;
  601. DDSPRITEFX_BLURFILTER = $00000010;
  602. DDSPRITEFX_FLATFILTER = $00000020;
  603. DDSPRITEFX_DEGRADEFILTER = $00000040;
  604. {***************************************************************************
  605. *
  606. * DIRECTDRAW WAITFORVERTICALBLANK FLAGS
  607. *
  608. ***************************************************************************}
  609. DDWAITVB_BLOCKBEGIN = $00000001;
  610. DDWAITVB_BLOCKBEGINEVENT = $00000002;
  611. DDWAITVB_BLOCKEND = $00000004;
  612. {***************************************************************************
  613. *
  614. * DIRECTDRAW GETFLIPSTATUS FLAGS
  615. *
  616. ***************************************************************************}
  617. DDGFS_CANFLIP = $00000001;
  618. DDGFS_ISFLIPDONE = $00000002;
  619. {***************************************************************************
  620. *
  621. * DIRECTDRAW GETBLTSTATUS FLAGS
  622. *
  623. ***************************************************************************}
  624. DDGBS_CANBLT = $00000001;
  625. DDGBS_ISBLTDONE = $00000002;
  626. {***************************************************************************
  627. *
  628. * DIRECTDRAW ENUMOVERLAYZORDER FLAGS
  629. *
  630. ***************************************************************************}
  631. DDENUMOVERLAYZ_BACKTOFRONT = $00000000;
  632. DDENUMOVERLAYZ_FRONTTOBACK = $00000001;
  633. {***************************************************************************
  634. *
  635. * DIRECTDRAW UPDATEOVERLAYZORDER FLAGS
  636. *
  637. ***************************************************************************}
  638. DDOVERZ_SENDTOFRONT = $00000000;
  639. DDOVERZ_SENDTOBACK = $00000001;
  640. DDOVERZ_MOVEFORWARD = $00000002;
  641. DDOVERZ_MOVEBACKWARD = $00000003;
  642. DDOVERZ_INSERTINFRONTOF = $00000004;
  643. DDOVERZ_INSERTINBACKOF = $00000005;
  644. {***************************************************************************
  645. *
  646. * DIRECTDRAW SETGAMMARAMP FLAGS
  647. *
  648. ***************************************************************************}
  649. DDSGR_CALIBRATE = $00000001;
  650. {===========================================================================
  651. DIRECTDRAW RETURN CODES
  652. The return values from DirectDraw Commands and Surface that return an HRESULT
  653. are codes from DirectDraw concerning the results of the action
  654. requested by DirectDraw.
  655. ===========================================================================}
  656. DD_OK = 0;
  657. DD_FALSE = S_FALSE;
  658. {***************************************************************************
  659. *
  660. * DIRECTDRAW ENUMCALLBACK RETURN VALUES
  661. *
  662. * EnumCallback returns are used to control the flow of the DIRECTDRAW and
  663. * DIRECTDRAWSURFACE object enumerations. They can only be returned by
  664. * enumeration callback routines.
  665. *
  666. ***************************************************************************}
  667. DDENUMRET_CANCEL = 0;
  668. DDENUMRET_OK = 1;
  669. {***************************************************************************
  670. *
  671. * DIRECTDRAW ERRORS
  672. *
  673. * Errors are represented by negative values and cannot be combined.
  674. *
  675. ***************************************************************************}
  676. DDERR_ALREADYINITIALIZED = ($80000000 + (_FACDD Shl 16) + 5);
  677. DDERR_CANNOTATTACHSURFACE = ($80000000 + (_FACDD Shl 16) + 10);
  678. DDERR_CANNOTDETACHSURFACE = ($80000000 + (_FACDD Shl 16) + 20);
  679. DDERR_CURRENTLYNOTAVAIL = ($80000000 + (_FACDD Shl 16) + 40);
  680. DDERR_EXCEPTION = ($80000000 + (_FACDD Shl 16) + 55);
  681. DDERR_GENERIC = E_FAIL;
  682. DDERR_HEIGHTALIGN = ($80000000 + (_FACDD Shl 16) + 90);
  683. DDERR_INCOMPATIBLEPRIMARY = ($80000000 + (_FACDD Shl 16) + 95);
  684. DDERR_INVALIDCAPS = ($80000000 + (_FACDD Shl 16) + 100);
  685. DDERR_INVALIDCLIPLIST = ($80000000 + (_FACDD Shl 16) + 110);
  686. DDERR_INVALIDMODE = ($80000000 + (_FACDD Shl 16) + 120);
  687. DDERR_INVALIDOBJECT = ($80000000 + (_FACDD Shl 16) + 130);
  688. DDERR_INVALIDPARAMS = E_INVALIDARG;
  689. DDERR_INVALIDPIXELFORMAT = ($80000000 + (_FACDD Shl 16) + 145);
  690. DDERR_INVALIDRECT = ($80000000 + (_FACDD Shl 16) + 150);
  691. DDERR_LOCKEDSURFACES = ($80000000 + (_FACDD Shl 16) + 160);
  692. DDERR_NO3D = ($80000000 + (_FACDD Shl 16) + 170);
  693. DDERR_NOALPHAHW = ($80000000 + (_FACDD Shl 16) + 180);
  694. DDERR_NOCLIPLIST = ($80000000 + (_FACDD Shl 16) + 205);
  695. DDERR_NOCOLORCONVHW = ($80000000 + (_FACDD Shl 16) + 210);
  696. DDERR_NOCOOPERATIVELEVELSET = ($80000000 + (_FACDD Shl 16) + 212);
  697. DDERR_NOCOLORKEY = ($80000000 + (_FACDD Shl 16) + 215);
  698. DDERR_NOCOLORKEYHW = ($80000000 + (_FACDD Shl 16) + 220);
  699. DDERR_NODIRECTDRAWSUPPORT = ($80000000 + (_FACDD Shl 16) + 222);
  700. DDERR_NOEXCLUSIVEMODE = ($80000000 + (_FACDD Shl 16) + 225);
  701. DDERR_NOFLIPHW = ($80000000 + (_FACDD Shl 16) + 230);
  702. DDERR_NOGDI = ($80000000 + (_FACDD Shl 16) + 240);
  703. DDERR_NOMIRRORHW = ($80000000 + (_FACDD Shl 16) + 250);
  704. DDERR_NOTFOUND = ($80000000 + (_FACDD Shl 16) + 255);
  705. DDERR_NOOVERLAYHW = ($80000000 + (_FACDD Shl 16) + 260);
  706. DDERR_OVERLAPPINGRECTS = ($80000000 + (_FACDD Shl 16) + 270);
  707. DDERR_NORASTEROPHW = ($80000000 + (_FACDD Shl 16) + 280);
  708. DDERR_NOROTATIONHW = ($80000000 + (_FACDD Shl 16) + 290);
  709. DDERR_NOSTRETCHHW = ($80000000 + (_FACDD Shl 16) + 310);
  710. DDERR_NOT4BITCOLOR = ($80000000 + (_FACDD Shl 16) + 316);
  711. DDERR_NOT4BITCOLORINDEX = ($80000000 + (_FACDD Shl 16) + 317);
  712. DDERR_NOT8BITCOLOR = ($80000000 + (_FACDD Shl 16) + 320);
  713. DDERR_NOTEXTUREHW = ($80000000 + (_FACDD Shl 16) + 330);
  714. DDERR_NOVSYNCHW = ($80000000 + (_FACDD Shl 16) + 335);
  715. DDERR_NOZBUFFERHW = ($80000000 + (_FACDD Shl 16) + 340);
  716. DDERR_NOZOVERLAYHW = ($80000000 + (_FACDD Shl 16) + 350);
  717. DDERR_OUTOFCAPS = ($80000000 + (_FACDD Shl 16) + 360);
  718. DDERR_OUTOFMEMORY = E_OUTOFMEMORY;
  719. DDERR_OUTOFVIDEOMEMORY = ($80000000 + (_FACDD Shl 16) + 380);
  720. DDERR_OVERLAYCANTCLIP = ($80000000 + (_FACDD Shl 16) + 382);
  721. DDERR_OVERLAYCOLORKEYONLYONEACTIVE = ($80000000 + (_FACDD Shl 16) + 384);
  722. DDERR_PALETTEBUSY = ($80000000 + (_FACDD Shl 16) + 387);
  723. DDERR_COLORKEYNOTSET = ($80000000 + (_FACDD Shl 16) + 400);
  724. DDERR_SURFACEALREADYATTACHED = ($80000000 + (_FACDD Shl 16) + 410);
  725. DDERR_SURFACEALREADYDEPENDENT = ($80000000 + (_FACDD Shl 16) + 420);
  726. DDERR_SURFACEBUSY = ($80000000 + (_FACDD Shl 16) + 430);
  727. DDERR_CANTLOCKSURFACE = ($80000000 + (_FACDD Shl 16) + 435);
  728. DDERR_SURFACEISOBSCURED = ($80000000 + (_FACDD Shl 16) + 440);
  729. DDERR_SURFACELOST = ($80000000 + (_FACDD Shl 16) + 450);
  730. DDERR_SURFACENOTATTACHED = ($80000000 + (_FACDD Shl 16) + 460);
  731. DDERR_TOOBIGHEIGHT = ($80000000 + (_FACDD Shl 16) + 470);
  732. DDERR_TOOBIGSIZE = ($80000000 + (_FACDD Shl 16) + 480);
  733. DDERR_TOOBIGWIDTH = ($80000000 + (_FACDD Shl 16) + 490);
  734. DDERR_UNSUPPORTED = E_NOTIMPL;
  735. DDERR_UNSUPPORTEDFORMAT = ($80000000 + (_FACDD Shl 16) + 510);
  736. DDERR_UNSUPPORTEDMASK = ($80000000 + (_FACDD Shl 16) + 520);
  737. DDERR_INVALIDSTREAM = ($80000000 + (_FACDD Shl 16) + 521);
  738. DDERR_VERTICALBLANKINPROGRESS = ($80000000 + (_FACDD Shl 16) + 537);
  739. DDERR_WASSTILLDRAWING = ($80000000 + (_FACDD Shl 16) + 540);
  740. DDERR_XALIGN = ($80000000 + (_FACDD Shl 16) + 560);
  741. DDERR_INVALIDDIRECTDRAWGUID = ($80000000 + (_FACDD Shl 16) + 561);
  742. DDERR_DIRECTDRAWALREADYCREATED = ($80000000 + (_FACDD Shl 16) + 562);
  743. DDERR_NODIRECTDRAWHW = ($80000000 + (_FACDD Shl 16) + 563);
  744. DDERR_PRIMARYSURFACEALREADYEXISTS = ($80000000 + (_FACDD Shl 16) + 564);
  745. DDERR_NOEMULATION = ($80000000 + (_FACDD Shl 16) + 565);
  746. DDERR_REGIONTOOSMALL = ($80000000 + (_FACDD Shl 16) + 566);
  747. DDERR_CLIPPERISUSINGHWND = ($80000000 + (_FACDD Shl 16) + 567);
  748. DDERR_NOCLIPPERATTACHED = ($80000000 + (_FACDD Shl 16) + 568);
  749. DDERR_NOHWND = ($80000000 + (_FACDD Shl 16) + 569);
  750. DDERR_HWNDSUBCLASSED = ($80000000 + (_FACDD Shl 16) + 570);
  751. DDERR_HWNDALREADYSET = ($80000000 + (_FACDD Shl 16) + 571);
  752. DDERR_NOPALETTEATTACHED = ($80000000 + (_FACDD Shl 16) + 572);
  753. DDERR_NOPALETTEHW = ($80000000 + (_FACDD Shl 16) + 573);
  754. DDERR_BLTFASTCANTCLIP = ($80000000 + (_FACDD Shl 16) + 574);
  755. DDERR_NOBLTHW = ($80000000 + (_FACDD Shl 16) + 575);
  756. DDERR_NODDROPSHW = ($80000000 + (_FACDD Shl 16) + 576);
  757. DDERR_OVERLAYNOTVISIBLE = ($80000000 + (_FACDD Shl 16) + 577);
  758. DDERR_NOOVERLAYDEST = ($80000000 + (_FACDD Shl 16) + 578);
  759. DDERR_INVALIDPOSITION = ($80000000 + (_FACDD Shl 16) + 579);
  760. DDERR_NOTAOVERLAYSURFACE = ($80000000 + (_FACDD Shl 16) + 580);
  761. DDERR_EXCLUSIVEMODEALREADYSET = ($80000000 + (_FACDD Shl 16) + 581);
  762. DDERR_NOTFLIPPABLE = ($80000000 + (_FACDD Shl 16) + 582);
  763. DDERR_CANTDUPLICATE = ($80000000 + (_FACDD Shl 16) + 583);
  764. DDERR_NOTLOCKED = ($80000000 + (_FACDD Shl 16) + 584);
  765. DDERR_CANTCREATEDC = ($80000000 + (_FACDD Shl 16) + 585);
  766. DDERR_NODC = ($80000000 + (_FACDD Shl 16) + 586);
  767. DDERR_WRONGMODE = ($80000000 + (_FACDD Shl 16) + 587);
  768. DDERR_IMPLICITLYCREATED = ($80000000 + (_FACDD Shl 16) + 588);
  769. DDERR_NOTPALETTIZED = ($80000000 + (_FACDD Shl 16) + 589);
  770. DDERR_UNSUPPORTEDMODE = ($80000000 + (_FACDD Shl 16) + 590);
  771. DDERR_NOMIPMAPHW = ($80000000 + (_FACDD Shl 16) + 591);
  772. DDERR_INVALIDSURFACETYPE = ($80000000 + (_FACDD Shl 16) + 592);
  773. DDERR_NOOPTIMIZEHW = ($80000000 + (_FACDD Shl 16) + 600);
  774. DDERR_NOTLOADED = ($80000000 + (_FACDD Shl 16) + 601);
  775. DDERR_NOFOCUSWINDOW = ($80000000 + (_FACDD Shl 16) + 602);
  776. DDERR_DCALREADYCREATED = ($80000000 + (_FACDD Shl 16) + 620);
  777. DDERR_NONONLOCALVIDMEM = ($80000000 + (_FACDD Shl 16) + 630);
  778. DDERR_CANTPAGELOCK = ($80000000 + (_FACDD Shl 16) + 640);
  779. DDERR_CANTPAGEUNLOCK = ($80000000 + (_FACDD Shl 16) + 660);
  780. DDERR_NOTPAGELOCKED = ($80000000 + (_FACDD Shl 16) + 680);
  781. DDERR_MOREDATA = ($80000000 + (_FACDD Shl 16) + 690);
  782. DDERR_EXPIRED = ($80000000 + (_FACDD Shl 16) + 691);
  783. DDERR_VIDEONOTACTIVE = ($80000000 + (_FACDD Shl 16) + 695);
  784. DDERR_DEVICEDOESNTOWNSURFACE = ($80000000 + (_FACDD Shl 16) + 699);
  785. DDERR_NOTINITIALIZED = CO_E_NOTINITIALIZED;
  786. Type
  787. PHWND = ^HWND;
  788. PHDC = ^HDC;
  789. LPLPDIRECTDRAW = ^LPDIRECTDRAW;
  790. LPDIRECTDRAW = ^IDIRECTDRAW;
  791. LPLPDIRECTDRAWSURFACE = ^LPDIRECTDRAWSURFACE;
  792. LPDIRECTDRAWSURFACE = ^IDirectDrawSurface;
  793. LPLPDIRECTDRAWCLIPPER = ^LPDIRECTDRAWCLIPPER;
  794. LPDIRECTDRAWCLIPPER = ^IDirectDrawClipper;
  795. LPLPDIRECTDRAWPALETTE = ^LPDIRECTDRAWPALETTE;
  796. LPDIRECTDRAWPALETTE = ^IDirectDrawPalette;
  797. LPDIRECTDRAW2 = LPDIRECTDRAW;
  798. LPLPVOID = ^LPVOID;
  799. LPVOID = Pointer;
  800. LPDWORD = ^DWord;
  801. {
  802. Generic pixel format with 8-bit RGB and alpha components
  803. }
  804. LPDDRGBA = ^DDRGBA;
  805. DDRGBA = Record
  806. red, green, blue, alpha : Byte;
  807. End;
  808. LPDDCOLORKEY = ^DDCOLORKEY;
  809. DDCOLORKEY = Record
  810. dwColorSpaceLowValue : DWord;
  811. dwColorSpaceHighValue : DWord;
  812. End;
  813. LPDDBLTFX = ^DDBLTFX;
  814. DDBLTFX = Record
  815. dwSize : DWord;
  816. dwDDFX : DWord;
  817. dwROP : DWord;
  818. dwDDROP : DWord;
  819. dwRotationAngle : DWord;
  820. dwZBufferOpCode : DWord;
  821. dwZBufferLow : DWord;
  822. dwZBufferHigh : DWord;
  823. dwZBufferBaseDest : DWord;
  824. dwZDestConstBitDepth : DWord;
  825. dwZDestConst : DWord; {union w/: lpDDSZBufferDest : LPDIRECTDRAWSURFACE}
  826. dwZSrcConstBitDepth : DWord;
  827. dwZSrcConst : DWord; {union w/: lpDDSZBufferSrc : LPDIRECTDRAWSURFACE}
  828. dwAlphaEdgeBlendBitDepth : DWord;
  829. dwAlphaEdgeBlend : DWord;
  830. dwReserved : DWord;
  831. dwAlphaDestConstBitDepth : DWord;
  832. dwAlphaDestConst : DWord; {union w/: lpDDSAlphaDest : LPDIRECTDRAWSURFACE}
  833. dwAlphaSrcConstBitDepth : DWord;
  834. dwAlphaSrcConst : DWord; {union w/: lpDDSAlphaSrc : LPDIRECTDRAWSURFACE}
  835. dwFillColor : DWord;
  836. {union w/: dwFillDepth : DWord}
  837. {union w/: lpDDSPattern : LPDIRECTDRAWSURFACE}
  838. ddckDestColorKey : DDCOLORKEY;
  839. ddckSrcColorKey : DDCOLORKEY;
  840. End;
  841. LPDDPIXELFORMAT = ^DDPIXELFORMAT;
  842. DDPIXELFORMAT = Record
  843. dwSize : DWord;
  844. dwFlags : DWord;
  845. dwFourCC : DWord;
  846. dwRGBBitCount : DWord;
  847. { union w/:
  848. dwYUVBitCount : DWord;
  849. dwZBufferBitDepth : DWord;
  850. dwAlphaBitDepth : DWord;
  851. }
  852. dwRBitMask : DWord;
  853. { union w/: dwYBitMask : DWord;}
  854. dwGBitMask : DWord;
  855. { union w/: dwUBitMask : DWord;}
  856. dwBBitMask : DWord;
  857. { union w/: dwVBitMask : DWord;}
  858. dwRGBAlphaBitMask : DWord;
  859. { union w/: dwYUVAlphaBitMask : DWord;}
  860. End;
  861. LPDDSCAPS = ^DDSCAPS;
  862. DDSCAPS = Record
  863. dwCaps : DWord;
  864. End;
  865. LPDDOSCAPS = ^DDOSCAPS;
  866. DDOSCAPS = Record
  867. dwCaps : DWord;
  868. End;
  869. { This structure is used internally by DirectDraw.}
  870. LPDDSCAPSEX = ^DDSCAPSEX;
  871. DDSCAPSEX = Record
  872. dwCaps2 : DWord;
  873. dwCaps3 : DWord;
  874. dwCaps4 : DWord;
  875. End;
  876. LPDDSCAPS2 = ^DDSCAPS2;
  877. DDSCAPS2 = Record
  878. dwCaps : DWord;
  879. dwCaps2 : DWord;
  880. dwCaps3 : DWord;
  881. dwCaps4 : DWord;
  882. End;
  883. {This structure is the DDCAPS structure as it was in version 2 and 3 of Direct X.
  884. It is present for back compatability.}
  885. DDCAPS_DX3 = Record
  886. {dwSize dd ? ; size of the DDDRIVERCAPS structure
  887. dwCaps dd ? ; driver specific capabilities
  888. dwCaps2 dd ? ; more driver specific capabilites
  889. dwCKeyCaps dd ? ; color key capabilities of the surface
  890. dwFXCaps dd ? ; driver specific stretching and effects capabilites
  891. dwFXAlphaCaps dd ? ; alpha driver specific capabilities
  892. dwPalCaps dd ? ; palette capabilities
  893. dwSVCaps dd ? ; stereo vision capabilities
  894. dwAlphaBltConstBitDepths dd ? ; DDBD_2,4,8
  895. dwAlphaBltPixelBitDepths dd ? ; DDBD_1,2,4,8
  896. dwAlphaBltSurfaceBitDepths dd ? ; DDBD_1,2,4,8
  897. dwAlphaOverlayConstBitDepths dd ? ; DDBD_2,4,8
  898. dwAlphaOverlayPixelBitDepths dd ? ; DDBD_1,2,4,8
  899. dwAlphaOverlaySurfaceBitDepths dd ? ; DDBD_1,2,4,8
  900. dwZBufferBitDepths dd ? ; DDBD_8,16,24,32
  901. dwVidMemTotal dd ? ; total amount of video memory
  902. dwVidMemFree dd ? ; amount of free video memory
  903. dwMaxVisibleOverlays dd ? ; maximum number of visible overlays
  904. dwCurrVisibleOverlays dd ? ; current number of visible overlays
  905. dwNumFourCCCodes dd ? ; number of four cc codes
  906. dwAlignBoundarySrc dd ? ; source rectangle alignment
  907. dwAlignSizeSrc dd ? ; source rectangle byte size
  908. dwAlignBoundaryDest dd ? ; dest rectangle alignment
  909. dwAlignSizeDest dd ? ; dest rectangle byte size
  910. dwAlignStrideAlign dd ? ; stride alignment
  911. dwRops dd DD_ROP_SPACE dup (?) ; ROPS supported
  912. ddsCaps DDSCAPS ? ; DDSCAPS structure has all the general capabilities
  913. dwMinOverlayStretch dd ? ; minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  914. dwMaxOverlayStretch dd ? ; maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  915. dwMinLiveVideoStretch dd ? ; minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  916. dwMaxLiveVideoStretch dd ? ; maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  917. dwMinHwCodecStretch dd ? ; minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  918. dwMaxHwCodecStretch dd ? ; maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  919. dwReserved1 dd ? ; reserved
  920. dwReserved2 dd ? ; reserved
  921. dwReserved3 dd ? ; reserved
  922. dwSVBCaps dd ? ; driver specific capabilities for System->Vmem blts
  923. dwSVBCKeyCaps dd ? ; driver color key capabilities for System->Vmem blts
  924. dwSVBFXCaps dd ? ; driver FX capabilities for System->Vmem blts
  925. dwSVBRops dd DD_ROP_SPACE dup (?) ; ROPS supported for System->Vmem blts
  926. dwVSBCaps dd ? ; driver specific capabilities for Vmem->System blts
  927. dwVSBCKeyCaps dd ? ; driver color key capabilities for Vmem->System blts
  928. dwVSBFXCaps dd ? ; driver FX capabilities for Vmem->System blts
  929. dwVSBRops dd DD_ROP_SPACE dup (?) ; ROPS supported for Vmem->System blts
  930. dwSSBCaps dd ? ; driver specific capabilities for System->System blts
  931. dwSSBCKeyCaps dd ? ; driver color key capabilities for System->System blts
  932. dwSSBFXCaps dd ? ; driver FX capabilities for System->System blts
  933. dwSSBRops dd DD_ROP_SPACE dup (?) ; ROPS supported for System->System blts
  934. dwReserved4 dd ? ; reserved
  935. dwReserved5 dd ? ; reserved
  936. dwReserved6 dd ? ; reserved}
  937. End;
  938. {This structure is the DDCAPS structure as it was in version 5 of Direct X.
  939. It is present for back compatability.}
  940. DDCAPS_DX5 = Record
  941. {dwSize dd ? ; size of the DDDRIVERCAPS structure ; 4
  942. dwCaps dd ? ; driver specific capabilities ; 8
  943. dwCaps2 dd ? ; more driver specific capabilites ; c
  944. dwCKeyCaps dd ? ; color key capabilities of the surface ; 10
  945. dwFXCaps dd ? ; driver specific stretching and effects capabilites ; 14
  946. dwFXAlphaCaps dd ? ; alpha driver specific capabilities ; 18
  947. dwPalCaps dd ? ; palette capabilities ; 1c
  948. dwSVCaps dd ? ; stereo vision capabilities ; 20
  949. dwAlphaBltConstBitDepths dd ? ; DDBD_2,4,8 ; 24
  950. dwAlphaBltPixelBitDepths dd ? ; DDBD_1,2,4,8 ; 28
  951. dwAlphaBltSurfaceBitDepths dd ? ; DDBD_1,2,4,8 ; 2c
  952. dwAlphaOverlayConstBitDepths dd ? ; DDBD_2,4,8 ; 30
  953. dwAlphaOverlayPixelBitDepths dd ? ; DDBD_1,2,4,8 ; 34
  954. dwAlphaOverlaySurfaceBitDepths dd ? ; DDBD_1,2,4,8 ; 38
  955. dwZBufferBitDepths dd ? ; DDBD_8,16,24,32 ; 3c
  956. dwVidMemTotal dd ? ; total amount of video memory ; 40
  957. dwVidMemFree dd ? ; amount of free video memory ; 44
  958. dwMaxVisibleOverlays dd ? ; maximum number of visible overlays ; 48
  959. dwCurrVisibleOverlays dd ? ; current number of visible overlays ; 4c
  960. dwNumFourCCCodes dd ? ; number of four cc codes ; 50
  961. dwAlignBoundarySrc dd ? ; source rectangle alignment ; 54
  962. dwAlignSizeSrc dd ? ; source rectangle byte size ; 58
  963. dwAlignBoundaryDest dd ? ; dest rectangle alignment ; 5c
  964. dwAlignSizeDest dd ? ; dest rectangle byte size ; 60
  965. dwAlignStrideAlign dd ? ; stride alignment ; 64
  966. dwRops dd DD_ROP_SPACE dup (?) ; ROPS supported ; 84
  967. ddsCaps DDSCAPS ? ; DDSCAPS structure has all the general capabilities ; 88
  968. dwMinOverlayStretch dd ? ; minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 ; 8c
  969. dwMaxOverlayStretch dd ? ; maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 ; 90
  970. dwMinLiveVideoStretch dd ? ; minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 ; 94
  971. dwMaxLiveVideoStretch dd ? ; maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 ; 98
  972. dwMinHwCodecStretch dd ? ; minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 ; 9c
  973. dwMaxHwCodecStretch dd ? ; maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 ; a0
  974. dwReserved1 dd ? ; reserved ; a4
  975. dwReserved2 dd ? ; reserved ; a8
  976. dwReserved3 dd ? ; reserved ; ac
  977. dwSVBCaps dd ? ; driver specific capabilities for System->Vmem blts ; b0
  978. dwSVBCKeyCaps dd ? ; driver color key capabilities for System->Vmem blts ; b4
  979. dwSVBFXCaps dd ? ; driver FX capabilities for System->Vmem blts ; b8
  980. dwSVBRops dd DD_ROP_SPACE dup (?) ; ROPS supported for System->Vmem blts ; d8
  981. dwVSBCaps dd ? ; driver specific capabilities for Vmem->System blts ; dc
  982. dwVSBCKeyCaps dd ? ; driver color key capabilities for Vmem->System blts ; e0
  983. dwVSBFXCaps dd ? ; driver FX capabilities for Vmem->System blts ; e4
  984. dwVSBRops dd DD_ROP_SPACE dup (?) ; ROPS supported for Vmem->System blts ;104
  985. dwSSBCaps dd ? ; driver specific capabilities for System->System blts ;108
  986. dwSSBCKeyCaps dd ? ; driver color key capabilities for System->System blts ;10c
  987. dwSSBFXCaps dd ? ; driver FX capabilities for System->System blts ;110
  988. dwSSBRops dd DD_ROP_SPACE dup (?) ; ROPS supported for System->System blts ; Members added for DX5: ;130
  989. dwMaxVideoPorts dd ? ; maximum number of usable video ports ;134
  990. dwCurrVideoPorts dd ? ; current number of video ports used ;138
  991. dwSVBCaps2 dd ? ; more driver specific capabilities for System->Vmem blts ;13c
  992. dwNLVBCaps dd ? ; driver specific capabilities for non-local->local vidmem blts ;140
  993. dwNLVBCaps2 dd ? ; more driver specific capabilities non-local->local vidmem blts ;144
  994. dwNLVBCKeyCaps dd ? ; driver color key capabilities for non-local->local vidmem blts ;148
  995. dwNLVBFXCaps dd ? ; driver FX capabilities for non-local->local blts ;14c
  996. dwNLVBRops dd DD_ROP_SPACE dup (?) ; ROPS supported for non-local->local blts}
  997. End;
  998. DDCAPS_DX6 = Record
  999. {dwSize dd ? ; size of the DDDRIVERCAPS structure ; 4
  1000. dwCaps dd ? ; driver specific capabilities ; 8
  1001. dwCaps2 dd ? ; more driver specific capabilites ; c
  1002. dwCKeyCaps dd ? ; color key capabilities of the surface ; 10
  1003. dwFXCaps dd ? ; driver specific stretching and effects capabilites ; 14
  1004. dwFXAlphaCaps dd ? ; alpha caps ; 18
  1005. dwPalCaps dd ? ; palette capabilities ; 1c
  1006. dwSVCaps dd ? ; stereo vision capabilities ; 20
  1007. dwAlphaBltConstBitDepths dd ? ; DDBD_2,4,8 ; 24
  1008. dwAlphaBltPixelBitDepths dd ? ; DDBD_1,2,4,8 ; 28
  1009. dwAlphaBltSurfaceBitDepths dd ? ; DDBD_1,2,4,8 ; 2c
  1010. dwAlphaOverlayConstBitDepths dd ? ; DDBD_2,4,8 ; 30
  1011. dwAlphaOverlayPixelBitDepths dd ? ; DDBD_1,2,4,8 ; 34
  1012. dwAlphaOverlaySurfaceBitDepths dd ? ; DDBD_1,2,4,8 ; 38
  1013. dwZBufferBitDepths dd ? ; DDBD_8,16,24,32 ; 3c
  1014. dwVidMemTotal dd ? ; total amount of video memory ; 40
  1015. dwVidMemFree dd ? ; amount of free video memory ; 44
  1016. dwMaxVisibleOverlays dd ? ; maximum number of visible overlays ; 48
  1017. dwCurrVisibleOverlays dd ? ; current number of visible overlays ; 4c
  1018. dwNumFourCCCodes dd ? ; number of four cc codes ; 50
  1019. dwAlignBoundarySrc dd ? ; source rectangle alignment ; 54
  1020. dwAlignSizeSrc dd ? ; source rectangle byte size ; 58
  1021. dwAlignBoundaryDest dd ? ; dest rectangle alignment ; 5c
  1022. dwAlignSizeDest dd ? ; dest rectangle byte size ; 60
  1023. dwAlignStrideAlign dd ? ; stride alignment ; 64
  1024. dwRops dd DD_ROP_SPACE dup (?) ; ROPS supported ; 84
  1025. ddsOldCaps DDSCAPS ? ; Was DDSCAPS ddsCaps. ddsCaps is of type DDSCAPS2 for DX6 ; 88
  1026. dwMinOverlayStretch dd ? ; minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 ; 8c
  1027. dwMaxOverlayStretch dd ? ; maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 ; 90
  1028. dwMinLiveVideoStretch dd ? ; minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 ; 94
  1029. dwMaxLiveVideoStretch dd ? ; maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 ; 98
  1030. dwMinHwCodecStretch dd ? ; minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 ; 9c
  1031. dwMaxHwCodecStretch dd ? ; maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 ; a0
  1032. dwReserved1 dd ? ; reserved ; a4
  1033. dwReserved2 dd ? ; reserved ; a8
  1034. dwReserved3 dd ? ; reserved ; ac
  1035. dwSVBCaps dd ? ; driver specific capabilities for System->Vmem blts ; b0
  1036. dwSVBCKeyCaps dd ? ; driver color key capabilities for System->Vmem blts ; b4
  1037. dwSVBFXCaps dd ? ; driver FX capabilities for System->Vmem blts ; b8
  1038. dwSVBRops dd DD_ROP_SPACE dup (?) ; ROPS supported for System->Vmem blts ; d8
  1039. dwVSBCaps dd ? ; driver specific capabilities for Vmem->System blts ; dc
  1040. dwVSBCKeyCaps dd ? ; driver color key capabilities for Vmem->System blts ; e0
  1041. dwVSBFXCaps dd ? ; driver FX capabilities for Vmem->System blts ; e4
  1042. dwVSBRops dd DD_ROP_SPACE dup (?) ; ROPS supported for Vmem->System blts ;104
  1043. dwSSBCaps dd ? ; driver specific capabilities for System->System blts ;108
  1044. dwSSBCKeyCaps dd ? ; driver color key capabilities for System->System blts ;10c
  1045. dwSSBFXCaps dd ? ; driver FX capabilities for System->System blts ;110
  1046. dwSSBRops dd DD_ROP_SPACE dup (?) ; ROPS supported for System->System blts ;130
  1047. dwMaxVideoPorts dd ? ; maximum number of usable video ports ;134
  1048. dwCurrVideoPorts dd ? ; current number of video ports used ;138
  1049. dwSVBCaps2 dd ? ; more driver specific capabilities for System->Vmem blts ;13c
  1050. dwNLVBCaps dd ? ; driver specific capabilities for non-local->local vidmem blts ;140
  1051. dwNLVBCaps2 dd ? ; more driver specific capabilities non-local->local vidmem blts ;144
  1052. dwNLVBCKeyCaps dd ? ; driver color key capabilities for non-local->local vidmem blts ;148
  1053. dwNLVBFXCaps dd ? ; driver FX capabilities for non-local->local blts ;14c
  1054. dwNLVBRops dd DD_ROP_SPACE dup (?) ; ROPS supported for non-local->local blts ; Members added for DX6 release ;16c
  1055. ddsCaps DDSCAPS2 ? ; Surface Caps}
  1056. End;
  1057. LPDDCAPS = ^DDCAPS;
  1058. DDCAPS = DDCAPS_DX6;
  1059. {DDCAPS = DDCAPS_DX5;}
  1060. {DDCAPS = DDCAPS_DX3;}
  1061. LPDDSURFACEDESC = ^DDSURFACEDESC;
  1062. DDSURFACEDESC = Record
  1063. dwSize : DWord;
  1064. dwFlags : DWord;
  1065. dwHeight : DWord;
  1066. dwWidth : DWord;
  1067. lPitch : LongInt;
  1068. dwBackBufferCount : DWord;
  1069. dwMipMapCount : DWord;
  1070. { union w/:
  1071. dwZBufferBitDepth : DWord;
  1072. dwRefreshRate : DWord;
  1073. }
  1074. dwAlphaBitDepth : DWord;
  1075. dwReserved : DWord;
  1076. lpSurface : LPVOID;
  1077. ddckCKDestOverlay : DDCOLORKEY;
  1078. ddckCKDestBlt : DDCOLORKEY;
  1079. ddckCKSrcOverlay : DDCOLORKEY;
  1080. ddckCKSrcBlt : DDCOLORKEY;
  1081. ddpfPixelFormat : DDPIXELFORMAT;
  1082. ddsCaps : DDSCAPS;
  1083. End;
  1084. LPDDOVERLAYFX = ^DDOVERLAYFX;
  1085. DDOVERLAYFX = Record
  1086. dwSize : DWord;
  1087. dwAlphaEdgeBlendBitDepth : DWord;
  1088. dwAlphaEdgeBlend : DWord;
  1089. dwReserved : DWord;
  1090. dwAlphaDestConstBitDepth : DWord;
  1091. dwAlphaDestConst : DWord;
  1092. {union w/: lpDDSAlphaDest : LPDIRECTDRAWSURFACE;}
  1093. dwAlphaSrcConstBitDepth : DWord;
  1094. dwAlphaSrcConst : DWord;
  1095. {union w/: lpDDSAlphaSrc : LPDIRECTDRAWSURFACE;}
  1096. dckDestColorkey : DDCOLORKEY;
  1097. dckSrcColorkey : DDCOLORKEY;
  1098. dwDDFX : DWord;
  1099. dwFlags : DWord;
  1100. End;
  1101. LPDDBLTBATCH = ^DDBLTBATCH;
  1102. DDBLTBATCH = Record
  1103. lprDest : LPRECT;
  1104. lpDDSSrc : LPDIRECTDRAWSURFACE;
  1105. lprSrc : LPRECT;
  1106. dwFlags : DWord;
  1107. lpDDBltFx : LPDDBLTFX;
  1108. End;
  1109. LPDDGAMMARAMP = ^DDGAMMARAMP;
  1110. DDGAMMARAMP = Record
  1111. red : Array[0..255] Of Word;
  1112. green : Array[0..255] Of Word;
  1113. blue : Array[0..255] Of Word;
  1114. End;
  1115. {;
  1116. ; This is the structure within which DirectDraw returns data about the current graphics driver and chipset
  1117. ;
  1118. MAX_DDDEVICEID_STRING = 512
  1119. struc DDDEVICEIDENTIFIER
  1120. szDriver db MAX_DDDEVICEID_STRING dup (?)
  1121. szDescription db MAX_DDDEVICEID_STRING dup (?)
  1122. label liDriverVersion qword
  1123. dwDriverVersionLowPart dd ?
  1124. dwDriverVersionHighPart dd ?
  1125. dwVendorId dd ?
  1126. dwDeviceId dd ?
  1127. dwSubSysId dd ?
  1128. dwRevision dd ?
  1129. guidDeviceIdentifier GUID ?
  1130. ends}
  1131. {;
  1132. ; Flags for the IDirectDraw4::GetDeviceIdentifier method
  1133. ;
  1134. DDGDI_GETHOSTIDENTIFIER = 000000001h
  1135. proctype CLIPPERCALLBACK :dword, :dword, :dword, :dword
  1136. proctype SURFACESTREAMINGCALLBACK :dword}
  1137. (* LPDDCAPS = ^DDCAPS;
  1138. DDCAPS = Record
  1139. dwSize : DWord;
  1140. {todo...}
  1141. End;*)
  1142. LPDDCOLORCONTROL = ^DDCOLORCONTROL;
  1143. DDCOLORCONTROL = Record
  1144. dwSize : DWord;
  1145. dwFlags : DWord;
  1146. lBrightness : LongInt;
  1147. lContrast : LongInt;
  1148. lHue : LongInt;
  1149. lSaturation : LongInt;
  1150. lSharpness : LongInt;
  1151. lGamma : LongInt;
  1152. lColorEnable : LongInt;
  1153. dwReserved1 : DWord;
  1154. End;
  1155. LPDDENUMCALLBACK = Pointer; {CDecl; (maybe) NO CDECL! STDCALL!}
  1156. LPDDENUMMODESCALLBACK = Pointer; {CDecl; !!! NO CDECL! STDCALL! todo:check DX SDK}
  1157. LPDDENUMSURFACESCALLBACK = Pointer; {CDecl; (maybe) NO CDECL! STDCALL!}
  1158. {
  1159. BOOL WINAPI lpCallback(GUID FAR * lpGUID, LPSTR lpDriverDescription, LPSTR lpDriverName, LPVOID lpContext);
  1160. HRESULT WINAPI lpEnumModesCallback(LPDDSURFACEDESC lpDDSurfaceDesc, LPVOID lpContext);
  1161. HRESULT WINAPI lpEnumSurfacesCallback(LPDIRECTDRAWSURFACE2 lpDDSurface, LPDDSURFACEDESC lpDDSurfaceDesc, LPVOID lpContext);
  1162. HRESULT WINAPI lpfnCallback(LPDIRECTDRAWSURFACE lpDDSurface, LPVOID lpContext);
  1163. }
  1164. {
  1165. ; INTERFACES FOLLOW:
  1166. ; IDirectDraw
  1167. ; IDirectDrawClipper
  1168. ; IDirectDrawPalette
  1169. ; IDirectDrawSurface
  1170. ;
  1171. ;
  1172. ; IDirectDraw
  1173. ;
  1174. struc IDirectDraw
  1175. ;** IUnknown methods **
  1176. QueryInterface dd ? 0
  1177. AddRef dd ? 1
  1178. Release dd ? 2
  1179. ;** IDirectDraw methods **
  1180. Compact dd ? 3
  1181. CreateClipper dd ? 4
  1182. CreatePalette dd ? 5
  1183. CreateSurface dd ? 6
  1184. DuplicateSurface dd ? 7
  1185. EnumDisplayModes dd ? 8
  1186. EnumSurfaces dd ? 9
  1187. FlipToGDISurface dd ? 10
  1188. GetCaps dd ? 11
  1189. GetDisplayMode dd ? 12
  1190. GetFourCCCodes dd ? 13
  1191. GetGDISurface dd ? 14
  1192. GetMonitorFrequency dd ? 15
  1193. GetScanLine dd ? 16
  1194. GetVerticalBlankStatus dd ? 17
  1195. Initialize dd ? 18
  1196. RestoreDisplayMode dd ? 19
  1197. SetCooperativeLevel dd ? 20
  1198. SetDisplayMode dd ? 21
  1199. WaitForVerticalBlank dd ? 22
  1200. ;** IDirectDraw2 methods **
  1201. GetAvailableVidMem dd ? 23
  1202. ;** IDirectDraw4 methods **
  1203. GetSurfaceFromDC dd ? 24
  1204. RestoreAllSurfaces dd ? 25
  1205. TestCooperativeLevel dd ? 26
  1206. GetDeviceIdentifier dd ? 27
  1207. ends
  1208. typedef IDirectDraw2 IDirectDraw
  1209. typedef IDirectDraw4 IDirectDraw}
  1210. IDirectDraw = Record
  1211. lpVtbl : ^IDirectDrawVtbl;
  1212. End;
  1213. IDirectDraw2 = IDirectDraw;
  1214. IDirectDraw4 = IDirectDraw;
  1215. IDirectDrawVtbl = Record
  1216. QueryInterface : Function(obj : LPDIRECTDRAW; sht : LPGUID; lplpGUZ : LPLPVOID) : DWord; DXCall;
  1217. AddRef : Function(obj : LPDIRECTDRAW) : DWord; DXCall;
  1218. Release : Function(obj : LPDIRECTDRAW) : DWord; DXCall;
  1219. Compact : Function(obj : LPDIRECTDRAW) : HResult; DXCall;
  1220. CreateClipper : Function(obj : LPDIRECTDRAW;
  1221. dwFlags : DWord; lplpDDClipper : LPLPDIRECTDRAWCLIPPER;
  1222. pUnkOther : Pointer) : HResult; DXCall;
  1223. CreatePalette : Function(obj : LPDIRECTDRAW;
  1224. dwFlags : DWord; lpColorTable : LPPALETTEENTRY;
  1225. lplpDDPalette : LPLPDIRECTDRAWPALETTE;
  1226. pUnkOther : Pointer) : HResult; DXCall;
  1227. CreateSurface : Function(obj : LPDIRECTDRAW;
  1228. lpDDSurfaceDesc : LPDDSURFACEDESC;
  1229. lplpDDSurface : LPLPDIRECTDRAWSURFACE;
  1230. pUnkOther : Pointer) : HResult; DXCall;
  1231. DuplicateSurface : Function(obj : LPDIRECTDRAW;
  1232. lpDDSurface : LPDIRECTDRAWSURFACE;
  1233. lplpDupDDSurface : LPLPDIRECTDRAWSURFACE) : HResult; DXCall;
  1234. EnumDisplayModes : Function(obj : LPDIRECTDRAW;
  1235. dwFlags : DWord; lpDDSurfaceDesc : LPDDSURFACEDESC;
  1236. lpContext : LPVOID;
  1237. lpEnumModesCallback : LPDDENUMMODESCALLBACK) : HResult; DXCall;
  1238. EnumSurfaces : Function(obj : LPDIRECTDRAW;
  1239. dwFlags : DWord; lpDDSD : LPDDSURFACEDESC;
  1240. lpContext : LPVOID;
  1241. lpEnumSurfacesCallback : LPDDENUMSURFACESCALLBACK) : HResult; DXCall;
  1242. { dummy1, dummy2 : DWord;}
  1243. FlipToGDISurface : Function(obj : LPDIRECTDRAW) : HResult; DXCall;
  1244. GetCaps : Function(obj : LPDIRECTDRAW; lpDDDriverCaps : LPDDCAPS;
  1245. lpDDHELCaps : LPDDCAPS) : HResult; DXCall;
  1246. GetDisplayMode : Function(obj : LPDIRECTDRAW;
  1247. lpDDSurfaceDesc : LPDDSURFACEDESC) : HResult; DXCall;
  1248. GetFourCCCodes : Function(obj : LPDIRECTDRAW;
  1249. lpNumCodes : LPDWORD; lpCodes : LPDWORD) : HResult; DXCall;
  1250. GetGDISurface : Function(obj : LPDIRECTDRAW;
  1251. lplpGDIDDSSurface : LPLPDIRECTDRAWSURFACE) : HResult; DXCall;
  1252. GetMonitorFrequency : Function(obj : LPDIRECTDRAW;
  1253. lpdwFrequency : LPDWORD) : HResult; DXCall;
  1254. GetScanLine : Function(obj : LPDIRECTDRAW;
  1255. lpdwScanLine : LPDWORD) : HResult; DXCall;
  1256. GetVerticalBlankStatus : Function(obj : LPDIRECTDRAW;
  1257. lpbIsInVB : LPBOOL) : HResult; DXCall;
  1258. {Function DirectDraw_Initialize(obj : LPDIRECTDRAW) : HResult; DXCall;}
  1259. Initialize : DWord;
  1260. RestoreDisplayMode : Function(obj : LPDIRECTDRAW) : HResult; DXCall;
  1261. SetCooperativeLevel : Function(obj : LPDIRECTDRAW;
  1262. hWnd : HWND; dwFlags : DWord) : HResult; DXCall;
  1263. SetDisplayMode : Function(obj : LPDIRECTDRAW;
  1264. dwWidth, dwHeight, dwBPP, dwRefreshRate, dwFlags : DWord) : HResult; DXCall;
  1265. WaitForVerticalBlank : Function(obj : LPDIRECTDRAW;
  1266. dwFlags : DWord; hEvent : HANDLE) : HResult; DXCall;
  1267. GetAvailableVidMem : Function(obj : LPDIRECTDRAW;
  1268. lpDDSCaps : LPDDSCAPS; lpdwTotal : LPDWORD; lpdwFree : LPDWORD) : HResult; DXCall;
  1269. End;
  1270. (*Function DirectDraw_AddRef(obj : LPDIRECTDRAW) : DWord;
  1271. Function DirectDraw_Release(obj : LPDIRECTDRAW) : DWord;
  1272. Function DirectDraw_Compact(obj : LPDIRECTDRAW) : HResult;
  1273. Function DirectDraw_CreateClipper(obj : LPDIRECTDRAW;
  1274. dwFlags : DWord; lplpDDClipper : LPLPDIRECTDRAWCLIPPER;
  1275. pUnkOther : Pointer) : HResult;
  1276. Function DirectDraw_CreatePalette(obj : LPDIRECTDRAW;
  1277. dwFlags : DWord; lpColorTable : LPPALETTEENTRY;
  1278. lplpDDPalette : LPLPDIRECTDRAWPALETTE;
  1279. pUnkOther : Pointer) : HResult;
  1280. Function DirectDraw_CreateSurface(obj : LPDIRECTDRAW;
  1281. lpDDSurfaceDesc : LPDDSURFACEDESC;
  1282. lplpDDSurface : LPLPDIRECTDRAWSURFACE;
  1283. pUnkOther : Pointer) : HResult;
  1284. Function DirectDraw_DuplicateSurface(obj : LPDIRECTDRAW;
  1285. lpDDSurface : LPDIRECTDRAWSURFACE;
  1286. lplpDupDDSurface : LPLPDIRECTDRAWSURFACE) : HResult;
  1287. Function DirectDraw_EnumDisplayModes(obj : LPDIRECTDRAW;
  1288. dwFlags : DWord; lpDDSurfaceDesc : LPDDSURFACEDESC;
  1289. lpContext : LPVOID;
  1290. lpEnumModesCallback : LPDDENUMMODESCALLBACK) : HResult;
  1291. Function DirectDraw_EnumSurfaces(obj : LPDIRECTDRAW;
  1292. dwFlags : DWord; lpDDSD : LPDDSURFACEDESC;
  1293. lpContext : LPVOID;
  1294. lpEnumSurfacesCallback : LPDDENUMSURFACESCALLBACK) : HResult;
  1295. Function DirectDraw_FlipToGDISurface(obj : LPDIRECTDRAW) : HResult;
  1296. Function DirectDraw_GetCaps(obj : LPDIRECTDRAW; lpDDDriverCaps : LPDDCAPS;
  1297. lpDDHELCaps : LPDDCAPS) : HResult;
  1298. Function DirectDraw_GetDisplayMode(obj : LPDIRECTDRAW;
  1299. lpDDSurfaceDesc : LPDDSURFACEDESC) : HResult;
  1300. Function DirectDraw_GetFourCCCodes(obj : LPDIRECTDRAW;
  1301. lpNumCodes : LPDWORD; lpCodes : LPDWORD) : HResult;
  1302. Function DirectDraw_GetGDISurface(obj : LPDIRECTDRAW;
  1303. lplpGDIDDSSurface : LPLPDIRECTDRAWSURFACE) : HResult;
  1304. Function DirectDraw_GetMonitorFrequency(obj : LPDIRECTDRAW;
  1305. lpdwFrequency : LPDWORD) : HResult;
  1306. Function DirectDraw_GetScanLine(obj : LPDIRECTDRAW;
  1307. lpdwScanLine : LPDWORD) : HResult;
  1308. Function DirectDraw_GetVerticalBlankStatus(obj : LPDIRECTDRAW;
  1309. lpbIsInVB : LPBOOL) : HResult;
  1310. {Function DirectDraw_Initialize(obj : LPDIRECTDRAW) : HResult;}
  1311. Function DirectDraw_RestoreDisplayMode(obj : LPDIRECTDRAW) : HResult;
  1312. Function DirectDraw_SetCooperativeLevel(obj : LPDIRECTDRAW;
  1313. hWnd : HWND; dwFlags : DWord) : HResult;
  1314. Function DirectDraw_SetDisplayMode(obj : LPDIRECTDRAW;
  1315. dwWidth, dwHeight, dwBPP, dwRefreshRate, dwFlags : DWord) : HResult;
  1316. Function DirectDraw_WaitForVerticalBlank(obj : LPDIRECTDRAW;
  1317. dwFlags : DWord; hEvent : HANDLE) : HResult;
  1318. Function DirectDraw_GetAvailableVidMem(obj : LPDIRECTDRAW;
  1319. lpDDSCaps : LPDDSCAPS; lpdwTotal : LPDWORD; lpdwFree : LPDWORD) : HResult;*)
  1320. IDirectDrawPalette = Record
  1321. lpVtbl : ^IDirectDrawPaletteVtbl;
  1322. End;
  1323. IDirectDrawPaletteVtbl = Record
  1324. q : Pointer;
  1325. AddRef : Function(obj : LPDIRECTDRAWPALETTE) : DWord; DXCall;
  1326. Release : Function(obj : LPDIRECTDRAWPALETTE) : DWord; DXCall;
  1327. GetCaps : Function(obj : LPDIRECTDRAWPALETTE;
  1328. lpdwCaps : LPDWORD) : HRESULT; DXCall;
  1329. GetEntries : Function(obj : LPDIRECTDRAWPALETTE;
  1330. dwFlags, dwBase, dwNumEntries : DWord;
  1331. lpEntries : LPPALETTEENTRY) : HRESULT; DXCall;
  1332. Initialize : Function(obj : LPDIRECTDRAWPALETTE;
  1333. lpDD : LPDIRECTDRAW; dwFlags : DWord;
  1334. lpDDColorTable : LPPALETTEENTRY) : HRESULT; DXCall;
  1335. SetEntries : Function(obj : LPDIRECTDRAWPALETTE;
  1336. dwFlags, dwStartingEntry, dwCount : DWord;
  1337. lpEntries : LPPALETTEENTRY) : HRESULT; DXCall;
  1338. End;
  1339. {
  1340. ;
  1341. ; IDirectDrawPalette
  1342. ;
  1343. struc IDirectDrawPalette
  1344. ;** IUnknown methods **
  1345. QueryInterface dd ?
  1346. AddRef dd ?
  1347. Release dd ?
  1348. ;** IDirectDrawPalette methods **
  1349. GetCaps dd ?
  1350. GetEntries dd ?
  1351. Initialize dd ?
  1352. SetEntries dd ?
  1353. ends}
  1354. IDirectDrawClipper = Record
  1355. lpVtbl : ^IDirectDrawClipperVtbl;
  1356. End;
  1357. IDirectDrawClipperVtbl = Record
  1358. q : Pointer;
  1359. AddRef : Function(obj : LPDIRECTDRAWCLIPPER) : DWord; DXCall;
  1360. Release : Function(obj : LPDIRECTDRAWCLIPPER) : DWord; DXCall;
  1361. GetClipList : Function(obj : LPDIRECTDRAWCLIPPER;
  1362. lpRect : LPRECT; lpClipList : LPRGNDATA;
  1363. lpdwSize : LPDWORD) : HRESULT; DXCall;
  1364. GetHWnd : Function(obj : LPDIRECTDRAWCLIPPER;
  1365. lphWnd : PHWND) : HRESULT; DXCall;
  1366. Initialize : Function(obj : LPDIRECTDRAWCLIPPER;
  1367. lpDD : LPDIRECTDRAW; dwFlags : DWord) : HRESULT; DXCall;
  1368. IsClipListChanged : Function(obj : LPDIRECTDRAWCLIPPER;
  1369. lpbChanged : PBoolean) : HRESULT; DXCall;
  1370. SetClipList : Function(obj : LPDIRECTDRAWCLIPPER;
  1371. lpClipList : LPRGNDATA;
  1372. dwFlags : DWord) : HRESULT; DXCall;
  1373. SetHWnd : Function(obj : LPDIRECTDRAWCLIPPER;
  1374. dwFlags : DWord; hWnd : HWND) : HRESULT; DXCall;
  1375. End;
  1376. {;
  1377. ; IDirectDrawClipper
  1378. ;
  1379. struc IDirectDrawClipper
  1380. ;** IUnknown methods **
  1381. QueryInterface dd ?
  1382. AddRef dd ?
  1383. Release dd ?
  1384. ;** IDirectDrawClipper methods **
  1385. GetClipList dd ?
  1386. GetHWnd dd ?
  1387. Initialize dd ?
  1388. IsClipListChanged dd ?
  1389. SetClipList dd ?
  1390. SetHWnd dd ?
  1391. ends}
  1392. IDirectDrawSurface = Record
  1393. lpVtbl : ^IDirectDrawSurfaceVtbl;
  1394. End;
  1395. IDirectDrawSurface2 = IDirectDrawSurface;
  1396. IDirectDrawSurface3 = IDirectDrawSurface;
  1397. IDirectDrawSurface4 = IDirectDrawSurface;
  1398. IDirectDrawSurfaceVtbl = Record
  1399. q : Pointer;
  1400. AddRef : Function(obj : LPDIRECTDRAWSURFACE) : DWord; DXCall;
  1401. Release : Function(obj : LPDIRECTDRAWSURFACE) : DWord; DXCall;
  1402. AddAttachedSurface : Function(obj : LPDIRECTDRAWSURFACE;
  1403. lpDDSAttachedSurface : LPDIRECTDRAWSURFACE{2}) : HRESULT; DXCall;
  1404. AddOverlayDirtyRect : Function(obj : LPDIRECTDRAWSURFACE;
  1405. lpRect : LPRECT) : HRESULT; DXCall;
  1406. Blt : Function(obj : LPDIRECTDRAWSURFACE; lpDestRect : LPRECT;
  1407. lpDDSrcSurface : LPDIRECTDRAWSURFACE{2}; lpSrcRect : LPRECT;
  1408. dwFlags : DWord; lpDDBltFx : LPDDBLTFX) : HRESULT; DXCall;
  1409. BltBatch : Function(obj : LPDIRECTDRAWSURFACE;
  1410. lpDDBltBatch : LPDDBLTBATCH; dwCount, dwFlags : DWord) : HRESULT; DXCall;
  1411. BltFast : Function(obj : LPDIRECTDRAWSURFACE; dwX, dwY : DWord;
  1412. lpDDSrcSurface : LPDIRECTDRAWSURFACE{2}; lpSrcRect : LPRECT;
  1413. dwTrans : DWord) : HRESULT; DXCall;
  1414. DeleteAttachedSurface : Function(obj : LPDIRECTDRAWSURFACE;
  1415. dwFlags : DWord;
  1416. lpDDSAttachedSurface : LPDIRECTDRAWSURFACE{2}) : HRESULT; DXCall;
  1417. EnumAttachedSurfaces : Function(obj : LPDIRECTDRAWSURFACE;
  1418. lpContext : LPVOID;
  1419. lpEnumSurfacesCallback : LPDDENUMSURFACESCALLBACK) : HRESULT; DXCall;
  1420. EnumOverlayZOrders : Function(obj : LPDIRECTDRAWSURFACE;
  1421. dwFlags : DWord; lpContext : LPVOID;
  1422. lpfnCallback : LPDDENUMSURFACESCALLBACK) : HRESULT; DXCall;
  1423. Flip : Function(obj : LPDIRECTDRAWSURFACE;
  1424. lpDDSurfaceTargetOverride : LPDIRECTDRAWSURFACE{2};
  1425. dwFlags : DWord) : HRESULT; DXCall;
  1426. GetAttachedSurface : Function(obj : LPDIRECTDRAWSURFACE;
  1427. lpDDSCaps : LPDDSCAPS;
  1428. lplpDDAttachedSurface : LPLPDIRECTDRAWSURFACE{2}) : HRESULT; DXCall;
  1429. GetBltStatus : Function(obj : LPDIRECTDRAWSURFACE;
  1430. dwFlags : DWord) : HRESULT; DXCall;
  1431. GetCaps : Function(obj : LPDIRECTDRAWSURFACE;
  1432. lpDDSCaps : LPDDSCAPS) : HRESULT; DXCall;
  1433. GetClipper : Function(obj : LPDIRECTDRAWSURFACE;
  1434. lplpDDClipper : LPLPDIRECTDRAWCLIPPER) : HRESULT; DXCall;
  1435. GetColorKey : Function(obj : LPDIRECTDRAWSURFACE;
  1436. dwFlags : DWord; lpDDColorKey : LPDDCOLORKEY) : HRESULT; DXCall;
  1437. GetDC : Function(obj : LPDIRECTDRAWSURFACE;
  1438. lphDC : PHDC) : HRESULT; DXCall;
  1439. GetFlipStatus : Function(obj : LPDIRECTDRAWSURFACE;
  1440. dwFlags : DWord) : HRESULT; DXCall;
  1441. GetOverlayPosition : Function(obj : LPDIRECTDRAWSURFACE;
  1442. lplX, lplY : LPDWORD) : HRESULT; DXCall;
  1443. GetPalette : Function(obj : LPDIRECTDRAWSURFACE;
  1444. lplpDDPalette : LPLPDIRECTDRAWPALETTE) : HRESULT; DXCall;
  1445. GetPixelFormat : Function(obj : LPDIRECTDRAWSURFACE;
  1446. lpDDPixelFormat : LPDDPIXELFORMAT) : HRESULT; DXCall;
  1447. GetSurfaceDesc : Function(obj : LPDIRECTDRAWSURFACE;
  1448. lpDDSurfaceDesc : LPDDSURFACEDESC) : HRESULT; DXCall;
  1449. Initialize : Function(obj : LPDIRECTDRAWSURFACE;
  1450. lpDD : LPDIRECTDRAW;
  1451. lpDDSurfaceDesc : LPDDSURFACEDESC) : HRESULT; DXCall;
  1452. IsLost : Function(obj : LPDIRECTDRAWSURFACE) : HRESULT; DXCall;
  1453. Lock : Function(obj : LPDIRECTDRAWSURFACE;
  1454. lpDestRect : LPRECT; lpDDSurfaceDesc : LPDDSURFACEDESC;
  1455. dwFlags : DWord; hEvent : HANDLE) : HRESULT; DXCall;
  1456. ReleaseDC : Function(obj : LPDIRECTDRAWSURFACE;
  1457. hDC : HDC) : HRESULT; DXCall;
  1458. Restore : Function(obj : LPDIRECTDRAWSURFACE) : HRESULT; DXCall;
  1459. SetClipper : Function(obj : LPDIRECTDRAWSURFACE;
  1460. lpDDClipper : LPDIRECTDRAWCLIPPER) : HRESULT; DXCall;
  1461. SetColorKey : Function(obj : LPDIRECTDRAWSURFACE;
  1462. dwFlags : DWord; lpDDColorKey : LPDDCOLORKEY) : HRESULT; DXCall;
  1463. SetOverlayPosition : Function(obj : LPDIRECTDRAWSURFACE;
  1464. lX, lY : LongInt) : HRESULT; DXCall;
  1465. SetPalette : Function(obj : LPDIRECTDRAWSURFACE;
  1466. lpDDPalette : LPDIRECTDRAWPALETTE) : HRESULT; DXCall;
  1467. Unlock : Function(obj : LPDIRECTDRAWSURFACE;
  1468. lpSurfaceData : LPVOID) : HRESULT; DXCall;
  1469. UpdateOverlay : Function(obj : LPDIRECTDRAWSURFACE;
  1470. lpSrcRect : LPRECT; lpDDDestSurface : LPDIRECTDRAWSURFACE{2};
  1471. lpDestRect : LPRECT; dwFlags : DWord;
  1472. lpDDOverlayFx : LPDDOVERLAYFX) : HRESULT; DXCall;
  1473. UpdateOverlayDisplay : Function(obj : LPDIRECTDRAWSURFACE;
  1474. dwFlags : DWord) : HRESULT; DXCall;
  1475. UpdateOverlayZOrder : Function(obj : LPDIRECTDRAWSURFACE;
  1476. dwFlags : DWord;
  1477. lpDDSReference : LPDIRECTDRAWSURFACE{2}) : HRESULT; DXCall;
  1478. {v2}
  1479. GetDDInterface : Function(obj : LPDIRECTDRAWSURFACE;
  1480. lplpDD : LPLPVOID) : HRESULT; DXCall;
  1481. PageLock : Function(obj : LPDIRECTDRAWSURFACE;
  1482. dwFlags : DWord) : HRESULT; DXCall;
  1483. PageUnlock : Function(obj : LPDIRECTDRAWSURFACE;
  1484. dwFlags : DWord) : HRESULT; DXCall;
  1485. {v3}
  1486. { SetSurfaceDesc}
  1487. {v4}
  1488. { SetPrivateData
  1489. GetPrivateData
  1490. FreePrivateData
  1491. GetUniquenessValue
  1492. ChangeUniquenessValue}
  1493. End;
  1494. {;
  1495. ; IDirectDrawSurface and related interfaces
  1496. ;
  1497. struc IDirectDrawSurface
  1498. ;** IUnknown methods **
  1499. QueryInterface dd ?
  1500. AddRef dd ?
  1501. Release dd ?
  1502. ;** IDirectDrawSurface methods **
  1503. AddAttachedSurface dd ?
  1504. AddOverlayDirtyRect dd ?
  1505. Blt dd ?
  1506. BltBatch dd ?
  1507. BltFast dd ?
  1508. DeleteAttachedSurface dd ?
  1509. EnumAttachedSurfaces dd ?
  1510. EnumOverlayZOrders dd ?
  1511. Flip dd ?
  1512. GetAttachedSurface dd ?
  1513. GetBltStatus dd ?
  1514. GetCaps dd ?
  1515. GetClipper dd ?
  1516. GetColorKey dd ?
  1517. GetDC dd ?
  1518. GetFlipStatus dd ?
  1519. GetOverlayPosition dd ?
  1520. GetPalette dd ?
  1521. GetPixelFormat dd ?
  1522. GetSurfaceDesc dd ?
  1523. Initialize dd ?
  1524. IsLost dd ?
  1525. _Lock dd ?
  1526. ReleaseDC dd ?
  1527. Restore dd ?
  1528. SetClipper dd ?
  1529. SetColorKey dd ?
  1530. SetOverlayPosition dd ?
  1531. SetPalette dd ?
  1532. Unlock dd ?
  1533. UpdateOverlay dd ?
  1534. UpdateOverlayDisplay dd ?
  1535. UpdateOverlayZOrder dd ?
  1536. ;** Added in the v2 interface **
  1537. GetDDInterface dd ?
  1538. PageLock dd ?
  1539. PageUnlock dd ?
  1540. ;** Added in the v3 interface **
  1541. SetSurfaceDesc dd ?
  1542. ;** Added in the v4 interface **
  1543. SetPrivateData dd ?
  1544. GetPrivateData dd ?
  1545. FreePrivateData dd ?
  1546. GetUniquenessValue dd ?
  1547. ChangeUniquenessValue dd ?
  1548. ends
  1549. typedef IDirectDrawSurface2 IDirectDrawSurface
  1550. typedef IDirectDrawSurface3 IDirectDrawSurface
  1551. typedef IDirectDrawSurface4 IDirectDrawSurface
  1552. }
  1553. {
  1554. ;
  1555. ; IDirectDrawColorControl
  1556. ;
  1557. struc IDirectDrawColorControl
  1558. ;** IUnknown methods **
  1559. QueryInterface dd ?
  1560. AddRef dd ?
  1561. Release dd ?
  1562. ;** IDirectDrawColorControl methods **
  1563. GetColorControls dd ?
  1564. SetColorControls dd ?
  1565. ends
  1566. ;
  1567. ; IDirectDrawGammaControl
  1568. ;
  1569. struc IDirectDrawGammaControl
  1570. ;** IUnknown methods **
  1571. QueryInterface dd ?
  1572. AddRef dd ?
  1573. Release dd ?
  1574. ;** IDirectDrawColorControl methods **
  1575. GetGammaRamp dd ?
  1576. SetGammaRamp dd ?
  1577. ends}
  1578. TDirectDrawCreate = Function(lpGUID : Pointer; lplpDD : LPLPDIRECTDRAW; pUnkOuter : Pointer{IUnknown FAR *}) : HRESULT; DXCall;
  1579. TDirectDrawCreateClipper = Function(dwFlags : DWord; lplpDDClipper : LPLPDIRECTDRAWCLIPPER; pUnkOuter : Pointer{IUnknown FAR *}) : HRESULT; DXCall;
  1580. TDirectDrawEnumerate = Function(lpCallback : LPDDENUMCALLBACK; lpContext : LPVOID) : HRESULT; DXCall; {DirectDrawEnumerateA}
  1581. TDirectDrawEnumerateEx = Function(A, B, C : DWord) : HRESULT; DXCall; {DirectDrawEnumerateExA}
  1582. Var
  1583. DirectDrawCreate : TDirectDrawCreate;
  1584. DirectDrawCreateClipper : TDirectDrawCreateClipper;
  1585. DirectDrawEnumerate : TDirectDrawEnumerate;
  1586. DirectDrawEnumerateEx : TDirectDrawEnumerateEx;
  1587. Implementation
  1588. Begin
  1589. DirectDrawCreate := Nil;
  1590. DirectDrawCreateClipper := Nil;
  1591. DirectDrawEnumerate := Nil;
  1592. DirectDrawEnumerateEx := Nil;
  1593. End.