ddraw.h 158 KB

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