ddraw.h 148 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566
  1. /*
  2. * Copyright (C) the Wine project
  3. *
  4. * This library is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU Lesser General Public
  6. * License as published by the Free Software Foundation; either
  7. * version 2.1 of the License, or (at your option) any later version.
  8. *
  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. *
  14. * You should have received a copy of the GNU Lesser General Public
  15. * License along with this library; if not, write to the Free Software
  16. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  17. */
  18. #ifndef __WINE_DDRAW_H
  19. #define __WINE_DDRAW_H
  20. #include <objbase.h>
  21. #ifdef __cplusplus
  22. extern "C" {
  23. #endif /* defined(__cplusplus) */
  24. #ifndef DIRECTDRAW_VERSION
  25. #define DIRECTDRAW_VERSION 0x0700
  26. #endif /* DIRECTDRAW_VERSION */
  27. /*****************************************************************************
  28. * Predeclare the interfaces
  29. */
  30. #ifndef __DDRAW_GUID_DEFINED__
  31. DEFINE_GUID( CLSID_DirectDraw, 0xD7B70EE0,0x4340,0x11CF,0xB0,0x63,0x00,0x20,0xAF,0xC2,0xCD,0x35 );
  32. DEFINE_GUID( CLSID_DirectDraw7, 0x3C305196,0x50DB,0x11D3,0x9C,0xFE,0x00,0xC0,0x4F,0xD9,0x30,0xC5 );
  33. DEFINE_GUID( CLSID_DirectDrawClipper, 0x593817A0,0x7DB3,0x11CF,0xA2,0xDE,0x00,0xAA,0x00,0xb9,0x33,0x56 );
  34. DEFINE_GUID( IID_IDirectDraw, 0x6C14DB80,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
  35. DEFINE_GUID( IID_IDirectDraw2, 0xB3A6F3E0,0x2B43,0x11CF,0xA2,0xDE,0x00,0xAA,0x00,0xB9,0x33,0x56 );
  36. DEFINE_GUID( IID_IDirectDraw4, 0x9c59509a,0x39bd,0x11d1,0x8c,0x4a,0x00,0xc0,0x4f,0xd9,0x30,0xc5 );
  37. DEFINE_GUID( IID_IDirectDraw7, 0x15e65ec0,0x3b9c,0x11d2,0xb9,0x2f,0x00,0x60,0x97,0x97,0xea,0x5b );
  38. DEFINE_GUID( IID_IDirectDrawSurface, 0x6C14DB81,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
  39. DEFINE_GUID( IID_IDirectDrawSurface2, 0x57805885,0x6eec,0x11cf,0x94,0x41,0xa8,0x23,0x03,0xc1,0x0e,0x27 );
  40. DEFINE_GUID( IID_IDirectDrawSurface3, 0xDA044E00,0x69B2,0x11D0,0xA1,0xD5,0x00,0xAA,0x00,0xB8,0xDF,0xBB );
  41. DEFINE_GUID( IID_IDirectDrawSurface4, 0x0B2B8630,0xAD35,0x11D0,0x8E,0xA6,0x00,0x60,0x97,0x97,0xEA,0x5B );
  42. DEFINE_GUID( IID_IDirectDrawSurface7, 0x06675a80,0x3b9b,0x11d2,0xb9,0x2f,0x00,0x60,0x97,0x97,0xea,0x5b );
  43. DEFINE_GUID( IID_IDirectDrawPalette, 0x6C14DB84,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
  44. DEFINE_GUID( IID_IDirectDrawClipper, 0x6C14DB85,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
  45. DEFINE_GUID( IID_IDirectDrawColorControl,0x4B9F0EE0,0x0D7E,0x11D0,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8 );
  46. DEFINE_GUID( IID_IDirectDrawGammaControl,0x69C11C3E,0xB46B,0x11D1,0xAD,0x7A,0x00,0xC0,0x4F,0xC2,0x9B,0x4E );
  47. #endif
  48. typedef struct IDirectDraw IDirectDraw,*LPDIRECTDRAW;
  49. typedef struct IDirectDraw2 IDirectDraw2,*LPDIRECTDRAW2;
  50. typedef struct IDirectDraw4 IDirectDraw4,*LPDIRECTDRAW4;
  51. typedef struct IDirectDraw7 IDirectDraw7,*LPDIRECTDRAW7;
  52. typedef struct IDirectDrawClipper IDirectDrawClipper,*LPDIRECTDRAWCLIPPER;
  53. typedef struct IDirectDrawPalette IDirectDrawPalette,*LPDIRECTDRAWPALETTE;
  54. typedef struct IDirectDrawSurface IDirectDrawSurface,*LPDIRECTDRAWSURFACE;
  55. typedef struct IDirectDrawSurface2 IDirectDrawSurface2,*LPDIRECTDRAWSURFACE2;
  56. typedef struct IDirectDrawSurface3 IDirectDrawSurface3,*LPDIRECTDRAWSURFACE3;
  57. typedef struct IDirectDrawSurface4 IDirectDrawSurface4,*LPDIRECTDRAWSURFACE4;
  58. typedef struct IDirectDrawSurface7 IDirectDrawSurface7,*LPDIRECTDRAWSURFACE7;
  59. typedef struct IDirectDrawColorControl IDirectDrawColorControl,*LPDIRECTDRAWCOLORCONTROL;
  60. typedef struct IDirectDrawGammaControl IDirectDrawGammaControl,*LPDIRECTDRAWGAMMACONTROL;
  61. #define DDENUMRET_CANCEL 0
  62. #define DDENUMRET_OK 1
  63. #define DD_OK 0
  64. #define _FACDD 0x876
  65. #define MAKE_DDHRESULT( code ) MAKE_HRESULT( 1, _FACDD, code )
  66. #define DDERR_ALREADYINITIALIZED MAKE_DDHRESULT( 5 )
  67. #define DDERR_CANNOTATTACHSURFACE MAKE_DDHRESULT( 10 )
  68. #define DDERR_CANNOTDETACHSURFACE MAKE_DDHRESULT( 20 )
  69. #define DDERR_CURRENTLYNOTAVAIL MAKE_DDHRESULT( 40 )
  70. #define DDERR_EXCEPTION MAKE_DDHRESULT( 55 )
  71. #define DDERR_GENERIC E_FAIL
  72. #define DDERR_HEIGHTALIGN MAKE_DDHRESULT( 90 )
  73. #define DDERR_INCOMPATIBLEPRIMARY MAKE_DDHRESULT( 95 )
  74. #define DDERR_INVALIDCAPS MAKE_DDHRESULT( 100 )
  75. #define DDERR_INVALIDCLIPLIST MAKE_DDHRESULT( 110 )
  76. #define DDERR_INVALIDMODE MAKE_DDHRESULT( 120 )
  77. #define DDERR_INVALIDOBJECT MAKE_DDHRESULT( 130 )
  78. #define DDERR_INVALIDPARAMS E_INVALIDARG
  79. #define DDERR_INVALIDPIXELFORMAT MAKE_DDHRESULT( 145 )
  80. #define DDERR_INVALIDRECT MAKE_DDHRESULT( 150 )
  81. #define DDERR_LOCKEDSURFACES MAKE_DDHRESULT( 160 )
  82. #define DDERR_NO3D MAKE_DDHRESULT( 170 )
  83. #define DDERR_NOALPHAHW MAKE_DDHRESULT( 180 )
  84. #define DDERR_NOSTEREOHARDWARE MAKE_DDHRESULT( 181 )
  85. #define DDERR_NOSURFACELEFT MAKE_DDHRESULT( 182 )
  86. #define DDERR_NOCLIPLIST MAKE_DDHRESULT( 205 )
  87. #define DDERR_NOCOLORCONVHW MAKE_DDHRESULT( 210 )
  88. #define DDERR_NOCOOPERATIVELEVELSET MAKE_DDHRESULT( 212 )
  89. #define DDERR_NOCOLORKEY MAKE_DDHRESULT( 215 )
  90. #define DDERR_NOCOLORKEYHW MAKE_DDHRESULT( 220 )
  91. #define DDERR_NODIRECTDRAWSUPPORT MAKE_DDHRESULT( 222 )
  92. #define DDERR_NOEXCLUSIVEMODE MAKE_DDHRESULT( 225 )
  93. #define DDERR_NOFLIPHW MAKE_DDHRESULT( 230 )
  94. #define DDERR_NOGDI MAKE_DDHRESULT( 240 )
  95. #define DDERR_NOMIRRORHW MAKE_DDHRESULT( 250 )
  96. #define DDERR_NOTFOUND MAKE_DDHRESULT( 255 )
  97. #define DDERR_NOOVERLAYHW MAKE_DDHRESULT( 260 )
  98. #define DDERR_OVERLAPPINGRECTS MAKE_DDHRESULT( 270 )
  99. #define DDERR_NORASTEROPHW MAKE_DDHRESULT( 280 )
  100. #define DDERR_NOROTATIONHW MAKE_DDHRESULT( 290 )
  101. #define DDERR_NOSTRETCHHW MAKE_DDHRESULT( 310 )
  102. #define DDERR_NOT4BITCOLOR MAKE_DDHRESULT( 316 )
  103. #define DDERR_NOT4BITCOLORINDEX MAKE_DDHRESULT( 317 )
  104. #define DDERR_NOT8BITCOLOR MAKE_DDHRESULT( 320 )
  105. #define DDERR_NOTEXTUREHW MAKE_DDHRESULT( 330 )
  106. #define DDERR_NOVSYNCHW MAKE_DDHRESULT( 335 )
  107. #define DDERR_NOZBUFFERHW MAKE_DDHRESULT( 340 )
  108. #define DDERR_NOZOVERLAYHW MAKE_DDHRESULT( 350 )
  109. #define DDERR_OUTOFCAPS MAKE_DDHRESULT( 360 )
  110. #define DDERR_OUTOFMEMORY E_OUTOFMEMORY
  111. #define DDERR_OUTOFVIDEOMEMORY MAKE_DDHRESULT( 380 )
  112. #define DDERR_OVERLAYCANTCLIP MAKE_DDHRESULT( 382 )
  113. #define DDERR_OVERLAYCOLORKEYONLYONEACTIVE MAKE_DDHRESULT( 384 )
  114. #define DDERR_PALETTEBUSY MAKE_DDHRESULT( 387 )
  115. #define DDERR_COLORKEYNOTSET MAKE_DDHRESULT( 400 )
  116. #define DDERR_SURFACEALREADYATTACHED MAKE_DDHRESULT( 410 )
  117. #define DDERR_SURFACEALREADYDEPENDENT MAKE_DDHRESULT( 420 )
  118. #define DDERR_SURFACEBUSY MAKE_DDHRESULT( 430 )
  119. #define DDERR_CANTLOCKSURFACE MAKE_DDHRESULT( 435 )
  120. #define DDERR_SURFACEISOBSCURED MAKE_DDHRESULT( 440 )
  121. #define DDERR_SURFACELOST MAKE_DDHRESULT( 450 )
  122. #define DDERR_SURFACENOTATTACHED MAKE_DDHRESULT( 460 )
  123. #define DDERR_TOOBIGHEIGHT MAKE_DDHRESULT( 470 )
  124. #define DDERR_TOOBIGSIZE MAKE_DDHRESULT( 480 )
  125. #define DDERR_TOOBIGWIDTH MAKE_DDHRESULT( 490 )
  126. #define DDERR_UNSUPPORTED E_NOTIMPL
  127. #define DDERR_UNSUPPORTEDFORMAT MAKE_DDHRESULT( 510 )
  128. #define DDERR_UNSUPPORTEDMASK MAKE_DDHRESULT( 520 )
  129. #define DDERR_INVALIDSTREAM MAKE_DDHRESULT( 521 )
  130. #define DDERR_VERTICALBLANKINPROGRESS MAKE_DDHRESULT( 537 )
  131. #define DDERR_WASSTILLDRAWING MAKE_DDHRESULT( 540 )
  132. #define DDERR_DDSCAPSCOMPLEXREQUIRED MAKE_DDHRESULT( 542 )
  133. #define DDERR_XALIGN MAKE_DDHRESULT( 560 )
  134. #define DDERR_INVALIDDIRECTDRAWGUID MAKE_DDHRESULT( 561 )
  135. #define DDERR_DIRECTDRAWALREADYCREATED MAKE_DDHRESULT( 562 )
  136. #define DDERR_NODIRECTDRAWHW MAKE_DDHRESULT( 563 )
  137. #define DDERR_PRIMARYSURFACEALREADYEXISTS MAKE_DDHRESULT( 564 )
  138. #define DDERR_NOEMULATION MAKE_DDHRESULT( 565 )
  139. #define DDERR_REGIONTOOSMALL MAKE_DDHRESULT( 566 )
  140. #define DDERR_CLIPPERISUSINGHWND MAKE_DDHRESULT( 567 )
  141. #define DDERR_NOCLIPPERATTACHED MAKE_DDHRESULT( 568 )
  142. #define DDERR_NOHWND MAKE_DDHRESULT( 569 )
  143. #define DDERR_HWNDSUBCLASSED MAKE_DDHRESULT( 570 )
  144. #define DDERR_HWNDALREADYSET MAKE_DDHRESULT( 571 )
  145. #define DDERR_NOPALETTEATTACHED MAKE_DDHRESULT( 572 )
  146. #define DDERR_NOPALETTEHW MAKE_DDHRESULT( 573 )
  147. #define DDERR_BLTFASTCANTCLIP MAKE_DDHRESULT( 574 )
  148. #define DDERR_NOBLTHW MAKE_DDHRESULT( 575 )
  149. #define DDERR_NODDROPSHW MAKE_DDHRESULT( 576 )
  150. #define DDERR_OVERLAYNOTVISIBLE MAKE_DDHRESULT( 577 )
  151. #define DDERR_NOOVERLAYDEST MAKE_DDHRESULT( 578 )
  152. #define DDERR_INVALIDPOSITION MAKE_DDHRESULT( 579 )
  153. #define DDERR_NOTAOVERLAYSURFACE MAKE_DDHRESULT( 580 )
  154. #define DDERR_EXCLUSIVEMODEALREADYSET MAKE_DDHRESULT( 581 )
  155. #define DDERR_NOTFLIPPABLE MAKE_DDHRESULT( 582 )
  156. #define DDERR_CANTDUPLICATE MAKE_DDHRESULT( 583 )
  157. #define DDERR_NOTLOCKED MAKE_DDHRESULT( 584 )
  158. #define DDERR_CANTCREATEDC MAKE_DDHRESULT( 585 )
  159. #define DDERR_NODC MAKE_DDHRESULT( 586 )
  160. #define DDERR_WRONGMODE MAKE_DDHRESULT( 587 )
  161. #define DDERR_IMPLICITLYCREATED MAKE_DDHRESULT( 588 )
  162. #define DDERR_NOTPALETTIZED MAKE_DDHRESULT( 589 )
  163. #define DDERR_UNSUPPORTEDMODE MAKE_DDHRESULT( 590 )
  164. #define DDERR_NOMIPMAPHW MAKE_DDHRESULT( 591 )
  165. #define DDERR_INVALIDSURFACETYPE MAKE_DDHRESULT( 592 )
  166. #define DDERR_NOOPTIMIZEHW MAKE_DDHRESULT( 600 )
  167. #define DDERR_NOTLOADED MAKE_DDHRESULT( 601 )
  168. #define DDERR_NOFOCUSWINDOW MAKE_DDHRESULT( 602 )
  169. #define DDERR_NOTONMIPMAPSUBLEVEL MAKE_DDHRESULT( 603 )
  170. #define DDERR_DCALREADYCREATED MAKE_DDHRESULT( 620 )
  171. #define DDERR_NONONLOCALVIDMEM MAKE_DDHRESULT( 630 )
  172. #define DDERR_CANTPAGELOCK MAKE_DDHRESULT( 640 )
  173. #define DDERR_CANTPAGEUNLOCK MAKE_DDHRESULT( 660 )
  174. #define DDERR_NOTPAGELOCKED MAKE_DDHRESULT( 680 )
  175. #define DDERR_MOREDATA MAKE_DDHRESULT( 690 )
  176. #define DDERR_EXPIRED MAKE_DDHRESULT( 691 )
  177. #define DDERR_TESTFINISHED MAKE_DDHRESULT( 692 )
  178. #define DDERR_NEWMODE MAKE_DDHRESULT( 693 )
  179. #define DDERR_D3DNOTINITIALIZED MAKE_DDHRESULT( 694 )
  180. #define DDERR_VIDEONOTACTIVE MAKE_DDHRESULT( 695 )
  181. #define DDERR_NOMONITORINFORMATION MAKE_DDHRESULT( 696 )
  182. #define DDERR_NODRIVERSUPPORT MAKE_DDHRESULT( 697 )
  183. #define DDERR_DEVICEDOESNTOWNSURFACE MAKE_DDHRESULT( 699 )
  184. #define DDERR_NOTINITIALIZED CO_E_NOTINITIALIZED
  185. /* dwFlags for Blt* */
  186. #define DDBLT_ALPHADEST 0x00000001
  187. #define DDBLT_ALPHADESTCONSTOVERRIDE 0x00000002
  188. #define DDBLT_ALPHADESTNEG 0x00000004
  189. #define DDBLT_ALPHADESTSURFACEOVERRIDE 0x00000008
  190. #define DDBLT_ALPHAEDGEBLEND 0x00000010
  191. #define DDBLT_ALPHASRC 0x00000020
  192. #define DDBLT_ALPHASRCCONSTOVERRIDE 0x00000040
  193. #define DDBLT_ALPHASRCNEG 0x00000080
  194. #define DDBLT_ALPHASRCSURFACEOVERRIDE 0x00000100
  195. #define DDBLT_ASYNC 0x00000200
  196. #define DDBLT_COLORFILL 0x00000400
  197. #define DDBLT_DDFX 0x00000800
  198. #define DDBLT_DDROPS 0x00001000
  199. #define DDBLT_KEYDEST 0x00002000
  200. #define DDBLT_KEYDESTOVERRIDE 0x00004000
  201. #define DDBLT_KEYSRC 0x00008000
  202. #define DDBLT_KEYSRCOVERRIDE 0x00010000
  203. #define DDBLT_ROP 0x00020000
  204. #define DDBLT_ROTATIONANGLE 0x00040000
  205. #define DDBLT_ZBUFFER 0x00080000
  206. #define DDBLT_ZBUFFERDESTCONSTOVERRIDE 0x00100000
  207. #define DDBLT_ZBUFFERDESTOVERRIDE 0x00200000
  208. #define DDBLT_ZBUFFERSRCCONSTOVERRIDE 0x00400000
  209. #define DDBLT_ZBUFFERSRCOVERRIDE 0x00800000
  210. #define DDBLT_WAIT 0x01000000
  211. #define DDBLT_DEPTHFILL 0x02000000
  212. #define DDBLT_DONOTWAIT 0x08000000
  213. /* dwTrans for BltFast */
  214. #define DDBLTFAST_NOCOLORKEY 0x00000000
  215. #define DDBLTFAST_SRCCOLORKEY 0x00000001
  216. #define DDBLTFAST_DESTCOLORKEY 0x00000002
  217. #define DDBLTFAST_WAIT 0x00000010
  218. #define DDBLTFAST_DONOTWAIT 0x00000020
  219. /* dwFlags for Flip */
  220. #define DDFLIP_WAIT 0x00000001
  221. #define DDFLIP_EVEN 0x00000002 /* only valid for overlay */
  222. #define DDFLIP_ODD 0x00000004 /* only valid for overlay */
  223. #define DDFLIP_NOVSYNC 0x00000008
  224. #define DDFLIP_STEREO 0x00000010
  225. #define DDFLIP_DONOTWAIT 0x00000020
  226. /* dwFlags for GetBltStatus */
  227. #define DDGBS_CANBLT 0x00000001
  228. #define DDGBS_ISBLTDONE 0x00000002
  229. /* dwFlags for IDirectDrawSurface7::GetFlipStatus */
  230. #define DDGFS_CANFLIP 1L
  231. #define DDGFS_ISFLIPDONE 2L
  232. /* dwFlags for IDirectDrawSurface7::SetPrivateData */
  233. #define DDSPD_IUNKNOWNPTR 1L
  234. #define DDSPD_VOLATILE 2L
  235. /* DDSCAPS.dwCaps */
  236. /* reserved1, was 3d capable */
  237. #define DDSCAPS_RESERVED1 0x00000001
  238. /* surface contains alpha information */
  239. #define DDSCAPS_ALPHA 0x00000002
  240. /* this surface is a backbuffer */
  241. #define DDSCAPS_BACKBUFFER 0x00000004
  242. /* complex surface structure */
  243. #define DDSCAPS_COMPLEX 0x00000008
  244. /* part of surface flipping structure */
  245. #define DDSCAPS_FLIP 0x00000010
  246. /* this surface is the frontbuffer surface */
  247. #define DDSCAPS_FRONTBUFFER 0x00000020
  248. /* this is a plain offscreen surface */
  249. #define DDSCAPS_OFFSCREENPLAIN 0x00000040
  250. /* overlay */
  251. #define DDSCAPS_OVERLAY 0x00000080
  252. /* palette objects can be created and attached to us */
  253. #define DDSCAPS_PALETTE 0x00000100
  254. /* primary surface (the one the user looks at currently)(right eye)*/
  255. #define DDSCAPS_PRIMARYSURFACE 0x00000200
  256. /* primary surface for left eye */
  257. #define DDSCAPS_PRIMARYSURFACELEFT 0x00000400
  258. /* surface exists in systemmemory */
  259. #define DDSCAPS_SYSTEMMEMORY 0x00000800
  260. /* surface can be used as a texture */
  261. #define DDSCAPS_TEXTURE 0x00001000
  262. /* surface may be destination for 3d rendering */
  263. #define DDSCAPS_3DDEVICE 0x00002000
  264. /* surface exists in videomemory */
  265. #define DDSCAPS_VIDEOMEMORY 0x00004000
  266. /* surface changes immediately visible */
  267. #define DDSCAPS_VISIBLE 0x00008000
  268. /* write only surface */
  269. #define DDSCAPS_WRITEONLY 0x00010000
  270. /* zbuffer surface */
  271. #define DDSCAPS_ZBUFFER 0x00020000
  272. /* has its own DC */
  273. #define DDSCAPS_OWNDC 0x00040000
  274. /* surface should be able to receive live video */
  275. #define DDSCAPS_LIVEVIDEO 0x00080000
  276. /* should be able to have a hw codec decompress stuff into it */
  277. #define DDSCAPS_HWCODEC 0x00100000
  278. /* mode X (320x200 or 320x240) surface */
  279. #define DDSCAPS_MODEX 0x00200000
  280. /* one mipmap surface (1 level) */
  281. #define DDSCAPS_MIPMAP 0x00400000
  282. #define DDSCAPS_RESERVED2 0x00800000
  283. /* memory allocation delayed until Load() */
  284. #define DDSCAPS_ALLOCONLOAD 0x04000000
  285. /* Indicates that the surface will receive data from a video port */
  286. #define DDSCAPS_VIDEOPORT 0x08000000
  287. /* surface is in local videomemory */
  288. #define DDSCAPS_LOCALVIDMEM 0x10000000
  289. /* surface is in nonlocal videomemory */
  290. #define DDSCAPS_NONLOCALVIDMEM 0x20000000
  291. /* surface is a standard VGA mode surface (NOT ModeX) */
  292. #define DDSCAPS_STANDARDVGAMODE 0x40000000
  293. /* optimized? surface */
  294. #define DDSCAPS_OPTIMIZED 0x80000000
  295. typedef struct _DDSCAPS {
  296. DWORD dwCaps; /* capabilities of surface wanted */
  297. } DDSCAPS,*LPDDSCAPS;
  298. /* DDSCAPS2.dwCaps2 */
  299. /* indicates the surface will receive data from a video port using
  300. deinterlacing hardware. */
  301. #define DDSCAPS2_HARDWAREDEINTERLACE 0x00000002
  302. /* indicates the surface will be locked very frequently. */
  303. #define DDSCAPS2_HINTDYNAMIC 0x00000004
  304. /* indicates surface can be re-ordered or retiled on load() */
  305. #define DDSCAPS2_HINTSTATIC 0x00000008
  306. /* indicates surface to be managed by directdraw/direct3D */
  307. #define DDSCAPS2_TEXTUREMANAGE 0x00000010
  308. /* reserved bits */
  309. #define DDSCAPS2_RESERVED1 0x00000020
  310. #define DDSCAPS2_RESERVED2 0x00000040
  311. /* indicates surface will never be locked again */
  312. #define DDSCAPS2_OPAQUE 0x00000080
  313. /* set at CreateSurface() time to indicate antialising will be used */
  314. #define DDSCAPS2_HINTANTIALIASING 0x00000100
  315. /* set at CreateSurface() time to indicate cubic environment map */
  316. #define DDSCAPS2_CUBEMAP 0x00000200
  317. /* face flags for cube maps */
  318. #define DDSCAPS2_CUBEMAP_POSITIVEX 0x00000400
  319. #define DDSCAPS2_CUBEMAP_NEGATIVEX 0x00000800
  320. #define DDSCAPS2_CUBEMAP_POSITIVEY 0x00001000
  321. #define DDSCAPS2_CUBEMAP_NEGATIVEY 0x00002000
  322. #define DDSCAPS2_CUBEMAP_POSITIVEZ 0x00004000
  323. #define DDSCAPS2_CUBEMAP_NEGATIVEZ 0x00008000
  324. /* specifies all faces of a cube for CreateSurface() */
  325. #define DDSCAPS2_CUBEMAP_ALLFACES ( DDSCAPS2_CUBEMAP_POSITIVEX |\
  326. DDSCAPS2_CUBEMAP_NEGATIVEX |\
  327. DDSCAPS2_CUBEMAP_POSITIVEY |\
  328. DDSCAPS2_CUBEMAP_NEGATIVEY |\
  329. DDSCAPS2_CUBEMAP_POSITIVEZ |\
  330. DDSCAPS2_CUBEMAP_NEGATIVEZ )
  331. /* set for mipmap sublevels on DirectX7 and later. ignored by CreateSurface() */
  332. #define DDSCAPS2_MIPMAPSUBLEVEL 0x00010000
  333. /* indicates texture surface to be managed by Direct3D *only* */
  334. #define DDSCAPS2_D3DTEXTUREMANAGE 0x00020000
  335. /* indicates managed surface that can safely be lost */
  336. #define DDSCAPS2_DONOTPERSIST 0x00040000
  337. /* indicates surface is part of a stereo flipping chain */
  338. #define DDSCAPS2_STEREOSURFACELEFT 0x00080000
  339. typedef struct _DDSCAPS2 {
  340. DWORD dwCaps; /* capabilities of surface wanted */
  341. DWORD dwCaps2; /* additional capabilities */
  342. DWORD dwCaps3; /* reserved capabilities */
  343. DWORD dwCaps4; /* more reserved capabilities */
  344. } DDSCAPS2,*LPDDSCAPS2;
  345. #define DD_ROP_SPACE (256/32) /* space required to store ROP array */
  346. typedef struct _DDCAPS_DX7 /* DirectX 7 version of caps struct */
  347. {
  348. DWORD dwSize; /* size of the DDDRIVERCAPS structure */
  349. DWORD dwCaps; /* driver specific capabilities */
  350. DWORD dwCaps2; /* more driver specific capabilites */
  351. DWORD dwCKeyCaps; /* color key capabilities of the surface */
  352. DWORD dwFXCaps; /* driver specific stretching and effects capabilites */
  353. DWORD dwFXAlphaCaps; /* alpha driver specific capabilities */
  354. DWORD dwPalCaps; /* palette capabilities */
  355. DWORD dwSVCaps; /* stereo vision capabilities */
  356. DWORD dwAlphaBltConstBitDepths; /* DDBD_2,4,8 */
  357. DWORD dwAlphaBltPixelBitDepths; /* DDBD_1,2,4,8 */
  358. DWORD dwAlphaBltSurfaceBitDepths; /* DDBD_1,2,4,8 */
  359. DWORD dwAlphaOverlayConstBitDepths; /* DDBD_2,4,8 */
  360. DWORD dwAlphaOverlayPixelBitDepths; /* DDBD_1,2,4,8 */
  361. DWORD dwAlphaOverlaySurfaceBitDepths; /* DDBD_1,2,4,8 */
  362. DWORD dwZBufferBitDepths; /* DDBD_8,16,24,32 */
  363. DWORD dwVidMemTotal; /* total amount of video memory */
  364. DWORD dwVidMemFree; /* amount of free video memory */
  365. DWORD dwMaxVisibleOverlays; /* maximum number of visible overlays */
  366. DWORD dwCurrVisibleOverlays; /* current number of visible overlays */
  367. DWORD dwNumFourCCCodes; /* number of four cc codes */
  368. DWORD dwAlignBoundarySrc; /* source rectangle alignment */
  369. DWORD dwAlignSizeSrc; /* source rectangle byte size */
  370. DWORD dwAlignBoundaryDest; /* dest rectangle alignment */
  371. DWORD dwAlignSizeDest; /* dest rectangle byte size */
  372. DWORD dwAlignStrideAlign; /* stride alignment */
  373. DWORD dwRops[DD_ROP_SPACE]; /* ROPS supported */
  374. DDSCAPS ddsOldCaps; /* old DDSCAPS - superseded for DirectX6+ */
  375. DWORD dwMinOverlayStretch; /* minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
  376. DWORD dwMaxOverlayStretch; /* maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
  377. DWORD dwMinLiveVideoStretch; /* minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
  378. DWORD dwMaxLiveVideoStretch; /* maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
  379. DWORD dwMinHwCodecStretch; /* minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
  380. DWORD dwMaxHwCodecStretch; /* maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
  381. DWORD dwReserved1;
  382. DWORD dwReserved2;
  383. DWORD dwReserved3;
  384. DWORD dwSVBCaps; /* driver specific capabilities for System->Vmem blts */
  385. DWORD dwSVBCKeyCaps; /* driver color key capabilities for System->Vmem blts */
  386. DWORD dwSVBFXCaps; /* driver FX capabilities for System->Vmem blts */
  387. DWORD dwSVBRops[DD_ROP_SPACE];/* ROPS supported for System->Vmem blts */
  388. DWORD dwVSBCaps; /* driver specific capabilities for Vmem->System blts */
  389. DWORD dwVSBCKeyCaps; /* driver color key capabilities for Vmem->System blts */
  390. DWORD dwVSBFXCaps; /* driver FX capabilities for Vmem->System blts */
  391. DWORD dwVSBRops[DD_ROP_SPACE];/* ROPS supported for Vmem->System blts */
  392. DWORD dwSSBCaps; /* driver specific capabilities for System->System blts */
  393. DWORD dwSSBCKeyCaps; /* driver color key capabilities for System->System blts */
  394. DWORD dwSSBFXCaps; /* driver FX capabilities for System->System blts */
  395. DWORD dwSSBRops[DD_ROP_SPACE];/* ROPS supported for System->System blts */
  396. DWORD dwMaxVideoPorts; /* maximum number of usable video ports */
  397. DWORD dwCurrVideoPorts; /* current number of video ports used */
  398. DWORD dwSVBCaps2; /* more driver specific capabilities for System->Vmem blts */
  399. DWORD dwNLVBCaps; /* driver specific capabilities for non-local->local vidmem blts */
  400. DWORD dwNLVBCaps2; /* more driver specific capabilities non-local->local vidmem blts */
  401. DWORD dwNLVBCKeyCaps; /* driver color key capabilities for non-local->local vidmem blts */
  402. DWORD dwNLVBFXCaps; /* driver FX capabilities for non-local->local blts */
  403. DWORD dwNLVBRops[DD_ROP_SPACE]; /* ROPS supported for non-local->local blts */
  404. DDSCAPS2 ddsCaps; /* surface capabilities */
  405. } DDCAPS_DX7,*LPDDCAPS_DX7;
  406. typedef struct _DDCAPS_DX6 /* DirectX 6 version of caps struct */
  407. {
  408. DWORD dwSize; /* size of the DDDRIVERCAPS structure */
  409. DWORD dwCaps; /* driver specific capabilities */
  410. DWORD dwCaps2; /* more driver specific capabilites */
  411. DWORD dwCKeyCaps; /* color key capabilities of the surface */
  412. DWORD dwFXCaps; /* driver specific stretching and effects capabilites */
  413. DWORD dwFXAlphaCaps; /* alpha driver specific capabilities */
  414. DWORD dwPalCaps; /* palette capabilities */
  415. DWORD dwSVCaps; /* stereo vision capabilities */
  416. DWORD dwAlphaBltConstBitDepths; /* DDBD_2,4,8 */
  417. DWORD dwAlphaBltPixelBitDepths; /* DDBD_1,2,4,8 */
  418. DWORD dwAlphaBltSurfaceBitDepths; /* DDBD_1,2,4,8 */
  419. DWORD dwAlphaOverlayConstBitDepths; /* DDBD_2,4,8 */
  420. DWORD dwAlphaOverlayPixelBitDepths; /* DDBD_1,2,4,8 */
  421. DWORD dwAlphaOverlaySurfaceBitDepths; /* DDBD_1,2,4,8 */
  422. DWORD dwZBufferBitDepths; /* DDBD_8,16,24,32 */
  423. DWORD dwVidMemTotal; /* total amount of video memory */
  424. DWORD dwVidMemFree; /* amount of free video memory */
  425. DWORD dwMaxVisibleOverlays; /* maximum number of visible overlays */
  426. DWORD dwCurrVisibleOverlays; /* current number of visible overlays */
  427. DWORD dwNumFourCCCodes; /* number of four cc codes */
  428. DWORD dwAlignBoundarySrc; /* source rectangle alignment */
  429. DWORD dwAlignSizeSrc; /* source rectangle byte size */
  430. DWORD dwAlignBoundaryDest; /* dest rectangle alignment */
  431. DWORD dwAlignSizeDest; /* dest rectangle byte size */
  432. DWORD dwAlignStrideAlign; /* stride alignment */
  433. DWORD dwRops[DD_ROP_SPACE]; /* ROPS supported */
  434. DDSCAPS ddsOldCaps; /* old DDSCAPS - superseded for DirectX6+ */
  435. DWORD dwMinOverlayStretch; /* minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
  436. DWORD dwMaxOverlayStretch; /* maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
  437. DWORD dwMinLiveVideoStretch; /* minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
  438. DWORD dwMaxLiveVideoStretch; /* maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
  439. DWORD dwMinHwCodecStretch; /* minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
  440. DWORD dwMaxHwCodecStretch; /* maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
  441. DWORD dwReserved1;
  442. DWORD dwReserved2;
  443. DWORD dwReserved3;
  444. DWORD dwSVBCaps; /* driver specific capabilities for System->Vmem blts */
  445. DWORD dwSVBCKeyCaps; /* driver color key capabilities for System->Vmem blts */
  446. DWORD dwSVBFXCaps; /* driver FX capabilities for System->Vmem blts */
  447. DWORD dwSVBRops[DD_ROP_SPACE];/* ROPS supported for System->Vmem blts */
  448. DWORD dwVSBCaps; /* driver specific capabilities for Vmem->System blts */
  449. DWORD dwVSBCKeyCaps; /* driver color key capabilities for Vmem->System blts */
  450. DWORD dwVSBFXCaps; /* driver FX capabilities for Vmem->System blts */
  451. DWORD dwVSBRops[DD_ROP_SPACE];/* ROPS supported for Vmem->System blts */
  452. DWORD dwSSBCaps; /* driver specific capabilities for System->System blts */
  453. DWORD dwSSBCKeyCaps; /* driver color key capabilities for System->System blts */
  454. DWORD dwSSBFXCaps; /* driver FX capabilities for System->System blts */
  455. DWORD dwSSBRops[DD_ROP_SPACE];/* ROPS supported for System->System blts */
  456. DWORD dwMaxVideoPorts; /* maximum number of usable video ports */
  457. DWORD dwCurrVideoPorts; /* current number of video ports used */
  458. DWORD dwSVBCaps2; /* more driver specific capabilities for System->Vmem blts */
  459. DWORD dwNLVBCaps; /* driver specific capabilities for non-local->local vidmem blts */
  460. DWORD dwNLVBCaps2; /* more driver specific capabilities non-local->local vidmem blts */
  461. DWORD dwNLVBCKeyCaps; /* driver color key capabilities for non-local->local vidmem blts */
  462. DWORD dwNLVBFXCaps; /* driver FX capabilities for non-local->local blts */
  463. DWORD dwNLVBRops[DD_ROP_SPACE]; /* ROPS supported for non-local->local blts */
  464. /* and one new member for DirectX 6 */
  465. DDSCAPS2 ddsCaps; /* surface capabilities */
  466. } DDCAPS_DX6,*LPDDCAPS_DX6;
  467. typedef struct _DDCAPS_DX5 /* DirectX5 version of caps struct */
  468. {
  469. DWORD dwSize; /* size of the DDDRIVERCAPS structure */
  470. DWORD dwCaps; /* driver specific capabilities */
  471. DWORD dwCaps2; /* more driver specific capabilites */
  472. DWORD dwCKeyCaps; /* color key capabilities of the surface */
  473. DWORD dwFXCaps; /* driver specific stretching and effects capabilites */
  474. DWORD dwFXAlphaCaps; /* alpha driver specific capabilities */
  475. DWORD dwPalCaps; /* palette capabilities */
  476. DWORD dwSVCaps; /* stereo vision capabilities */
  477. DWORD dwAlphaBltConstBitDepths; /* DDBD_2,4,8 */
  478. DWORD dwAlphaBltPixelBitDepths; /* DDBD_1,2,4,8 */
  479. DWORD dwAlphaBltSurfaceBitDepths; /* DDBD_1,2,4,8 */
  480. DWORD dwAlphaOverlayConstBitDepths; /* DDBD_2,4,8 */
  481. DWORD dwAlphaOverlayPixelBitDepths; /* DDBD_1,2,4,8 */
  482. DWORD dwAlphaOverlaySurfaceBitDepths; /* DDBD_1,2,4,8 */
  483. DWORD dwZBufferBitDepths; /* DDBD_8,16,24,32 */
  484. DWORD dwVidMemTotal; /* total amount of video memory */
  485. DWORD dwVidMemFree; /* amount of free video memory */
  486. DWORD dwMaxVisibleOverlays; /* maximum number of visible overlays */
  487. DWORD dwCurrVisibleOverlays; /* current number of visible overlays */
  488. DWORD dwNumFourCCCodes; /* number of four cc codes */
  489. DWORD dwAlignBoundarySrc; /* source rectangle alignment */
  490. DWORD dwAlignSizeSrc; /* source rectangle byte size */
  491. DWORD dwAlignBoundaryDest; /* dest rectangle alignment */
  492. DWORD dwAlignSizeDest; /* dest rectangle byte size */
  493. DWORD dwAlignStrideAlign; /* stride alignment */
  494. DWORD dwRops[DD_ROP_SPACE]; /* ROPS supported */
  495. DDSCAPS ddsCaps; /* DDSCAPS structure has all the general capabilities */
  496. DWORD dwMinOverlayStretch; /* minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
  497. DWORD dwMaxOverlayStretch; /* maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
  498. DWORD dwMinLiveVideoStretch; /* minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
  499. DWORD dwMaxLiveVideoStretch; /* maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
  500. DWORD dwMinHwCodecStretch; /* minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
  501. DWORD dwMaxHwCodecStretch; /* maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
  502. DWORD dwReserved1;
  503. DWORD dwReserved2;
  504. DWORD dwReserved3;
  505. DWORD dwSVBCaps; /* driver specific capabilities for System->Vmem blts */
  506. DWORD dwSVBCKeyCaps; /* driver color key capabilities for System->Vmem blts */
  507. DWORD dwSVBFXCaps; /* driver FX capabilities for System->Vmem blts */
  508. DWORD dwSVBRops[DD_ROP_SPACE];/* ROPS supported for System->Vmem blts */
  509. DWORD dwVSBCaps; /* driver specific capabilities for Vmem->System blts */
  510. DWORD dwVSBCKeyCaps; /* driver color key capabilities for Vmem->System blts */
  511. DWORD dwVSBFXCaps; /* driver FX capabilities for Vmem->System blts */
  512. DWORD dwVSBRops[DD_ROP_SPACE];/* ROPS supported for Vmem->System blts */
  513. DWORD dwSSBCaps; /* driver specific capabilities for System->System blts */
  514. DWORD dwSSBCKeyCaps; /* driver color key capabilities for System->System blts */
  515. DWORD dwSSBFXCaps; /* driver FX capabilities for System->System blts */
  516. DWORD dwSSBRops[DD_ROP_SPACE];/* ROPS supported for System->System blts */
  517. /* the following are the new DirectX 5 members */
  518. DWORD dwMaxVideoPorts; /* maximum number of usable video ports */
  519. DWORD dwCurrVideoPorts; /* current number of video ports used */
  520. DWORD dwSVBCaps2; /* more driver specific capabilities for System->Vmem blts */
  521. DWORD dwNLVBCaps; /* driver specific capabilities for non-local->local vidmem blts */
  522. DWORD dwNLVBCaps2; /* more driver specific capabilities non-local->local vidmem blts */
  523. DWORD dwNLVBCKeyCaps; /* driver color key capabilities for non-local->local vidmem blts */
  524. DWORD dwNLVBFXCaps; /* driver FX capabilities for non-local->local blts */
  525. DWORD dwNLVBRops[DD_ROP_SPACE]; /* ROPS supported for non-local->local blts */
  526. } DDCAPS_DX5,*LPDDCAPS_DX5;
  527. typedef struct _DDCAPS_DX3 /* DirectX3 version of caps struct */
  528. {
  529. DWORD dwSize; /* size of the DDDRIVERCAPS structure */
  530. DWORD dwCaps; /* driver specific capabilities */
  531. DWORD dwCaps2; /* more driver specific capabilites */
  532. DWORD dwCKeyCaps; /* color key capabilities of the surface */
  533. DWORD dwFXCaps; /* driver specific stretching and effects capabilites */
  534. DWORD dwFXAlphaCaps; /* alpha driver specific capabilities */
  535. DWORD dwPalCaps; /* palette capabilities */
  536. DWORD dwSVCaps; /* stereo vision capabilities */
  537. DWORD dwAlphaBltConstBitDepths; /* DDBD_2,4,8 */
  538. DWORD dwAlphaBltPixelBitDepths; /* DDBD_1,2,4,8 */
  539. DWORD dwAlphaBltSurfaceBitDepths; /* DDBD_1,2,4,8 */
  540. DWORD dwAlphaOverlayConstBitDepths; /* DDBD_2,4,8 */
  541. DWORD dwAlphaOverlayPixelBitDepths; /* DDBD_1,2,4,8 */
  542. DWORD dwAlphaOverlaySurfaceBitDepths; /* DDBD_1,2,4,8 */
  543. DWORD dwZBufferBitDepths; /* DDBD_8,16,24,32 */
  544. DWORD dwVidMemTotal; /* total amount of video memory */
  545. DWORD dwVidMemFree; /* amount of free video memory */
  546. DWORD dwMaxVisibleOverlays; /* maximum number of visible overlays */
  547. DWORD dwCurrVisibleOverlays; /* current number of visible overlays */
  548. DWORD dwNumFourCCCodes; /* number of four cc codes */
  549. DWORD dwAlignBoundarySrc; /* source rectangle alignment */
  550. DWORD dwAlignSizeSrc; /* source rectangle byte size */
  551. DWORD dwAlignBoundaryDest; /* dest rectangle alignment */
  552. DWORD dwAlignSizeDest; /* dest rectangle byte size */
  553. DWORD dwAlignStrideAlign; /* stride alignment */
  554. DWORD dwRops[DD_ROP_SPACE]; /* ROPS supported */
  555. DDSCAPS ddsCaps; /* DDSCAPS structure has all the general capabilities */
  556. DWORD dwMinOverlayStretch; /* minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
  557. DWORD dwMaxOverlayStretch; /* maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
  558. DWORD dwMinLiveVideoStretch; /* minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
  559. DWORD dwMaxLiveVideoStretch; /* maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
  560. DWORD dwMinHwCodecStretch; /* minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
  561. DWORD dwMaxHwCodecStretch; /* maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
  562. DWORD dwReserved1;
  563. DWORD dwReserved2;
  564. DWORD dwReserved3;
  565. DWORD dwSVBCaps; /* driver specific capabilities for System->Vmem blts */
  566. DWORD dwSVBCKeyCaps; /* driver color key capabilities for System->Vmem blts */
  567. DWORD dwSVBFXCaps; /* driver FX capabilities for System->Vmem blts */
  568. DWORD dwSVBRops[DD_ROP_SPACE];/* ROPS supported for System->Vmem blts */
  569. DWORD dwVSBCaps; /* driver specific capabilities for Vmem->System blts */
  570. DWORD dwVSBCKeyCaps; /* driver color key capabilities for Vmem->System blts */
  571. DWORD dwVSBFXCaps; /* driver FX capabilities for Vmem->System blts */
  572. DWORD dwVSBRops[DD_ROP_SPACE];/* ROPS supported for Vmem->System blts */
  573. DWORD dwSSBCaps; /* driver specific capabilities for System->System blts */
  574. DWORD dwSSBCKeyCaps; /* driver color key capabilities for System->System blts */
  575. DWORD dwSSBFXCaps; /* driver FX capabilities for System->System blts */
  576. DWORD dwSSBRops[DD_ROP_SPACE];/* ROPS supported for System->System blts */
  577. DWORD dwReserved4;
  578. DWORD dwReserved5;
  579. DWORD dwReserved6;
  580. } DDCAPS_DX3,*LPDDCAPS_DX3;
  581. /* set caps struct according to DIRECTDRAW_VERSION */
  582. #if DIRECTDRAW_VERSION <= 0x300
  583. typedef DDCAPS_DX3 DDCAPS;
  584. #elif DIRECTDRAW_VERSION <= 0x500
  585. typedef DDCAPS_DX5 DDCAPS;
  586. #elif DIRECTDRAW_VERSION <= 0x600
  587. typedef DDCAPS_DX6 DDCAPS;
  588. #else
  589. typedef DDCAPS_DX7 DDCAPS;
  590. #endif
  591. typedef DDCAPS *LPDDCAPS;
  592. /* DDCAPS.dwCaps */
  593. #define DDCAPS_3D 0x00000001
  594. #define DDCAPS_ALIGNBOUNDARYDEST 0x00000002
  595. #define DDCAPS_ALIGNSIZEDEST 0x00000004
  596. #define DDCAPS_ALIGNBOUNDARYSRC 0x00000008
  597. #define DDCAPS_ALIGNSIZESRC 0x00000010
  598. #define DDCAPS_ALIGNSTRIDE 0x00000020
  599. #define DDCAPS_BLT 0x00000040
  600. #define DDCAPS_BLTQUEUE 0x00000080
  601. #define DDCAPS_BLTFOURCC 0x00000100
  602. #define DDCAPS_BLTSTRETCH 0x00000200
  603. #define DDCAPS_GDI 0x00000400
  604. #define DDCAPS_OVERLAY 0x00000800
  605. #define DDCAPS_OVERLAYCANTCLIP 0x00001000
  606. #define DDCAPS_OVERLAYFOURCC 0x00002000
  607. #define DDCAPS_OVERLAYSTRETCH 0x00004000
  608. #define DDCAPS_PALETTE 0x00008000
  609. #define DDCAPS_PALETTEVSYNC 0x00010000
  610. #define DDCAPS_READSCANLINE 0x00020000
  611. #define DDCAPS_STEREOVIEW 0x00040000
  612. #define DDCAPS_VBI 0x00080000
  613. #define DDCAPS_ZBLTS 0x00100000
  614. #define DDCAPS_ZOVERLAYS 0x00200000
  615. #define DDCAPS_COLORKEY 0x00400000
  616. #define DDCAPS_ALPHA 0x00800000
  617. #define DDCAPS_COLORKEYHWASSIST 0x01000000
  618. #define DDCAPS_NOHARDWARE 0x02000000
  619. #define DDCAPS_BLTCOLORFILL 0x04000000
  620. #define DDCAPS_BANKSWITCHED 0x08000000
  621. #define DDCAPS_BLTDEPTHFILL 0x10000000
  622. #define DDCAPS_CANCLIP 0x20000000
  623. #define DDCAPS_CANCLIPSTRETCHED 0x40000000
  624. #define DDCAPS_CANBLTSYSMEM 0x80000000
  625. /* DDCAPS.dwCaps2 */
  626. #define DDCAPS2_CERTIFIED 0x00000001
  627. #define DDCAPS2_NO2DDURING3DSCENE 0x00000002
  628. #define DDCAPS2_VIDEOPORT 0x00000004
  629. #define DDCAPS2_AUTOFLIPOVERLAY 0x00000008
  630. #define DDCAPS2_CANBOBINTERLEAVED 0x00000010
  631. #define DDCAPS2_CANBOBNONINTERLEAVED 0x00000020
  632. #define DDCAPS2_COLORCONTROLOVERLAY 0x00000040
  633. #define DDCAPS2_COLORCONTROLPRIMARY 0x00000080
  634. #define DDCAPS2_CANDROPZ16BIT 0x00000100
  635. #define DDCAPS2_NONLOCALVIDMEM 0x00000200
  636. #define DDCAPS2_NONLOCALVIDMEMCAPS 0x00000400
  637. #define DDCAPS2_NOPAGELOCKREQUIRED 0x00000800
  638. #define DDCAPS2_WIDESURFACES 0x00001000
  639. #define DDCAPS2_CANFLIPODDEVEN 0x00002000
  640. #define DDCAPS2_CANBOBHARDWARE 0x00004000
  641. #define DDCAPS2_COPYFOURCC 0x00008000
  642. #define DDCAPS2_PRIMARYGAMMA 0x00020000
  643. #define DDCAPS2_CANRENDERWINDOWED 0x00080000
  644. #define DDCAPS2_CANCALIBRATEGAMMA 0x00100000
  645. #define DDCAPS2_FLIPINTERVAL 0x00200000
  646. #define DDCAPS2_FLIPNOVSYNC 0x00400000
  647. #define DDCAPS2_CANMANAGETEXTURE 0x00800000
  648. #define DDCAPS2_TEXMANINNONLOCALVIDMEM 0x01000000
  649. #define DDCAPS2_STEREO 0x02000000
  650. #define DDCAPS2_SYSTONONLOCAL_AS_SYSTOLOCAL 0x04000000
  651. /* Set/Get Colour Key Flags */
  652. #define DDCKEY_COLORSPACE 0x00000001 /* Struct is single colour space */
  653. #define DDCKEY_DESTBLT 0x00000002 /* To be used as dest for blt */
  654. #define DDCKEY_DESTOVERLAY 0x00000004 /* To be used as dest for CK overlays */
  655. #define DDCKEY_SRCBLT 0x00000008 /* To be used as src for blt */
  656. #define DDCKEY_SRCOVERLAY 0x00000010 /* To be used as src for CK overlays */
  657. typedef struct _DDCOLORKEY
  658. {
  659. DWORD dwColorSpaceLowValue;/* low boundary of color space that is to
  660. * be treated as Color Key, inclusive
  661. */
  662. DWORD dwColorSpaceHighValue;/* high boundary of color space that is
  663. * to be treated as Color Key, inclusive
  664. */
  665. } DDCOLORKEY,*LPDDCOLORKEY;
  666. /* ddCKEYCAPS bits */
  667. #define DDCKEYCAPS_DESTBLT 0x00000001
  668. #define DDCKEYCAPS_DESTBLTCLRSPACE 0x00000002
  669. #define DDCKEYCAPS_DESTBLTCLRSPACEYUV 0x00000004
  670. #define DDCKEYCAPS_DESTBLTYUV 0x00000008
  671. #define DDCKEYCAPS_DESTOVERLAY 0x00000010
  672. #define DDCKEYCAPS_DESTOVERLAYCLRSPACE 0x00000020
  673. #define DDCKEYCAPS_DESTOVERLAYCLRSPACEYUV 0x00000040
  674. #define DDCKEYCAPS_DESTOVERLAYONEACTIVE 0x00000080
  675. #define DDCKEYCAPS_DESTOVERLAYYUV 0x00000100
  676. #define DDCKEYCAPS_SRCBLT 0x00000200
  677. #define DDCKEYCAPS_SRCBLTCLRSPACE 0x00000400
  678. #define DDCKEYCAPS_SRCBLTCLRSPACEYUV 0x00000800
  679. #define DDCKEYCAPS_SRCBLTYUV 0x00001000
  680. #define DDCKEYCAPS_SRCOVERLAY 0x00002000
  681. #define DDCKEYCAPS_SRCOVERLAYCLRSPACE 0x00004000
  682. #define DDCKEYCAPS_SRCOVERLAYCLRSPACEYUV 0x00008000
  683. #define DDCKEYCAPS_SRCOVERLAYONEACTIVE 0x00010000
  684. #define DDCKEYCAPS_SRCOVERLAYYUV 0x00020000
  685. #define DDCKEYCAPS_NOCOSTOVERLAY 0x00040000
  686. typedef struct _DDPIXELFORMAT {
  687. DWORD dwSize; /* 0: size of structure */
  688. DWORD dwFlags; /* 4: pixel format flags */
  689. DWORD dwFourCC; /* 8: (FOURCC code) */
  690. union {
  691. DWORD dwRGBBitCount; /* C: how many bits per pixel */
  692. DWORD dwYUVBitCount; /* C: how many bits per pixel */
  693. DWORD dwZBufferBitDepth; /* C: how many bits for z buffers */
  694. DWORD dwAlphaBitDepth; /* C: how many bits for alpha channels*/
  695. DWORD dwLuminanceBitCount;
  696. DWORD dwBumpBitCount;
  697. } DUMMYUNIONNAME1;
  698. union {
  699. DWORD dwRBitMask; /* 10: mask for red bit*/
  700. DWORD dwYBitMask; /* 10: mask for Y bits*/
  701. DWORD dwStencilBitDepth;
  702. DWORD dwLuminanceBitMask;
  703. DWORD dwBumpDuBitMask;
  704. } DUMMYUNIONNAME2;
  705. union {
  706. DWORD dwGBitMask; /* 14: mask for green bits*/
  707. DWORD dwUBitMask; /* 14: mask for U bits*/
  708. DWORD dwZBitMask;
  709. DWORD dwBumpDvBitMask;
  710. } DUMMYUNIONNAME3;
  711. union {
  712. DWORD dwBBitMask; /* 18: mask for blue bits*/
  713. DWORD dwVBitMask; /* 18: mask for V bits*/
  714. DWORD dwStencilBitMask;
  715. DWORD dwBumpLuminanceBitMask;
  716. } DUMMYUNIONNAME4;
  717. union {
  718. DWORD dwRGBAlphaBitMask; /* 1C: mask for alpha channel */
  719. DWORD dwYUVAlphaBitMask; /* 1C: mask for alpha channel */
  720. DWORD dwLuminanceAlphaBitMask;
  721. DWORD dwRGBZBitMask; /* 1C: mask for Z channel */
  722. DWORD dwYUVZBitMask; /* 1C: mask for Z channel */
  723. } DUMMYUNIONNAME5;
  724. /* 20: next structure */
  725. } DDPIXELFORMAT,*LPDDPIXELFORMAT;
  726. /* DDCAPS.dwFXCaps */
  727. #define DDFXCAPS_BLTALPHA 0x00000001
  728. #define DDFXCAPS_OVERLAYALPHA 0x00000004
  729. #define DDFXCAPS_BLTARITHSTRETCHYN 0x00000010
  730. #define DDFXCAPS_BLTARITHSTRETCHY 0x00000020
  731. #define DDFXCAPS_BLTMIRRORLEFTRIGHT 0x00000040
  732. #define DDFXCAPS_BLTMIRRORUPDOWN 0x00000080
  733. #define DDFXCAPS_BLTROTATION 0x00000100
  734. #define DDFXCAPS_BLTROTATION90 0x00000200
  735. #define DDFXCAPS_BLTSHRINKX 0x00000400
  736. #define DDFXCAPS_BLTSHRINKXN 0x00000800
  737. #define DDFXCAPS_BLTSHRINKY 0x00001000
  738. #define DDFXCAPS_BLTSHRINKYN 0x00002000
  739. #define DDFXCAPS_BLTSTRETCHX 0x00004000
  740. #define DDFXCAPS_BLTSTRETCHXN 0x00008000
  741. #define DDFXCAPS_BLTSTRETCHY 0x00010000
  742. #define DDFXCAPS_BLTSTRETCHYN 0x00020000
  743. #define DDFXCAPS_OVERLAYARITHSTRETCHY 0x00040000
  744. #define DDFXCAPS_OVERLAYARITHSTRETCHYN 0x00000008
  745. #define DDFXCAPS_OVERLAYSHRINKX 0x00080000
  746. #define DDFXCAPS_OVERLAYSHRINKXN 0x00100000
  747. #define DDFXCAPS_OVERLAYSHRINKY 0x00200000
  748. #define DDFXCAPS_OVERLAYSHRINKYN 0x00400000
  749. #define DDFXCAPS_OVERLAYSTRETCHX 0x00800000
  750. #define DDFXCAPS_OVERLAYSTRETCHXN 0x01000000
  751. #define DDFXCAPS_OVERLAYSTRETCHY 0x02000000
  752. #define DDFXCAPS_OVERLAYSTRETCHYN 0x04000000
  753. #define DDFXCAPS_OVERLAYMIRRORLEFTRIGHT 0x08000000
  754. #define DDFXCAPS_OVERLAYMIRRORUPDOWN 0x10000000
  755. #define DDFXCAPS_OVERLAYFILTER DDFXCAPS_OVERLAYARITHSTRETCHY
  756. /* DDCAPS.dwFXAlphaCaps */
  757. #define DDFXALPHACAPS_BLTALPHAEDGEBLEND 0x00000001
  758. #define DDFXALPHACAPS_BLTALPHAPIXELS 0x00000002
  759. #define DDFXALPHACAPS_BLTALPHAPIXELSNEG 0x00000004
  760. #define DDFXALPHACAPS_BLTALPHASURFACES 0x00000008
  761. #define DDFXALPHACAPS_BLTALPHASURFACESNEG 0x00000010
  762. #define DDFXALPHACAPS_OVERLAYALPHAEDGEBLEND 0x00000020
  763. #define DDFXALPHACAPS_OVERLAYALPHAPIXELS 0x00000040
  764. #define DDFXALPHACAPS_OVERLAYALPHAPIXELSNEG 0x00000080
  765. #define DDFXALPHACAPS_OVERLAYALPHASURFACES 0x00000100
  766. #define DDFXALPHACAPS_OVERLAYALPHASURFACESNEG 0x00000200
  767. /* DDCAPS.dwPalCaps */
  768. #define DDPCAPS_4BIT 0x00000001
  769. #define DDPCAPS_8BITENTRIES 0x00000002
  770. #define DDPCAPS_8BIT 0x00000004
  771. #define DDPCAPS_INITIALIZE 0x00000008
  772. #define DDPCAPS_PRIMARYSURFACE 0x00000010
  773. #define DDPCAPS_PRIMARYSURFACELEFT 0x00000020
  774. #define DDPCAPS_ALLOW256 0x00000040
  775. #define DDPCAPS_VSYNC 0x00000080
  776. #define DDPCAPS_1BIT 0x00000100
  777. #define DDPCAPS_2BIT 0x00000200
  778. #define DDPCAPS_ALPHA 0x00000400
  779. /* DDCAPS.dwSVCaps */
  780. /* the first 4 of these are now obsolete */
  781. #if DIRECTDRAW_VERSION >= 0x700 /* FIXME: I'm not sure when this switch occurred */
  782. #define DDSVCAPS_RESERVED1 0x00000001
  783. #define DDSVCAPS_RESERVED2 0x00000002
  784. #define DDSVCAPS_RESERVED3 0x00000004
  785. #define DDSVCAPS_RESERVED4 0x00000008
  786. #else
  787. #define DDSVCAPS_ENIGMA 0x00000001
  788. #define DDSVCAPS_FLICKER 0x00000002
  789. #define DDSVCAPS_REDBLUE 0x00000004
  790. #define DDSVCAPS_SPLIT 0x00000008
  791. #endif
  792. #define DDSVCAPS_STEREOSEQUENTIAL 0x00000010
  793. /* BitDepths */
  794. #define DDBD_1 0x00004000
  795. #define DDBD_2 0x00002000
  796. #define DDBD_4 0x00001000
  797. #define DDBD_8 0x00000800
  798. #define DDBD_16 0x00000400
  799. #define DDBD_24 0x00000200
  800. #define DDBD_32 0x00000100
  801. /* DDOVERLAYFX.dwDDFX */
  802. #define DDOVERFX_ARITHSTRETCHY 0x00000001
  803. #define DDOVERFX_MIRRORLEFTRIGHT 0x00000002
  804. #define DDOVERFX_MIRRORUPDOWN 0x00000004
  805. /* UpdateOverlay flags */
  806. #define DDOVER_ALPHADEST 0x00000001
  807. #define DDOVER_ALPHADESTCONSTOVERRIDE 0x00000002
  808. #define DDOVER_ALPHADESTNEG 0x00000004
  809. #define DDOVER_ALPHADESTSURFACEOVERRIDE 0x00000008
  810. #define DDOVER_ALPHAEDGEBLEND 0x00000010
  811. #define DDOVER_ALPHASRC 0x00000020
  812. #define DDOVER_ALPHASRCCONSTOVERRIDE 0x00000040
  813. #define DDOVER_ALPHASRCNEG 0x00000080
  814. #define DDOVER_ALPHASRCSURFACEOVERRIDE 0x00000100
  815. #define DDOVER_HIDE 0x00000200
  816. #define DDOVER_KEYDEST 0x00000400
  817. #define DDOVER_KEYDESTOVERRIDE 0x00000800
  818. #define DDOVER_KEYSRC 0x00001000
  819. #define DDOVER_KEYSRCOVERRIDE 0x00002000
  820. #define DDOVER_SHOW 0x00004000
  821. #define DDOVER_ADDDIRTYRECT 0x00008000
  822. #define DDOVER_REFRESHDIRTYRECTS 0x00010000
  823. #define DDOVER_REFRESHALL 0x00020000
  824. #define DDOVER_DDFX 0x00080000
  825. #define DDOVER_AUTOFLIP 0x00100000
  826. #define DDOVER_BOB 0x00200000
  827. #define DDOVER_OVERRIDEBOBWEAVE 0x00400000
  828. #define DDOVER_INTERLEAVED 0x00800000
  829. /* DDCOLORKEY.dwFlags */
  830. #define DDPF_ALPHAPIXELS 0x00000001
  831. #define DDPF_ALPHA 0x00000002
  832. #define DDPF_FOURCC 0x00000004
  833. #define DDPF_PALETTEINDEXED4 0x00000008
  834. #define DDPF_PALETTEINDEXEDTO8 0x00000010
  835. #define DDPF_PALETTEINDEXED8 0x00000020
  836. #define DDPF_RGB 0x00000040
  837. #define DDPF_COMPRESSED 0x00000080
  838. #define DDPF_RGBTOYUV 0x00000100
  839. #define DDPF_YUV 0x00000200
  840. #define DDPF_ZBUFFER 0x00000400
  841. #define DDPF_PALETTEINDEXED1 0x00000800
  842. #define DDPF_PALETTEINDEXED2 0x00001000
  843. #define DDPF_ZPIXELS 0x00002000
  844. #define DDPF_STENCILBUFFER 0x00004000
  845. #define DDPF_ALPHAPREMULT 0x00008000
  846. #define DDPF_LUMINANCE 0x00020000
  847. #define DDPF_BUMPLUMINANCE 0x00040000
  848. #define DDPF_BUMPDUDV 0x00080000
  849. /* SetCooperativeLevel dwFlags */
  850. #define DDSCL_FULLSCREEN 0x00000001
  851. #define DDSCL_ALLOWREBOOT 0x00000002
  852. #define DDSCL_NOWINDOWCHANGES 0x00000004
  853. #define DDSCL_NORMAL 0x00000008
  854. #define DDSCL_EXCLUSIVE 0x00000010
  855. #define DDSCL_ALLOWMODEX 0x00000040
  856. #define DDSCL_SETFOCUSWINDOW 0x00000080
  857. #define DDSCL_SETDEVICEWINDOW 0x00000100
  858. #define DDSCL_CREATEDEVICEWINDOW 0x00000200
  859. #define DDSCL_MULTITHREADED 0x00000400
  860. #define DDSCL_FPUSETUP 0x00000800
  861. #define DDSCL_FPUPRESERVE 0x00001000
  862. /* DDSURFACEDESC.dwFlags */
  863. #define DDSD_CAPS 0x00000001
  864. #define DDSD_HEIGHT 0x00000002
  865. #define DDSD_WIDTH 0x00000004
  866. #define DDSD_PITCH 0x00000008
  867. #define DDSD_BACKBUFFERCOUNT 0x00000020
  868. #define DDSD_ZBUFFERBITDEPTH 0x00000040
  869. #define DDSD_ALPHABITDEPTH 0x00000080
  870. #define DDSD_LPSURFACE 0x00000800
  871. #define DDSD_PIXELFORMAT 0x00001000
  872. #define DDSD_CKDESTOVERLAY 0x00002000
  873. #define DDSD_CKDESTBLT 0x00004000
  874. #define DDSD_CKSRCOVERLAY 0x00008000
  875. #define DDSD_CKSRCBLT 0x00010000
  876. #define DDSD_MIPMAPCOUNT 0x00020000
  877. #define DDSD_REFRESHRATE 0x00040000
  878. #define DDSD_LINEARSIZE 0x00080000
  879. #define DDSD_TEXTURESTAGE 0x00100000
  880. #define DDSD_FVF 0x00200000
  881. #define DDSD_SRCVBHANDLE 0x00400000
  882. #define DDSD_ALL 0x007ff9ee
  883. /* EnumSurfaces flags */
  884. #define DDENUMSURFACES_ALL 0x00000001
  885. #define DDENUMSURFACES_MATCH 0x00000002
  886. #define DDENUMSURFACES_NOMATCH 0x00000004
  887. #define DDENUMSURFACES_CANBECREATED 0x00000008
  888. #define DDENUMSURFACES_DOESEXIST 0x00000010
  889. /* SetDisplayMode flags */
  890. #define DDSDM_STANDARDVGAMODE 0x00000001
  891. /* EnumDisplayModes flags */
  892. #define DDEDM_REFRESHRATES 0x00000001
  893. #define DDEDM_STANDARDVGAMODES 0x00000002
  894. /* WaitForVerticalDisplay flags */
  895. #define DDWAITVB_BLOCKBEGIN 0x00000001
  896. #define DDWAITVB_BLOCKBEGINEVENT 0x00000002
  897. #define DDWAITVB_BLOCKEND 0x00000004
  898. typedef struct _DDSURFACEDESC
  899. {
  900. DWORD dwSize; /* 0: size of the DDSURFACEDESC structure*/
  901. DWORD dwFlags; /* 4: determines what fields are valid*/
  902. DWORD dwHeight; /* 8: height of surface to be created*/
  903. DWORD dwWidth; /* C: width of input surface*/
  904. union {
  905. LONG lPitch; /* 10: distance to start of next line (return value only)*/
  906. DWORD dwLinearSize;
  907. } DUMMYUNIONNAME1;
  908. DWORD dwBackBufferCount;/* 14: number of back buffers requested*/
  909. union {
  910. DWORD dwMipMapCount;/* 18:number of mip-map levels requested*/
  911. DWORD dwZBufferBitDepth;/*18: depth of Z buffer requested*/
  912. DWORD dwRefreshRate;/* 18:refresh rate (used when display mode is described)*/
  913. } DUMMYUNIONNAME2;
  914. DWORD dwAlphaBitDepth;/* 1C:depth of alpha buffer requested*/
  915. DWORD dwReserved; /* 20:reserved*/
  916. LPVOID lpSurface; /* 24:pointer to the associated surface memory*/
  917. DDCOLORKEY ddckCKDestOverlay;/* 28: CK for dest overlay use*/
  918. DDCOLORKEY ddckCKDestBlt; /* 30: CK for destination blt use*/
  919. DDCOLORKEY ddckCKSrcOverlay;/* 38: CK for source overlay use*/
  920. DDCOLORKEY ddckCKSrcBlt; /* 40: CK for source blt use*/
  921. DDPIXELFORMAT ddpfPixelFormat;/* 48: pixel format description of the surface*/
  922. DDSCAPS ddsCaps; /* 68: direct draw surface caps */
  923. } DDSURFACEDESC,*LPDDSURFACEDESC;
  924. typedef struct _DDSURFACEDESC2
  925. {
  926. DWORD dwSize; /* 0: size of the DDSURFACEDESC2 structure*/
  927. DWORD dwFlags; /* 4: determines what fields are valid*/
  928. DWORD dwHeight; /* 8: height of surface to be created*/
  929. DWORD dwWidth; /* C: width of input surface*/
  930. union {
  931. LONG lPitch; /*10: distance to start of next line (return value only)*/
  932. DWORD dwLinearSize; /*10: formless late-allocated optimized surface size */
  933. } DUMMYUNIONNAME1;
  934. DWORD dwBackBufferCount;/* 14: number of back buffers requested*/
  935. union {
  936. DWORD dwMipMapCount;/* 18:number of mip-map levels requested*/
  937. DWORD dwRefreshRate;/* 18:refresh rate (used when display mode is described)*/
  938. DWORD dwSrcVBHandle;/* 18:source used in VB::Optimize */
  939. } DUMMYUNIONNAME2;
  940. DWORD dwAlphaBitDepth;/* 1C:depth of alpha buffer requested*/
  941. DWORD dwReserved; /* 20:reserved*/
  942. LPVOID lpSurface; /* 24:pointer to the associated surface memory*/
  943. union {
  944. DDCOLORKEY ddckCKDestOverlay; /* 28: CK for dest overlay use*/
  945. DWORD dwEmptyFaceColor; /* 28: color for empty cubemap faces */
  946. } DUMMYUNIONNAME3;
  947. DDCOLORKEY ddckCKDestBlt; /* 30: CK for destination blt use*/
  948. DDCOLORKEY ddckCKSrcOverlay;/* 38: CK for source overlay use*/
  949. DDCOLORKEY ddckCKSrcBlt; /* 40: CK for source blt use*/
  950. union {
  951. DDPIXELFORMAT ddpfPixelFormat;/* 48: pixel format description of the surface*/
  952. DWORD dwFVF; /* 48: vertex format description of vertex buffers */
  953. } DUMMYUNIONNAME4;
  954. DDSCAPS2 ddsCaps; /* 68: DDraw surface caps */
  955. DWORD dwTextureStage; /* 78: stage in multitexture cascade */
  956. } DDSURFACEDESC2,*LPDDSURFACEDESC2;
  957. /* DDCOLORCONTROL.dwFlags */
  958. #define DDCOLOR_BRIGHTNESS 0x00000001
  959. #define DDCOLOR_CONTRAST 0x00000002
  960. #define DDCOLOR_HUE 0x00000004
  961. #define DDCOLOR_SATURATION 0x00000008
  962. #define DDCOLOR_SHARPNESS 0x00000010
  963. #define DDCOLOR_GAMMA 0x00000020
  964. #define DDCOLOR_COLORENABLE 0x00000040
  965. typedef struct {
  966. DWORD dwSize;
  967. DWORD dwFlags;
  968. LONG lBrightness;
  969. LONG lContrast;
  970. LONG lHue;
  971. LONG lSaturation;
  972. LONG lSharpness;
  973. LONG lGamma;
  974. LONG lColorEnable;
  975. DWORD dwReserved1;
  976. } DDCOLORCONTROL,*LPDDCOLORCONTROL;
  977. typedef struct {
  978. WORD red[256];
  979. WORD green[256];
  980. WORD blue[256];
  981. } DDGAMMARAMP,*LPDDGAMMARAMP;
  982. typedef BOOL (CALLBACK *LPDDENUMCALLBACKA)(GUID *, LPSTR, LPSTR, LPVOID);
  983. typedef BOOL (CALLBACK *LPDDENUMCALLBACKW)(GUID *, LPWSTR, LPWSTR, LPVOID);
  984. DECL_WINELIB_TYPE_AW(LPDDENUMCALLBACK)
  985. typedef HRESULT (CALLBACK *LPDDENUMMODESCALLBACK)(LPDDSURFACEDESC, LPVOID);
  986. typedef HRESULT (CALLBACK *LPDDENUMMODESCALLBACK2)(LPDDSURFACEDESC2, LPVOID);
  987. typedef HRESULT (CALLBACK *LPDDENUMSURFACESCALLBACK)(LPDIRECTDRAWSURFACE, LPDDSURFACEDESC, LPVOID);
  988. typedef HRESULT (CALLBACK *LPDDENUMSURFACESCALLBACK2)(LPDIRECTDRAWSURFACE4, LPDDSURFACEDESC2, LPVOID);
  989. typedef HRESULT (CALLBACK *LPDDENUMSURFACESCALLBACK7)(LPDIRECTDRAWSURFACE7, LPDDSURFACEDESC2, LPVOID);
  990. typedef BOOL (CALLBACK *LPDDENUMCALLBACKEXA)(GUID *, LPSTR, LPSTR, LPVOID, HMONITOR);
  991. typedef BOOL (CALLBACK *LPDDENUMCALLBACKEXW)(GUID *, LPWSTR, LPWSTR, LPVOID, HMONITOR);
  992. DECL_WINELIB_TYPE_AW(LPDDENUMCALLBACKEX)
  993. HRESULT WINAPI DirectDrawEnumerateExA( LPDDENUMCALLBACKEXA lpCallback, LPVOID lpContext, DWORD dwFlags);
  994. HRESULT WINAPI DirectDrawEnumerateExW( LPDDENUMCALLBACKEXW lpCallback, LPVOID lpContext, DWORD dwFlags);
  995. #define DirectDrawEnumerateEx WINELIB_NAME_AW(DirectDrawEnumerateEx)
  996. typedef HRESULT (WINAPI * LPDIRECTDRAWENUMERATEEXA)( LPDDENUMCALLBACKEXA lpCallback, LPVOID lpContext, DWORD dwFlags);
  997. typedef HRESULT (WINAPI * LPDIRECTDRAWENUMERATEEXW)( LPDDENUMCALLBACKEXW lpCallback, LPVOID lpContext, DWORD dwFlags);
  998. DECL_WINELIB_TYPE_AW(LPDIRECTDRAWENUMERATEEX)
  999. /* flags for DirectDrawEnumerateEx */
  1000. #define DDENUM_ATTACHEDSECONDARYDEVICES 0x00000001
  1001. #define DDENUM_DETACHEDSECONDARYDEVICES 0x00000002
  1002. #define DDENUM_NONDISPLAYDEVICES 0x00000004
  1003. /* flags for DirectDrawCreate or IDirectDraw::Initialize */
  1004. #define DDCREATE_HARDWAREONLY 1L
  1005. #define DDCREATE_EMULATIONONLY 2L
  1006. typedef struct _DDBLTFX
  1007. {
  1008. DWORD dwSize; /* size of structure */
  1009. DWORD dwDDFX; /* FX operations */
  1010. DWORD dwROP; /* Win32 raster operations */
  1011. DWORD dwDDROP; /* Raster operations new for DirectDraw */
  1012. DWORD dwRotationAngle; /* Rotation angle for blt */
  1013. DWORD dwZBufferOpCode; /* ZBuffer compares */
  1014. DWORD dwZBufferLow; /* Low limit of Z buffer */
  1015. DWORD dwZBufferHigh; /* High limit of Z buffer */
  1016. DWORD dwZBufferBaseDest; /* Destination base value */
  1017. DWORD dwZDestConstBitDepth; /* Bit depth used to specify Z constant for destination */
  1018. union
  1019. {
  1020. DWORD dwZDestConst; /* Constant to use as Z buffer for dest */
  1021. LPDIRECTDRAWSURFACE lpDDSZBufferDest; /* Surface to use as Z buffer for dest */
  1022. } DUMMYUNIONNAME1;
  1023. DWORD dwZSrcConstBitDepth; /* Bit depth used to specify Z constant for source */
  1024. union
  1025. {
  1026. DWORD dwZSrcConst; /* Constant to use as Z buffer for src */
  1027. LPDIRECTDRAWSURFACE lpDDSZBufferSrc; /* Surface to use as Z buffer for src */
  1028. } DUMMYUNIONNAME2;
  1029. DWORD dwAlphaEdgeBlendBitDepth; /* Bit depth used to specify constant for alpha edge blend */
  1030. DWORD dwAlphaEdgeBlend; /* Alpha for edge blending */
  1031. DWORD dwReserved;
  1032. DWORD dwAlphaDestConstBitDepth; /* Bit depth used to specify alpha constant for destination */
  1033. union
  1034. {
  1035. DWORD dwAlphaDestConst; /* Constant to use as Alpha Channel */
  1036. LPDIRECTDRAWSURFACE lpDDSAlphaDest; /* Surface to use as Alpha Channel */
  1037. } DUMMYUNIONNAME3;
  1038. DWORD dwAlphaSrcConstBitDepth; /* Bit depth used to specify alpha constant for source */
  1039. union
  1040. {
  1041. DWORD dwAlphaSrcConst; /* Constant to use as Alpha Channel */
  1042. LPDIRECTDRAWSURFACE lpDDSAlphaSrc; /* Surface to use as Alpha Channel */
  1043. } DUMMYUNIONNAME4;
  1044. union
  1045. {
  1046. DWORD dwFillColor; /* color in RGB or Palettized */
  1047. DWORD dwFillDepth; /* depth value for z-buffer */
  1048. DWORD dwFillPixel; /* pixel val for RGBA or RGBZ */
  1049. LPDIRECTDRAWSURFACE lpDDSPattern; /* Surface to use as pattern */
  1050. } DUMMYUNIONNAME5;
  1051. DDCOLORKEY ddckDestColorkey; /* DestColorkey override */
  1052. DDCOLORKEY ddckSrcColorkey; /* SrcColorkey override */
  1053. } DDBLTFX,*LPDDBLTFX;
  1054. /* dwDDFX */
  1055. /* arithmetic stretching along y axis */
  1056. #define DDBLTFX_ARITHSTRETCHY 0x00000001
  1057. /* mirror on y axis */
  1058. #define DDBLTFX_MIRRORLEFTRIGHT 0x00000002
  1059. /* mirror on x axis */
  1060. #define DDBLTFX_MIRRORUPDOWN 0x00000004
  1061. /* do not tear */
  1062. #define DDBLTFX_NOTEARING 0x00000008
  1063. /* 180 degrees clockwise rotation */
  1064. #define DDBLTFX_ROTATE180 0x00000010
  1065. /* 270 degrees clockwise rotation */
  1066. #define DDBLTFX_ROTATE270 0x00000020
  1067. /* 90 degrees clockwise rotation */
  1068. #define DDBLTFX_ROTATE90 0x00000040
  1069. /* dwZBufferLow and dwZBufferHigh specify limits to the copied Z values */
  1070. #define DDBLTFX_ZBUFFERRANGE 0x00000080
  1071. /* add dwZBufferBaseDest to every source z value before compare */
  1072. #define DDBLTFX_ZBUFFERBASEDEST 0x00000100
  1073. typedef struct _DDOVERLAYFX
  1074. {
  1075. DWORD dwSize; /* size of structure */
  1076. DWORD dwAlphaEdgeBlendBitDepth; /* Bit depth used to specify constant for alpha edge blend */
  1077. DWORD dwAlphaEdgeBlend; /* Constant to use as alpha for edge blend */
  1078. DWORD dwReserved;
  1079. DWORD dwAlphaDestConstBitDepth; /* Bit depth used to specify alpha constant for destination */
  1080. union
  1081. {
  1082. DWORD dwAlphaDestConst; /* Constant to use as alpha channel for dest */
  1083. LPDIRECTDRAWSURFACE lpDDSAlphaDest; /* Surface to use as alpha channel for dest */
  1084. } DUMMYUNIONNAME1;
  1085. DWORD dwAlphaSrcConstBitDepth; /* Bit depth used to specify alpha constant for source */
  1086. union
  1087. {
  1088. DWORD dwAlphaSrcConst; /* Constant to use as alpha channel for src */
  1089. LPDIRECTDRAWSURFACE lpDDSAlphaSrc; /* Surface to use as alpha channel for src */
  1090. } DUMMYUNIONNAME2;
  1091. DDCOLORKEY dckDestColorkey; /* DestColorkey override */
  1092. DDCOLORKEY dckSrcColorkey; /* DestColorkey override */
  1093. DWORD dwDDFX; /* Overlay FX */
  1094. DWORD dwFlags; /* flags */
  1095. } DDOVERLAYFX,*LPDDOVERLAYFX;
  1096. typedef struct _DDBLTBATCH
  1097. {
  1098. LPRECT lprDest;
  1099. LPDIRECTDRAWSURFACE lpDDSSrc;
  1100. LPRECT lprSrc;
  1101. DWORD dwFlags;
  1102. LPDDBLTFX lpDDBltFx;
  1103. } DDBLTBATCH,*LPDDBLTBATCH;
  1104. #define MAX_DDDEVICEID_STRING 512
  1105. #define DDGDI_GETHOSTIDENTIFIER 1
  1106. typedef struct tagDDDEVICEIDENTIFIER {
  1107. char szDriver[MAX_DDDEVICEID_STRING];
  1108. char szDescription[MAX_DDDEVICEID_STRING];
  1109. LARGE_INTEGER liDriverVersion;
  1110. DWORD dwVendorId;
  1111. DWORD dwDeviceId;
  1112. DWORD dwSubSysId;
  1113. DWORD dwRevision;
  1114. GUID guidDeviceIdentifier;
  1115. } DDDEVICEIDENTIFIER, * LPDDDEVICEIDENTIFIER;
  1116. typedef struct tagDDDEVICEIDENTIFIER2 {
  1117. char szDriver[MAX_DDDEVICEID_STRING]; /* user readable driver name */
  1118. char szDescription[MAX_DDDEVICEID_STRING]; /* user readable description */
  1119. LARGE_INTEGER liDriverVersion; /* driver version */
  1120. DWORD dwVendorId; /* vendor ID, zero if unknown */
  1121. DWORD dwDeviceId; /* chipset ID, zero if unknown */
  1122. DWORD dwSubSysId; /* board ID, zero if unknown */
  1123. DWORD dwRevision; /* chipset version, zero if unknown */
  1124. GUID guidDeviceIdentifier; /* unique ID for this driver/chipset combination */
  1125. DWORD dwWHQLLevel; /* Windows Hardware Quality Lab certification level */
  1126. } DDDEVICEIDENTIFIER2, * LPDDDEVICEIDENTIFIER2;
  1127. /*****************************************************************************
  1128. * IDirectDrawPalette interface
  1129. */
  1130. #define INTERFACE IDirectDrawPalette
  1131. DECLARE_INTERFACE_(IDirectDrawPalette,IUnknown)
  1132. {
  1133. /*** IUnknown methods ***/
  1134. STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
  1135. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  1136. STDMETHOD_(ULONG,Release)(THIS) PURE;
  1137. /*** IDirectDrawPalette methods ***/
  1138. STDMETHOD(GetCaps)(THIS_ LPDWORD lpdwCaps) PURE;
  1139. STDMETHOD(GetEntries)(THIS_ DWORD dwFlags, DWORD dwBase, DWORD dwNumEntries, LPPALETTEENTRY lpEntries) PURE;
  1140. STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW lpDD, DWORD dwFlags, LPPALETTEENTRY lpDDColorTable) PURE;
  1141. STDMETHOD(SetEntries)(THIS_ DWORD dwFlags, DWORD dwStartingEntry, DWORD dwCount, LPPALETTEENTRY lpEntries) PURE;
  1142. };
  1143. #undef INTERFACE
  1144. #if !defined(__cplusplus) || defined(CINTERFACE)
  1145. /*** IUnknown methods ***/
  1146. #define IDirectDrawPalette_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  1147. #define IDirectDrawPalette_AddRef(p) (p)->lpVtbl->AddRef(p)
  1148. #define IDirectDrawPalette_Release(p) (p)->lpVtbl->Release(p)
  1149. /*** IDirectDrawPalette methods ***/
  1150. #define IDirectDrawPalette_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a)
  1151. #define IDirectDrawPalette_GetEntries(p,a,b,c,d) (p)->lpVtbl->GetEntries(p,a,b,c,d)
  1152. #define IDirectDrawPalette_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c)
  1153. #define IDirectDrawPalette_SetEntries(p,a,b,c,d) (p)->lpVtbl->SetEntries(p,a,b,c,d)
  1154. #else
  1155. /*** IUnknown methods ***/
  1156. #define IDirectDrawPalette_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  1157. #define IDirectDrawPalette_AddRef(p) (p)->AddRef()
  1158. #define IDirectDrawPalette_Release(p) (p)->Release()
  1159. /*** IDirectDrawPalette methods ***/
  1160. #define IDirectDrawPalette_GetCaps(p,a) (p)->GetCaps(a)
  1161. #define IDirectDrawPalette_GetEntries(p,a,b,c,d) (p)->GetEntries(a,b,c,d)
  1162. #define IDirectDrawPalette_Initialize(p,a,b,c) (p)->Initialize(a,b,c)
  1163. #define IDirectDrawPalette_SetEntries(p,a,b,c,d) (p)->SetEntries(a,b,c,d)
  1164. #endif
  1165. /*****************************************************************************
  1166. * IDirectDrawClipper interface
  1167. */
  1168. #define INTERFACE IDirectDrawClipper
  1169. DECLARE_INTERFACE_(IDirectDrawClipper,IUnknown)
  1170. {
  1171. /*** IUnknown methods ***/
  1172. STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
  1173. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  1174. STDMETHOD_(ULONG,Release)(THIS) PURE;
  1175. /*** IDirectDrawClipper methods ***/
  1176. STDMETHOD(GetClipList)(THIS_ LPRECT lpRect, LPRGNDATA lpClipList, LPDWORD lpdwSize) PURE;
  1177. STDMETHOD(GetHWnd)(THIS_ HWND *lphWnd) PURE;
  1178. STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW lpDD, DWORD dwFlags) PURE;
  1179. STDMETHOD(IsClipListChanged)(THIS_ BOOL *lpbChanged) PURE;
  1180. STDMETHOD(SetClipList)(THIS_ LPRGNDATA lpClipList, DWORD dwFlags) PURE;
  1181. STDMETHOD(SetHWnd)(THIS_ DWORD dwFlags, HWND hWnd) PURE;
  1182. };
  1183. #undef INTERFACE
  1184. #if !defined(__cplusplus) || defined(CINTERFACE)
  1185. /*** IUnknown methods ***/
  1186. #define IDirectDrawClipper_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  1187. #define IDirectDrawClipper_AddRef(p) (p)->lpVtbl->AddRef(p)
  1188. #define IDirectDrawClipper_Release(p) (p)->lpVtbl->Release(p)
  1189. /*** IDirectDrawClipper methods ***/
  1190. #define IDirectDrawClipper_GetClipList(p,a,b,c) (p)->lpVtbl->GetClipList(p,a,b,c)
  1191. #define IDirectDrawClipper_GetHWnd(p,a) (p)->lpVtbl->GetHWnd(p,a)
  1192. #define IDirectDrawClipper_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
  1193. #define IDirectDrawClipper_IsClipListChanged(p,a) (p)->lpVtbl->IsClipListChanged(p,a)
  1194. #define IDirectDrawClipper_SetClipList(p,a,b) (p)->lpVtbl->SetClipList(p,a,b)
  1195. #define IDirectDrawClipper_SetHWnd(p,a,b) (p)->lpVtbl->SetHWnd(p,a,b)
  1196. #else
  1197. /*** IUnknown methods ***/
  1198. #define IDirectDrawClipper_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  1199. #define IDirectDrawClipper_AddRef(p) (p)->AddRef()
  1200. #define IDirectDrawClipper_Release(p) (p)->Release()
  1201. /*** IDirectDrawClipper methods ***/
  1202. #define IDirectDrawClipper_GetClipList(p,a,b,c) (p)->GetClipList(a,b,c)
  1203. #define IDirectDrawClipper_GetHWnd(p,a) (p)->GetHWnd(a)
  1204. #define IDirectDrawClipper_Initialize(p,a,b) (p)->Initialize(a,b)
  1205. #define IDirectDrawClipper_IsClipListChanged(p,a) (p)->IsClipListChanged(a)
  1206. #define IDirectDrawClipper_SetClipList(p,a,b) (p)->SetClipList(a,b)
  1207. #define IDirectDrawClipper_SetHWnd(p,a,b) (p)->SetHWnd(a,b)
  1208. #endif
  1209. /*****************************************************************************
  1210. * IDirectDraw interface
  1211. */
  1212. #define INTERFACE IDirectDraw
  1213. DECLARE_INTERFACE_(IDirectDraw,IUnknown)
  1214. {
  1215. /*** IUnknown methods ***/
  1216. STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
  1217. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  1218. STDMETHOD_(ULONG,Release)(THIS) PURE;
  1219. /*** IDirectDraw methods ***/
  1220. STDMETHOD(Compact)(THIS) PURE;
  1221. STDMETHOD(CreateClipper)(THIS_ DWORD dwFlags, LPDIRECTDRAWCLIPPER *lplpDDClipper, IUnknown *pUnkOuter) PURE;
  1222. STDMETHOD(CreatePalette)(THIS_ DWORD dwFlags, LPPALETTEENTRY lpColorTable, LPDIRECTDRAWPALETTE *lplpDDPalette, IUnknown *pUnkOuter) PURE;
  1223. STDMETHOD(CreateSurface)(THIS_ LPDDSURFACEDESC lpDDSurfaceDesc, LPDIRECTDRAWSURFACE *lplpDDSurface, IUnknown *pUnkOuter) PURE;
  1224. STDMETHOD(DuplicateSurface)(THIS_ LPDIRECTDRAWSURFACE lpDDSurface, LPDIRECTDRAWSURFACE *lplpDupDDSurface) PURE;
  1225. STDMETHOD(EnumDisplayModes)(THIS_ DWORD dwFlags, LPDDSURFACEDESC lpDDSurfaceDesc, LPVOID lpContext, LPDDENUMMODESCALLBACK lpEnumModesCallback) PURE;
  1226. STDMETHOD(EnumSurfaces)(THIS_ DWORD dwFlags, LPDDSURFACEDESC lpDDSD, LPVOID lpContext, LPDDENUMSURFACESCALLBACK lpEnumSurfacesCallback) PURE;
  1227. STDMETHOD(FlipToGDISurface)(THIS) PURE;
  1228. STDMETHOD(GetCaps)(THIS_ LPDDCAPS lpDDDriverCaps, LPDDCAPS lpDDHELCaps) PURE;
  1229. STDMETHOD(GetDisplayMode)(THIS_ LPDDSURFACEDESC lpDDSurfaceDesc) PURE;
  1230. STDMETHOD(GetFourCCCodes)(THIS_ LPDWORD lpNumCodes, LPDWORD lpCodes) PURE;
  1231. STDMETHOD(GetGDISurface)(THIS_ LPDIRECTDRAWSURFACE *lplpGDIDDSurface) PURE;
  1232. STDMETHOD(GetMonitorFrequency)(THIS_ LPDWORD lpdwFrequency) PURE;
  1233. STDMETHOD(GetScanLine)(THIS_ LPDWORD lpdwScanLine) PURE;
  1234. STDMETHOD(GetVerticalBlankStatus)(THIS_ BOOL *lpbIsInVB) PURE;
  1235. STDMETHOD(Initialize)(THIS_ GUID *lpGUID) PURE;
  1236. STDMETHOD(RestoreDisplayMode)(THIS) PURE;
  1237. STDMETHOD(SetCooperativeLevel)(THIS_ HWND hWnd, DWORD dwFlags) PURE;
  1238. STDMETHOD(SetDisplayMode)(THIS_ DWORD dwWidth, DWORD dwHeight, DWORD dwBPP) PURE;
  1239. STDMETHOD(WaitForVerticalBlank)(THIS_ DWORD dwFlags, HANDLE hEvent) PURE;
  1240. };
  1241. #undef INTERFACE
  1242. #if !defined(__cplusplus) || defined(CINTERFACE)
  1243. /*** IUnknown methods ***/
  1244. #define IDirectDraw_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  1245. #define IDirectDraw_AddRef(p) (p)->lpVtbl->AddRef(p)
  1246. #define IDirectDraw_Release(p) (p)->lpVtbl->Release(p)
  1247. /*** IDirectDraw methods ***/
  1248. #define IDirectDraw_Compact(p) (p)->lpVtbl->Compact(p)
  1249. #define IDirectDraw_CreateClipper(p,a,b,c) (p)->lpVtbl->CreateClipper(p,a,b,c)
  1250. #define IDirectDraw_CreatePalette(p,a,b,c,d) (p)->lpVtbl->CreatePalette(p,a,b,c,d)
  1251. #define IDirectDraw_CreateSurface(p,a,b,c) (p)->lpVtbl->CreateSurface(p,a,b,c)
  1252. #define IDirectDraw_DuplicateSurface(p,a,b) (p)->lpVtbl->DuplicateSurface(p,a,b)
  1253. #define IDirectDraw_EnumDisplayModes(p,a,b,c,d) (p)->lpVtbl->EnumDisplayModes(p,a,b,c,d)
  1254. #define IDirectDraw_EnumSurfaces(p,a,b,c,d) (p)->lpVtbl->EnumSurfaces(p,a,b,c,d)
  1255. #define IDirectDraw_FlipToGDISurface(p) (p)->lpVtbl->FlipToGDISurface(p)
  1256. #define IDirectDraw_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b)
  1257. #define IDirectDraw_GetDisplayMode(p,a) (p)->lpVtbl->GetDisplayMode(p,a)
  1258. #define IDirectDraw_GetFourCCCodes(p,a,b) (p)->lpVtbl->GetFourCCCodes(p,a,b)
  1259. #define IDirectDraw_GetGDISurface(p,a) (p)->lpVtbl->GetGDISurface(p,a)
  1260. #define IDirectDraw_GetMonitorFrequency(p,a) (p)->lpVtbl->GetMonitorFrequency(p,a)
  1261. #define IDirectDraw_GetScanLine(p,a) (p)->lpVtbl->GetScanLine(p,a)
  1262. #define IDirectDraw_GetVerticalBlankStatus(p,a) (p)->lpVtbl->GetVerticalBlankStatus(p,a)
  1263. #define IDirectDraw_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
  1264. #define IDirectDraw_RestoreDisplayMode(p) (p)->lpVtbl->RestoreDisplayMode(p)
  1265. #define IDirectDraw_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
  1266. #define IDirectDraw_SetDisplayMode(p,a,b,c) (p)->lpVtbl->SetDisplayMode(p,a,b,c)
  1267. #define IDirectDraw_WaitForVerticalBlank(p,a,b) (p)->lpVtbl->WaitForVerticalBlank(p,a,b)
  1268. #else
  1269. /*** IUnknown methods ***/
  1270. #define IDirectDraw_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  1271. #define IDirectDraw_AddRef(p) (p)->AddRef()
  1272. #define IDirectDraw_Release(p) (p)->Release()
  1273. /*** IDirectDraw methods ***/
  1274. #define IDirectDraw_Compact(p) (p)->Compact()
  1275. #define IDirectDraw_CreateClipper(p,a,b,c) (p)->CreateClipper(a,b,c)
  1276. #define IDirectDraw_CreatePalette(p,a,b,c,d) (p)->CreatePalette(a,b,c,d)
  1277. #define IDirectDraw_CreateSurface(p,a,b,c) (p)->CreateSurface(a,b,c)
  1278. #define IDirectDraw_DuplicateSurface(p,a,b) (p)->DuplicateSurface(a,b)
  1279. #define IDirectDraw_EnumDisplayModes(p,a,b,c,d) (p)->EnumDisplayModes(a,b,c,d)
  1280. #define IDirectDraw_EnumSurfaces(p,a,b,c,d) (p)->EnumSurfaces(a,b,c,d)
  1281. #define IDirectDraw_FlipToGDISurface(p) (p)->FlipToGDISurface()
  1282. #define IDirectDraw_GetCaps(p,a,b) (p)->GetCaps(a,b)
  1283. #define IDirectDraw_GetDisplayMode(p,a) (p)->GetDisplayMode(a)
  1284. #define IDirectDraw_GetFourCCCodes(p,a,b) (p)->GetFourCCCodes(a,b)
  1285. #define IDirectDraw_GetGDISurface(p,a) (p)->GetGDISurface(a)
  1286. #define IDirectDraw_GetMonitorFrequency(p,a) (p)->GetMonitorFrequency(a)
  1287. #define IDirectDraw_GetScanLine(p,a) (p)->GetScanLine(a)
  1288. #define IDirectDraw_GetVerticalBlankStatus(p,a) (p)->GetVerticalBlankStatus(a)
  1289. #define IDirectDraw_Initialize(p,a) (p)->Initialize(a)
  1290. #define IDirectDraw_RestoreDisplayMode(p) (p)->RestoreDisplayMode()
  1291. #define IDirectDraw_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)
  1292. #define IDirectDraw_SetDisplayMode(p,a,b,c) (p)->SetDisplayMode(a,b,c)
  1293. #define IDirectDraw_WaitForVerticalBlank(p,a,b) (p)->WaitForVerticalBlank(a,b)
  1294. #endif
  1295. /* flags for Lock() */
  1296. #define DDLOCK_SURFACEMEMORYPTR 0x00000000
  1297. #define DDLOCK_WAIT 0x00000001
  1298. #define DDLOCK_EVENT 0x00000002
  1299. #define DDLOCK_READONLY 0x00000010
  1300. #define DDLOCK_WRITEONLY 0x00000020
  1301. #define DDLOCK_NOSYSLOCK 0x00000800
  1302. #define DDLOCK_NOOVERWRITE 0x00001000
  1303. #define DDLOCK_DISCARDCONTENTS 0x00002000
  1304. /*****************************************************************************
  1305. * IDirectDraw2 interface
  1306. */
  1307. /* Note: IDirectDraw2 cannot derive from IDirectDraw because the number of
  1308. * arguments of SetDisplayMode has changed !
  1309. */
  1310. #define INTERFACE IDirectDraw2
  1311. DECLARE_INTERFACE_(IDirectDraw2,IUnknown)
  1312. {
  1313. /*** IUnknown methods ***/
  1314. /*00*/ STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
  1315. /*04*/ STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  1316. /*08*/ STDMETHOD_(ULONG,Release)(THIS) PURE;
  1317. /*** IDirectDraw2 methods ***/
  1318. /*0c*/ STDMETHOD(Compact)(THIS) PURE;
  1319. /*10*/ STDMETHOD(CreateClipper)(THIS_ DWORD dwFlags, LPDIRECTDRAWCLIPPER *lplpDDClipper, IUnknown *pUnkOuter) PURE;
  1320. /*14*/ STDMETHOD(CreatePalette)(THIS_ DWORD dwFlags, LPPALETTEENTRY lpColorTable, LPDIRECTDRAWPALETTE *lplpDDPalette, IUnknown *pUnkOuter) PURE;
  1321. /*18*/ STDMETHOD(CreateSurface)(THIS_ LPDDSURFACEDESC lpDDSurfaceDesc, LPDIRECTDRAWSURFACE *lplpDDSurface, IUnknown *pUnkOuter) PURE;
  1322. /*1c*/ STDMETHOD(DuplicateSurface)(THIS_ LPDIRECTDRAWSURFACE lpDDSurface, LPDIRECTDRAWSURFACE *lplpDupDDSurface) PURE;
  1323. /*20*/ STDMETHOD(EnumDisplayModes)(THIS_ DWORD dwFlags, LPDDSURFACEDESC lpDDSurfaceDesc, LPVOID lpContext, LPDDENUMMODESCALLBACK lpEnumModesCallback) PURE;
  1324. /*24*/ STDMETHOD(EnumSurfaces)(THIS_ DWORD dwFlags, LPDDSURFACEDESC lpDDSD, LPVOID lpContext, LPDDENUMSURFACESCALLBACK lpEnumSurfacesCallback) PURE;
  1325. /*28*/ STDMETHOD(FlipToGDISurface)(THIS) PURE;
  1326. /*2c*/ STDMETHOD(GetCaps)(THIS_ LPDDCAPS lpDDDriverCaps, LPDDCAPS lpDDHELCaps) PURE;
  1327. /*30*/ STDMETHOD(GetDisplayMode)(THIS_ LPDDSURFACEDESC lpDDSurfaceDesc) PURE;
  1328. /*34*/ STDMETHOD(GetFourCCCodes)(THIS_ LPDWORD lpNumCodes, LPDWORD lpCodes) PURE;
  1329. /*38*/ STDMETHOD(GetGDISurface)(THIS_ LPDIRECTDRAWSURFACE *lplpGDIDDSurface) PURE;
  1330. /*3c*/ STDMETHOD(GetMonitorFrequency)(THIS_ LPDWORD lpdwFrequency) PURE;
  1331. /*40*/ STDMETHOD(GetScanLine)(THIS_ LPDWORD lpdwScanLine) PURE;
  1332. /*44*/ STDMETHOD(GetVerticalBlankStatus)(THIS_ BOOL *lpbIsInVB) PURE;
  1333. /*48*/ STDMETHOD(Initialize)(THIS_ GUID *lpGUID) PURE;
  1334. /*4c*/ STDMETHOD(RestoreDisplayMode)(THIS) PURE;
  1335. /*50*/ STDMETHOD(SetCooperativeLevel)(THIS_ HWND hWnd, DWORD dwFlags) PURE;
  1336. /*54*/ STDMETHOD(SetDisplayMode)(THIS_ DWORD dwWidth, DWORD dwHeight, DWORD dwBPP, DWORD dwRefreshRate, DWORD dwFlags) PURE;
  1337. /*58*/ STDMETHOD(WaitForVerticalBlank)(THIS_ DWORD dwFlags, HANDLE hEvent) PURE;
  1338. /* added in v2 */
  1339. /*5c*/ STDMETHOD(GetAvailableVidMem)(THIS_ LPDDSCAPS lpDDCaps, LPDWORD lpdwTotal, LPDWORD lpdwFree) PURE;
  1340. };
  1341. #undef INTERFACE
  1342. #if !defined(__cplusplus) || defined(CINTERFACE)
  1343. /*** IUnknown methods ***/
  1344. #define IDirectDraw2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  1345. #define IDirectDraw2_AddRef(p) (p)->lpVtbl->AddRef(p)
  1346. #define IDirectDraw2_Release(p) (p)->lpVtbl->Release(p)
  1347. /*** IDirectDraw methods ***/
  1348. #define IDirectDraw2_Compact(p) (p)->lpVtbl->Compact(p)
  1349. #define IDirectDraw2_CreateClipper(p,a,b,c) (p)->lpVtbl->CreateClipper(p,a,b,c)
  1350. #define IDirectDraw2_CreatePalette(p,a,b,c,d) (p)->lpVtbl->CreatePalette(p,a,b,c,d)
  1351. #define IDirectDraw2_CreateSurface(p,a,b,c) (p)->lpVtbl->CreateSurface(p,a,b,c)
  1352. #define IDirectDraw2_DuplicateSurface(p,a,b) (p)->lpVtbl->DuplicateSurface(p,a,b)
  1353. #define IDirectDraw2_EnumDisplayModes(p,a,b,c,d) (p)->lpVtbl->EnumDisplayModes(p,a,b,c,d)
  1354. #define IDirectDraw2_EnumSurfaces(p,a,b,c,d) (p)->lpVtbl->EnumSurfaces(p,a,b,c,d)
  1355. #define IDirectDraw2_FlipToGDISurface(p) (p)->lpVtbl->FlipToGDISurface(p)
  1356. #define IDirectDraw2_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b)
  1357. #define IDirectDraw2_GetDisplayMode(p,a) (p)->lpVtbl->GetDisplayMode(p,a)
  1358. #define IDirectDraw2_GetFourCCCodes(p,a,b) (p)->lpVtbl->GetFourCCCodes(p,a,b)
  1359. #define IDirectDraw2_GetGDISurface(p,a) (p)->lpVtbl->GetGDISurface(p,a)
  1360. #define IDirectDraw2_GetMonitorFrequency(p,a) (p)->lpVtbl->GetMonitorFrequency(p,a)
  1361. #define IDirectDraw2_GetScanLine(p,a) (p)->lpVtbl->GetScanLine(p,a)
  1362. #define IDirectDraw2_GetVerticalBlankStatus(p,a) (p)->lpVtbl->GetVerticalBlankStatus(p,a)
  1363. #define IDirectDraw2_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
  1364. #define IDirectDraw2_RestoreDisplayMode(p) (p)->lpVtbl->RestoreDisplayMode(p)
  1365. #define IDirectDraw2_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
  1366. #define IDirectDraw2_SetDisplayMode(p,a,b,c,d,e) (p)->lpVtbl->SetDisplayMode(p,a,b,c,d,e)
  1367. #define IDirectDraw2_WaitForVerticalBlank(p,a,b) (p)->lpVtbl->WaitForVerticalBlank(p,a,b)
  1368. /*** IDirectDraw2 methods ***/
  1369. #define IDirectDraw2_GetAvailableVidMem(p,a,b,c) (p)->lpVtbl->GetAvailableVidMem(p,a,b,c)
  1370. #else
  1371. /*** IUnknown methods ***/
  1372. #define IDirectDraw2_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  1373. #define IDirectDraw2_AddRef(p) (p)->AddRef()
  1374. #define IDirectDraw2_Release(p) (p)->Release()
  1375. /*** IDirectDraw methods ***/
  1376. #define IDirectDraw2_Compact(p) (p)->Compact()
  1377. #define IDirectDraw2_CreateClipper(p,a,b,c) (p)->CreateClipper(a,b,c)
  1378. #define IDirectDraw2_CreatePalette(p,a,b,c,d) (p)->CreatePalette(a,b,c,d)
  1379. #define IDirectDraw2_CreateSurface(p,a,b,c) (p)->CreateSurface(a,b,c)
  1380. #define IDirectDraw2_DuplicateSurface(p,a,b) (p)->DuplicateSurface(a,b)
  1381. #define IDirectDraw2_EnumDisplayModes(p,a,b,c,d) (p)->EnumDisplayModes(a,b,c,d)
  1382. #define IDirectDraw2_EnumSurfaces(p,a,b,c,d) (p)->EnumSurfaces(a,b,c,d)
  1383. #define IDirectDraw2_FlipToGDISurface(p) (p)->FlipToGDISurface()
  1384. #define IDirectDraw2_GetCaps(p,a,b) (p)->GetCaps(a,b)
  1385. #define IDirectDraw2_GetDisplayMode(p,a) (p)->GetDisplayMode(a)
  1386. #define IDirectDraw2_GetFourCCCodes(p,a,b) (p)->GetFourCCCodes(a,b)
  1387. #define IDirectDraw2_GetGDISurface(p,a) (p)->GetGDISurface(a)
  1388. #define IDirectDraw2_GetMonitorFrequency(p,a) (p)->GetMonitorFrequency(a)
  1389. #define IDirectDraw2_GetScanLine(p,a) (p)->GetScanLine(a)
  1390. #define IDirectDraw2_GetVerticalBlankStatus(p,a) (p)->GetVerticalBlankStatus(a)
  1391. #define IDirectDraw2_Initialize(p,a) (p)->Initialize(a)
  1392. #define IDirectDraw2_RestoreDisplayMode(p) (p)->RestoreDisplayMode()
  1393. #define IDirectDraw2_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)
  1394. #define IDirectDraw2_SetDisplayMode(p,a,b,c,d,e) (p)->SetDisplayMode(a,b,c,d,e)
  1395. #define IDirectDraw2_WaitForVerticalBlank(p,a,b) (p)->WaitForVerticalBlank(a,b)
  1396. /*** IDirectDraw2 methods ***/
  1397. #define IDirectDraw2_GetAvailableVidMem(p,a,b,c) (p)->GetAvailableVidMem(a,b,c)
  1398. #endif
  1399. /*****************************************************************************
  1400. * IDirectDraw4 interface
  1401. */
  1402. #define INTERFACE IDirectDraw4
  1403. DECLARE_INTERFACE_(IDirectDraw4,IUnknown)
  1404. {
  1405. /*** IUnknown methods ***/
  1406. /*00*/ STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
  1407. /*04*/ STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  1408. /*08*/ STDMETHOD_(ULONG,Release)(THIS) PURE;
  1409. /*** IDirectDraw4 methods ***/
  1410. /*0c*/ STDMETHOD(Compact)(THIS) PURE;
  1411. /*10*/ STDMETHOD(CreateClipper)(THIS_ DWORD dwFlags, LPDIRECTDRAWCLIPPER *lplpDDClipper, IUnknown *pUnkOuter) PURE;
  1412. /*14*/ STDMETHOD(CreatePalette)(THIS_ DWORD dwFlags, LPPALETTEENTRY lpColorTable, LPDIRECTDRAWPALETTE *lplpDDPalette, IUnknown *pUnkOuter) PURE;
  1413. /*18*/ STDMETHOD(CreateSurface)(THIS_ LPDDSURFACEDESC2 lpDDSurfaceDesc, LPDIRECTDRAWSURFACE4 *lplpDDSurface, IUnknown *pUnkOuter) PURE;
  1414. /*1c*/ STDMETHOD(DuplicateSurface)(THIS_ LPDIRECTDRAWSURFACE4 lpDDSurface, LPDIRECTDRAWSURFACE4 *lplpDupDDSurface) PURE;
  1415. /*20*/ STDMETHOD(EnumDisplayModes)(THIS_ DWORD dwFlags, LPDDSURFACEDESC2 lpDDSurfaceDesc, LPVOID lpContext, LPDDENUMMODESCALLBACK2 lpEnumModesCallback) PURE;
  1416. /*24*/ STDMETHOD(EnumSurfaces)(THIS_ DWORD dwFlags, LPDDSURFACEDESC2 lpDDSD, LPVOID lpContext, LPDDENUMSURFACESCALLBACK2 lpEnumSurfacesCallback) PURE;
  1417. /*28*/ STDMETHOD(FlipToGDISurface)(THIS) PURE;
  1418. /*2c*/ STDMETHOD(GetCaps)(THIS_ LPDDCAPS lpDDDriverCaps, LPDDCAPS lpDDHELCaps) PURE;
  1419. /*30*/ STDMETHOD(GetDisplayMode)(THIS_ LPDDSURFACEDESC2 lpDDSurfaceDesc) PURE;
  1420. /*34*/ STDMETHOD(GetFourCCCodes)(THIS_ LPDWORD lpNumCodes, LPDWORD lpCodes) PURE;
  1421. /*38*/ STDMETHOD(GetGDISurface)(THIS_ LPDIRECTDRAWSURFACE4 *lplpGDIDDSurface) PURE;
  1422. /*3c*/ STDMETHOD(GetMonitorFrequency)(THIS_ LPDWORD lpdwFrequency) PURE;
  1423. /*40*/ STDMETHOD(GetScanLine)(THIS_ LPDWORD lpdwScanLine) PURE;
  1424. /*44*/ STDMETHOD(GetVerticalBlankStatus)(THIS_ BOOL *lpbIsInVB) PURE;
  1425. /*48*/ STDMETHOD(Initialize)(THIS_ GUID *lpGUID) PURE;
  1426. /*4c*/ STDMETHOD(RestoreDisplayMode)(THIS) PURE;
  1427. /*50*/ STDMETHOD(SetCooperativeLevel)(THIS_ HWND hWnd, DWORD dwFlags) PURE;
  1428. /*54*/ STDMETHOD(SetDisplayMode)(THIS_ DWORD dwWidth, DWORD dwHeight, DWORD dwBPP, DWORD dwRefreshRate, DWORD dwFlags) PURE;
  1429. /*58*/ STDMETHOD(WaitForVerticalBlank)(THIS_ DWORD dwFlags, HANDLE hEvent) PURE;
  1430. /* added in v2 */
  1431. /*5c*/ STDMETHOD(GetAvailableVidMem)(THIS_ LPDDSCAPS2 lpDDCaps, LPDWORD lpdwTotal, LPDWORD lpdwFree) PURE;
  1432. /* added in v4 */
  1433. /*60*/ STDMETHOD(GetSurfaceFromDC)(THIS_ HDC hdc, LPDIRECTDRAWSURFACE4 *pSurf) PURE;
  1434. /*64*/ STDMETHOD(RestoreAllSurfaces)(THIS) PURE;
  1435. /*68*/ STDMETHOD(TestCooperativeLevel)(THIS) PURE;
  1436. /*6c*/ STDMETHOD(GetDeviceIdentifier)(THIS_ LPDDDEVICEIDENTIFIER pDDDI, DWORD dwFlags) PURE;
  1437. };
  1438. #undef INTERFACE
  1439. #if !defined(__cplusplus) || defined(CINTERFACE)
  1440. /*** IUnknown methods ***/
  1441. #define IDirectDraw4_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  1442. #define IDirectDraw4_AddRef(p) (p)->lpVtbl->AddRef(p)
  1443. #define IDirectDraw4_Release(p) (p)->lpVtbl->Release(p)
  1444. /*** IDirectDraw methods ***/
  1445. #define IDirectDraw4_Compact(p) (p)->lpVtbl->Compact(p)
  1446. #define IDirectDraw4_CreateClipper(p,a,b,c) (p)->lpVtbl->CreateClipper(p,a,b,c)
  1447. #define IDirectDraw4_CreatePalette(p,a,b,c,d) (p)->lpVtbl->CreatePalette(p,a,b,c,d)
  1448. #define IDirectDraw4_CreateSurface(p,a,b,c) (p)->lpVtbl->CreateSurface(p,a,b,c)
  1449. #define IDirectDraw4_DuplicateSurface(p,a,b) (p)->lpVtbl->DuplicateSurface(p,a,b)
  1450. #define IDirectDraw4_EnumDisplayModes(p,a,b,c,d) (p)->lpVtbl->EnumDisplayModes(p,a,b,c,d)
  1451. #define IDirectDraw4_EnumSurfaces(p,a,b,c,d) (p)->lpVtbl->EnumSurfaces(p,a,b,c,d)
  1452. #define IDirectDraw4_FlipToGDISurface(p) (p)->lpVtbl->FlipToGDISurface(p)
  1453. #define IDirectDraw4_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b)
  1454. #define IDirectDraw4_GetDisplayMode(p,a) (p)->lpVtbl->GetDisplayMode(p,a)
  1455. #define IDirectDraw4_GetFourCCCodes(p,a,b) (p)->lpVtbl->GetFourCCCodes(p,a,b)
  1456. #define IDirectDraw4_GetGDISurface(p,a) (p)->lpVtbl->GetGDISurface(p,a)
  1457. #define IDirectDraw4_GetMonitorFrequency(p,a) (p)->lpVtbl->GetMonitorFrequency(p,a)
  1458. #define IDirectDraw4_GetScanLine(p,a) (p)->lpVtbl->GetScanLine(p,a)
  1459. #define IDirectDraw4_GetVerticalBlankStatus(p,a) (p)->lpVtbl->GetVerticalBlankStatus(p,a)
  1460. #define IDirectDraw4_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
  1461. #define IDirectDraw4_RestoreDisplayMode(p) (p)->lpVtbl->RestoreDisplayMode(p)
  1462. #define IDirectDraw4_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
  1463. #define IDirectDraw4_SetDisplayMode(p,a,b,c,d,e) (p)->lpVtbl->SetDisplayMode(p,a,b,c,d,e)
  1464. #define IDirectDraw4_WaitForVerticalBlank(p,a,b) (p)->lpVtbl->WaitForVerticalBlank(p,a,b)
  1465. /*** IDirectDraw2 methods ***/
  1466. #define IDirectDraw4_GetAvailableVidMem(p,a,b,c) (p)->lpVtbl->GetAvailableVidMem(p,a,b,c)
  1467. /*** IDirectDraw4 methods ***/
  1468. #define IDirectDraw4_GetSurfaceFromDC(p,a,b) (p)->lpVtbl->GetSurfaceFromDC(p,a,b)
  1469. #define IDirectDraw4_RestoreAllSurfaces(pc) (p)->lpVtbl->RestoreAllSurfaces(p)
  1470. #define IDirectDraw4_TestCooperativeLevel(p) (p)->lpVtbl->TestCooperativeLevel(p)
  1471. #define IDirectDraw4_GetDeviceIdentifier(p,a,b) (p)->lpVtbl->GetDeviceIdentifier(p,a,b)
  1472. #else
  1473. /*** IUnknown methods ***/
  1474. #define IDirectDraw4_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  1475. #define IDirectDraw4_AddRef(p) (p)->AddRef()
  1476. #define IDirectDraw4_Release(p) (p)->Release()
  1477. /*** IDirectDraw methods ***/
  1478. #define IDirectDraw4_Compact(p) (p)->Compact()
  1479. #define IDirectDraw4_CreateClipper(p,a,b,c) (p)->CreateClipper(a,b,c)
  1480. #define IDirectDraw4_CreatePalette(p,a,b,c,d) (p)->CreatePalette(a,b,c,d)
  1481. #define IDirectDraw4_CreateSurface(p,a,b,c) (p)->CreateSurface(a,b,c)
  1482. #define IDirectDraw4_DuplicateSurface(p,a,b) (p)->DuplicateSurface(a,b)
  1483. #define IDirectDraw4_EnumDisplayModes(p,a,b,c,d) (p)->EnumDisplayModes(a,b,c,d)
  1484. #define IDirectDraw4_EnumSurfaces(p,a,b,c,d) (p)->EnumSurfaces(a,b,c,d)
  1485. #define IDirectDraw4_FlipToGDISurface(p) (p)->FlipToGDISurface()
  1486. #define IDirectDraw4_GetCaps(p,a,b) (p)->GetCaps(a,b)
  1487. #define IDirectDraw4_GetDisplayMode(p,a) (p)->GetDisplayMode(a)
  1488. #define IDirectDraw4_GetFourCCCodes(p,a,b) (p)->GetFourCCCodes(a,b)
  1489. #define IDirectDraw4_GetGDISurface(p,a) (p)->GetGDISurface(a)
  1490. #define IDirectDraw4_GetMonitorFrequency(p,a) (p)->GetMonitorFrequency(a)
  1491. #define IDirectDraw4_GetScanLine(p,a) (p)->GetScanLine(a)
  1492. #define IDirectDraw4_GetVerticalBlankStatus(p,a) (p)->GetVerticalBlankStatus(a)
  1493. #define IDirectDraw4_Initialize(p,a) (p)->Initialize(a)
  1494. #define IDirectDraw4_RestoreDisplayMode(p) (p)->RestoreDisplayMode()
  1495. #define IDirectDraw4_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)
  1496. #define IDirectDraw4_SetDisplayMode(p,a,b,c,d,e) (p)->SetDisplayMode(a,b,c,d,e)
  1497. #define IDirectDraw4_WaitForVerticalBlank(p,a,b) (p)->WaitForVerticalBlank(a,b)
  1498. /*** IDirectDraw2 methods ***/
  1499. #define IDirectDraw4_GetAvailableVidMem(p,a,b,c) (p)->GetAvailableVidMem(a,b,c)
  1500. /*** IDirectDraw4 methods ***/
  1501. #define IDirectDraw4_GetSurfaceFromDC(p,a,b) (p)->GetSurfaceFromDC(a,b)
  1502. #define IDirectDraw4_RestoreAllSurfaces(pc) (p)->RestoreAllSurfaces()
  1503. #define IDirectDraw4_TestCooperativeLevel(p) (p)->TestCooperativeLevel()
  1504. #define IDirectDraw4_GetDeviceIdentifier(p,a,b) (p)->GetDeviceIdentifier(a,b)
  1505. #endif
  1506. /*****************************************************************************
  1507. * IDirectDraw7 interface
  1508. */
  1509. /* Note: IDirectDraw7 cannot derive from IDirectDraw4; it is even documented
  1510. * as not interchangeable with earlier DirectDraw interfaces.
  1511. */
  1512. #define INTERFACE IDirectDraw7
  1513. DECLARE_INTERFACE_(IDirectDraw7,IUnknown)
  1514. {
  1515. /*** IUnknown methods ***/
  1516. /*00*/ STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
  1517. /*04*/ STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  1518. /*08*/ STDMETHOD_(ULONG,Release)(THIS) PURE;
  1519. /*** IDirectDraw7 methods ***/
  1520. /*0c*/ STDMETHOD(Compact)(THIS) PURE;
  1521. /*10*/ STDMETHOD(CreateClipper)(THIS_ DWORD dwFlags, LPDIRECTDRAWCLIPPER *lplpDDClipper, IUnknown *pUnkOuter) PURE;
  1522. /*14*/ STDMETHOD(CreatePalette)(THIS_ DWORD dwFlags, LPPALETTEENTRY lpColorTable, LPDIRECTDRAWPALETTE *lplpDDPalette, IUnknown *pUnkOuter) PURE;
  1523. /*18*/ STDMETHOD(CreateSurface)(THIS_ LPDDSURFACEDESC2 lpDDSurfaceDesc, LPDIRECTDRAWSURFACE7 *lplpDDSurface, IUnknown *pUnkOuter) PURE;
  1524. /*1c*/ STDMETHOD(DuplicateSurface)(THIS_ LPDIRECTDRAWSURFACE7 lpDDSurface, LPDIRECTDRAWSURFACE7 *lplpDupDDSurface) PURE;
  1525. /*20*/ STDMETHOD(EnumDisplayModes)(THIS_ DWORD dwFlags, LPDDSURFACEDESC2 lpDDSurfaceDesc, LPVOID lpContext, LPDDENUMMODESCALLBACK2 lpEnumModesCallback) PURE;
  1526. /*24*/ STDMETHOD(EnumSurfaces)(THIS_ DWORD dwFlags, LPDDSURFACEDESC2 lpDDSD, LPVOID lpContext, LPDDENUMSURFACESCALLBACK7 lpEnumSurfacesCallback) PURE;
  1527. /*28*/ STDMETHOD(FlipToGDISurface)(THIS) PURE;
  1528. /*2c*/ STDMETHOD(GetCaps)(THIS_ LPDDCAPS lpDDDriverCaps, LPDDCAPS lpDDHELCaps) PURE;
  1529. /*30*/ STDMETHOD(GetDisplayMode)(THIS_ LPDDSURFACEDESC2 lpDDSurfaceDesc) PURE;
  1530. /*34*/ STDMETHOD(GetFourCCCodes)(THIS_ LPDWORD lpNumCodes, LPDWORD lpCodes) PURE;
  1531. /*38*/ STDMETHOD(GetGDISurface)(THIS_ LPDIRECTDRAWSURFACE7 *lplpGDIDDSurface) PURE;
  1532. /*3c*/ STDMETHOD(GetMonitorFrequency)(THIS_ LPDWORD lpdwFrequency) PURE;
  1533. /*40*/ STDMETHOD(GetScanLine)(THIS_ LPDWORD lpdwScanLine) PURE;
  1534. /*44*/ STDMETHOD(GetVerticalBlankStatus)(THIS_ BOOL *lpbIsInVB) PURE;
  1535. /*48*/ STDMETHOD(Initialize)(THIS_ GUID *lpGUID) PURE;
  1536. /*4c*/ STDMETHOD(RestoreDisplayMode)(THIS) PURE;
  1537. /*50*/ STDMETHOD(SetCooperativeLevel)(THIS_ HWND hWnd, DWORD dwFlags) PURE;
  1538. /*54*/ STDMETHOD(SetDisplayMode)(THIS_ DWORD dwWidth, DWORD dwHeight, DWORD dwBPP, DWORD dwRefreshRate, DWORD dwFlags) PURE;
  1539. /*58*/ STDMETHOD(WaitForVerticalBlank)(THIS_ DWORD dwFlags, HANDLE hEvent) PURE;
  1540. /* added in v2 */
  1541. /*5c*/ STDMETHOD(GetAvailableVidMem)(THIS_ LPDDSCAPS2 lpDDCaps, LPDWORD lpdwTotal, LPDWORD lpdwFree) PURE;
  1542. /* added in v4 */
  1543. /*60*/ STDMETHOD(GetSurfaceFromDC)(THIS_ HDC hdc, LPDIRECTDRAWSURFACE7 *pSurf) PURE;
  1544. /*64*/ STDMETHOD(RestoreAllSurfaces)(THIS) PURE;
  1545. /*68*/ STDMETHOD(TestCooperativeLevel)(THIS) PURE;
  1546. /*6c*/ STDMETHOD(GetDeviceIdentifier)(THIS_ LPDDDEVICEIDENTIFIER2 pDDDI, DWORD dwFlags) PURE;
  1547. /* added in v7 */
  1548. /*70*/ STDMETHOD(StartModeTest)(THIS_ LPSIZE pModes, DWORD dwNumModes, DWORD dwFlags) PURE;
  1549. /*74*/ STDMETHOD(EvaluateMode)(THIS_ DWORD dwFlags, DWORD *pTimeout) PURE;
  1550. };
  1551. #undef INTERFACE
  1552. #if !defined(__cplusplus) || defined(CINTERFACE)
  1553. /*** IUnknown methods ***/
  1554. #define IDirectDraw7_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  1555. #define IDirectDraw7_AddRef(p) (p)->lpVtbl->AddRef(p)
  1556. #define IDirectDraw7_Release(p) (p)->lpVtbl->Release(p)
  1557. /*** IDirectDraw methods ***/
  1558. #define IDirectDraw7_Compact(p) (p)->lpVtbl->Compact(p)
  1559. #define IDirectDraw7_CreateClipper(p,a,b,c) (p)->lpVtbl->CreateClipper(p,a,b,c)
  1560. #define IDirectDraw7_CreatePalette(p,a,b,c,d) (p)->lpVtbl->CreatePalette(p,a,b,c,d)
  1561. #define IDirectDraw7_CreateSurface(p,a,b,c) (p)->lpVtbl->CreateSurface(p,a,b,c)
  1562. #define IDirectDraw7_DuplicateSurface(p,a,b) (p)->lpVtbl->DuplicateSurface(p,a,b)
  1563. #define IDirectDraw7_EnumDisplayModes(p,a,b,c,d) (p)->lpVtbl->EnumDisplayModes(p,a,b,c,d)
  1564. #define IDirectDraw7_EnumSurfaces(p,a,b,c,d) (p)->lpVtbl->EnumSurfaces(p,a,b,c,d)
  1565. #define IDirectDraw7_FlipToGDISurface(p) (p)->lpVtbl->FlipToGDISurface(p)
  1566. #define IDirectDraw7_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b)
  1567. #define IDirectDraw7_GetDisplayMode(p,a) (p)->lpVtbl->GetDisplayMode(p,a)
  1568. #define IDirectDraw7_GetFourCCCodes(p,a,b) (p)->lpVtbl->GetFourCCCodes(p,a,b)
  1569. #define IDirectDraw7_GetGDISurface(p,a) (p)->lpVtbl->GetGDISurface(p,a)
  1570. #define IDirectDraw7_GetMonitorFrequency(p,a) (p)->lpVtbl->GetMonitorFrequency(p,a)
  1571. #define IDirectDraw7_GetScanLine(p,a) (p)->lpVtbl->GetScanLine(p,a)
  1572. #define IDirectDraw7_GetVerticalBlankStatus(p,a) (p)->lpVtbl->GetVerticalBlankStatus(p,a)
  1573. #define IDirectDraw7_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
  1574. #define IDirectDraw7_RestoreDisplayMode(p) (p)->lpVtbl->RestoreDisplayMode(p)
  1575. #define IDirectDraw7_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
  1576. #define IDirectDraw7_SetDisplayMode(p,a,b,c,d,e) (p)->lpVtbl->SetDisplayMode(p,a,b,c,d,e)
  1577. #define IDirectDraw7_WaitForVerticalBlank(p,a,b) (p)->lpVtbl->WaitForVerticalBlank(p,a,b)
  1578. /*** added in IDirectDraw2 ***/
  1579. #define IDirectDraw7_GetAvailableVidMem(p,a,b,c) (p)->lpVtbl->GetAvailableVidMem(p,a,b,c)
  1580. /*** added in IDirectDraw4 ***/
  1581. #define IDirectDraw7_GetSurfaceFromDC(p,a,b) (p)->lpVtbl->GetSurfaceFromDC(p,a,b)
  1582. #define IDirectDraw7_RestoreAllSurfaces(p) (p)->lpVtbl->RestoreAllSurfaces(p)
  1583. #define IDirectDraw7_TestCooperativeLevel(p) (p)->lpVtbl->TestCooperativeLevel(p)
  1584. #define IDirectDraw7_GetDeviceIdentifier(p,a,b) (p)->lpVtbl->GetDeviceIdentifier(p,a,b)
  1585. /*** added in IDirectDraw 7 ***/
  1586. #define IDirectDraw7_StartModeTest(p,a,b,c) (p)->lpVtbl->StartModeTest(p,a,b,c)
  1587. #define IDirectDraw7_EvaluateMode(p,a,b) (p)->lpVtbl->EvaluateMode(p,a,b)
  1588. #else
  1589. /*** IUnknown methods ***/
  1590. #define IDirectDraw7_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  1591. #define IDirectDraw7_AddRef(p) (p)->AddRef()
  1592. #define IDirectDraw7_Release(p) (p)->Release()
  1593. /*** IDirectDraw methods ***/
  1594. #define IDirectDraw7_Compact(p) (p)->Compact()
  1595. #define IDirectDraw7_CreateClipper(p,a,b,c) (p)->CreateClipper(a,b,c)
  1596. #define IDirectDraw7_CreatePalette(p,a,b,c,d) (p)->CreatePalette(a,b,c,d)
  1597. #define IDirectDraw7_CreateSurface(p,a,b,c) (p)->CreateSurface(a,b,c)
  1598. #define IDirectDraw7_DuplicateSurface(p,a,b) (p)->DuplicateSurface(a,b)
  1599. #define IDirectDraw7_EnumDisplayModes(p,a,b,c,d) (p)->EnumDisplayModes(a,b,c,d)
  1600. #define IDirectDraw7_EnumSurfaces(p,a,b,c,d) (p)->EnumSurfaces(a,b,c,d)
  1601. #define IDirectDraw7_FlipToGDISurface(p) (p)->FlipToGDISurface()
  1602. #define IDirectDraw7_GetCaps(p,a,b) (p)->GetCaps(a,b)
  1603. #define IDirectDraw7_GetDisplayMode(p,a) (p)->GetDisplayMode(a)
  1604. #define IDirectDraw7_GetFourCCCodes(p,a,b) (p)->GetFourCCCodes(a,b)
  1605. #define IDirectDraw7_GetGDISurface(p,a) (p)->GetGDISurface(a)
  1606. #define IDirectDraw7_GetMonitorFrequency(p,a) (p)->GetMonitorFrequency(a)
  1607. #define IDirectDraw7_GetScanLine(p,a) (p)->GetScanLine(a)
  1608. #define IDirectDraw7_GetVerticalBlankStatus(p,a) (p)->GetVerticalBlankStatus(a)
  1609. #define IDirectDraw7_Initialize(p,a) (p)->Initialize(a)
  1610. #define IDirectDraw7_RestoreDisplayMode(p) (p)->RestoreDisplayMode()
  1611. #define IDirectDraw7_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)
  1612. #define IDirectDraw7_SetDisplayMode(p,a,b,c,d,e) (p)->SetDisplayMode(a,b,c,d,e)
  1613. #define IDirectDraw7_WaitForVerticalBlank(p,a,b) (p)->WaitForVerticalBlank(a,b)
  1614. /*** added in IDirectDraw2 ***/
  1615. #define IDirectDraw7_GetAvailableVidMem(p,a,b,c) (p)->GetAvailableVidMem(a,b,c)
  1616. /*** added in IDirectDraw4 ***/
  1617. #define IDirectDraw7_GetSurfaceFromDC(p,a,b) (p)->GetSurfaceFromDC(a,b)
  1618. #define IDirectDraw7_RestoreAllSurfaces(p) (p)->RestoreAllSurfaces()
  1619. #define IDirectDraw7_TestCooperativeLevel(p) (p)->TestCooperativeLevel()
  1620. #define IDirectDraw7_GetDeviceIdentifier(p,a,b) (p)->GetDeviceIdentifier(a,b)
  1621. /*** added in IDirectDraw 7 ***/
  1622. #define IDirectDraw7_StartModeTest(p,a,b,c) (p)->StartModeTest(a,b,c)
  1623. #define IDirectDraw7_EvaluateMode(p,a,b) (p)->EvaluateMode(a,b)
  1624. #endif
  1625. /*****************************************************************************
  1626. * IDirectDrawSurface interface
  1627. */
  1628. #define INTERFACE IDirectDrawSurface
  1629. DECLARE_INTERFACE_(IDirectDrawSurface,IUnknown)
  1630. {
  1631. /*** IUnknown methods ***/
  1632. /*00*/ STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
  1633. /*04*/ STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  1634. /*08*/ STDMETHOD_(ULONG,Release)(THIS) PURE;
  1635. /*** IDirectDrawSurface methods ***/
  1636. /*0c*/ STDMETHOD(AddAttachedSurface)(THIS_ LPDIRECTDRAWSURFACE lpDDSAttachedSurface) PURE;
  1637. /*10*/ STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT lpRect) PURE;
  1638. /*14*/ STDMETHOD(Blt)(THIS_ LPRECT lpDestRect, LPDIRECTDRAWSURFACE lpDDSrcSurface, LPRECT lpSrcRect, DWORD dwFlags, LPDDBLTFX lpDDBltFx) PURE;
  1639. /*18*/ STDMETHOD(BltBatch)(THIS_ LPDDBLTBATCH lpDDBltBatch, DWORD dwCount, DWORD dwFlags) PURE;
  1640. /*1c*/ STDMETHOD(BltFast)(THIS_ DWORD dwX, DWORD dwY, LPDIRECTDRAWSURFACE lpDDSrcSurface, LPRECT lpSrcRect, DWORD dwTrans) PURE;
  1641. /*20*/ STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD dwFlags, LPDIRECTDRAWSURFACE lpDDSAttachedSurface) PURE;
  1642. /*24*/ STDMETHOD(EnumAttachedSurfaces)(THIS_ LPVOID lpContext, LPDDENUMSURFACESCALLBACK lpEnumSurfacesCallback) PURE;
  1643. /*28*/ STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD dwFlags, LPVOID lpContext, LPDDENUMSURFACESCALLBACK lpfnCallback) PURE;
  1644. /*2c*/ STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE lpDDSurfaceTargetOverride, DWORD dwFlags) PURE;
  1645. /*30*/ STDMETHOD(GetAttachedSurface)(THIS_ LPDDSCAPS lpDDSCaps, LPDIRECTDRAWSURFACE *lplpDDAttachedSurface) PURE;
  1646. /*34*/ STDMETHOD(GetBltStatus)(THIS_ DWORD dwFlags) PURE;
  1647. /*38*/ STDMETHOD(GetCaps)(THIS_ LPDDSCAPS lpDDSCaps) PURE;
  1648. /*3c*/ STDMETHOD(GetClipper)(THIS_ LPDIRECTDRAWCLIPPER *lplpDDClipper) PURE;
  1649. /*40*/ STDMETHOD(GetColorKey)(THIS_ DWORD dwFlags, LPDDCOLORKEY lpDDColorKey) PURE;
  1650. /*44*/ STDMETHOD(GetDC)(THIS_ HDC *lphDC) PURE;
  1651. /*48*/ STDMETHOD(GetFlipStatus)(THIS_ DWORD dwFlags) PURE;
  1652. /*4c*/ STDMETHOD(GetOverlayPosition)(THIS_ LPLONG lplX, LPLONG lplY) PURE;
  1653. /*50*/ STDMETHOD(GetPalette)(THIS_ LPDIRECTDRAWPALETTE *lplpDDPalette) PURE;
  1654. /*54*/ STDMETHOD(GetPixelFormat)(THIS_ LPDDPIXELFORMAT lpDDPixelFormat) PURE;
  1655. /*58*/ STDMETHOD(GetSurfaceDesc)(THIS_ LPDDSURFACEDESC lpDDSurfaceDesc) PURE;
  1656. /*5c*/ STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW lpDD, LPDDSURFACEDESC lpDDSurfaceDesc) PURE;
  1657. /*60*/ STDMETHOD(IsLost)(THIS) PURE;
  1658. /*64*/ STDMETHOD(Lock)(THIS_ LPRECT lpDestRect, LPDDSURFACEDESC lpDDSurfaceDesc, DWORD dwFlags, HANDLE hEvent) PURE;
  1659. /*68*/ STDMETHOD(ReleaseDC)(THIS_ HDC hDC) PURE;
  1660. /*6c*/ STDMETHOD(Restore)(THIS) PURE;
  1661. /*70*/ STDMETHOD(SetClipper)(THIS_ LPDIRECTDRAWCLIPPER lpDDClipper) PURE;
  1662. /*74*/ STDMETHOD(SetColorKey)(THIS_ DWORD dwFlags, LPDDCOLORKEY lpDDColorKey) PURE;
  1663. /*78*/ STDMETHOD(SetOverlayPosition)(THIS_ LONG lX, LONG lY) PURE;
  1664. /*7c*/ STDMETHOD(SetPalette)(THIS_ LPDIRECTDRAWPALETTE lpDDPalette) PURE;
  1665. /*80*/ STDMETHOD(Unlock)(THIS_ LPVOID lpSurfaceData) PURE;
  1666. /*84*/ STDMETHOD(UpdateOverlay)(THIS_ LPRECT lpSrcRect, LPDIRECTDRAWSURFACE lpDDDestSurface, LPRECT lpDestRect, DWORD dwFlags, LPDDOVERLAYFX lpDDOverlayFx) PURE;
  1667. /*88*/ STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD dwFlags) PURE;
  1668. /*8c*/ STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD dwFlags, LPDIRECTDRAWSURFACE lpDDSReference) PURE;
  1669. };
  1670. #undef INTERFACE
  1671. #if !defined(__cplusplus) || defined(CINTERFACE)
  1672. /*** IUnknown methods ***/
  1673. #define IDirectDrawSurface_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  1674. #define IDirectDrawSurface_AddRef(p) (p)->lpVtbl->AddRef(p)
  1675. #define IDirectDrawSurface_Release(p) (p)->lpVtbl->Release(p)
  1676. /*** IDirectDrawSurface methods ***/
  1677. #define IDirectDrawSurface_AddAttachedSurface(p,a) (p)->lpVtbl->AddAttachedSurface(p,a)
  1678. #define IDirectDrawSurface_AddOverlayDirtyRect(p,a) (p)->lpVtbl->AddOverlayDirtyRect(p,a)
  1679. #define IDirectDrawSurface_Blt(p,a,b,c,d,e) (p)->lpVtbl->Blt(p,a,b,c,d,e)
  1680. #define IDirectDrawSurface_BltBatch(p,a,b,c) (p)->lpVtbl->BltBatch(p,a,b,c)
  1681. #define IDirectDrawSurface_BltFast(p,a,b,c,d,e) (p)->lpVtbl->BltFast(p,a,b,c,d,e)
  1682. #define IDirectDrawSurface_DeleteAttachedSurface(p,a,b) (p)->lpVtbl->DeleteAttachedSurface(p,a,b)
  1683. #define IDirectDrawSurface_EnumAttachedSurfaces(p,a,b) (p)->lpVtbl->EnumAttachedSurfaces(p,a,b)
  1684. #define IDirectDrawSurface_EnumOverlayZOrders(p,a,b,c) (p)->lpVtbl->EnumOverlayZOrders(p,a,b,c)
  1685. #define IDirectDrawSurface_Flip(p,a,b) (p)->lpVtbl->Flip(p,a,b)
  1686. #define IDirectDrawSurface_GetAttachedSurface(p,a,b) (p)->lpVtbl->GetAttachedSurface(p,a,b)
  1687. #define IDirectDrawSurface_GetBltStatus(p,a) (p)->lpVtbl->GetBltStatus(p,a)
  1688. #define IDirectDrawSurface_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a)
  1689. #define IDirectDrawSurface_GetClipper(p,a) (p)->lpVtbl->GetClipper(p,a)
  1690. #define IDirectDrawSurface_GetColorKey(p,a,b) (p)->lpVtbl->GetColorKey(p,a,b)
  1691. #define IDirectDrawSurface_GetDC(p,a) (p)->lpVtbl->GetDC(p,a)
  1692. #define IDirectDrawSurface_GetFlipStatus(p,a) (p)->lpVtbl->GetFlipStatus(p,a)
  1693. #define IDirectDrawSurface_GetOverlayPosition(p,a,b) (p)->lpVtbl->GetOverlayPosition(p,a,b)
  1694. #define IDirectDrawSurface_GetPalette(p,a) (p)->lpVtbl->GetPalette(p,a)
  1695. #define IDirectDrawSurface_GetPixelFormat(p,a) (p)->lpVtbl->GetPixelFormat(p,a)
  1696. #define IDirectDrawSurface_GetSurfaceDesc(p,a) (p)->lpVtbl->GetSurfaceDesc(p,a)
  1697. #define IDirectDrawSurface_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
  1698. #define IDirectDrawSurface_IsLost(p) (p)->lpVtbl->IsLost(p)
  1699. #define IDirectDrawSurface_Lock(p,a,b,c,d) (p)->lpVtbl->Lock(p,a,b,c,d)
  1700. #define IDirectDrawSurface_ReleaseDC(p,a) (p)->lpVtbl->ReleaseDC(p,a)
  1701. #define IDirectDrawSurface_Restore(p) (p)->lpVtbl->Restore(p)
  1702. #define IDirectDrawSurface_SetClipper(p,a) (p)->lpVtbl->SetClipper(p,a)
  1703. #define IDirectDrawSurface_SetColorKey(p,a,b) (p)->lpVtbl->SetColorKey(p,a,b)
  1704. #define IDirectDrawSurface_SetOverlayPosition(p,a,b) (p)->lpVtbl->SetOverlayPosition(p,a,b)
  1705. #define IDirectDrawSurface_SetPalette(p,a) (p)->lpVtbl->SetPalette(p,a)
  1706. #define IDirectDrawSurface_Unlock(p,a) (p)->lpVtbl->Unlock(p,a)
  1707. #define IDirectDrawSurface_UpdateOverlay(p,a,b,c,d,e) (p)->lpVtbl->UpdateOverlay(p,a,b,c,d,e)
  1708. #define IDirectDrawSurface_UpdateOverlayDisplay(p,a) (p)->lpVtbl->UpdateOverlayDisplay(p,a)
  1709. #define IDirectDrawSurface_UpdateOverlayZOrder(p,a,b) (p)->lpVtbl->UpdateOverlayZOrder(p,a,b)
  1710. #else
  1711. /*** IUnknown methods ***/
  1712. #define IDirectDrawSurface_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  1713. #define IDirectDrawSurface_AddRef(p) (p)->AddRef()
  1714. #define IDirectDrawSurface_Release(p) (p)->Release()
  1715. /*** IDirectDrawSurface methods ***/
  1716. #define IDirectDrawSurface_AddAttachedSurface(p,a) (p)->AddAttachedSurface(a)
  1717. #define IDirectDrawSurface_AddOverlayDirtyRect(p,a) (p)->AddOverlayDirtyRect(a)
  1718. #define IDirectDrawSurface_Blt(p,a,b,c,d,e) (p)->Blt(a,b,c,d,e)
  1719. #define IDirectDrawSurface_BltBatch(p,a,b,c) (p)->BltBatch(a,b,c)
  1720. #define IDirectDrawSurface_BltFast(p,a,b,c,d,e) (p)->BltFast(a,b,c,d,e)
  1721. #define IDirectDrawSurface_DeleteAttachedSurface(p,a,b) (p)->DeleteAttachedSurface(a,b)
  1722. #define IDirectDrawSurface_EnumAttachedSurfaces(p,a,b) (p)->EnumAttachedSurfaces(a,b)
  1723. #define IDirectDrawSurface_EnumOverlayZOrders(p,a,b,c) (p)->EnumOverlayZOrders(a,b,c)
  1724. #define IDirectDrawSurface_Flip(p,a,b) (p)->Flip(a,b)
  1725. #define IDirectDrawSurface_GetAttachedSurface(p,a,b) (p)->GetAttachedSurface(a,b)
  1726. #define IDirectDrawSurface_GetBltStatus(p,a) (p)->GetBltStatus(a)
  1727. #define IDirectDrawSurface_GetCaps(p,a) (p)->GetCaps(a)
  1728. #define IDirectDrawSurface_GetClipper(p,a) (p)->GetClipper(a)
  1729. #define IDirectDrawSurface_GetColorKey(p,a,b) (p)->GetColorKey(a,b)
  1730. #define IDirectDrawSurface_GetDC(p,a) (p)->GetDC(a)
  1731. #define IDirectDrawSurface_GetFlipStatus(p,a) (p)->GetFlipStatus(a)
  1732. #define IDirectDrawSurface_GetOverlayPosition(p,a,b) (p)->GetOverlayPosition(a,b)
  1733. #define IDirectDrawSurface_GetPalette(p,a) (p)->GetPalette(a)
  1734. #define IDirectDrawSurface_GetPixelFormat(p,a) (p)->GetPixelFormat(a)
  1735. #define IDirectDrawSurface_GetSurfaceDesc(p,a) (p)->GetSurfaceDesc(a)
  1736. #define IDirectDrawSurface_Initialize(p,a,b) (p)->Initialize(a,b)
  1737. #define IDirectDrawSurface_IsLost(p) (p)->IsLost()
  1738. #define IDirectDrawSurface_Lock(p,a,b,c,d) (p)->Lock(a,b,c,d)
  1739. #define IDirectDrawSurface_ReleaseDC(p,a) (p)->ReleaseDC(a)
  1740. #define IDirectDrawSurface_Restore(p) (p)->Restore()
  1741. #define IDirectDrawSurface_SetClipper(p,a) (p)->SetClipper(a)
  1742. #define IDirectDrawSurface_SetColorKey(p,a,b) (p)->SetColorKey(a,b)
  1743. #define IDirectDrawSurface_SetOverlayPosition(p,a,b) (p)->SetOverlayPosition(a,b)
  1744. #define IDirectDrawSurface_SetPalette(p,a) (p)->SetPalette(a)
  1745. #define IDirectDrawSurface_Unlock(p,a) (p)->Unlock(a)
  1746. #define IDirectDrawSurface_UpdateOverlay(p,a,b,c,d,e) (p)->UpdateOverlay(a,b,c,d,e)
  1747. #define IDirectDrawSurface_UpdateOverlayDisplay(p,a) (p)->UpdateOverlayDisplay(a)
  1748. #define IDirectDrawSurface_UpdateOverlayZOrder(p,a,b) (p)->UpdateOverlayZOrder(a,b)
  1749. #endif
  1750. /*****************************************************************************
  1751. * IDirectDrawSurface2 interface
  1752. */
  1753. /* Cannot inherit from IDirectDrawSurface because the LPDIRECTDRAWSURFACE parameters
  1754. * have been converted to LPDIRECTDRAWSURFACE2.
  1755. */
  1756. #define INTERFACE IDirectDrawSurface2
  1757. DECLARE_INTERFACE_(IDirectDrawSurface2,IUnknown)
  1758. {
  1759. /*** IUnknown methods ***/
  1760. STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
  1761. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  1762. STDMETHOD_(ULONG,Release)(THIS) PURE;
  1763. /*** IDirectDrawSurface2 methods ***/
  1764. STDMETHOD(AddAttachedSurface)(THIS_ LPDIRECTDRAWSURFACE2 lpDDSAttachedSurface) PURE;
  1765. STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT lpRect) PURE;
  1766. STDMETHOD(Blt)(THIS_ LPRECT lpDestRect, LPDIRECTDRAWSURFACE2 lpDDSrcSurface, LPRECT lpSrcRect, DWORD dwFlags, LPDDBLTFX lpDDBltFx) PURE;
  1767. STDMETHOD(BltBatch)(THIS_ LPDDBLTBATCH lpDDBltBatch, DWORD dwCount, DWORD dwFlags) PURE;
  1768. STDMETHOD(BltFast)(THIS_ DWORD dwX, DWORD dwY, LPDIRECTDRAWSURFACE2 lpDDSrcSurface, LPRECT lpSrcRect, DWORD dwTrans) PURE;
  1769. STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD dwFlags, LPDIRECTDRAWSURFACE2 lpDDSAttachedSurface) PURE;
  1770. STDMETHOD(EnumAttachedSurfaces)(THIS_ LPVOID lpContext, LPDDENUMSURFACESCALLBACK lpEnumSurfacesCallback) PURE;
  1771. STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD dwFlags, LPVOID lpContext, LPDDENUMSURFACESCALLBACK lpfnCallback) PURE;
  1772. STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE2 lpDDSurfaceTargetOverride, DWORD dwFlags) PURE;
  1773. STDMETHOD(GetAttachedSurface)(THIS_ LPDDSCAPS lpDDSCaps, LPDIRECTDRAWSURFACE2 *lplpDDAttachedSurface) PURE;
  1774. STDMETHOD(GetBltStatus)(THIS_ DWORD dwFlags) PURE;
  1775. STDMETHOD(GetCaps)(THIS_ LPDDSCAPS lpDDSCaps) PURE;
  1776. STDMETHOD(GetClipper)(THIS_ LPDIRECTDRAWCLIPPER *lplpDDClipper) PURE;
  1777. STDMETHOD(GetColorKey)(THIS_ DWORD dwFlags, LPDDCOLORKEY lpDDColorKey) PURE;
  1778. STDMETHOD(GetDC)(THIS_ HDC *lphDC) PURE;
  1779. STDMETHOD(GetFlipStatus)(THIS_ DWORD dwFlags) PURE;
  1780. STDMETHOD(GetOverlayPosition)(THIS_ LPLONG lplX, LPLONG lplY) PURE;
  1781. STDMETHOD(GetPalette)(THIS_ LPDIRECTDRAWPALETTE *lplpDDPalette) PURE;
  1782. STDMETHOD(GetPixelFormat)(THIS_ LPDDPIXELFORMAT lpDDPixelFormat) PURE;
  1783. STDMETHOD(GetSurfaceDesc)(THIS_ LPDDSURFACEDESC lpDDSurfaceDesc) PURE;
  1784. STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW lpDD, LPDDSURFACEDESC lpDDSurfaceDesc) PURE;
  1785. STDMETHOD(IsLost)(THIS) PURE;
  1786. STDMETHOD(Lock)(THIS_ LPRECT lpDestRect, LPDDSURFACEDESC lpDDSurfaceDesc, DWORD dwFlags, HANDLE hEvent) PURE;
  1787. STDMETHOD(ReleaseDC)(THIS_ HDC hDC) PURE;
  1788. STDMETHOD(Restore)(THIS) PURE;
  1789. STDMETHOD(SetClipper)(THIS_ LPDIRECTDRAWCLIPPER lpDDClipper) PURE;
  1790. STDMETHOD(SetColorKey)(THIS_ DWORD dwFlags, LPDDCOLORKEY lpDDColorKey) PURE;
  1791. STDMETHOD(SetOverlayPosition)(THIS_ LONG lX, LONG lY) PURE;
  1792. STDMETHOD(SetPalette)(THIS_ LPDIRECTDRAWPALETTE lpDDPalette) PURE;
  1793. STDMETHOD(Unlock)(THIS_ LPVOID lpSurfaceData) PURE;
  1794. STDMETHOD(UpdateOverlay)(THIS_ LPRECT lpSrcRect, LPDIRECTDRAWSURFACE2 lpDDDestSurface, LPRECT lpDestRect, DWORD dwFlags, LPDDOVERLAYFX lpDDOverlayFx) PURE;
  1795. STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD dwFlags) PURE;
  1796. STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD dwFlags, LPDIRECTDRAWSURFACE2 lpDDSReference) PURE;
  1797. /* added in v2 */
  1798. STDMETHOD(GetDDInterface)(THIS_ LPVOID *lplpDD) PURE;
  1799. STDMETHOD(PageLock)(THIS_ DWORD dwFlags) PURE;
  1800. STDMETHOD(PageUnlock)(THIS_ DWORD dwFlags) PURE;
  1801. };
  1802. #undef INTERFACE
  1803. #if !defined(__cplusplus) || defined(CINTERFACE)
  1804. /*** IUnknown methods ***/
  1805. #define IDirectDrawSurface2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  1806. #define IDirectDrawSurface2_AddRef(p) (p)->lpVtbl->AddRef(p)
  1807. #define IDirectDrawSurface2_Release(p) (p)->lpVtbl->Release(p)
  1808. /*** IDirectDrawSurface methods (almost) ***/
  1809. #define IDirectDrawSurface2_AddAttachedSurface(p,a) (p)->lpVtbl->AddAttachedSurface(p,a)
  1810. #define IDirectDrawSurface2_AddOverlayDirtyRect(p,a) (p)->lpVtbl->AddOverlayDirtyRect(p,a)
  1811. #define IDirectDrawSurface2_Blt(p,a,b,c,d,e) (p)->lpVtbl->Blt(p,a,b,c,d,e)
  1812. #define IDirectDrawSurface2_BltBatch(p,a,b,c) (p)->lpVtbl->BltBatch(p,a,b,c)
  1813. #define IDirectDrawSurface2_BltFast(p,a,b,c,d,e) (p)->lpVtbl->BltFast(p,a,b,c,d,e)
  1814. #define IDirectDrawSurface2_DeleteAttachedSurface(p,a,b) (p)->lpVtbl->DeleteAttachedSurface(p,a,b)
  1815. #define IDirectDrawSurface2_EnumAttachedSurfaces(p,a,b) (p)->lpVtbl->EnumAttachedSurfaces(p,a,b)
  1816. #define IDirectDrawSurface2_EnumOverlayZOrders(p,a,b,c) (p)->lpVtbl->EnumOverlayZOrders(p,a,b,c)
  1817. #define IDirectDrawSurface2_Flip(p,a,b) (p)->lpVtbl->Flip(p,a,b)
  1818. #define IDirectDrawSurface2_GetAttachedSurface(p,a,b) (p)->lpVtbl->GetAttachedSurface(p,a,b)
  1819. #define IDirectDrawSurface2_GetBltStatus(p,a) (p)->lpVtbl->GetBltStatus(p,a)
  1820. #define IDirectDrawSurface2_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a)
  1821. #define IDirectDrawSurface2_GetClipper(p,a) (p)->lpVtbl->GetClipper(p,a)
  1822. #define IDirectDrawSurface2_GetColorKey(p,a,b) (p)->lpVtbl->GetColorKey(p,a,b)
  1823. #define IDirectDrawSurface2_GetDC(p,a) (p)->lpVtbl->GetDC(p,a)
  1824. #define IDirectDrawSurface2_GetFlipStatus(p,a) (p)->lpVtbl->GetFlipStatus(p,a)
  1825. #define IDirectDrawSurface2_GetOverlayPosition(p,a,b) (p)->lpVtbl->GetOverlayPosition(p,a,b)
  1826. #define IDirectDrawSurface2_GetPalette(p,a) (p)->lpVtbl->GetPalette(p,a)
  1827. #define IDirectDrawSurface2_GetPixelFormat(p,a) (p)->lpVtbl->GetPixelFormat(p,a)
  1828. #define IDirectDrawSurface2_GetSurfaceDesc(p,a) (p)->lpVtbl->GetSurfaceDesc(p,a)
  1829. #define IDirectDrawSurface2_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
  1830. #define IDirectDrawSurface2_IsLost(p) (p)->lpVtbl->IsLost(p)
  1831. #define IDirectDrawSurface2_Lock(p,a,b,c,d) (p)->lpVtbl->Lock(p,a,b,c,d)
  1832. #define IDirectDrawSurface2_ReleaseDC(p,a) (p)->lpVtbl->ReleaseDC(p,a)
  1833. #define IDirectDrawSurface2_Restore(p) (p)->lpVtbl->Restore(p)
  1834. #define IDirectDrawSurface2_SetClipper(p,a) (p)->lpVtbl->SetClipper(p,a)
  1835. #define IDirectDrawSurface2_SetColorKey(p,a,b) (p)->lpVtbl->SetColorKey(p,a,b)
  1836. #define IDirectDrawSurface2_SetOverlayPosition(p,a,b) (p)->lpVtbl->SetOverlayPosition(p,a,b)
  1837. #define IDirectDrawSurface2_SetPalette(p,a) (p)->lpVtbl->SetPalette(p,a)
  1838. #define IDirectDrawSurface2_Unlock(p,a) (p)->lpVtbl->Unlock(p,a)
  1839. #define IDirectDrawSurface2_UpdateOverlay(p,a,b,c,d,e) (p)->lpVtbl->UpdateOverlay(p,a,b,c,d,e)
  1840. #define IDirectDrawSurface2_UpdateOverlayDisplay(p,a) (p)->lpVtbl->UpdateOverlayDisplay(p,a)
  1841. #define IDirectDrawSurface2_UpdateOverlayZOrder(p,a,b) (p)->lpVtbl->UpdateOverlayZOrder(p,a,b)
  1842. /*** IDirectDrawSurface2 methods ***/
  1843. #define IDirectDrawSurface2_GetDDInterface(p,a) (p)->lpVtbl->GetDDInterface(p,a)
  1844. #define IDirectDrawSurface2_PageLock(p,a) (p)->lpVtbl->PageLock(p,a)
  1845. #define IDirectDrawSurface2_PageUnlock(p,a) (p)->lpVtbl->PageUnlock(p,a)
  1846. #else
  1847. /*** IUnknown methods ***/
  1848. #define IDirectDrawSurface2_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  1849. #define IDirectDrawSurface2_AddRef(p) (p)->AddRef()
  1850. #define IDirectDrawSurface2_Release(p) (p)->Release()
  1851. /*** IDirectDrawSurface methods (almost) ***/
  1852. #define IDirectDrawSurface2_AddAttachedSurface(p,a) (p)->AddAttachedSurface(a)
  1853. #define IDirectDrawSurface2_AddOverlayDirtyRect(p,a) (p)->AddOverlayDirtyRect(a)
  1854. #define IDirectDrawSurface2_Blt(p,a,b,c,d,e) (p)->Blt(a,b,c,d,e)
  1855. #define IDirectDrawSurface2_BltBatch(p,a,b,c) (p)->BltBatch(a,b,c)
  1856. #define IDirectDrawSurface2_BltFast(p,a,b,c,d,e) (p)->BltFast(a,b,c,d,e)
  1857. #define IDirectDrawSurface2_DeleteAttachedSurface(p,a,b) (p)->DeleteAttachedSurface(a,b)
  1858. #define IDirectDrawSurface2_EnumAttachedSurfaces(p,a,b) (p)->EnumAttachedSurfaces(a,b)
  1859. #define IDirectDrawSurface2_EnumOverlayZOrders(p,a,b,c) (p)->EnumOverlayZOrders(a,b,c)
  1860. #define IDirectDrawSurface2_Flip(p,a,b) (p)->Flip(a,b)
  1861. #define IDirectDrawSurface2_GetAttachedSurface(p,a,b) (p)->GetAttachedSurface(a,b)
  1862. #define IDirectDrawSurface2_GetBltStatus(p,a) (p)->GetBltStatus(a)
  1863. #define IDirectDrawSurface2_GetCaps(p,a) (p)->GetCaps(a)
  1864. #define IDirectDrawSurface2_GetClipper(p,a) (p)->GetClipper(a)
  1865. #define IDirectDrawSurface2_GetColorKey(p,a,b) (p)->GetColorKey(a,b)
  1866. #define IDirectDrawSurface2_GetDC(p,a) (p)->GetDC(a)
  1867. #define IDirectDrawSurface2_GetFlipStatus(p,a) (p)->GetFlipStatus(a)
  1868. #define IDirectDrawSurface2_GetOverlayPosition(p,a,b) (p)->GetOverlayPosition(a,b)
  1869. #define IDirectDrawSurface2_GetPalette(p,a) (p)->GetPalette(a)
  1870. #define IDirectDrawSurface2_GetPixelFormat(p,a) (p)->GetPixelFormat(a)
  1871. #define IDirectDrawSurface2_GetSurfaceDesc(p,a) (p)->GetSurfaceDesc(a)
  1872. #define IDirectDrawSurface2_Initialize(p,a,b) (p)->Initialize(a,b)
  1873. #define IDirectDrawSurface2_IsLost(p) (p)->IsLost()
  1874. #define IDirectDrawSurface2_Lock(p,a,b,c,d) (p)->Lock(a,b,c,d)
  1875. #define IDirectDrawSurface2_ReleaseDC(p,a) (p)->ReleaseDC(a)
  1876. #define IDirectDrawSurface2_Restore(p) (p)->Restore()
  1877. #define IDirectDrawSurface2_SetClipper(p,a) (p)->SetClipper(a)
  1878. #define IDirectDrawSurface2_SetColorKey(p,a,b) (p)->SetColorKey(a,b)
  1879. #define IDirectDrawSurface2_SetOverlayPosition(p,a,b) (p)->SetOverlayPosition(a,b)
  1880. #define IDirectDrawSurface2_SetPalette(p,a) (p)->SetPalette(a)
  1881. #define IDirectDrawSurface2_Unlock(p,a) (p)->Unlock(a)
  1882. #define IDirectDrawSurface2_UpdateOverlay(p,a,b,c,d,e) (p)->UpdateOverlay(a,b,c,d,e)
  1883. #define IDirectDrawSurface2_UpdateOverlayDisplay(p,a) (p)->UpdateOverlayDisplay(a)
  1884. #define IDirectDrawSurface2_UpdateOverlayZOrder(p,a,b) (p)->UpdateOverlayZOrder(a,b)
  1885. /*** IDirectDrawSurface2 methods ***/
  1886. #define IDirectDrawSurface2_GetDDInterface(p,a) (p)->GetDDInterface(a)
  1887. #define IDirectDrawSurface2_PageLock(p,a) (p)->PageLock(a)
  1888. #define IDirectDrawSurface2_PageUnlock(p,a) (p)->PageUnlock(a)
  1889. #endif
  1890. /*****************************************************************************
  1891. * IDirectDrawSurface3 interface
  1892. */
  1893. /* Cannot inherit from IDirectDrawSurface2 because the LPDIRECTDRAWSURFACE2 parameters
  1894. * have been converted to LPDIRECTDRAWSURFACE3.
  1895. */
  1896. #define INTERFACE IDirectDrawSurface3
  1897. DECLARE_INTERFACE_(IDirectDrawSurface3,IUnknown)
  1898. {
  1899. /*** IUnknown methods ***/
  1900. STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
  1901. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  1902. STDMETHOD_(ULONG,Release)(THIS) PURE;
  1903. /*** IDirectDrawSurface3 methods ***/
  1904. STDMETHOD(AddAttachedSurface)(THIS_ LPDIRECTDRAWSURFACE3 lpDDSAttachedSurface) PURE;
  1905. STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT lpRect) PURE;
  1906. STDMETHOD(Blt)(THIS_ LPRECT lpDestRect, LPDIRECTDRAWSURFACE3 lpDDSrcSurface, LPRECT lpSrcRect, DWORD dwFlags, LPDDBLTFX lpDDBltFx) PURE;
  1907. STDMETHOD(BltBatch)(THIS_ LPDDBLTBATCH lpDDBltBatch, DWORD dwCount, DWORD dwFlags) PURE;
  1908. STDMETHOD(BltFast)(THIS_ DWORD dwX, DWORD dwY, LPDIRECTDRAWSURFACE3 lpDDSrcSurface, LPRECT lpSrcRect, DWORD dwTrans) PURE;
  1909. STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD dwFlags, LPDIRECTDRAWSURFACE3 lpDDSAttachedSurface) PURE;
  1910. STDMETHOD(EnumAttachedSurfaces)(THIS_ LPVOID lpContext, LPDDENUMSURFACESCALLBACK lpEnumSurfacesCallback) PURE;
  1911. STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD dwFlags, LPVOID lpContext, LPDDENUMSURFACESCALLBACK lpfnCallback) PURE;
  1912. STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE3 lpDDSurfaceTargetOverride, DWORD dwFlags) PURE;
  1913. STDMETHOD(GetAttachedSurface)(THIS_ LPDDSCAPS lpDDSCaps, LPDIRECTDRAWSURFACE3 *lplpDDAttachedSurface) PURE;
  1914. STDMETHOD(GetBltStatus)(THIS_ DWORD dwFlags) PURE;
  1915. STDMETHOD(GetCaps)(THIS_ LPDDSCAPS lpDDSCaps) PURE;
  1916. STDMETHOD(GetClipper)(THIS_ LPDIRECTDRAWCLIPPER *lplpDDClipper) PURE;
  1917. STDMETHOD(GetColorKey)(THIS_ DWORD dwFlags, LPDDCOLORKEY lpDDColorKey) PURE;
  1918. STDMETHOD(GetDC)(THIS_ HDC *lphDC) PURE;
  1919. STDMETHOD(GetFlipStatus)(THIS_ DWORD dwFlags) PURE;
  1920. STDMETHOD(GetOverlayPosition)(THIS_ LPLONG lplX, LPLONG lplY) PURE;
  1921. STDMETHOD(GetPalette)(THIS_ LPDIRECTDRAWPALETTE *lplpDDPalette) PURE;
  1922. STDMETHOD(GetPixelFormat)(THIS_ LPDDPIXELFORMAT lpDDPixelFormat) PURE;
  1923. STDMETHOD(GetSurfaceDesc)(THIS_ LPDDSURFACEDESC lpDDSurfaceDesc) PURE;
  1924. STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW lpDD, LPDDSURFACEDESC lpDDSurfaceDesc) PURE;
  1925. STDMETHOD(IsLost)(THIS) PURE;
  1926. STDMETHOD(Lock)(THIS_ LPRECT lpDestRect, LPDDSURFACEDESC lpDDSurfaceDesc, DWORD dwFlags, HANDLE hEvent) PURE;
  1927. STDMETHOD(ReleaseDC)(THIS_ HDC hDC) PURE;
  1928. STDMETHOD(Restore)(THIS) PURE;
  1929. STDMETHOD(SetClipper)(THIS_ LPDIRECTDRAWCLIPPER lpDDClipper) PURE;
  1930. STDMETHOD(SetColorKey)(THIS_ DWORD dwFlags, LPDDCOLORKEY lpDDColorKey) PURE;
  1931. STDMETHOD(SetOverlayPosition)(THIS_ LONG lX, LONG lY) PURE;
  1932. STDMETHOD(SetPalette)(THIS_ LPDIRECTDRAWPALETTE lpDDPalette) PURE;
  1933. STDMETHOD(Unlock)(THIS_ LPVOID lpSurfaceData) PURE;
  1934. STDMETHOD(UpdateOverlay)(THIS_ LPRECT lpSrcRect, LPDIRECTDRAWSURFACE3 lpDDDestSurface, LPRECT lpDestRect, DWORD dwFlags, LPDDOVERLAYFX lpDDOverlayFx) PURE;
  1935. STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD dwFlags) PURE;
  1936. STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD dwFlags, LPDIRECTDRAWSURFACE3 lpDDSReference) PURE;
  1937. /* added in v2 */
  1938. STDMETHOD(GetDDInterface)(THIS_ LPVOID *lplpDD) PURE;
  1939. STDMETHOD(PageLock)(THIS_ DWORD dwFlags) PURE;
  1940. STDMETHOD(PageUnlock)(THIS_ DWORD dwFlags) PURE;
  1941. /* added in v3 */
  1942. STDMETHOD(SetSurfaceDesc)(THIS_ LPDDSURFACEDESC lpDDSD, DWORD dwFlags) PURE;
  1943. };
  1944. #undef INTERFACE
  1945. #if !defined(__cplusplus) || defined(CINTERFACE)
  1946. /*** IUnknown methods ***/
  1947. #define IDirectDrawSurface3_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  1948. #define IDirectDrawSurface3_AddRef(p) (p)->lpVtbl->AddRef(p)
  1949. #define IDirectDrawSurface3_Release(p) (p)->lpVtbl->Release(p)
  1950. /*** IDirectDrawSurface methods (almost) ***/
  1951. #define IDirectDrawSurface3_AddAttachedSurface(p,a) (p)->lpVtbl->AddAttachedSurface(p,a)
  1952. #define IDirectDrawSurface3_AddOverlayDirtyRect(p,a) (p)->lpVtbl->AddOverlayDirtyRect(p,a)
  1953. #define IDirectDrawSurface3_Blt(p,a,b,c,d,e) (p)->lpVtbl->Blt(p,a,b,c,d,e)
  1954. #define IDirectDrawSurface3_BltBatch(p,a,b,c) (p)->lpVtbl->BltBatch(p,a,b,c)
  1955. #define IDirectDrawSurface3_BltFast(p,a,b,c,d,e) (p)->lpVtbl->BltFast(p,a,b,c,d,e)
  1956. #define IDirectDrawSurface3_DeleteAttachedSurface(p,a,b) (p)->lpVtbl->DeleteAttachedSurface(p,a,b)
  1957. #define IDirectDrawSurface3_EnumAttachedSurfaces(p,a,b) (p)->lpVtbl->EnumAttachedSurfaces(p,a,b)
  1958. #define IDirectDrawSurface3_EnumOverlayZOrders(p,a,b,c) (p)->lpVtbl->EnumOverlayZOrders(p,a,b,c)
  1959. #define IDirectDrawSurface3_Flip(p,a,b) (p)->lpVtbl->Flip(p,a,b)
  1960. #define IDirectDrawSurface3_GetAttachedSurface(p,a,b) (p)->lpVtbl->GetAttachedSurface(p,a,b)
  1961. #define IDirectDrawSurface3_GetBltStatus(p,a) (p)->lpVtbl->GetBltStatus(p,a)
  1962. #define IDirectDrawSurface3_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a)
  1963. #define IDirectDrawSurface3_GetClipper(p,a) (p)->lpVtbl->GetClipper(p,a)
  1964. #define IDirectDrawSurface3_GetColorKey(p,a,b) (p)->lpVtbl->GetColorKey(p,a,b)
  1965. #define IDirectDrawSurface3_GetDC(p,a) (p)->lpVtbl->GetDC(p,a)
  1966. #define IDirectDrawSurface3_GetFlipStatus(p,a) (p)->lpVtbl->GetFlipStatus(p,a)
  1967. #define IDirectDrawSurface3_GetOverlayPosition(p,a,b) (p)->lpVtbl->GetOverlayPosition(p,a,b)
  1968. #define IDirectDrawSurface3_GetPalette(p,a) (p)->lpVtbl->GetPalette(p,a)
  1969. #define IDirectDrawSurface3_GetPixelFormat(p,a) (p)->lpVtbl->GetPixelFormat(p,a)
  1970. #define IDirectDrawSurface3_GetSurfaceDesc(p,a) (p)->lpVtbl->GetSurfaceDesc(p,a)
  1971. #define IDirectDrawSurface3_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
  1972. #define IDirectDrawSurface3_IsLost(p) (p)->lpVtbl->IsLost(p)
  1973. #define IDirectDrawSurface3_Lock(p,a,b,c,d) (p)->lpVtbl->Lock(p,a,b,c,d)
  1974. #define IDirectDrawSurface3_ReleaseDC(p,a) (p)->lpVtbl->ReleaseDC(p,a)
  1975. #define IDirectDrawSurface3_Restore(p) (p)->lpVtbl->Restore(p)
  1976. #define IDirectDrawSurface3_SetClipper(p,a) (p)->lpVtbl->SetClipper(p,a)
  1977. #define IDirectDrawSurface3_SetColorKey(p,a,b) (p)->lpVtbl->SetColorKey(p,a,b)
  1978. #define IDirectDrawSurface3_SetOverlayPosition(p,a,b) (p)->lpVtbl->SetOverlayPosition(p,a,b)
  1979. #define IDirectDrawSurface3_SetPalette(p,a) (p)->lpVtbl->SetPalette(p,a)
  1980. #define IDirectDrawSurface3_Unlock(p,a) (p)->lpVtbl->Unlock(p,a)
  1981. #define IDirectDrawSurface3_UpdateOverlay(p,a,b,c,d,e) (p)->lpVtbl->UpdateOverlay(p,a,b,c,d,e)
  1982. #define IDirectDrawSurface3_UpdateOverlayDisplay(p,a) (p)->lpVtbl->UpdateOverlayDisplay(p,a)
  1983. #define IDirectDrawSurface3_UpdateOverlayZOrder(p,a,b) (p)->lpVtbl->UpdateOverlayZOrder(p,a,b)
  1984. /*** IDirectDrawSurface2 methods ***/
  1985. #define IDirectDrawSurface3_GetDDInterface(p,a) (p)->lpVtbl->GetDDInterface(p,a)
  1986. #define IDirectDrawSurface3_PageLock(p,a) (p)->lpVtbl->PageLock(p,a)
  1987. #define IDirectDrawSurface3_PageUnlock(p,a) (p)->lpVtbl->PageUnlock(p,a)
  1988. /*** IDirectDrawSurface3 methods ***/
  1989. #define IDirectDrawSurface3_SetSurfaceDesc(p,a,b) (p)->lpVtbl->SetSurfaceDesc(p,a,b)
  1990. #else
  1991. /*** IUnknown methods ***/
  1992. #define IDirectDrawSurface3_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  1993. #define IDirectDrawSurface3_AddRef(p) (p)->AddRef()
  1994. #define IDirectDrawSurface3_Release(p) (p)->Release()
  1995. /*** IDirectDrawSurface methods (almost) ***/
  1996. #define IDirectDrawSurface3_AddAttachedSurface(p,a) (p)->AddAttachedSurface(a)
  1997. #define IDirectDrawSurface3_AddOverlayDirtyRect(p,a) (p)->AddOverlayDirtyRect(a)
  1998. #define IDirectDrawSurface3_Blt(p,a,b,c,d,e) (p)->Blt(a,b,c,d,e)
  1999. #define IDirectDrawSurface3_BltBatch(p,a,b,c) (p)->BltBatch(a,b,c)
  2000. #define IDirectDrawSurface3_BltFast(p,a,b,c,d,e) (p)->BltFast(a,b,c,d,e)
  2001. #define IDirectDrawSurface3_DeleteAttachedSurface(p,a,b) (p)->DeleteAttachedSurface(a,b)
  2002. #define IDirectDrawSurface3_EnumAttachedSurfaces(p,a,b) (p)->EnumAttachedSurfaces(a,b)
  2003. #define IDirectDrawSurface3_EnumOverlayZOrders(p,a,b,c) (p)->EnumOverlayZOrders(a,b,c)
  2004. #define IDirectDrawSurface3_Flip(p,a,b) (p)->Flip(a,b)
  2005. #define IDirectDrawSurface3_GetAttachedSurface(p,a,b) (p)->GetAttachedSurface(a,b)
  2006. #define IDirectDrawSurface3_GetBltStatus(p,a) (p)->GetBltStatus(a)
  2007. #define IDirectDrawSurface3_GetCaps(p,a) (p)->GetCaps(a)
  2008. #define IDirectDrawSurface3_GetClipper(p,a) (p)->GetClipper(a)
  2009. #define IDirectDrawSurface3_GetColorKey(p,a,b) (p)->GetColorKey(a,b)
  2010. #define IDirectDrawSurface3_GetDC(p,a) (p)->GetDC(a)
  2011. #define IDirectDrawSurface3_GetFlipStatus(p,a) (p)->GetFlipStatus(a)
  2012. #define IDirectDrawSurface3_GetOverlayPosition(p,a,b) (p)->GetOverlayPosition(a,b)
  2013. #define IDirectDrawSurface3_GetPalette(p,a) (p)->GetPalette(a)
  2014. #define IDirectDrawSurface3_GetPixelFormat(p,a) (p)->GetPixelFormat(a)
  2015. #define IDirectDrawSurface3_GetSurfaceDesc(p,a) (p)->GetSurfaceDesc(a)
  2016. #define IDirectDrawSurface3_Initialize(p,a,b) (p)->Initialize(a,b)
  2017. #define IDirectDrawSurface3_IsLost(p) (p)->IsLost()
  2018. #define IDirectDrawSurface3_Lock(p,a,b,c,d) (p)->Lock(a,b,c,d)
  2019. #define IDirectDrawSurface3_ReleaseDC(p,a) (p)->ReleaseDC(a)
  2020. #define IDirectDrawSurface3_Restore(p) (p)->Restore()
  2021. #define IDirectDrawSurface3_SetClipper(p,a) (p)->SetClipper(a)
  2022. #define IDirectDrawSurface3_SetColorKey(p,a,b) (p)->SetColorKey(a,b)
  2023. #define IDirectDrawSurface3_SetOverlayPosition(p,a,b) (p)->SetOverlayPosition(a,b)
  2024. #define IDirectDrawSurface3_SetPalette(p,a) (p)->SetPalette(a)
  2025. #define IDirectDrawSurface3_Unlock(p,a) (p)->Unlock(a)
  2026. #define IDirectDrawSurface3_UpdateOverlay(p,a,b,c,d,e) (p)->UpdateOverlay(a,b,c,d,e)
  2027. #define IDirectDrawSurface3_UpdateOverlayDisplay(p,a) (p)->UpdateOverlayDisplay(a)
  2028. #define IDirectDrawSurface3_UpdateOverlayZOrder(p,a,b) (p)->UpdateOverlayZOrder(a,b)
  2029. /*** IDirectDrawSurface2 methods ***/
  2030. #define IDirectDrawSurface3_GetDDInterface(p,a) (p)->GetDDInterface(a)
  2031. #define IDirectDrawSurface3_PageLock(p,a) (p)->PageLock(a)
  2032. #define IDirectDrawSurface3_PageUnlock(p,a) (p)->PageUnlock(a)
  2033. /*** IDirectDrawSurface3 methods ***/
  2034. #define IDirectDrawSurface3_SetSurfaceDesc(p,a,b) (p)->SetSurfaceDesc(a,b)
  2035. #endif
  2036. /*****************************************************************************
  2037. * IDirectDrawSurface4 interface
  2038. */
  2039. /* Cannot inherit from IDirectDrawSurface2 because DDSCAPS changed to DDSCAPS2.
  2040. */
  2041. #define INTERFACE IDirectDrawSurface4
  2042. DECLARE_INTERFACE_(IDirectDrawSurface4,IUnknown)
  2043. {
  2044. /*** IUnknown methods ***/
  2045. STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
  2046. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  2047. STDMETHOD_(ULONG,Release)(THIS) PURE;
  2048. /*** IDirectDrawSurface4 methods ***/
  2049. STDMETHOD(AddAttachedSurface)(THIS_ LPDIRECTDRAWSURFACE4 lpDDSAttachedSurface) PURE;
  2050. STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT lpRect) PURE;
  2051. STDMETHOD(Blt)(THIS_ LPRECT lpDestRect, LPDIRECTDRAWSURFACE4 lpDDSrcSurface, LPRECT lpSrcRect, DWORD dwFlags, LPDDBLTFX lpDDBltFx) PURE;
  2052. STDMETHOD(BltBatch)(THIS_ LPDDBLTBATCH lpDDBltBatch, DWORD dwCount, DWORD dwFlags) PURE;
  2053. STDMETHOD(BltFast)(THIS_ DWORD dwX, DWORD dwY, LPDIRECTDRAWSURFACE4 lpDDSrcSurface, LPRECT lpSrcRect, DWORD dwTrans) PURE;
  2054. STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD dwFlags, LPDIRECTDRAWSURFACE4 lpDDSAttachedSurface) PURE;
  2055. STDMETHOD(EnumAttachedSurfaces)(THIS_ LPVOID lpContext, LPDDENUMSURFACESCALLBACK lpEnumSurfacesCallback) PURE;
  2056. STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD dwFlags, LPVOID lpContext, LPDDENUMSURFACESCALLBACK lpfnCallback) PURE;
  2057. STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE4 lpDDSurfaceTargetOverride, DWORD dwFlags) PURE;
  2058. STDMETHOD(GetAttachedSurface)(THIS_ LPDDSCAPS2 lpDDSCaps, LPDIRECTDRAWSURFACE4 *lplpDDAttachedSurface) PURE;
  2059. STDMETHOD(GetBltStatus)(THIS_ DWORD dwFlags) PURE;
  2060. STDMETHOD(GetCaps)(THIS_ LPDDSCAPS2 lpDDSCaps) PURE;
  2061. STDMETHOD(GetClipper)(THIS_ LPDIRECTDRAWCLIPPER *lplpDDClipper) PURE;
  2062. STDMETHOD(GetColorKey)(THIS_ DWORD dwFlags, LPDDCOLORKEY lpDDColorKey) PURE;
  2063. STDMETHOD(GetDC)(THIS_ HDC *lphDC) PURE;
  2064. STDMETHOD(GetFlipStatus)(THIS_ DWORD dwFlags) PURE;
  2065. STDMETHOD(GetOverlayPosition)(THIS_ LPLONG lplX, LPLONG lplY) PURE;
  2066. STDMETHOD(GetPalette)(THIS_ LPDIRECTDRAWPALETTE *lplpDDPalette) PURE;
  2067. STDMETHOD(GetPixelFormat)(THIS_ LPDDPIXELFORMAT lpDDPixelFormat) PURE;
  2068. STDMETHOD(GetSurfaceDesc)(THIS_ LPDDSURFACEDESC2 lpDDSurfaceDesc) PURE;
  2069. STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW lpDD, LPDDSURFACEDESC2 lpDDSurfaceDesc) PURE;
  2070. STDMETHOD(IsLost)(THIS) PURE;
  2071. STDMETHOD(Lock)(THIS_ LPRECT lpDestRect, LPDDSURFACEDESC2 lpDDSurfaceDesc, DWORD dwFlags, HANDLE hEvent) PURE;
  2072. STDMETHOD(ReleaseDC)(THIS_ HDC hDC) PURE;
  2073. STDMETHOD(Restore)(THIS) PURE;
  2074. STDMETHOD(SetClipper)(THIS_ LPDIRECTDRAWCLIPPER lpDDClipper) PURE;
  2075. STDMETHOD(SetColorKey)(THIS_ DWORD dwFlags, LPDDCOLORKEY lpDDColorKey) PURE;
  2076. STDMETHOD(SetOverlayPosition)(THIS_ LONG lX, LONG lY) PURE;
  2077. STDMETHOD(SetPalette)(THIS_ LPDIRECTDRAWPALETTE lpDDPalette) PURE;
  2078. STDMETHOD(Unlock)(THIS_ LPRECT lpSurfaceData) PURE;
  2079. STDMETHOD(UpdateOverlay)(THIS_ LPRECT lpSrcRect, LPDIRECTDRAWSURFACE4 lpDDDestSurface, LPRECT lpDestRect, DWORD dwFlags, LPDDOVERLAYFX lpDDOverlayFx) PURE;
  2080. STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD dwFlags) PURE;
  2081. STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD dwFlags, LPDIRECTDRAWSURFACE4 lpDDSReference) PURE;
  2082. /* added in v2 */
  2083. STDMETHOD(GetDDInterface)(THIS_ LPVOID *lplpDD) PURE;
  2084. STDMETHOD(PageLock)(THIS_ DWORD dwFlags) PURE;
  2085. STDMETHOD(PageUnlock)(THIS_ DWORD dwFlags) PURE;
  2086. /* added in v3 */
  2087. STDMETHOD(SetSurfaceDesc)(THIS_ LPDDSURFACEDESC2 lpDDSD, DWORD dwFlags) PURE;
  2088. /* added in v4 */
  2089. STDMETHOD(SetPrivateData)(THIS_ REFGUID tag, LPVOID pData, DWORD cbSize, DWORD dwFlags) PURE;
  2090. STDMETHOD(GetPrivateData)(THIS_ REFGUID tag, LPVOID pBuffer, LPDWORD pcbBufferSize) PURE;
  2091. STDMETHOD(FreePrivateData)(THIS_ REFGUID tag) PURE;
  2092. STDMETHOD(GetUniquenessValue)(THIS_ LPDWORD pValue) PURE;
  2093. STDMETHOD(ChangeUniquenessValue)(THIS) PURE;
  2094. };
  2095. #undef INTERFACE
  2096. #if !defined(__cplusplus) || defined(CINTERFACE)
  2097. /*** IUnknown methods ***/
  2098. #define IDirectDrawSurface4_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  2099. #define IDirectDrawSurface4_AddRef(p) (p)->lpVtbl->AddRef(p)
  2100. #define IDirectDrawSurface4_Release(p) (p)->lpVtbl->Release(p)
  2101. /*** IDirectDrawSurface (almost) methods ***/
  2102. #define IDirectDrawSurface4_AddAttachedSurface(p,a) (p)->lpVtbl->AddAttachedSurface(p,a)
  2103. #define IDirectDrawSurface4_AddOverlayDirtyRect(p,a) (p)->lpVtbl->AddOverlayDirtyRect(p,a)
  2104. #define IDirectDrawSurface4_Blt(p,a,b,c,d,e) (p)->lpVtbl->Blt(p,a,b,c,d,e)
  2105. #define IDirectDrawSurface4_BltBatch(p,a,b,c) (p)->lpVtbl->BltBatch(p,a,b,c)
  2106. #define IDirectDrawSurface4_BltFast(p,a,b,c,d,e) (p)->lpVtbl->BltFast(p,a,b,c,d,e)
  2107. #define IDirectDrawSurface4_DeleteAttachedSurface(p,a,b) (p)->lpVtbl->DeleteAttachedSurface(p,a,b)
  2108. #define IDirectDrawSurface4_EnumAttachedSurfaces(p,a,b) (p)->lpVtbl->EnumAttachedSurfaces(p,a,b)
  2109. #define IDirectDrawSurface4_EnumOverlayZOrders(p,a,b,c) (p)->lpVtbl->EnumOverlayZOrders(p,a,b,c)
  2110. #define IDirectDrawSurface4_Flip(p,a,b) (p)->lpVtbl->Flip(p,a,b)
  2111. #define IDirectDrawSurface4_GetAttachedSurface(p,a,b) (p)->lpVtbl->GetAttachedSurface(p,a,b)
  2112. #define IDirectDrawSurface4_GetBltStatus(p,a) (p)->lpVtbl->GetBltStatus(p,a)
  2113. #define IDirectDrawSurface4_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a)
  2114. #define IDirectDrawSurface4_GetClipper(p,a) (p)->lpVtbl->GetClipper(p,a)
  2115. #define IDirectDrawSurface4_GetColorKey(p,a,b) (p)->lpVtbl->GetColorKey(p,a,b)
  2116. #define IDirectDrawSurface4_GetDC(p,a) (p)->lpVtbl->GetDC(p,a)
  2117. #define IDirectDrawSurface4_GetFlipStatus(p,a) (p)->lpVtbl->GetFlipStatus(p,a)
  2118. #define IDirectDrawSurface4_GetOverlayPosition(p,a,b) (p)->lpVtbl->GetOverlayPosition(p,a,b)
  2119. #define IDirectDrawSurface4_GetPalette(p,a) (p)->lpVtbl->GetPalette(p,a)
  2120. #define IDirectDrawSurface4_GetPixelFormat(p,a) (p)->lpVtbl->GetPixelFormat(p,a)
  2121. #define IDirectDrawSurface4_GetSurfaceDesc(p,a) (p)->lpVtbl->GetSurfaceDesc(p,a)
  2122. #define IDirectDrawSurface4_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
  2123. #define IDirectDrawSurface4_IsLost(p) (p)->lpVtbl->IsLost(p)
  2124. #define IDirectDrawSurface4_Lock(p,a,b,c,d) (p)->lpVtbl->Lock(p,a,b,c,d)
  2125. #define IDirectDrawSurface4_ReleaseDC(p,a) (p)->lpVtbl->ReleaseDC(p,a)
  2126. #define IDirectDrawSurface4_Restore(p) (p)->lpVtbl->Restore(p)
  2127. #define IDirectDrawSurface4_SetClipper(p,a) (p)->lpVtbl->SetClipper(p,a)
  2128. #define IDirectDrawSurface4_SetColorKey(p,a,b) (p)->lpVtbl->SetColorKey(p,a,b)
  2129. #define IDirectDrawSurface4_SetOverlayPosition(p,a,b) (p)->lpVtbl->SetOverlayPosition(p,a,b)
  2130. #define IDirectDrawSurface4_SetPalette(p,a) (p)->lpVtbl->SetPalette(p,a)
  2131. #define IDirectDrawSurface4_Unlock(p,a) (p)->lpVtbl->Unlock(p,a)
  2132. #define IDirectDrawSurface4_UpdateOverlay(p,a,b,c,d,e) (p)->lpVtbl->UpdateOverlay(p,a,b,c,d,e)
  2133. #define IDirectDrawSurface4_UpdateOverlayDisplay(p,a) (p)->lpVtbl->UpdateOverlayDisplay(p,a)
  2134. #define IDirectDrawSurface4_UpdateOverlayZOrder(p,a,b) (p)->lpVtbl->UpdateOverlayZOrder(p,a,b)
  2135. /*** IDirectDrawSurface2 methods ***/
  2136. #define IDirectDrawSurface4_GetDDInterface(p,a) (p)->lpVtbl->GetDDInterface(p,a)
  2137. #define IDirectDrawSurface4_PageLock(p,a) (p)->lpVtbl->PageLock(p,a)
  2138. #define IDirectDrawSurface4_PageUnlock(p,a) (p)->lpVtbl->PageUnlock(p,a)
  2139. /*** IDirectDrawSurface3 methods ***/
  2140. #define IDirectDrawSurface4_SetSurfaceDesc(p,a,b) (p)->lpVtbl->SetSurfaceDesc(p,a,b)
  2141. /*** IDirectDrawSurface4 methods ***/
  2142. #define IDirectDrawSurface4_SetPrivateData(p,a,b,c,d) (p)->lpVtbl->SetPrivateData(p,a,b,c,d)
  2143. #define IDirectDrawSurface4_GetPrivateData(p,a,b,c) (p)->lpVtbl->GetPrivateData(p,a,b,c)
  2144. #define IDirectDrawSurface4_FreePrivateData(p,a) (p)->lpVtbl->FreePrivateData(p,a)
  2145. #define IDirectDrawSurface4_GetUniquenessValue(p,a) (p)->lpVtbl->GetUniquenessValue(p,a)
  2146. #define IDirectDrawSurface4_ChangeUniquenessValue(p) (p)->lpVtbl->ChangeUniquenessValue(p)
  2147. #else
  2148. /*** IUnknown methods ***/
  2149. #define IDirectDrawSurface4_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  2150. #define IDirectDrawSurface4_AddRef(p) (p)->AddRef()
  2151. #define IDirectDrawSurface4_Release(p) (p)->Release()
  2152. /*** IDirectDrawSurface (almost) methods ***/
  2153. #define IDirectDrawSurface4_AddAttachedSurface(p,a) (p)->AddAttachedSurface(a)
  2154. #define IDirectDrawSurface4_AddOverlayDirtyRect(p,a) (p)->AddOverlayDirtyRect(a)
  2155. #define IDirectDrawSurface4_Blt(p,a,b,c,d,e) (p)->Blt(a,b,c,d,e)
  2156. #define IDirectDrawSurface4_BltBatch(p,a,b,c) (p)->BltBatch(a,b,c)
  2157. #define IDirectDrawSurface4_BltFast(p,a,b,c,d,e) (p)->BltFast(a,b,c,d,e)
  2158. #define IDirectDrawSurface4_DeleteAttachedSurface(p,a,b) (p)->DeleteAttachedSurface(a,b)
  2159. #define IDirectDrawSurface4_EnumAttachedSurfaces(p,a,b) (p)->EnumAttachedSurfaces(a,b)
  2160. #define IDirectDrawSurface4_EnumOverlayZOrders(p,a,b,c) (p)->EnumOverlayZOrders(a,b,c)
  2161. #define IDirectDrawSurface4_Flip(p,a,b) (p)->Flip(a,b)
  2162. #define IDirectDrawSurface4_GetAttachedSurface(p,a,b) (p)->GetAttachedSurface(a,b)
  2163. #define IDirectDrawSurface4_GetBltStatus(p,a) (p)->GetBltStatus(a)
  2164. #define IDirectDrawSurface4_GetCaps(p,a) (p)->GetCaps(a)
  2165. #define IDirectDrawSurface4_GetClipper(p,a) (p)->GetClipper(a)
  2166. #define IDirectDrawSurface4_GetColorKey(p,a,b) (p)->GetColorKey(a,b)
  2167. #define IDirectDrawSurface4_GetDC(p,a) (p)->GetDC(a)
  2168. #define IDirectDrawSurface4_GetFlipStatus(p,a) (p)->GetFlipStatus(a)
  2169. #define IDirectDrawSurface4_GetOverlayPosition(p,a,b) (p)->GetOverlayPosition(a,b)
  2170. #define IDirectDrawSurface4_GetPalette(p,a) (p)->GetPalette(a)
  2171. #define IDirectDrawSurface4_GetPixelFormat(p,a) (p)->GetPixelFormat(a)
  2172. #define IDirectDrawSurface4_GetSurfaceDesc(p,a) (p)->GetSurfaceDesc(a)
  2173. #define IDirectDrawSurface4_Initialize(p,a,b) (p)->Initialize(a,b)
  2174. #define IDirectDrawSurface4_IsLost(p) (p)->IsLost()
  2175. #define IDirectDrawSurface4_Lock(p,a,b,c,d) (p)->Lock(a,b,c,d)
  2176. #define IDirectDrawSurface4_ReleaseDC(p,a) (p)->ReleaseDC(a)
  2177. #define IDirectDrawSurface4_Restore(p) (p)->Restore()
  2178. #define IDirectDrawSurface4_SetClipper(p,a) (p)->SetClipper(a)
  2179. #define IDirectDrawSurface4_SetColorKey(p,a,b) (p)->SetColorKey(a,b)
  2180. #define IDirectDrawSurface4_SetOverlayPosition(p,a,b) (p)->SetOverlayPosition(a,b)
  2181. #define IDirectDrawSurface4_SetPalette(p,a) (p)->SetPalette(a)
  2182. #define IDirectDrawSurface4_Unlock(p,a) (p)->Unlock(a)
  2183. #define IDirectDrawSurface4_UpdateOverlay(p,a,b,c,d,e) (p)->UpdateOverlay(a,b,c,d,e)
  2184. #define IDirectDrawSurface4_UpdateOverlayDisplay(p,a) (p)->UpdateOverlayDisplay(a)
  2185. #define IDirectDrawSurface4_UpdateOverlayZOrder(p,a,b) (p)->UpdateOverlayZOrder(a,b)
  2186. /*** IDirectDrawSurface2 methods ***/
  2187. #define IDirectDrawSurface4_GetDDInterface(p,a) (p)->GetDDInterface(a)
  2188. #define IDirectDrawSurface4_PageLock(p,a) (p)->PageLock(a)
  2189. #define IDirectDrawSurface4_PageUnlock(p,a) (p)->PageUnlock(a)
  2190. /*** IDirectDrawSurface3 methods ***/
  2191. #define IDirectDrawSurface4_SetSurfaceDesc(p,a,b) (p)->SetSurfaceDesc(a,b)
  2192. /*** IDirectDrawSurface4 methods ***/
  2193. #define IDirectDrawSurface4_SetPrivateData(p,a,b,c,d) (p)->SetPrivateData(a,b,c,d)
  2194. #define IDirectDrawSurface4_GetPrivateData(p,a,b,c) (p)->GetPrivateData(a,b,c)
  2195. #define IDirectDrawSurface4_FreePrivateData(p,a) (p)->FreePrivateData(a)
  2196. #define IDirectDrawSurface4_GetUniquenessValue(p,a) (p)->GetUniquenessValue(a)
  2197. #define IDirectDrawSurface4_ChangeUniquenessValue(p) (p)->ChangeUniquenessValue()
  2198. #endif
  2199. /*****************************************************************************
  2200. * IDirectDrawSurface7 interface
  2201. */
  2202. #define INTERFACE IDirectDrawSurface7
  2203. DECLARE_INTERFACE_(IDirectDrawSurface7,IUnknown)
  2204. {
  2205. /*** IUnknown methods ***/
  2206. STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
  2207. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  2208. STDMETHOD_(ULONG,Release)(THIS) PURE;
  2209. /*** IDirectDrawSurface7 methods ***/
  2210. STDMETHOD(AddAttachedSurface)(THIS_ LPDIRECTDRAWSURFACE7 lpDDSAttachedSurface) PURE;
  2211. STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT lpRect) PURE;
  2212. STDMETHOD(Blt)(THIS_ LPRECT lpDestRect, LPDIRECTDRAWSURFACE7 lpDDSrcSurface, LPRECT lpSrcRect, DWORD dwFlags, LPDDBLTFX lpDDBltFx) PURE;
  2213. STDMETHOD(BltBatch)(THIS_ LPDDBLTBATCH lpDDBltBatch, DWORD dwCount, DWORD dwFlags) PURE;
  2214. STDMETHOD(BltFast)(THIS_ DWORD dwX, DWORD dwY, LPDIRECTDRAWSURFACE7 lpDDSrcSurface, LPRECT lpSrcRect, DWORD dwTrans) PURE;
  2215. STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD dwFlags, LPDIRECTDRAWSURFACE7 lpDDSAttachedSurface) PURE;
  2216. STDMETHOD(EnumAttachedSurfaces)(THIS_ LPVOID lpContext, LPDDENUMSURFACESCALLBACK7 lpEnumSurfacesCallback) PURE;
  2217. STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD dwFlags, LPVOID lpContext, LPDDENUMSURFACESCALLBACK7 lpfnCallback) PURE;
  2218. STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE7 lpDDSurfaceTargetOverride, DWORD dwFlags) PURE;
  2219. STDMETHOD(GetAttachedSurface)(THIS_ LPDDSCAPS2 lpDDSCaps, LPDIRECTDRAWSURFACE7 *lplpDDAttachedSurface) PURE;
  2220. STDMETHOD(GetBltStatus)(THIS_ DWORD dwFlags) PURE;
  2221. STDMETHOD(GetCaps)(THIS_ LPDDSCAPS2 lpDDSCaps) PURE;
  2222. STDMETHOD(GetClipper)(THIS_ LPDIRECTDRAWCLIPPER *lplpDDClipper) PURE;
  2223. STDMETHOD(GetColorKey)(THIS_ DWORD dwFlags, LPDDCOLORKEY lpDDColorKey) PURE;
  2224. STDMETHOD(GetDC)(THIS_ HDC *lphDC) PURE;
  2225. STDMETHOD(GetFlipStatus)(THIS_ DWORD dwFlags) PURE;
  2226. STDMETHOD(GetOverlayPosition)(THIS_ LPLONG lplX, LPLONG lplY) PURE;
  2227. STDMETHOD(GetPalette)(THIS_ LPDIRECTDRAWPALETTE *lplpDDPalette) PURE;
  2228. STDMETHOD(GetPixelFormat)(THIS_ LPDDPIXELFORMAT lpDDPixelFormat) PURE;
  2229. STDMETHOD(GetSurfaceDesc)(THIS_ LPDDSURFACEDESC2 lpDDSurfaceDesc) PURE;
  2230. STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW lpDD, LPDDSURFACEDESC2 lpDDSurfaceDesc) PURE;
  2231. STDMETHOD(IsLost)(THIS) PURE;
  2232. STDMETHOD(Lock)(THIS_ LPRECT lpDestRect, LPDDSURFACEDESC2 lpDDSurfaceDesc, DWORD dwFlags, HANDLE hEvent) PURE;
  2233. STDMETHOD(ReleaseDC)(THIS_ HDC hDC) PURE;
  2234. STDMETHOD(Restore)(THIS) PURE;
  2235. STDMETHOD(SetClipper)(THIS_ LPDIRECTDRAWCLIPPER lpDDClipper) PURE;
  2236. STDMETHOD(SetColorKey)(THIS_ DWORD dwFlags, LPDDCOLORKEY lpDDColorKey) PURE;
  2237. STDMETHOD(SetOverlayPosition)(THIS_ LONG lX, LONG lY) PURE;
  2238. STDMETHOD(SetPalette)(THIS_ LPDIRECTDRAWPALETTE lpDDPalette) PURE;
  2239. STDMETHOD(Unlock)(THIS_ LPRECT lpSurfaceData) PURE;
  2240. STDMETHOD(UpdateOverlay)(THIS_ LPRECT lpSrcRect, LPDIRECTDRAWSURFACE7 lpDDDestSurface, LPRECT lpDestRect, DWORD dwFlags, LPDDOVERLAYFX lpDDOverlayFx) PURE;
  2241. STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD dwFlags) PURE;
  2242. STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD dwFlags, LPDIRECTDRAWSURFACE7 lpDDSReference) PURE;
  2243. /* added in v2 */
  2244. STDMETHOD(GetDDInterface)(THIS_ LPVOID *lplpDD) PURE;
  2245. STDMETHOD(PageLock)(THIS_ DWORD dwFlags) PURE;
  2246. STDMETHOD(PageUnlock)(THIS_ DWORD dwFlags) PURE;
  2247. /* added in v3 */
  2248. STDMETHOD(SetSurfaceDesc)(THIS_ LPDDSURFACEDESC2 lpDDSD, DWORD dwFlags) PURE;
  2249. /* added in v4 */
  2250. STDMETHOD(SetPrivateData)(THIS_ REFGUID tag, LPVOID pData, DWORD cbSize, DWORD dwFlags) PURE;
  2251. STDMETHOD(GetPrivateData)(THIS_ REFGUID tag, LPVOID pBuffer, LPDWORD pcbBufferSize) PURE;
  2252. STDMETHOD(FreePrivateData)(THIS_ REFGUID tag) PURE;
  2253. STDMETHOD(GetUniquenessValue)(THIS_ LPDWORD pValue) PURE;
  2254. STDMETHOD(ChangeUniquenessValue)(THIS) PURE;
  2255. /* added in v7 */
  2256. STDMETHOD(SetPriority)(THIS_ DWORD prio) PURE;
  2257. STDMETHOD(GetPriority)(THIS_ LPDWORD prio) PURE;
  2258. STDMETHOD(SetLOD)(THIS_ DWORD lod) PURE;
  2259. STDMETHOD(GetLOD)(THIS_ LPDWORD lod) PURE;
  2260. };
  2261. #undef INTERFACE
  2262. #if !defined(__cplusplus) || defined(CINTERFACE)
  2263. /*** IUnknown methods ***/
  2264. #define IDirectDrawSurface7_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  2265. #define IDirectDrawSurface7_AddRef(p) (p)->lpVtbl->AddRef(p)
  2266. #define IDirectDrawSurface7_Release(p) (p)->lpVtbl->Release(p)
  2267. /*** IDirectDrawSurface (almost) methods ***/
  2268. #define IDirectDrawSurface7_AddAttachedSurface(p,a) (p)->lpVtbl->AddAttachedSurface(p,a)
  2269. #define IDirectDrawSurface7_AddOverlayDirtyRect(p,a) (p)->lpVtbl->AddOverlayDirtyRect(p,a)
  2270. #define IDirectDrawSurface7_Blt(p,a,b,c,d,e) (p)->lpVtbl->Blt(p,a,b,c,d,e)
  2271. #define IDirectDrawSurface7_BltBatch(p,a,b,c) (p)->lpVtbl->BltBatch(p,a,b,c)
  2272. #define IDirectDrawSurface7_BltFast(p,a,b,c,d,e) (p)->lpVtbl->BltFast(p,a,b,c,d,e)
  2273. #define IDirectDrawSurface7_DeleteAttachedSurface(p,a,b) (p)->lpVtbl->DeleteAttachedSurface(p,a,b)
  2274. #define IDirectDrawSurface7_EnumAttachedSurfaces(p,a,b) (p)->lpVtbl->EnumAttachedSurfaces(p,a,b)
  2275. #define IDirectDrawSurface7_EnumOverlayZOrders(p,a,b,c) (p)->lpVtbl->EnumOverlayZOrders(p,a,b,c)
  2276. #define IDirectDrawSurface7_Flip(p,a,b) (p)->lpVtbl->Flip(p,a,b)
  2277. #define IDirectDrawSurface7_GetAttachedSurface(p,a,b) (p)->lpVtbl->GetAttachedSurface(p,a,b)
  2278. #define IDirectDrawSurface7_GetBltStatus(p,a) (p)->lpVtbl->GetBltStatus(p,a)
  2279. #define IDirectDrawSurface7_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a)
  2280. #define IDirectDrawSurface7_GetClipper(p,a) (p)->lpVtbl->GetClipper(p,a)
  2281. #define IDirectDrawSurface7_GetColorKey(p,a,b) (p)->lpVtbl->GetColorKey(p,a,b)
  2282. #define IDirectDrawSurface7_GetDC(p,a) (p)->lpVtbl->GetDC(p,a)
  2283. #define IDirectDrawSurface7_GetFlipStatus(p,a) (p)->lpVtbl->GetFlipStatus(p,a)
  2284. #define IDirectDrawSurface7_GetOverlayPosition(p,a,b) (p)->lpVtbl->GetOverlayPosition(p,a,b)
  2285. #define IDirectDrawSurface7_GetPalette(p,a) (p)->lpVtbl->GetPalette(p,a)
  2286. #define IDirectDrawSurface7_GetPixelFormat(p,a) (p)->lpVtbl->GetPixelFormat(p,a)
  2287. #define IDirectDrawSurface7_GetSurfaceDesc(p,a) (p)->lpVtbl->GetSurfaceDesc(p,a)
  2288. #define IDirectDrawSurface7_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
  2289. #define IDirectDrawSurface7_IsLost(p) (p)->lpVtbl->IsLost(p)
  2290. #define IDirectDrawSurface7_Lock(p,a,b,c,d) (p)->lpVtbl->Lock(p,a,b,c,d)
  2291. #define IDirectDrawSurface7_ReleaseDC(p,a) (p)->lpVtbl->ReleaseDC(p,a)
  2292. #define IDirectDrawSurface7_Restore(p) (p)->lpVtbl->Restore(p)
  2293. #define IDirectDrawSurface7_SetClipper(p,a) (p)->lpVtbl->SetClipper(p,a)
  2294. #define IDirectDrawSurface7_SetColorKey(p,a,b) (p)->lpVtbl->SetColorKey(p,a,b)
  2295. #define IDirectDrawSurface7_SetOverlayPosition(p,a,b) (p)->lpVtbl->SetOverlayPosition(p,a,b)
  2296. #define IDirectDrawSurface7_SetPalette(p,a) (p)->lpVtbl->SetPalette(p,a)
  2297. #define IDirectDrawSurface7_Unlock(p,a) (p)->lpVtbl->Unlock(p,a)
  2298. #define IDirectDrawSurface7_UpdateOverlay(p,a,b,c,d,e) (p)->lpVtbl->UpdateOverlay(p,a,b,c,d,e)
  2299. #define IDirectDrawSurface7_UpdateOverlayDisplay(p,a) (p)->lpVtbl->UpdateOverlayDisplay(p,a)
  2300. #define IDirectDrawSurface7_UpdateOverlayZOrder(p,a,b) (p)->lpVtbl->UpdateOverlayZOrder(p,a,b)
  2301. /*** IDirectDrawSurface2 methods ***/
  2302. #define IDirectDrawSurface7_GetDDInterface(p,a) (p)->lpVtbl->GetDDInterface(p,a)
  2303. #define IDirectDrawSurface7_PageLock(p,a) (p)->lpVtbl->PageLock(p,a)
  2304. #define IDirectDrawSurface7_PageUnlock(p,a) (p)->lpVtbl->PageUnlock(p,a)
  2305. /*** IDirectDrawSurface3 methods ***/
  2306. #define IDirectDrawSurface7_SetSurfaceDesc(p,a,b) (p)->lpVtbl->SetSurfaceDesc(p,a,b)
  2307. /*** IDirectDrawSurface4 methods ***/
  2308. #define IDirectDrawSurface7_SetPrivateData(p,a,b,c,d) (p)->lpVtbl->SetPrivateData(p,a,b,c,d)
  2309. #define IDirectDrawSurface7_GetPrivateData(p,a,b,c) (p)->lpVtbl->GetPrivateData(p,a,b,c)
  2310. #define IDirectDrawSurface7_FreePrivateData(p,a) (p)->lpVtbl->FreePrivateData(p,a)
  2311. #define IDirectDrawSurface7_GetUniquenessValue(p,a) (p)->lpVtbl->GetUniquenessValue(p,a)
  2312. #define IDirectDrawSurface7_ChangeUniquenessValue(p) (p)->lpVtbl->ChangeUniquenessValue(p)
  2313. /*** IDirectDrawSurface7 methods ***/
  2314. #define IDirectDrawSurface7_SetPriority(p,a) (p)->lpVtbl->SetPriority(p,a)
  2315. #define IDirectDrawSurface7_GetPriority(p,a) (p)->lpVtbl->GetPriority(p,a)
  2316. #define IDirectDrawSurface7_SetLOD(p,a) (p)->lpVtbl->SetLOD(p,a)
  2317. #define IDirectDrawSurface7_GetLOD(p,a) (p)->lpVtbl->GetLOD(p,a)
  2318. #else
  2319. /*** IUnknown methods ***/
  2320. #define IDirectDrawSurface7_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  2321. #define IDirectDrawSurface7_AddRef(p) (p)->AddRef()
  2322. #define IDirectDrawSurface7_Release(p) (p)->Release()
  2323. /*** IDirectDrawSurface (almost) methods ***/
  2324. #define IDirectDrawSurface7_AddAttachedSurface(p,a) (p)->AddAttachedSurface(a)
  2325. #define IDirectDrawSurface7_AddOverlayDirtyRect(p,a) (p)->AddOverlayDirtyRect(a)
  2326. #define IDirectDrawSurface7_Blt(p,a,b,c,d,e) (p)->Blt(a,b,c,d,e)
  2327. #define IDirectDrawSurface7_BltBatch(p,a,b,c) (p)->BltBatch(a,b,c)
  2328. #define IDirectDrawSurface7_BltFast(p,a,b,c,d,e) (p)->BltFast(a,b,c,d,e)
  2329. #define IDirectDrawSurface7_DeleteAttachedSurface(p,a,b) (p)->DeleteAttachedSurface(a,b)
  2330. #define IDirectDrawSurface7_EnumAttachedSurfaces(p,a,b) (p)->EnumAttachedSurfaces(a,b)
  2331. #define IDirectDrawSurface7_EnumOverlayZOrders(p,a,b,c) (p)->EnumOverlayZOrders(a,b,c)
  2332. #define IDirectDrawSurface7_Flip(p,a,b) (p)->Flip(a,b)
  2333. #define IDirectDrawSurface7_GetAttachedSurface(p,a,b) (p)->GetAttachedSurface(a,b)
  2334. #define IDirectDrawSurface7_GetBltStatus(p,a) (p)->GetBltStatus(a)
  2335. #define IDirectDrawSurface7_GetCaps(p,a) (p)->GetCaps(a)
  2336. #define IDirectDrawSurface7_GetClipper(p,a) (p)->GetClipper(a)
  2337. #define IDirectDrawSurface7_GetColorKey(p,a,b) (p)->GetColorKey(a,b)
  2338. #define IDirectDrawSurface7_GetDC(p,a) (p)->GetDC(a)
  2339. #define IDirectDrawSurface7_GetFlipStatus(p,a) (p)->GetFlipStatus(a)
  2340. #define IDirectDrawSurface7_GetOverlayPosition(p,a,b) (p)->GetOverlayPosition(a,b)
  2341. #define IDirectDrawSurface7_GetPalette(p,a) (p)->GetPalette(a)
  2342. #define IDirectDrawSurface7_GetPixelFormat(p,a) (p)->GetPixelFormat(a)
  2343. #define IDirectDrawSurface7_GetSurfaceDesc(p,a) (p)->GetSurfaceDesc(a)
  2344. #define IDirectDrawSurface7_Initialize(p,a,b) (p)->Initialize(a,b)
  2345. #define IDirectDrawSurface7_IsLost(p) (p)->IsLost()
  2346. #define IDirectDrawSurface7_Lock(p,a,b,c,d) (p)->Lock(a,b,c,d)
  2347. #define IDirectDrawSurface7_ReleaseDC(p,a) (p)->ReleaseDC(a)
  2348. #define IDirectDrawSurface7_Restore(p) (p)->Restore()
  2349. #define IDirectDrawSurface7_SetClipper(p,a) (p)->SetClipper(a)
  2350. #define IDirectDrawSurface7_SetColorKey(p,a,b) (p)->SetColorKey(a,b)
  2351. #define IDirectDrawSurface7_SetOverlayPosition(p,a,b) (p)->SetOverlayPosition(a,b)
  2352. #define IDirectDrawSurface7_SetPalette(p,a) (p)->SetPalette(a)
  2353. #define IDirectDrawSurface7_Unlock(p,a) (p)->Unlock(a)
  2354. #define IDirectDrawSurface7_UpdateOverlay(p,a,b,c,d,e) (p)->UpdateOverlay(a,b,c,d,e)
  2355. #define IDirectDrawSurface7_UpdateOverlayDisplay(p,a) (p)->UpdateOverlayDisplay(a)
  2356. #define IDirectDrawSurface7_UpdateOverlayZOrder(p,a,b) (p)->UpdateOverlayZOrder(a,b)
  2357. /*** IDirectDrawSurface2 methods ***/
  2358. #define IDirectDrawSurface7_GetDDInterface(p,a) (p)->GetDDInterface(a)
  2359. #define IDirectDrawSurface7_PageLock(p,a) (p)->PageLock(a)
  2360. #define IDirectDrawSurface7_PageUnlock(p,a) (p)->PageUnlock(a)
  2361. /*** IDirectDrawSurface3 methods ***/
  2362. #define IDirectDrawSurface7_SetSurfaceDesc(p,a,b) (p)->SetSurfaceDesc(a,b)
  2363. /*** IDirectDrawSurface4 methods ***/
  2364. #define IDirectDrawSurface7_SetPrivateData(p,a,b,c,d) (p)->SetPrivateData(a,b,c,d)
  2365. #define IDirectDrawSurface7_GetPrivateData(p,a,b,c) (p)->GetPrivateData(a,b,c)
  2366. #define IDirectDrawSurface7_FreePrivateData(p,a) (p)->FreePrivateData(a)
  2367. #define IDirectDrawSurface7_GetUniquenessValue(p,a) (p)->GetUniquenessValue(a)
  2368. #define IDirectDrawSurface7_ChangeUniquenessValue(p) (p)->ChangeUniquenessValue()
  2369. /*** IDirectDrawSurface7 methods ***/
  2370. #define IDirectDrawSurface7_SetPriority(p,a) (p)->SetPriority(a)
  2371. #define IDirectDrawSurface7_GetPriority(p,a) (p)->GetPriority(a)
  2372. #define IDirectDrawSurface7_SetLOD(p,a) (p)->SetLOD(a)
  2373. #define IDirectDrawSurface7_GetLOD(p,a) (p)->GetLOD(a)
  2374. #endif
  2375. /*****************************************************************************
  2376. * IDirectDrawColorControl interface
  2377. */
  2378. #define INTERFACE IDirectDrawColorControl
  2379. DECLARE_INTERFACE_(IDirectDrawColorControl,IUnknown)
  2380. {
  2381. /*** IUnknown methods ***/
  2382. STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
  2383. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  2384. STDMETHOD_(ULONG,Release)(THIS) PURE;
  2385. /*** IDirectDrawColorControl methods ***/
  2386. STDMETHOD(GetColorControls)(THIS_ LPDDCOLORCONTROL lpColorControl) PURE;
  2387. STDMETHOD(SetColorControls)(THIS_ LPDDCOLORCONTROL lpColorControl) PURE;
  2388. };
  2389. #undef INTERFACE
  2390. #if !defined(__cplusplus) || defined(CINTERFACE)
  2391. /*** IUnknown methods ***/
  2392. #define IDirectDrawColorControl_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  2393. #define IDirectDrawColorControl_AddRef(p) (p)->lpVtbl->AddRef(p)
  2394. #define IDirectDrawColorControl_Release(p) (p)->lpVtbl->Release(p)
  2395. /*** IDirectDrawColorControl methods ***/
  2396. #define IDirectDrawColorControl_GetColorControls(p,a) (p)->lpVtbl->GetColorControls(p,a)
  2397. #define IDirectDrawColorControl_SetColorControls(p,a) (p)->lpVtbl->SetColorControls(p,a)
  2398. #else
  2399. /*** IUnknown methods ***/
  2400. #define IDirectDrawColorControl_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  2401. #define IDirectDrawColorControl_AddRef(p) (p)->AddRef()
  2402. #define IDirectDrawColorControl_Release(p) (p)->Release()
  2403. /*** IDirectDrawColorControl methods ***/
  2404. #define IDirectDrawColorControl_GetColorControls(p,a) (p)->GetColorControls(a)
  2405. #define IDirectDrawColorControl_SetColorControls(p,a) (p)->SetColorControls(a)
  2406. #endif
  2407. /*****************************************************************************
  2408. * IDirectDrawGammaControl interface
  2409. */
  2410. #define INTERFACE IDirectDrawGammaControl
  2411. DECLARE_INTERFACE_(IDirectDrawGammaControl,IUnknown)
  2412. {
  2413. /*** IUnknown methods ***/
  2414. STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
  2415. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  2416. STDMETHOD_(ULONG,Release)(THIS) PURE;
  2417. /*** IDirectDrawGammaControl methods ***/
  2418. STDMETHOD(GetGammaRamp)(THIS_ DWORD dwFlags, LPDDGAMMARAMP lpGammaRamp) PURE;
  2419. STDMETHOD(SetGammaRamp)(THIS_ DWORD dwFlags, LPDDGAMMARAMP lpGammaRamp) PURE;
  2420. };
  2421. #undef INTERFACE
  2422. #if !defined(__cplusplus) || defined(CINTERFACE)
  2423. /*** IUnknown methods ***/
  2424. #define IDirectDrawGammaControl_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  2425. #define IDirectDrawGammaControl_AddRef(p) (p)->lpVtbl->AddRef(p)
  2426. #define IDirectDrawGammaControl_Release(p) (p)->lpVtbl->Release(p)
  2427. /*** IDirectDrawGammaControl methods ***/
  2428. #define IDirectDrawGammaControl_GetGammaRamp(p,a,b) (p)->lpVtbl->GetGammaRamp(p,a,b)
  2429. #define IDirectDrawGammaControl_SetGammaRamp(p,a,b) (p)->lpVtbl->SetGammaRamp(p,a,b)
  2430. #else
  2431. /*** IUnknown methods ***/
  2432. #define IDirectDrawGammaControl_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  2433. #define IDirectDrawGammaControl_AddRef(p) (p)->AddRef()
  2434. #define IDirectDrawGammaControl_Release(p) (p)->Release()
  2435. /*** IDirectDrawGammaControl methods ***/
  2436. #define IDirectDrawGammaControl_GetGammaRamp(p,a,b) (p)->GetGammaRamp(a,b)
  2437. #define IDirectDrawGammaControl_SetGammaRamp(p,a,b) (p)->SetGammaRamp(a,b)
  2438. #endif
  2439. HRESULT WINAPI DirectDrawCreate(LPGUID,LPDIRECTDRAW*,LPUNKNOWN);
  2440. HRESULT WINAPI DirectDrawCreateEx(LPGUID,LPVOID*,REFIID,LPUNKNOWN);
  2441. HRESULT WINAPI DirectDrawEnumerateA(LPDDENUMCALLBACKA,LPVOID);
  2442. HRESULT WINAPI DirectDrawEnumerateW(LPDDENUMCALLBACKW,LPVOID);
  2443. #define DirectDrawEnumerate WINELIB_NAME_AW(DirectDrawEnumerate)
  2444. HRESULT WINAPI DirectDrawCreateClipper(DWORD,LPDIRECTDRAWCLIPPER*,LPUNKNOWN);
  2445. #ifdef __cplusplus
  2446. } /* extern "C" */
  2447. #endif /* defined(__cplusplus) */
  2448. #endif /* __WINE_DDRAW_H */