DDRAW.H 105 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117
  1. //
  2. // Copyright 2020 Electronic Arts Inc.
  3. //
  4. // TiberianDawn.DLL and RedAlert.dll and corresponding source code is free
  5. // software: you can redistribute it and/or modify it under the terms of
  6. // the GNU General Public License as published by the Free Software Foundation,
  7. // either version 3 of the License, or (at your option) any later version.
  8. // TiberianDawn.DLL and RedAlert.dll and corresponding source code is distributed
  9. // in the hope that it will be useful, but with permitted additional restrictions
  10. // under Section 7 of the GPL. See the GNU General Public License in LICENSE.TXT
  11. // distributed with this program. You should have received a copy of the
  12. // GNU General Public License along with permitted additional restrictions
  13. // with this program. If not, see https://github.com/electronicarts/CnC_Remastered_Collection
  14. /*==========================================================================;
  15. *
  16. * Copyright (C) 1994-1996 Microsoft Corporation. All Rights Reserved.
  17. *
  18. * File: ddraw.h
  19. * Content: DirectDraw include file
  20. *
  21. ***************************************************************************/
  22. #ifndef __DDRAW_INCLUDED__
  23. #define __DDRAW_INCLUDED__
  24. #if defined( _WIN32 ) && !defined( _NO_COM )
  25. #define COM_NO_WINDOWS_H
  26. #include <objbase.h>
  27. #else
  28. #define IUnknown void
  29. #define CO_E_NOTINITIALIZED 0x800401F0L
  30. #endif
  31. #define _FACDD 0x876
  32. #define MAKE_DDHRESULT( code ) MAKE_HRESULT( 1, _FACDD, code )
  33. #ifdef __cplusplus
  34. extern "C" {
  35. #endif
  36. /*
  37. * GUIDS used by DirectDraw objects
  38. */
  39. #if defined( _WIN32 ) && !defined( _NO_COM )
  40. DEFINE_GUID( CLSID_DirectDraw, 0xD7B70EE0,0x4340,0x11CF,0xB0,0x63,0x00,0x20,0xAF,0xC2,0xCD,0x35 );
  41. DEFINE_GUID( CLSID_DirectDrawClipper, 0x593817A0,0x7DB3,0x11CF,0xA2,0xDE,0x00,0xAA,0x00,0xb9,0x33,0x56 );
  42. DEFINE_GUID( IID_IDirectDraw, 0x6C14DB80,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
  43. DEFINE_GUID( IID_IDirectDraw2, 0xB3A6F3E0,0x2B43,0x11CF,0xA2,0xDE,0x00,0xAA,0x00,0xB9,0x33,0x56 );
  44. DEFINE_GUID( IID_IDirectDrawSurface, 0x6C14DB81,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
  45. DEFINE_GUID( IID_IDirectDrawSurface2, 0x57805885,0x6eec,0x11cf,0x94,0x41,0xa8,0x23,0x03,0xc1,0x0e,0x27 );
  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. #endif
  49. /*============================================================================
  50. *
  51. * DirectDraw Structures
  52. *
  53. * Various structures used to invoke DirectDraw.
  54. *
  55. *==========================================================================*/
  56. struct IDirectDraw;
  57. struct IDirectDrawSurface;
  58. struct IDirectDrawPalette;
  59. struct IDirectDrawClipper;
  60. typedef struct IDirectDraw FAR *LPDIRECTDRAW;
  61. typedef struct IDirectDraw2 FAR *LPDIRECTDRAW2;
  62. typedef struct IDirectDrawSurface FAR *LPDIRECTDRAWSURFACE;
  63. typedef struct IDirectDrawSurface2 FAR *LPDIRECTDRAWSURFACE2;
  64. typedef struct IDirectDrawPalette FAR *LPDIRECTDRAWPALETTE;
  65. typedef struct IDirectDrawClipper FAR *LPDIRECTDRAWCLIPPER;
  66. typedef struct _DDFXROP FAR *LPDDFXROP;
  67. typedef struct _DDSURFACEDESC FAR *LPDDSURFACEDESC;
  68. /*
  69. * API's
  70. */
  71. #if (defined (WIN32) || defined( _WIN32 ) ) && !defined( _NO_COM )
  72. //#if defined( _WIN32 ) && !defined( _NO_ENUM )
  73. typedef BOOL (FAR PASCAL * LPDDENUMCALLBACKA)(GUID FAR *, LPSTR, LPSTR, LPVOID);
  74. typedef BOOL (FAR PASCAL * LPDDENUMCALLBACKW)(GUID FAR *, LPWSTR, LPWSTR, LPVOID);
  75. extern HRESULT WINAPI DirectDrawEnumerateW( LPDDENUMCALLBACKW lpCallback, LPVOID lpContext );
  76. extern HRESULT WINAPI DirectDrawEnumerateA( LPDDENUMCALLBACKA lpCallback, LPVOID lpContext );
  77. #ifdef UNICODE
  78. typedef LPDDENUMCALLBACKW LPDDENUMCALLBACK;
  79. #define DirectDrawEnumerate DirectDrawEnumerateW
  80. #else
  81. typedef LPDDENUMCALLBACKA LPDDENUMCALLBACK;
  82. #define DirectDrawEnumerate DirectDrawEnumerateA
  83. #endif
  84. extern HRESULT WINAPI DirectDrawCreate( GUID FAR *lpGUID, LPDIRECTDRAW FAR *lplpDD, IUnknown FAR *pUnkOuter );
  85. extern HRESULT WINAPI DirectDrawCreateClipper( DWORD dwFlags, LPDIRECTDRAWCLIPPER FAR *lplpDDClipper, IUnknown FAR *pUnkOuter );
  86. #ifdef WINNT
  87. //This is the user-mode entry stub to the kernel mode procedure.
  88. extern HRESULT NtDirectDrawCreate( GUID FAR *lpGUID, HANDLE *lplpDD, IUnknown FAR *pUnkOuter );
  89. #endif
  90. #endif
  91. #define REGSTR_KEY_DDHW_DESCRIPTION "Description"
  92. #define REGSTR_KEY_DDHW_DRIVERNAME "DriverName"
  93. #define REGSTR_PATH_DDHW "Hardware\\DirectDrawDrivers"
  94. #define DDCREATE_HARDWAREONLY 0x00000001l
  95. #define DDCREATE_EMULATIONONLY 0x00000002l
  96. #ifdef WINNT
  97. typedef long HRESULT;
  98. #endif
  99. //#ifndef WINNT
  100. typedef HRESULT (FAR PASCAL * LPDDENUMMODESCALLBACK)(LPDDSURFACEDESC, LPVOID);
  101. typedef HRESULT (FAR PASCAL * LPDDENUMSURFACESCALLBACK)(LPDIRECTDRAWSURFACE, LPDDSURFACEDESC, LPVOID);
  102. //#endif
  103. /*
  104. * DDCOLORKEY
  105. */
  106. typedef struct _DDCOLORKEY
  107. {
  108. DWORD dwColorSpaceLowValue; // low boundary of color space that is to
  109. // be treated as Color Key, inclusive
  110. DWORD dwColorSpaceHighValue; // high boundary of color space that is
  111. // to be treated as Color Key, inclusive
  112. } DDCOLORKEY;
  113. typedef DDCOLORKEY FAR* LPDDCOLORKEY;
  114. /*
  115. * DDBLTFX
  116. * Used to pass override information to the DIRECTDRAWSURFACE callback Blt.
  117. */
  118. typedef struct _DDBLTFX
  119. {
  120. DWORD dwSize; // size of structure
  121. DWORD dwDDFX; // FX operations
  122. DWORD dwROP; // Win32 raster operations
  123. DWORD dwDDROP; // Raster operations new for DirectDraw
  124. DWORD dwRotationAngle; // Rotation angle for blt
  125. DWORD dwZBufferOpCode; // ZBuffer compares
  126. DWORD dwZBufferLow; // Low limit of Z buffer
  127. DWORD dwZBufferHigh; // High limit of Z buffer
  128. DWORD dwZBufferBaseDest; // Destination base value
  129. DWORD dwZDestConstBitDepth; // Bit depth used to specify Z constant for destination
  130. union
  131. {
  132. DWORD dwZDestConst; // Constant to use as Z buffer for dest
  133. LPDIRECTDRAWSURFACE lpDDSZBufferDest; // Surface to use as Z buffer for dest
  134. };
  135. DWORD dwZSrcConstBitDepth; // Bit depth used to specify Z constant for source
  136. union
  137. {
  138. DWORD dwZSrcConst; // Constant to use as Z buffer for src
  139. LPDIRECTDRAWSURFACE lpDDSZBufferSrc; // Surface to use as Z buffer for src
  140. };
  141. DWORD dwAlphaEdgeBlendBitDepth; // Bit depth used to specify constant for alpha edge blend
  142. DWORD dwAlphaEdgeBlend; // Alpha for edge blending
  143. DWORD dwReserved;
  144. DWORD dwAlphaDestConstBitDepth; // Bit depth used to specify alpha constant for destination
  145. union
  146. {
  147. DWORD dwAlphaDestConst; // Constant to use as Alpha Channel
  148. LPDIRECTDRAWSURFACE lpDDSAlphaDest; // Surface to use as Alpha Channel
  149. };
  150. DWORD dwAlphaSrcConstBitDepth; // Bit depth used to specify alpha constant for source
  151. union
  152. {
  153. DWORD dwAlphaSrcConst; // Constant to use as Alpha Channel
  154. LPDIRECTDRAWSURFACE lpDDSAlphaSrc; // Surface to use as Alpha Channel
  155. };
  156. union
  157. {
  158. DWORD dwFillColor; // color in RGB or Palettized
  159. DWORD dwFillDepth; // depth value for z-buffer
  160. LPDIRECTDRAWSURFACE lpDDSPattern; // Surface to use as pattern
  161. };
  162. DDCOLORKEY ddckDestColorkey; // DestColorkey override
  163. DDCOLORKEY ddckSrcColorkey; // SrcColorkey override
  164. } DDBLTFX;
  165. typedef DDBLTFX FAR* LPDDBLTFX;
  166. /*
  167. * DDSCAPS
  168. */
  169. typedef struct _DDSCAPS
  170. {
  171. DWORD dwCaps; // capabilities of surface wanted
  172. } DDSCAPS;
  173. typedef DDSCAPS FAR* LPDDSCAPS;
  174. /*
  175. * DDCAPS
  176. */
  177. #define DD_ROP_SPACE (256/32) // space required to store ROP array
  178. typedef struct _DDCAPS
  179. {
  180. DWORD dwSize; // size of the DDDRIVERCAPS structure
  181. DWORD dwCaps; // driver specific capabilities
  182. DWORD dwCaps2; // more driver specific capabilites
  183. DWORD dwCKeyCaps; // color key capabilities of the surface
  184. DWORD dwFXCaps; // driver specific stretching and effects capabilites
  185. DWORD dwFXAlphaCaps; // alpha driver specific capabilities
  186. DWORD dwPalCaps; // palette capabilities
  187. DWORD dwSVCaps; // stereo vision capabilities
  188. DWORD dwAlphaBltConstBitDepths; // DDBD_2,4,8
  189. DWORD dwAlphaBltPixelBitDepths; // DDBD_1,2,4,8
  190. DWORD dwAlphaBltSurfaceBitDepths; // DDBD_1,2,4,8
  191. DWORD dwAlphaOverlayConstBitDepths; // DDBD_2,4,8
  192. DWORD dwAlphaOverlayPixelBitDepths; // DDBD_1,2,4,8
  193. DWORD dwAlphaOverlaySurfaceBitDepths; // DDBD_1,2,4,8
  194. DWORD dwZBufferBitDepths; // DDBD_8,16,24,32
  195. DWORD dwVidMemTotal; // total amount of video memory
  196. DWORD dwVidMemFree; // amount of free video memory
  197. DWORD dwMaxVisibleOverlays; // maximum number of visible overlays
  198. DWORD dwCurrVisibleOverlays; // current number of visible overlays
  199. DWORD dwNumFourCCCodes; // number of four cc codes
  200. DWORD dwAlignBoundarySrc; // source rectangle alignment
  201. DWORD dwAlignSizeSrc; // source rectangle byte size
  202. DWORD dwAlignBoundaryDest; // dest rectangle alignment
  203. DWORD dwAlignSizeDest; // dest rectangle byte size
  204. DWORD dwAlignStrideAlign; // stride alignment
  205. DWORD dwRops[DD_ROP_SPACE]; // ROPS supported
  206. DDSCAPS ddsCaps; // DDSCAPS structure has all the general capabilities
  207. DWORD dwMinOverlayStretch; // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  208. DWORD dwMaxOverlayStretch; // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  209. DWORD dwMinLiveVideoStretch; // minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  210. DWORD dwMaxLiveVideoStretch; // maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  211. DWORD dwMinHwCodecStretch; // minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  212. DWORD dwMaxHwCodecStretch; // maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  213. DWORD dwReserved1; // reserved
  214. DWORD dwReserved2; // reserved
  215. DWORD dwReserved3; // reserved
  216. DWORD dwSVBCaps; // driver specific capabilities for System->Vmem blts
  217. DWORD dwSVBCKeyCaps; // driver color key capabilities for System->Vmem blts
  218. DWORD dwSVBFXCaps; // driver FX capabilities for System->Vmem blts
  219. DWORD dwSVBRops[DD_ROP_SPACE];// ROPS supported for System->Vmem blts
  220. DWORD dwVSBCaps; // driver specific capabilities for Vmem->System blts
  221. DWORD dwVSBCKeyCaps; // driver color key capabilities for Vmem->System blts
  222. DWORD dwVSBFXCaps; // driver FX capabilities for Vmem->System blts
  223. DWORD dwVSBRops[DD_ROP_SPACE];// ROPS supported for Vmem->System blts
  224. DWORD dwSSBCaps; // driver specific capabilities for System->System blts
  225. DWORD dwSSBCKeyCaps; // driver color key capabilities for System->System blts
  226. DWORD dwSSBFXCaps; // driver FX capabilities for System->System blts
  227. DWORD dwSSBRops[DD_ROP_SPACE];// ROPS supported for System->System blts
  228. DWORD dwReserved4; // reserved
  229. DWORD dwReserved5; // reserved
  230. DWORD dwReserved6; // reserved
  231. } DDCAPS;
  232. typedef DDCAPS FAR* LPDDCAPS;
  233. /*
  234. * DDPIXELFORMAT
  235. */
  236. typedef struct _DDPIXELFORMAT
  237. {
  238. DWORD dwSize; // size of structure
  239. DWORD dwFlags; // pixel format flags
  240. DWORD dwFourCC; // (FOURCC code)
  241. union
  242. {
  243. DWORD dwRGBBitCount; // how many bits per pixel (BD_4,8,16,24,32)
  244. DWORD dwYUVBitCount; // how many bits per pixel (BD_4,8,16,24,32)
  245. DWORD dwZBufferBitDepth; // how many bits for z buffers (BD_8,16,24,32)
  246. DWORD dwAlphaBitDepth; // how many bits for alpha channels (BD_1,2,4,8)
  247. };
  248. union
  249. {
  250. DWORD dwRBitMask; // mask for red bit
  251. DWORD dwYBitMask; // mask for Y bits
  252. };
  253. union
  254. {
  255. DWORD dwGBitMask; // mask for green bits
  256. DWORD dwUBitMask; // mask for U bits
  257. };
  258. union
  259. {
  260. DWORD dwBBitMask; // mask for blue bits
  261. DWORD dwVBitMask; // mask for V bits
  262. };
  263. union
  264. {
  265. DWORD dwRGBAlphaBitMask; // mask for alpha channel
  266. DWORD dwYUVAlphaBitMask; // mask for alpha channel
  267. };
  268. } DDPIXELFORMAT;
  269. typedef DDPIXELFORMAT FAR* LPDDPIXELFORMAT;
  270. /*
  271. * DDOVERLAYFX
  272. */
  273. typedef struct _DDOVERLAYFX
  274. {
  275. DWORD dwSize; // size of structure
  276. DWORD dwAlphaEdgeBlendBitDepth; // Bit depth used to specify constant for alpha edge blend
  277. DWORD dwAlphaEdgeBlend; // Constant to use as alpha for edge blend
  278. DWORD dwReserved;
  279. DWORD dwAlphaDestConstBitDepth; // Bit depth used to specify alpha constant for destination
  280. union
  281. {
  282. DWORD dwAlphaDestConst; // Constant to use as alpha channel for dest
  283. LPDIRECTDRAWSURFACE lpDDSAlphaDest; // Surface to use as alpha channel for dest
  284. };
  285. DWORD dwAlphaSrcConstBitDepth; // Bit depth used to specify alpha constant for source
  286. union
  287. {
  288. DWORD dwAlphaSrcConst; // Constant to use as alpha channel for src
  289. LPDIRECTDRAWSURFACE lpDDSAlphaSrc; // Surface to use as alpha channel for src
  290. };
  291. DDCOLORKEY dckDestColorkey; // DestColorkey override
  292. DDCOLORKEY dckSrcColorkey; // DestColorkey override
  293. DWORD dwDDFX; // Overlay FX
  294. DWORD dwFlags; // flags
  295. } DDOVERLAYFX;
  296. typedef DDOVERLAYFX FAR *LPDDOVERLAYFX;
  297. /*
  298. * DDBLTBATCH: BltBatch entry structure
  299. */
  300. typedef struct _DDBLTBATCH
  301. {
  302. LPRECT lprDest;
  303. LPDIRECTDRAWSURFACE lpDDSSrc;
  304. LPRECT lprSrc;
  305. DWORD dwFlags;
  306. LPDDBLTFX lpDDBltFx;
  307. } DDBLTBATCH;
  308. typedef DDBLTBATCH FAR * LPDDBLTBATCH;
  309. /*
  310. * callbacks
  311. */
  312. typedef DWORD (FAR PASCAL *LPCLIPPERCALLBACK)(LPDIRECTDRAWCLIPPER lpDDClipper, HWND hWnd, DWORD code, LPVOID lpContext );
  313. #ifdef STREAMING
  314. typedef DWORD (FAR PASCAL *LPSURFACESTREAMINGCALLBACK)(DWORD);
  315. #endif
  316. /*
  317. * INTERACES FOLLOW:
  318. * IDirectDraw
  319. * IDirectDrawClipper
  320. * IDirectDrawPalette
  321. * IDirectDrawSurface
  322. */
  323. /*
  324. * IDirectDraw
  325. */
  326. #if defined( _WIN32 ) && !defined( _NO_COM )
  327. #undef INTERFACE
  328. #define INTERFACE IDirectDraw
  329. DECLARE_INTERFACE_( IDirectDraw, IUnknown )
  330. {
  331. /*** IUnknown methods ***/
  332. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  333. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  334. STDMETHOD_(ULONG,Release) (THIS) PURE;
  335. /*** IDirectDraw methods ***/
  336. STDMETHOD(Compact)(THIS) PURE;
  337. STDMETHOD(CreateClipper)(THIS_ DWORD, LPDIRECTDRAWCLIPPER FAR*, IUnknown FAR * ) PURE;
  338. STDMETHOD(CreatePalette)(THIS_ DWORD, LPPALETTEENTRY, LPDIRECTDRAWPALETTE FAR*, IUnknown FAR * ) PURE;
  339. STDMETHOD(CreateSurface)(THIS_ LPDDSURFACEDESC, LPDIRECTDRAWSURFACE FAR *, IUnknown FAR *) PURE;
  340. STDMETHOD(DuplicateSurface)( THIS_ LPDIRECTDRAWSURFACE, LPDIRECTDRAWSURFACE FAR * ) PURE;
  341. STDMETHOD(EnumDisplayModes)( THIS_ DWORD, LPDDSURFACEDESC, LPVOID, LPDDENUMMODESCALLBACK ) PURE;
  342. STDMETHOD(EnumSurfaces)(THIS_ DWORD, LPDDSURFACEDESC, LPVOID,LPDDENUMSURFACESCALLBACK ) PURE;
  343. STDMETHOD(FlipToGDISurface)(THIS) PURE;
  344. STDMETHOD(GetCaps)( THIS_ LPDDCAPS, LPDDCAPS) PURE;
  345. STDMETHOD(GetDisplayMode)( THIS_ LPDDSURFACEDESC) PURE;
  346. STDMETHOD(GetFourCCCodes)(THIS_ LPDWORD, LPDWORD ) PURE;
  347. STDMETHOD(GetGDISurface)(THIS_ LPDIRECTDRAWSURFACE FAR *) PURE;
  348. STDMETHOD(GetMonitorFrequency)(THIS_ LPDWORD) PURE;
  349. STDMETHOD(GetScanLine)(THIS_ LPDWORD) PURE;
  350. STDMETHOD(GetVerticalBlankStatus)(THIS_ LPBOOL ) PURE;
  351. STDMETHOD(Initialize)(THIS_ GUID FAR *) PURE;
  352. STDMETHOD(RestoreDisplayMode)(THIS) PURE;
  353. STDMETHOD(SetCooperativeLevel)(THIS_ HWND, DWORD) PURE;
  354. STDMETHOD(SetDisplayMode)(THIS_ DWORD, DWORD,DWORD) PURE;
  355. STDMETHOD(WaitForVerticalBlank)(THIS_ DWORD, HANDLE ) PURE;
  356. };
  357. #if !defined(__cplusplus) || defined(CINTERFACE)
  358. #define IDirectDraw_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
  359. #define IDirectDraw_AddRef(p) (p)->lpVtbl->AddRef(p)
  360. #define IDirectDraw_Release(p) (p)->lpVtbl->Release(p)
  361. #define IDirectDraw_Compact(p) (p)->lpVtbl->Compact(p)
  362. #define IDirectDraw_CreateClipper(p, a, b, c) (p)->lpVtbl->CreateClipper(p, a, b, c)
  363. #define IDirectDraw_CreatePalette(p, a, b, c, d) (p)->lpVtbl->CreatePalette(p, a, b, c, d)
  364. #define IDirectDraw_CreateSurface(p, a, b, c) (p)->lpVtbl->CreateSurface(p, a, b, c)
  365. #define IDirectDraw_DuplicateSurface(p, a, b) (p)->lpVtbl->DuplicateSurface(p, a, b)
  366. #define IDirectDraw_EnumDisplayModes(p, a, b, c, d) (p)->lpVtbl->EnumDisplayModes(p, a, b, c, d)
  367. #define IDirectDraw_EnumSurfaces(p, a, b, c, d) (p)->lpVtbl->EnumSurfaces(p, a, b, c, d)
  368. #define IDirectDraw_FlipToGDISurface(p) (p)->lpVtbl->FlipToGDISurface(p)
  369. #define IDirectDraw_GetCaps(p, a, b) (p)->lpVtbl->GetCaps(p, a, b)
  370. #define IDirectDraw_GetDisplayMode(p, a) (p)->lpVtbl->GetDisplayMode(p, a)
  371. #define IDirectDraw_GetFourCCCodes(p, a, b) (p)->lpVtbl->GetFourCCCodes(p, a, b)
  372. #define IDirectDraw_GetGDISurface(p, a) (p)->lpVtbl->GetGDISurface(p, a)
  373. #define IDirectDraw_GetMonitorFrequency(p, a) (p)->lpVtbl->GetMonitorFrequency(p, a)
  374. #define IDirectDraw_GetScanLine(p, a) (p)->lpVtbl->GetScanLine(p, a)
  375. #define IDirectDraw_GetVerticalBlankStatus(p, a) (p)->lpVtbl->GetVerticalBlankStatus(p, a)
  376. #define IDirectDraw_Initialize(p, a) (p)->lpVtbl->Initialize(p, a)
  377. #define IDirectDraw_RestoreDisplayMode(p) (p)->lpVtbl->RestoreDisplayMode(p)
  378. #define IDirectDraw_SetCooperativeLevel(p, a, b) (p)->lpVtbl->SetCooperativeLevel(p, a, b)
  379. #define IDirectDraw_SetDisplayMode(p, a, b, c) (p)->lpVtbl->SetDisplayMode(p, a, b, c)
  380. #define IDirectDraw_WaitForVerticalBlank(p, a, b) (p)->lpVtbl->WaitForVerticalBlank(p, a, b)
  381. #endif
  382. #endif
  383. #if defined( _WIN32 ) && !defined( _NO_COM )
  384. #undef INTERFACE
  385. #define INTERFACE IDirectDraw2
  386. DECLARE_INTERFACE_( IDirectDraw2, IUnknown )
  387. {
  388. /*** IUnknown methods ***/
  389. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  390. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  391. STDMETHOD_(ULONG,Release) (THIS) PURE;
  392. /*** IDirectDraw methods ***/
  393. STDMETHOD(Compact)(THIS) PURE;
  394. STDMETHOD(CreateClipper)(THIS_ DWORD, LPDIRECTDRAWCLIPPER FAR*, IUnknown FAR * ) PURE;
  395. STDMETHOD(CreatePalette)(THIS_ DWORD, LPPALETTEENTRY, LPDIRECTDRAWPALETTE FAR*, IUnknown FAR * ) PURE;
  396. STDMETHOD(CreateSurface)(THIS_ LPDDSURFACEDESC, LPDIRECTDRAWSURFACE FAR *, IUnknown FAR *) PURE;
  397. STDMETHOD(DuplicateSurface)( THIS_ LPDIRECTDRAWSURFACE, LPDIRECTDRAWSURFACE FAR * ) PURE;
  398. STDMETHOD(EnumDisplayModes)( THIS_ DWORD, LPDDSURFACEDESC, LPVOID, LPDDENUMMODESCALLBACK ) PURE;
  399. STDMETHOD(EnumSurfaces)(THIS_ DWORD, LPDDSURFACEDESC, LPVOID,LPDDENUMSURFACESCALLBACK ) PURE;
  400. STDMETHOD(FlipToGDISurface)(THIS) PURE;
  401. STDMETHOD(GetCaps)( THIS_ LPDDCAPS, LPDDCAPS) PURE;
  402. STDMETHOD(GetDisplayMode)( THIS_ LPDDSURFACEDESC) PURE;
  403. STDMETHOD(GetFourCCCodes)(THIS_ LPDWORD, LPDWORD ) PURE;
  404. STDMETHOD(GetGDISurface)(THIS_ LPDIRECTDRAWSURFACE FAR *) PURE;
  405. STDMETHOD(GetMonitorFrequency)(THIS_ LPDWORD) PURE;
  406. STDMETHOD(GetScanLine)(THIS_ LPDWORD) PURE;
  407. STDMETHOD(GetVerticalBlankStatus)(THIS_ LPBOOL ) PURE;
  408. STDMETHOD(Initialize)(THIS_ GUID FAR *) PURE;
  409. STDMETHOD(RestoreDisplayMode)(THIS) PURE;
  410. STDMETHOD(SetCooperativeLevel)(THIS_ HWND, DWORD) PURE;
  411. STDMETHOD(SetDisplayMode)(THIS_ DWORD, DWORD,DWORD, DWORD, DWORD) PURE;
  412. STDMETHOD(WaitForVerticalBlank)(THIS_ DWORD, HANDLE ) PURE;
  413. /*** Added in the v2 interface ***/
  414. STDMETHOD(GetAvailableVidMem)(THIS_ LPDDSCAPS, LPDWORD, LPDWORD) PURE;
  415. };
  416. #if !defined(__cplusplus) || defined(CINTERFACE)
  417. #define IDirectDraw2_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
  418. #define IDirectDraw2_AddRef(p) (p)->lpVtbl->AddRef(p)
  419. #define IDirectDraw2_Release(p) (p)->lpVtbl->Release(p)
  420. #define IDirectDraw2_Compact(p) (p)->lpVtbl->Compact(p)
  421. #define IDirectDraw2_CreateClipper(p, a, b, c) (p)->lpVtbl->CreateClipper(p, a, b, c)
  422. #define IDirectDraw2_CreatePalette(p, a, b, c, d) (p)->lpVtbl->CreatePalette(p, a, b, c, d)
  423. #define IDirectDraw2_CreateSurface(p, a, b, c) (p)->lpVtbl->CreateSurface(p, a, b, c)
  424. #define IDirectDraw2_DuplicateSurface(p, a, b) (p)->lpVtbl->DuplicateSurface(p, a, b)
  425. #define IDirectDraw2_EnumDisplayModes(p, a, b, c, d) (p)->lpVtbl->EnumDisplayModes(p, a, b, c, d)
  426. #define IDirectDraw2_EnumSurfaces(p, a, b, c, d) (p)->lpVtbl->EnumSurfaces(p, a, b, c, d)
  427. #define IDirectDraw2_FlipToGDISurface(p) (p)->lpVtbl->FlipToGDISurface(p)
  428. #define IDirectDraw2_GetCaps(p, a, b) (p)->lpVtbl->GetCaps(p, a, b)
  429. #define IDirectDraw2_GetDisplayMode(p, a) (p)->lpVtbl->GetDisplayMode(p, a)
  430. #define IDirectDraw2_GetFourCCCodes(p, a, b) (p)->lpVtbl->GetFourCCCodes(p, a, b)
  431. #define IDirectDraw2_GetGDISurface(p, a) (p)->lpVtbl->GetGDISurface(p, a)
  432. #define IDirectDraw2_GetMonitorFrequency(p, a) (p)->lpVtbl->GetMonitorFrequency(p, a)
  433. #define IDirectDraw2_GetScanLine(p, a) (p)->lpVtbl->GetScanLine(p, a)
  434. #define IDirectDraw2_GetVerticalBlankStatus(p, a) (p)->lpVtbl->GetVerticalBlankStatus(p, a)
  435. #define IDirectDraw2_Initialize(p, a) (p)->lpVtbl->Initialize(p, a)
  436. #define IDirectDraw2_RestoreDisplayMode(p) (p)->lpVtbl->RestoreDisplayMode(p)
  437. #define IDirectDraw2_SetCooperativeLevel(p, a, b) (p)->lpVtbl->SetCooperativeLevel(p, a, b)
  438. #define IDirectDraw2_SetDisplayMode(p, a, b, c, d) (p)->lpVtbl->SetDisplayMode(p, a, b, c, d)
  439. #define IDirectDraw2_WaitForVerticalBlank(p, a, b) (p)->lpVtbl->WaitForVerticalBlank(p, a, b)
  440. #define IDirectDraw2_GetAvailableVidMem(p, a, b, c) (p)->lpVtbl->GetAvailableVidMem(p, a, b, c)
  441. #endif
  442. #endif
  443. /*
  444. * IDirectDrawPalette
  445. */
  446. #if defined( _WIN32 ) && !defined( _NO_COM )
  447. #undef INTERFACE
  448. #define INTERFACE IDirectDrawPalette
  449. DECLARE_INTERFACE_( IDirectDrawPalette, IUnknown )
  450. {
  451. /*** IUnknown methods ***/
  452. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  453. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  454. STDMETHOD_(ULONG,Release) (THIS) PURE;
  455. /*** IDirectDrawPalette methods ***/
  456. STDMETHOD(GetCaps)(THIS_ LPDWORD) PURE;
  457. STDMETHOD(GetEntries)(THIS_ DWORD,DWORD,DWORD,LPPALETTEENTRY) PURE;
  458. STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, DWORD, LPPALETTEENTRY) PURE;
  459. STDMETHOD(SetEntries)(THIS_ DWORD,DWORD,DWORD,LPPALETTEENTRY) PURE;
  460. };
  461. #if !defined(__cplusplus) || defined(CINTERFACE)
  462. #define IDirectDrawPalette_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
  463. #define IDirectDrawPalette_AddRef(p) (p)->lpVtbl->AddRef(p)
  464. #define IDirectDrawPalette_Release(p) (p)->lpVtbl->Release(p)
  465. #define IDirectDrawPalette_GetCaps(p, a) (p)->lpVtbl->GetCaps(p, a)
  466. #define IDirectDrawPalette_GetEntries(p, a, b, c, d) (p)->lpVtbl->GetEntries(p, a, b, c, d)
  467. #define IDirectDrawPalette_Initialize(p, a, b, c) (p)->lpVtbl->Initialize(p, a, b, c)
  468. #define IDirectDrawPalette_SetEntries(p, a, b, c, d) (p)->lpVtbl->SetEntries(p, a, b, c, d)
  469. #endif
  470. #endif
  471. /*
  472. * IDirectDrawClipper
  473. */
  474. #if defined( _WIN32 ) && !defined( _NO_COM )
  475. #undef INTERFACE
  476. #define INTERFACE IDirectDrawClipper
  477. DECLARE_INTERFACE_( IDirectDrawClipper, IUnknown )
  478. {
  479. /*** IUnknown methods ***/
  480. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  481. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  482. STDMETHOD_(ULONG,Release) (THIS) PURE;
  483. /*** IDirectDrawClipper methods ***/
  484. STDMETHOD(GetClipList)(THIS_ LPRECT, LPRGNDATA, LPDWORD) PURE;
  485. STDMETHOD(GetHWnd)(THIS_ HWND FAR *) PURE;
  486. STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, DWORD) PURE;
  487. STDMETHOD(IsClipListChanged)(THIS_ BOOL FAR *) PURE;
  488. STDMETHOD(SetClipList)(THIS_ LPRGNDATA,DWORD) PURE;
  489. STDMETHOD(SetHWnd)(THIS_ DWORD, HWND ) PURE;
  490. };
  491. #if !defined(__cplusplus) || defined(CINTERFACE)
  492. #define IDirectDrawClipper_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
  493. #define IDirectDrawClipper_AddRef(p) (p)->lpVtbl->AddRef(p)
  494. #define IDirectDrawClipper_Release(p) (p)->lpVtbl->Release(p)
  495. #define IDirectDrawClipper_GetClipList(p, a, b, c) (p)->lpVtbl->GetClipList(p, a, b, c)
  496. #define IDirectDrawClipper_GetHWnd(p, a) (p)->lpVtbl->GetHWnd(p, a)
  497. #define IDirectDrawClipper_Initialize(p, a, b) (p)->lpVtbl->Initialize(p, a, b)
  498. #define IDirectDrawClipper_IsClipListChanged(p, a) (p)->lpVtbl->IsClipListChanged(p, a)
  499. #define IDirectDrawClipper_SetClipList(p, a, b) (p)->lpVtbl->SetClipList(p, a, b)
  500. #define IDirectDrawClipper_SetHWnd(p, a, b) (p)->lpVtbl->SetHWnd(p, a, b)
  501. #endif
  502. #endif
  503. /*
  504. * IDirectDrawSurface and related interfaces
  505. */
  506. #if defined( _WIN32 ) && !defined( _NO_COM )
  507. #undef INTERFACE
  508. #define INTERFACE IDirectDrawSurface
  509. DECLARE_INTERFACE_( IDirectDrawSurface, IUnknown )
  510. {
  511. /*** IUnknown methods ***/
  512. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  513. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  514. STDMETHOD_(ULONG,Release) (THIS) PURE;
  515. /*** IDirectDrawSurface methods ***/
  516. STDMETHOD(AddAttachedSurface)(THIS_ LPDIRECTDRAWSURFACE) PURE;
  517. STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT) PURE;
  518. STDMETHOD(Blt)(THIS_ LPRECT,LPDIRECTDRAWSURFACE, LPRECT,DWORD, LPDDBLTFX) PURE;
  519. STDMETHOD(BltBatch)(THIS_ LPDDBLTBATCH, DWORD, DWORD ) PURE;
  520. STDMETHOD(BltFast)(THIS_ DWORD,DWORD,LPDIRECTDRAWSURFACE, LPRECT,DWORD) PURE;
  521. STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD,LPDIRECTDRAWSURFACE) PURE;
  522. STDMETHOD(EnumAttachedSurfaces)(THIS_ LPVOID,LPDDENUMSURFACESCALLBACK) PURE;
  523. STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD,LPVOID,LPDDENUMSURFACESCALLBACK) PURE;
  524. STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE, DWORD) PURE;
  525. STDMETHOD(GetAttachedSurface)(THIS_ LPDDSCAPS, LPDIRECTDRAWSURFACE FAR *) PURE;
  526. STDMETHOD(GetBltStatus)(THIS_ DWORD) PURE;
  527. STDMETHOD(GetCaps)(THIS_ LPDDSCAPS) PURE;
  528. STDMETHOD(GetClipper)(THIS_ LPDIRECTDRAWCLIPPER FAR*) PURE;
  529. STDMETHOD(GetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
  530. STDMETHOD(GetDC)(THIS_ HDC FAR *) PURE;
  531. STDMETHOD(GetFlipStatus)(THIS_ DWORD) PURE;
  532. STDMETHOD(GetOverlayPosition)(THIS_ LPLONG, LPLONG ) PURE;
  533. STDMETHOD(GetPalette)(THIS_ LPDIRECTDRAWPALETTE FAR*) PURE;
  534. STDMETHOD(GetPixelFormat)(THIS_ LPDDPIXELFORMAT) PURE;
  535. STDMETHOD(GetSurfaceDesc)(THIS_ LPDDSURFACEDESC) PURE;
  536. STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, LPDDSURFACEDESC) PURE;
  537. STDMETHOD(IsLost)(THIS) PURE;
  538. STDMETHOD(Lock)(THIS_ LPRECT,LPDDSURFACEDESC,DWORD,HANDLE) PURE;
  539. STDMETHOD(ReleaseDC)(THIS_ HDC) PURE;
  540. STDMETHOD(Restore)(THIS) PURE;
  541. STDMETHOD(SetClipper)(THIS_ LPDIRECTDRAWCLIPPER) PURE;
  542. STDMETHOD(SetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
  543. STDMETHOD(SetOverlayPosition)(THIS_ LONG, LONG ) PURE;
  544. STDMETHOD(SetPalette)(THIS_ LPDIRECTDRAWPALETTE) PURE;
  545. STDMETHOD(Unlock)(THIS_ LPVOID) PURE;
  546. STDMETHOD(UpdateOverlay)(THIS_ LPRECT, LPDIRECTDRAWSURFACE,LPRECT,DWORD, LPDDOVERLAYFX) PURE;
  547. STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD) PURE;
  548. STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD, LPDIRECTDRAWSURFACE) PURE;
  549. };
  550. #if !defined(__cplusplus) || defined(CINTERFACE)
  551. #define IDirectDrawSurface_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  552. #define IDirectDrawSurface_AddRef(p) (p)->lpVtbl->AddRef(p)
  553. #define IDirectDrawSurface_Release(p) (p)->lpVtbl->Release(p)
  554. #define IDirectDrawSurface_AddAttachedSurface(p,a) (p)->lpVtbl->AddAttachedSurface(p,a)
  555. #define IDirectDrawSurface_AddOverlayDirtyRect(p,a) (p)->lpVtbl->AddOverlayDirtyRect(p,a)
  556. #define IDirectDrawSurface_Blt(p,a,b,c,d,e) (p)->lpVtbl->Blt(p,a,b,c,d,e)
  557. #define IDirectDrawSurface_BltBatch(p,a,b,c) (p)->lpVtbl->BltBatch(p,a,b,c)
  558. #define IDirectDrawSurface_BltFast(p,a,b,c,d,e) (p)->lpVtbl->BltFast(p,a,b,c,d,e)
  559. #define IDirectDrawSurface_DeleteAttachedSurface(p,a,b) (p)->lpVtbl->DeleteAttachedSurface(p,a,b)
  560. #define IDirectDrawSurface_EnumAttachedSurfaces(p,a,b) (p)->lpVtbl->EnumAttachedSurfaces(p,a,b)
  561. #define IDirectDrawSurface_EnumOverlayZOrders(p,a,b,c) (p)->lpVtbl->EnumOverlayZOrders(p,a,b,c)
  562. #define IDirectDrawSurface_Flip(p,a,b) (p)->lpVtbl->Flip(p,a,b)
  563. #define IDirectDrawSurface_GetAttachedSurface(p,a,b) (p)->lpVtbl->GetAttachedSurface(p,a,b)
  564. #define IDirectDrawSurface_GetBltStatus(p,a) (p)->lpVtbl->GetBltStatus(p,a)
  565. #define IDirectDrawSurface_GetCaps(p,b) (p)->lpVtbl->GetCaps(p,b)
  566. #define IDirectDrawSurface_GetClipper(p,a) (p)->lpVtbl->GetClipper(p,a)
  567. #define IDirectDrawSurface_GetColorKey(p,a,b) (p)->lpVtbl->GetColorKey(p,a,b)
  568. #define IDirectDrawSurface_GetDC(p,a) (p)->lpVtbl->GetDC(p,a)
  569. #define IDirectDrawSurface_GetFlipStatus(p,a) (p)->lpVtbl->GetFlipStatus(p,a)
  570. #define IDirectDrawSurface_GetOverlayPosition(p,a,b) (p)->lpVtbl->GetOverlayPosition(p,a,b)
  571. #define IDirectDrawSurface_GetPalette(p,a) (p)->lpVtbl->GetPalette(p,a)
  572. #define IDirectDrawSurface_GetPixelFormat(p,a) (p)->lpVtbl->GetPixelFormat(p,a)
  573. #define IDirectDrawSurface_GetSurfaceDesc(p,a) (p)->lpVtbl->GetSurfaceDesc(p,a)
  574. #define IDirectDrawSurface_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
  575. #define IDirectDrawSurface_IsLost(p) (p)->lpVtbl->IsLost(p)
  576. #define IDirectDrawSurface_Lock(p,a,b,c,d) (p)->lpVtbl->Lock(p,a,b,c,d)
  577. #define IDirectDrawSurface_ReleaseDC(p,a) (p)->lpVtbl->ReleaseDC(p,a)
  578. #define IDirectDrawSurface_Restore(p) (p)->lpVtbl->Restore(p)
  579. #define IDirectDrawSurface_SetClipper(p,a) (p)->lpVtbl->SetClipper(p,a)
  580. #define IDirectDrawSurface_SetColorKey(p,a,b) (p)->lpVtbl->SetColorKey(p,a,b)
  581. #define IDirectDrawSurface_SetOverlayPosition(p,a,b) (p)->lpVtbl->SetOverlayPosition(p,a,b)
  582. #define IDirectDrawSurface_SetPalette(p,a) (p)->lpVtbl->SetPalette(p,a)
  583. #define IDirectDrawSurface_Unlock(p,b) (p)->lpVtbl->Unlock(p,b)
  584. #define IDirectDrawSurface_UpdateOverlay(p,a,b,c,d,e) (p)->lpVtbl->UpdateOverlay(p,a,b,c,d,e)
  585. #define IDirectDrawSurface_UpdateOverlayDisplay(p,a) (p)->lpVtbl->UpdateOverlayDisplay(p,a)
  586. #define IDirectDrawSurface_UpdateOverlayZOrder(p,a,b) (p)->lpVtbl->UpdateOverlayZOrder(p,a,b)
  587. #endif
  588. /*
  589. * IDirectDrawSurface2 and related interfaces
  590. */
  591. #undef INTERFACE
  592. #define INTERFACE IDirectDrawSurface2
  593. DECLARE_INTERFACE_( IDirectDrawSurface2, IUnknown )
  594. {
  595. /*** IUnknown methods ***/
  596. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  597. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  598. STDMETHOD_(ULONG,Release) (THIS) PURE;
  599. /*** IDirectDrawSurface methods ***/
  600. STDMETHOD(AddAttachedSurface)(THIS_ LPDIRECTDRAWSURFACE2) PURE;
  601. STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT) PURE;
  602. STDMETHOD(Blt)(THIS_ LPRECT,LPDIRECTDRAWSURFACE2, LPRECT,DWORD, LPDDBLTFX) PURE;
  603. STDMETHOD(BltBatch)(THIS_ LPDDBLTBATCH, DWORD, DWORD ) PURE;
  604. STDMETHOD(BltFast)(THIS_ DWORD,DWORD,LPDIRECTDRAWSURFACE2, LPRECT,DWORD) PURE;
  605. STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD,LPDIRECTDRAWSURFACE2) PURE;
  606. STDMETHOD(EnumAttachedSurfaces)(THIS_ LPVOID,LPDDENUMSURFACESCALLBACK) PURE;
  607. STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD,LPVOID,LPDDENUMSURFACESCALLBACK) PURE;
  608. STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE2, DWORD) PURE;
  609. STDMETHOD(GetAttachedSurface)(THIS_ LPDDSCAPS, LPDIRECTDRAWSURFACE2 FAR *) PURE;
  610. STDMETHOD(GetBltStatus)(THIS_ DWORD) PURE;
  611. STDMETHOD(GetCaps)(THIS_ LPDDSCAPS) PURE;
  612. STDMETHOD(GetClipper)(THIS_ LPDIRECTDRAWCLIPPER FAR*) PURE;
  613. STDMETHOD(GetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
  614. STDMETHOD(GetDC)(THIS_ HDC FAR *) PURE;
  615. STDMETHOD(GetFlipStatus)(THIS_ DWORD) PURE;
  616. STDMETHOD(GetOverlayPosition)(THIS_ LPLONG, LPLONG ) PURE;
  617. STDMETHOD(GetPalette)(THIS_ LPDIRECTDRAWPALETTE FAR*) PURE;
  618. STDMETHOD(GetPixelFormat)(THIS_ LPDDPIXELFORMAT) PURE;
  619. STDMETHOD(GetSurfaceDesc)(THIS_ LPDDSURFACEDESC) PURE;
  620. STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, LPDDSURFACEDESC) PURE;
  621. STDMETHOD(IsLost)(THIS) PURE;
  622. STDMETHOD(Lock)(THIS_ LPRECT,LPDDSURFACEDESC,DWORD,HANDLE) PURE;
  623. STDMETHOD(ReleaseDC)(THIS_ HDC) PURE;
  624. STDMETHOD(Restore)(THIS) PURE;
  625. STDMETHOD(SetClipper)(THIS_ LPDIRECTDRAWCLIPPER) PURE;
  626. STDMETHOD(SetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
  627. STDMETHOD(SetOverlayPosition)(THIS_ LONG, LONG ) PURE;
  628. STDMETHOD(SetPalette)(THIS_ LPDIRECTDRAWPALETTE) PURE;
  629. STDMETHOD(Unlock)(THIS_ LPVOID) PURE;
  630. STDMETHOD(UpdateOverlay)(THIS_ LPRECT, LPDIRECTDRAWSURFACE2,LPRECT,DWORD, LPDDOVERLAYFX) PURE;
  631. STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD) PURE;
  632. STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD, LPDIRECTDRAWSURFACE2) PURE;
  633. /*** Added in the v2 interface ***/
  634. STDMETHOD(GetDDInterface)(THIS_ LPVOID FAR *) PURE;
  635. STDMETHOD(PageLock)(THIS_ DWORD) PURE;
  636. STDMETHOD(PageUnlock)(THIS_ DWORD) PURE;
  637. };
  638. #if !defined(__cplusplus) || defined(CINTERFACE)
  639. #define IDirectDrawSurface2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  640. #define IDirectDrawSurface2_AddRef(p) (p)->lpVtbl->AddRef(p)
  641. #define IDirectDrawSurface2_Release(p) (p)->lpVtbl->Release(p)
  642. #define IDirectDrawSurface2_AddAttachedSurface(p,a) (p)->lpVtbl->AddAttachedSurface(p,a)
  643. #define IDirectDrawSurface2_AddOverlayDirtyRect(p,a) (p)->lpVtbl->AddOverlayDirtyRect(p,a)
  644. #define IDirectDrawSurface2_Blt(p,a,b,c,d,e) (p)->lpVtbl->Blt(p,a,b,c,d,e)
  645. #define IDirectDrawSurface2_BltBatch(p,a,b,c) (p)->lpVtbl->BltBatch(p,a,b,c)
  646. #define IDirectDrawSurface2_BltFast(p,a,b,c,d,e) (p)->lpVtbl->BltFast(p,a,b,c,d,e)
  647. #define IDirectDrawSurface2_DeleteAttachedSurface(p,a,b) (p)->lpVtbl->DeleteAttachedSurface(p,a,b)
  648. #define IDirectDrawSurface2_EnumAttachedSurfaces(p,a,b) (p)->lpVtbl->EnumAttachedSurfaces(p,a,b)
  649. #define IDirectDrawSurface2_EnumOverlayZOrders(p,a,b,c) (p)->lpVtbl->EnumOverlayZOrders(p,a,b,c)
  650. #define IDirectDrawSurface2_Flip(p,a,b) (p)->lpVtbl->Flip(p,a,b)
  651. #define IDirectDrawSurface2_GetAttachedSurface(p,a,b) (p)->lpVtbl->GetAttachedSurface(p,a,b)
  652. #define IDirectDrawSurface2_GetBltStatus(p,a) (p)->lpVtbl->GetBltStatus(p,a)
  653. #define IDirectDrawSurface2_GetCaps(p,b) (p)->lpVtbl->GetCaps(p,b)
  654. #define IDirectDrawSurface2_GetClipper(p,a) (p)->lpVtbl->GetClipper(p,a)
  655. #define IDirectDrawSurface2_GetColorKey(p,a,b) (p)->lpVtbl->GetColorKey(p,a,b)
  656. #define IDirectDrawSurface2_GetDC(p,a) (p)->lpVtbl->GetDC(p,a)
  657. #define IDirectDrawSurface2_GetFlipStatus(p,a) (p)->lpVtbl->GetFlipStatus(p,a)
  658. #define IDirectDrawSurface2_GetOverlayPosition(p,a,b) (p)->lpVtbl->GetOverlayPosition(p,a,b)
  659. #define IDirectDrawSurface2_GetPalette(p,a) (p)->lpVtbl->GetPalette(p,a)
  660. #define IDirectDrawSurface2_GetPixelFormat(p,a) (p)->lpVtbl->GetPixelFormat(p,a)
  661. #define IDirectDrawSurface2_GetSurfaceDesc(p,a) (p)->lpVtbl->GetSurfaceDesc(p,a)
  662. #define IDirectDrawSurface2_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
  663. #define IDirectDrawSurface2_IsLost(p) (p)->lpVtbl->IsLost(p)
  664. #define IDirectDrawSurface2_Lock(p,a,b,c,d) (p)->lpVtbl->Lock(p,a,b,c,d)
  665. #define IDirectDrawSurface2_ReleaseDC(p,a) (p)->lpVtbl->ReleaseDC(p,a)
  666. #define IDirectDrawSurface2_Restore(p) (p)->lpVtbl->Restore(p)
  667. #define IDirectDrawSurface2_SetClipper(p,a) (p)->lpVtbl->SetClipper(p,a)
  668. #define IDirectDrawSurface2_SetColorKey(p,a,b) (p)->lpVtbl->SetColorKey(p,a,b)
  669. #define IDirectDrawSurface2_SetOverlayPosition(p,a,b) (p)->lpVtbl->SetOverlayPosition(p,a,b)
  670. #define IDirectDrawSurface2_SetPalette(p,a) (p)->lpVtbl->SetPalette(p,a)
  671. #define IDirectDrawSurface2_Unlock(p,b) (p)->lpVtbl->Unlock(p,b)
  672. #define IDirectDrawSurface2_UpdateOverlay(p,a,b,c,d,e) (p)->lpVtbl->UpdateOverlay(p,a,b,c,d,e)
  673. #define IDirectDrawSurface2_UpdateOverlayDisplay(p,a) (p)->lpVtbl->UpdateOverlayDisplay(p,a)
  674. #define IDirectDrawSurface2_UpdateOverlayZOrder(p,a,b) (p)->lpVtbl->UpdateOverlayZOrder(p,a,b)
  675. #define IDirectDrawSurface2_GetDDInterface(p,a) (p)->lpVtbl->GetDDInterface(p,a)
  676. #define IDirectDrawSurface2_PageLock(p,a) (p)->lpVtbl->PageLock(p,a)
  677. #define IDirectDrawSurface2_PageUnlock(p,a) (p)->lpVtbl->PageUnlock(p,a)
  678. #endif
  679. #endif
  680. /*
  681. * DDSURFACEDESC
  682. */
  683. typedef struct _DDSURFACEDESC
  684. {
  685. DWORD dwSize; // size of the DDSURFACEDESC structure
  686. DWORD dwFlags; // determines what fields are valid
  687. DWORD dwHeight; // height of surface to be created
  688. DWORD dwWidth; // width of input surface
  689. LONG lPitch; // distance to start of next line (return value only)
  690. DWORD dwBackBufferCount; // number of back buffers requested
  691. union
  692. {
  693. DWORD dwMipMapCount; // number of mip-map levels requested
  694. DWORD dwZBufferBitDepth; // depth of Z buffer requested
  695. DWORD dwRefreshRate; // refresh rate (used when display mode is described)
  696. };
  697. DWORD dwAlphaBitDepth; // depth of alpha buffer requested
  698. DWORD dwReserved; // reserved
  699. LPVOID lpSurface; // pointer to the associated surface memory
  700. DDCOLORKEY ddckCKDestOverlay; // color key for destination overlay use
  701. DDCOLORKEY ddckCKDestBlt; // color key for destination blt use
  702. DDCOLORKEY ddckCKSrcOverlay; // color key for source overlay use
  703. DDCOLORKEY ddckCKSrcBlt; // color key for source blt use
  704. DDPIXELFORMAT ddpfPixelFormat; // pixel format description of the surface
  705. DDSCAPS ddsCaps; // direct draw surface capabilities
  706. } DDSURFACEDESC;
  707. /*
  708. * ddsCaps field is valid.
  709. */
  710. #define DDSD_CAPS 0x00000001l // default
  711. /*
  712. * dwHeight field is valid.
  713. */
  714. #define DDSD_HEIGHT 0x00000002l
  715. /*
  716. * dwWidth field is valid.
  717. */
  718. #define DDSD_WIDTH 0x00000004l
  719. /*
  720. * lPitch is valid.
  721. */
  722. #define DDSD_PITCH 0x00000008l
  723. /*
  724. * dwBackBufferCount is valid.
  725. */
  726. #define DDSD_BACKBUFFERCOUNT 0x00000020l
  727. /*
  728. * dwZBufferBitDepth is valid.
  729. */
  730. #define DDSD_ZBUFFERBITDEPTH 0x00000040l
  731. /*
  732. * dwAlphaBitDepth is valid.
  733. */
  734. #define DDSD_ALPHABITDEPTH 0x00000080l
  735. /*
  736. * ddpfPixelFormat is valid.
  737. */
  738. #define DDSD_PIXELFORMAT 0x00001000l
  739. /*
  740. * ddckCKDestOverlay is valid.
  741. */
  742. #define DDSD_CKDESTOVERLAY 0x00002000l
  743. /*
  744. * ddckCKDestBlt is valid.
  745. */
  746. #define DDSD_CKDESTBLT 0x00004000l
  747. /*
  748. * ddckCKSrcOverlay is valid.
  749. */
  750. #define DDSD_CKSRCOVERLAY 0x00008000l
  751. /*
  752. * ddckCKSrcBlt is valid.
  753. */
  754. #define DDSD_CKSRCBLT 0x00010000l
  755. /*
  756. * dwMipMapCount is valid.
  757. */
  758. #define DDSD_MIPMAPCOUNT 0x00020000l
  759. /*
  760. * dwRefreshRate is valid
  761. */
  762. #define DDSD_REFRESHRATE 0x00040000l
  763. /*
  764. * All input fields are valid.
  765. */
  766. #define DDSD_ALL 0x0007f9eel
  767. /*============================================================================
  768. *
  769. * Direct Draw Capability Flags
  770. *
  771. * These flags are used to describe the capabilities of a given Surface.
  772. * All flags are bit flags.
  773. *
  774. *==========================================================================*/
  775. /****************************************************************************
  776. *
  777. * DIRECTDRAWSURFACE CAPABILITY FLAGS
  778. *
  779. ****************************************************************************/
  780. /*
  781. * This bit currently has no meaning.
  782. */
  783. #define DDSCAPS_3D 0x00000001l
  784. /*
  785. * Indicates that this surface contains alpha information. The pixel
  786. * format must be interrogated to determine whether this surface
  787. * contains only alpha information or alpha information interlaced
  788. * with pixel color data (e.g. RGBA or YUVA).
  789. */
  790. #define DDSCAPS_ALPHA 0x00000002l
  791. /*
  792. * Indicates that this surface is a backbuffer. It is generally
  793. * set by CreateSurface when the DDSCAPS_FLIP capability bit is set.
  794. * It indicates that this surface is THE back buffer of a surface
  795. * flipping structure. DirectDraw supports N surfaces in a
  796. * surface flipping structure. Only the surface that immediately
  797. * precedeces the DDSCAPS_FRONTBUFFER has this capability bit set.
  798. * The other surfaces are identified as back buffers by the presence
  799. * of the DDSCAPS_FLIP capability, their attachment order, and the
  800. * absence of the DDSCAPS_FRONTBUFFER and DDSCAPS_BACKBUFFER
  801. * capabilities. The bit is sent to CreateSurface when a standalone
  802. * back buffer is being created. This surface could be attached to
  803. * a front buffer and/or back buffers to form a flipping surface
  804. * structure after the CreateSurface call. See AddAttachments for
  805. * a detailed description of the behaviors in this case.
  806. */
  807. #define DDSCAPS_BACKBUFFER 0x00000004l
  808. /*
  809. * Indicates a complex surface structure is being described. A
  810. * complex surface structure results in the creation of more than
  811. * one surface. The additional surfaces are attached to the root
  812. * surface. The complex structure can only be destroyed by
  813. * destroying the root.
  814. */
  815. #define DDSCAPS_COMPLEX 0x00000008l
  816. /*
  817. * Indicates that this surface is a part of a surface flipping structure.
  818. * When it is passed to CreateSurface the DDSCAPS_FRONTBUFFER and
  819. * DDSCAP_BACKBUFFER bits are not set. They are set by CreateSurface
  820. * on the resulting creations. The dwBackBufferCount field in the
  821. * DDSURFACEDESC structure must be set to at least 1 in order for
  822. * the CreateSurface call to succeed. The DDSCAPS_COMPLEX capability
  823. * must always be set with creating multiple surfaces through CreateSurface.
  824. */
  825. #define DDSCAPS_FLIP 0x00000010l
  826. /*
  827. * Indicates that this surface is THE front buffer of a surface flipping
  828. * structure. It is generally set by CreateSurface when the DDSCAPS_FLIP
  829. * capability bit is set.
  830. * If this capability is sent to CreateSurface then a standalonw front buffer
  831. * is created. This surface will not have the DDSCAPS_FLIP capability.
  832. * It can be attached to other back buffers to form a flipping structure.
  833. * See AddAttachments for a detailed description of the behaviors in this
  834. * case.
  835. */
  836. #define DDSCAPS_FRONTBUFFER 0x00000020l
  837. /*
  838. * Indicates that this surface is any offscreen surface that is not an overlay,
  839. * texture, zbuffer, front buffer, back buffer, or alpha surface. It is used
  840. * to identify plain vanilla surfaces.
  841. */
  842. #define DDSCAPS_OFFSCREENPLAIN 0x00000040l
  843. /*
  844. * Indicates that this surface is an overlay. It may or may not be directly visible
  845. * depending on whether or not it is currently being overlayed onto the primary
  846. * surface. DDSCAPS_VISIBLE can be used to determine whether or not it is being
  847. * overlayed at the moment.
  848. */
  849. #define DDSCAPS_OVERLAY 0x00000080l
  850. /*
  851. * Indicates that unique DirectDrawPalette objects can be created and
  852. * attached to this surface.
  853. */
  854. #define DDSCAPS_PALETTE 0x00000100l
  855. /*
  856. * Indicates that this surface is the primary surface. The primary
  857. * surface represents what the user is seeing at the moment.
  858. */
  859. #define DDSCAPS_PRIMARYSURFACE 0x00000200l
  860. /*
  861. * Indicates that this surface is the primary surface for the left eye.
  862. * The primary surface for the left eye represents what the user is seeing
  863. * at the moment with the users left eye. When this surface is created the
  864. * DDSCAPS_PRIMARYSURFACE represents what the user is seeing with the users
  865. * right eye.
  866. */
  867. #define DDSCAPS_PRIMARYSURFACELEFT 0x00000400l
  868. /*
  869. * Indicates that this surface memory was allocated in system memory
  870. */
  871. #define DDSCAPS_SYSTEMMEMORY 0x00000800l
  872. /*
  873. * Indicates that this surface can be used as a 3D texture. It does not
  874. * indicate whether or not the surface is being used for that purpose.
  875. */
  876. #define DDSCAPS_TEXTURE 0x00001000l
  877. /*
  878. * Indicates that a surface may be a destination for 3D rendering. This
  879. * bit must be set in order to query for a Direct3D Device Interface
  880. * from this surface.
  881. */
  882. #define DDSCAPS_3DDEVICE 0x00002000l
  883. /*
  884. * Indicates that this surface exists in video memory.
  885. */
  886. #define DDSCAPS_VIDEOMEMORY 0x00004000l
  887. /*
  888. * Indicates that changes made to this surface are immediately visible.
  889. * It is always set for the primary surface and is set for overlays while
  890. * they are being overlayed and texture maps while they are being textured.
  891. */
  892. #define DDSCAPS_VISIBLE 0x00008000l
  893. /*
  894. * Indicates that only writes are permitted to the surface. Read accesses
  895. * from the surface may or may not generate a protection fault, but the
  896. * results of a read from this surface will not be meaningful. READ ONLY.
  897. */
  898. #define DDSCAPS_WRITEONLY 0x00010000l
  899. /*
  900. * Indicates that this surface is a z buffer. A z buffer does not contain
  901. * displayable information. Instead it contains bit depth information that is
  902. * used to determine which pixels are visible and which are obscured.
  903. */
  904. #define DDSCAPS_ZBUFFER 0x00020000l
  905. /*
  906. * Indicates surface will have a DC associated long term
  907. */
  908. #define DDSCAPS_OWNDC 0x00040000l
  909. /*
  910. * Indicates surface should be able to receive live video
  911. */
  912. #define DDSCAPS_LIVEVIDEO 0x00080000l
  913. /*
  914. * Indicates surface should be able to have a stream decompressed
  915. * to it by the hardware.
  916. */
  917. #define DDSCAPS_HWCODEC 0x00100000l
  918. /*
  919. * Surface is a 320x200 or 320x240 ModeX surface
  920. */
  921. #define DDSCAPS_MODEX 0x00200000l
  922. /*
  923. * Indicates surface is one level of a mip-map. This surface will
  924. * be attached to other DDSCAPS_MIPMAP surfaces to form the mip-map.
  925. * This can be done explicitly, by creating a number of surfaces and
  926. * attaching them with AddAttachedSurface or by implicitly by CreateSurface.
  927. * If this bit is set then DDSCAPS_TEXTURE must also be set.
  928. */
  929. #define DDSCAPS_MIPMAP 0x00400000l
  930. /*
  931. * Indicates that memory for the surface is not allocated until the surface
  932. * is loaded (via the Direct3D texture Load() function).
  933. */
  934. #define DDSCAPS_ALLOCONLOAD 0x04000000l
  935. /****************************************************************************
  936. *
  937. * DIRECTDRAW DRIVER CAPABILITY FLAGS
  938. *
  939. ****************************************************************************/
  940. /*
  941. * Display hardware has 3D acceleration.
  942. */
  943. #define DDCAPS_3D 0x00000001l
  944. /*
  945. * Indicates that DirectDraw will support only dest rectangles that are aligned
  946. * on DIRECTDRAWCAPS.dwAlignBoundaryDest boundaries of the surface, respectively.
  947. * READ ONLY.
  948. */
  949. #define DDCAPS_ALIGNBOUNDARYDEST 0x00000002l
  950. /*
  951. * Indicates that DirectDraw will support only source rectangles whose sizes in
  952. * BYTEs are DIRECTDRAWCAPS.dwAlignSizeDest multiples, respectively. READ ONLY.
  953. */
  954. #define DDCAPS_ALIGNSIZEDEST 0x00000004l
  955. /*
  956. * Indicates that DirectDraw will support only source rectangles that are aligned
  957. * on DIRECTDRAWCAPS.dwAlignBoundarySrc boundaries of the surface, respectively.
  958. * READ ONLY.
  959. */
  960. #define DDCAPS_ALIGNBOUNDARYSRC 0x00000008l
  961. /*
  962. * Indicates that DirectDraw will support only source rectangles whose sizes in
  963. * BYTEs are DIRECTDRAWCAPS.dwAlignSizeSrc multiples, respectively. READ ONLY.
  964. */
  965. #define DDCAPS_ALIGNSIZESRC 0x00000010l
  966. /*
  967. * Indicates that DirectDraw will create video memory surfaces that have a stride
  968. * alignment equal to DIRECTDRAWCAPS.dwAlignStride. READ ONLY.
  969. */
  970. #define DDCAPS_ALIGNSTRIDE 0x00000020l
  971. /*
  972. * Display hardware is capable of blt operations.
  973. */
  974. #define DDCAPS_BLT 0x00000040l
  975. /*
  976. * Display hardware is capable of asynchronous blt operations.
  977. */
  978. #define DDCAPS_BLTQUEUE 0x00000080l
  979. /*
  980. * Display hardware is capable of color space conversions during the blt operation.
  981. */
  982. #define DDCAPS_BLTFOURCC 0x00000100l
  983. /*
  984. * Display hardware is capable of stretching during blt operations.
  985. */
  986. #define DDCAPS_BLTSTRETCH 0x00000200l
  987. /*
  988. * Display hardware is shared with GDI.
  989. */
  990. #define DDCAPS_GDI 0x00000400l
  991. /*
  992. * Display hardware can overlay.
  993. */
  994. #define DDCAPS_OVERLAY 0x00000800l
  995. /*
  996. * Set if display hardware supports overlays but can not clip them.
  997. */
  998. #define DDCAPS_OVERLAYCANTCLIP 0x00001000l
  999. /*
  1000. * Indicates that overlay hardware is capable of color space conversions during
  1001. * the overlay operation.
  1002. */
  1003. #define DDCAPS_OVERLAYFOURCC 0x00002000l
  1004. /*
  1005. * Indicates that stretching can be done by the overlay hardware.
  1006. */
  1007. #define DDCAPS_OVERLAYSTRETCH 0x00004000l
  1008. /*
  1009. * Indicates that unique DirectDrawPalettes can be created for DirectDrawSurfaces
  1010. * other than the primary surface.
  1011. */
  1012. #define DDCAPS_PALETTE 0x00008000l
  1013. /*
  1014. * Indicates that palette changes can be syncd with the veritcal refresh.
  1015. */
  1016. #define DDCAPS_PALETTEVSYNC 0x00010000l
  1017. /*
  1018. * Display hardware can return the current scan line.
  1019. */
  1020. #define DDCAPS_READSCANLINE 0x00020000l
  1021. /*
  1022. * Display hardware has stereo vision capabilities. DDSCAPS_PRIMARYSURFACELEFT
  1023. * can be created.
  1024. */
  1025. #define DDCAPS_STEREOVIEW 0x00040000l
  1026. /*
  1027. * Display hardware is capable of generating a vertical blank interrupt.
  1028. */
  1029. #define DDCAPS_VBI 0x00080000l
  1030. /*
  1031. * Supports the use of z buffers with blt operations.
  1032. */
  1033. #define DDCAPS_ZBLTS 0x00100000l
  1034. /*
  1035. * Supports Z Ordering of overlays.
  1036. */
  1037. #define DDCAPS_ZOVERLAYS 0x00200000l
  1038. /*
  1039. * Supports color key
  1040. */
  1041. #define DDCAPS_COLORKEY 0x00400000l
  1042. /*
  1043. * Supports alpha surfaces
  1044. */
  1045. #define DDCAPS_ALPHA 0x00800000l
  1046. /*
  1047. * colorkey is hardware assisted(DDCAPS_COLORKEY will also be set)
  1048. */
  1049. #define DDCAPS_COLORKEYHWASSIST 0x01000000l
  1050. /*
  1051. * no hardware support at all
  1052. */
  1053. #define DDCAPS_NOHARDWARE 0x02000000l
  1054. /*
  1055. * Display hardware is capable of color fill with bltter
  1056. */
  1057. #define DDCAPS_BLTCOLORFILL 0x04000000l
  1058. /*
  1059. * Display hardware is bank switched, and potentially very slow at
  1060. * random access to VRAM.
  1061. */
  1062. #define DDCAPS_BANKSWITCHED 0x08000000l
  1063. /*
  1064. * Display hardware is capable of depth filling Z-buffers with bltter
  1065. */
  1066. #define DDCAPS_BLTDEPTHFILL 0x10000000l
  1067. /*
  1068. * Display hardware is capable of clipping while bltting.
  1069. */
  1070. #define DDCAPS_CANCLIP 0x20000000l
  1071. /*
  1072. * Display hardware is capable of clipping while stretch bltting.
  1073. */
  1074. #define DDCAPS_CANCLIPSTRETCHED 0x40000000l
  1075. /*
  1076. * Display hardware is capable of bltting to or from system memory
  1077. */
  1078. #define DDCAPS_CANBLTSYSMEM 0x80000000l
  1079. /****************************************************************************
  1080. *
  1081. * MORE DIRECTDRAW DRIVER CAPABILITY FLAGS (dwCaps2)
  1082. *
  1083. ****************************************************************************/
  1084. /*
  1085. * Display hardware is certified
  1086. */
  1087. #define DDCAPS2_CERTIFIED 0x00000001l
  1088. /*
  1089. * Driver cannot interleave 2D operations (lock and blt) to surfaces with
  1090. * Direct3D rendering operations between calls to BeginScene() and EndScene()
  1091. */
  1092. #define DDCAPS2_NO2DDURING3DSCENE 0x00000002l
  1093. /****************************************************************************
  1094. *
  1095. * DIRECTDRAW FX ALPHA CAPABILITY FLAGS
  1096. *
  1097. ****************************************************************************/
  1098. /*
  1099. * Supports alpha blending around the edge of a source color keyed surface.
  1100. * For Blt.
  1101. */
  1102. #define DDFXALPHACAPS_BLTALPHAEDGEBLEND 0x00000001l
  1103. /*
  1104. * Supports alpha information in the pixel format. The bit depth of alpha
  1105. * information in the pixel format can be 1,2,4, or 8. The alpha value becomes
  1106. * more opaque as the alpha value increases. (0 is transparent.)
  1107. * For Blt.
  1108. */
  1109. #define DDFXALPHACAPS_BLTALPHAPIXELS 0x00000002l
  1110. /*
  1111. * Supports alpha information in the pixel format. The bit depth of alpha
  1112. * information in the pixel format can be 1,2,4, or 8. The alpha value
  1113. * becomes more transparent as the alpha value increases. (0 is opaque.)
  1114. * This flag can only be set if DDCAPS_ALPHA is set.
  1115. * For Blt.
  1116. */
  1117. #define DDFXALPHACAPS_BLTALPHAPIXELSNEG 0x00000004l
  1118. /*
  1119. * Supports alpha only surfaces. The bit depth of an alpha only surface can be
  1120. * 1,2,4, or 8. The alpha value becomes more opaque as the alpha value increases.
  1121. * (0 is transparent.)
  1122. * For Blt.
  1123. */
  1124. #define DDFXALPHACAPS_BLTALPHASURFACES 0x00000008l
  1125. /*
  1126. * The depth of the alpha channel data can range can be 1,2,4, or 8.
  1127. * The NEG suffix indicates that this alpha channel becomes more transparent
  1128. * as the alpha value increases. (0 is opaque.) This flag can only be set if
  1129. * DDCAPS_ALPHA is set.
  1130. * For Blt.
  1131. */
  1132. #define DDFXALPHACAPS_BLTALPHASURFACESNEG 0x00000010l
  1133. /*
  1134. * Supports alpha blending around the edge of a source color keyed surface.
  1135. * For Overlays.
  1136. */
  1137. #define DDFXALPHACAPS_OVERLAYALPHAEDGEBLEND 0x00000020l
  1138. /*
  1139. * Supports alpha information in the pixel format. The bit depth of alpha
  1140. * information in the pixel format can be 1,2,4, or 8. The alpha value becomes
  1141. * more opaque as the alpha value increases. (0 is transparent.)
  1142. * For Overlays.
  1143. */
  1144. #define DDFXALPHACAPS_OVERLAYALPHAPIXELS 0x00000040l
  1145. /*
  1146. * Supports alpha information in the pixel format. The bit depth of alpha
  1147. * information in the pixel format can be 1,2,4, or 8. The alpha value
  1148. * becomes more transparent as the alpha value increases. (0 is opaque.)
  1149. * This flag can only be set if DDCAPS_ALPHA is set.
  1150. * For Overlays.
  1151. */
  1152. #define DDFXALPHACAPS_OVERLAYALPHAPIXELSNEG 0x00000080l
  1153. /*
  1154. * Supports alpha only surfaces. The bit depth of an alpha only surface can be
  1155. * 1,2,4, or 8. The alpha value becomes more opaque as the alpha value increases.
  1156. * (0 is transparent.)
  1157. * For Overlays.
  1158. */
  1159. #define DDFXALPHACAPS_OVERLAYALPHASURFACES 0x00000100l
  1160. /*
  1161. * The depth of the alpha channel data can range can be 1,2,4, or 8.
  1162. * The NEG suffix indicates that this alpha channel becomes more transparent
  1163. * as the alpha value increases. (0 is opaque.) This flag can only be set if
  1164. * DDCAPS_ALPHA is set.
  1165. * For Overlays.
  1166. */
  1167. #define DDFXALPHACAPS_OVERLAYALPHASURFACESNEG 0x00000200l
  1168. /****************************************************************************
  1169. *
  1170. * DIRECTDRAW FX CAPABILITY FLAGS
  1171. *
  1172. ****************************************************************************/
  1173. /*
  1174. * Uses arithmetic operations to stretch and shrink surfaces during blt
  1175. * rather than pixel doubling techniques. Along the Y axis.
  1176. */
  1177. #define DDFXCAPS_BLTARITHSTRETCHY 0x00000020l
  1178. /*
  1179. * Uses arithmetic operations to stretch during blt
  1180. * rather than pixel doubling techniques. Along the Y axis. Only
  1181. * works for x1, x2, etc.
  1182. */
  1183. #define DDFXCAPS_BLTARITHSTRETCHYN 0x00000010l
  1184. /*
  1185. * Supports mirroring left to right in blt.
  1186. */
  1187. #define DDFXCAPS_BLTMIRRORLEFTRIGHT 0x00000040l
  1188. /*
  1189. * Supports mirroring top to bottom in blt.
  1190. */
  1191. #define DDFXCAPS_BLTMIRRORUPDOWN 0x00000080l
  1192. /*
  1193. * Supports arbitrary rotation for blts.
  1194. */
  1195. #define DDFXCAPS_BLTROTATION 0x00000100l
  1196. /*
  1197. * Supports 90 degree rotations for blts.
  1198. */
  1199. #define DDFXCAPS_BLTROTATION90 0x00000200l
  1200. /*
  1201. * DirectDraw supports arbitrary shrinking of a surface along the
  1202. * x axis (horizontal direction) for blts.
  1203. */
  1204. #define DDFXCAPS_BLTSHRINKX 0x00000400l
  1205. /*
  1206. * DirectDraw supports integer shrinking (1x,2x,) of a surface
  1207. * along the x axis (horizontal direction) for blts.
  1208. */
  1209. #define DDFXCAPS_BLTSHRINKXN 0x00000800l
  1210. /*
  1211. * DirectDraw supports arbitrary shrinking of a surface along the
  1212. * y axis (horizontal direction) for blts.
  1213. */
  1214. #define DDFXCAPS_BLTSHRINKY 0x00001000l
  1215. /*
  1216. * DirectDraw supports integer shrinking (1x,2x,) of a surface
  1217. * along the y axis (vertical direction) for blts.
  1218. */
  1219. #define DDFXCAPS_BLTSHRINKYN 0x00002000l
  1220. /*
  1221. * DirectDraw supports arbitrary stretching of a surface along the
  1222. * x axis (horizontal direction) for blts.
  1223. */
  1224. #define DDFXCAPS_BLTSTRETCHX 0x00004000l
  1225. /*
  1226. * DirectDraw supports integer stretching (1x,2x,) of a surface
  1227. * along the x axis (horizontal direction) for blts.
  1228. */
  1229. #define DDFXCAPS_BLTSTRETCHXN 0x00008000l
  1230. /*
  1231. * DirectDraw supports arbitrary stretching of a surface along the
  1232. * y axis (horizontal direction) for blts.
  1233. */
  1234. #define DDFXCAPS_BLTSTRETCHY 0x00010000l
  1235. /*
  1236. * DirectDraw supports integer stretching (1x,2x,) of a surface
  1237. * along the y axis (vertical direction) for blts.
  1238. */
  1239. #define DDFXCAPS_BLTSTRETCHYN 0x00020000l
  1240. /*
  1241. * Uses arithmetic operations to stretch and shrink surfaces during
  1242. * overlay rather than pixel doubling techniques. Along the Y axis
  1243. * for overlays.
  1244. */
  1245. #define DDFXCAPS_OVERLAYARITHSTRETCHY 0x00040000l
  1246. /*
  1247. * Uses arithmetic operations to stretch surfaces during
  1248. * overlay rather than pixel doubling techniques. Along the Y axis
  1249. * for overlays. Only works for x1, x2, etc.
  1250. */
  1251. #define DDFXCAPS_OVERLAYARITHSTRETCHYN 0x00000008l
  1252. /*
  1253. * DirectDraw supports arbitrary shrinking of a surface along the
  1254. * x axis (horizontal direction) for overlays.
  1255. */
  1256. #define DDFXCAPS_OVERLAYSHRINKX 0x00080000l
  1257. /*
  1258. * DirectDraw supports integer shrinking (1x,2x,) of a surface
  1259. * along the x axis (horizontal direction) for overlays.
  1260. */
  1261. #define DDFXCAPS_OVERLAYSHRINKXN 0x00100000l
  1262. /*
  1263. * DirectDraw supports arbitrary shrinking of a surface along the
  1264. * y axis (horizontal direction) for overlays.
  1265. */
  1266. #define DDFXCAPS_OVERLAYSHRINKY 0x00200000l
  1267. /*
  1268. * DirectDraw supports integer shrinking (1x,2x,) of a surface
  1269. * along the y axis (vertical direction) for overlays.
  1270. */
  1271. #define DDFXCAPS_OVERLAYSHRINKYN 0x00400000l
  1272. /*
  1273. * DirectDraw supports arbitrary stretching of a surface along the
  1274. * x axis (horizontal direction) for overlays.
  1275. */
  1276. #define DDFXCAPS_OVERLAYSTRETCHX 0x00800000l
  1277. /*
  1278. * DirectDraw supports integer stretching (1x,2x,) of a surface
  1279. * along the x axis (horizontal direction) for overlays.
  1280. */
  1281. #define DDFXCAPS_OVERLAYSTRETCHXN 0x01000000l
  1282. /*
  1283. * DirectDraw supports arbitrary stretching of a surface along the
  1284. * y axis (horizontal direction) for overlays.
  1285. */
  1286. #define DDFXCAPS_OVERLAYSTRETCHY 0x02000000l
  1287. /*
  1288. * DirectDraw supports integer stretching (1x,2x,) of a surface
  1289. * along the y axis (vertical direction) for overlays.
  1290. */
  1291. #define DDFXCAPS_OVERLAYSTRETCHYN 0x04000000l
  1292. /*
  1293. * DirectDraw supports mirroring of overlays across the vertical axis
  1294. */
  1295. #define DDFXCAPS_OVERLAYMIRRORLEFTRIGHT 0x08000000l
  1296. /*
  1297. * DirectDraw supports mirroring of overlays across the horizontal axis
  1298. */
  1299. #define DDFXCAPS_OVERLAYMIRRORUPDOWN 0x10000000l
  1300. /****************************************************************************
  1301. *
  1302. * DIRECTDRAW STEREO VIEW CAPABILITIES
  1303. *
  1304. ****************************************************************************/
  1305. /*
  1306. * The stereo view is accomplished via enigma encoding.
  1307. */
  1308. #define DDSVCAPS_ENIGMA 0x00000001l
  1309. /*
  1310. * The stereo view is accomplished via high frequency flickering.
  1311. */
  1312. #define DDSVCAPS_FLICKER 0x00000002l
  1313. /*
  1314. * The stereo view is accomplished via red and blue filters applied
  1315. * to the left and right eyes. All images must adapt their colorspaces
  1316. * for this process.
  1317. */
  1318. #define DDSVCAPS_REDBLUE 0x00000004l
  1319. /*
  1320. * The stereo view is accomplished with split screen technology.
  1321. */
  1322. #define DDSVCAPS_SPLIT 0x00000008l
  1323. /****************************************************************************
  1324. *
  1325. * DIRECTDRAWPALETTE CAPABILITIES
  1326. *
  1327. ****************************************************************************/
  1328. /*
  1329. * Index is 4 bits. There are sixteen color entries in the palette table.
  1330. */
  1331. #define DDPCAPS_4BIT 0x00000001l
  1332. /*
  1333. * Index is onto a 8 bit color index. This field is only valid with the
  1334. * DDPCAPS_1BIT, DDPCAPS_2BIT or DDPCAPS_4BIT capability and the target
  1335. * surface is in 8bpp. Each color entry is one byte long and is an index
  1336. * into destination surface's 8bpp palette.
  1337. */
  1338. #define DDPCAPS_8BITENTRIES 0x00000002l
  1339. /*
  1340. * Index is 8 bits. There are 256 color entries in the palette table.
  1341. */
  1342. #define DDPCAPS_8BIT 0x00000004l
  1343. /*
  1344. * Indicates that this DIRECTDRAWPALETTE should use the palette color array
  1345. * passed into the lpDDColorArray parameter to initialize the DIRECTDRAWPALETTE
  1346. * object.
  1347. */
  1348. #define DDPCAPS_INITIALIZE 0x00000008l
  1349. /*
  1350. * This palette is the one attached to the primary surface. Changing this
  1351. * table has immediate effect on the display unless DDPSETPAL_VSYNC is specified
  1352. * and supported.
  1353. */
  1354. #define DDPCAPS_PRIMARYSURFACE 0x00000010l
  1355. /*
  1356. * This palette is the one attached to the primary surface left. Changing
  1357. * this table has immediate effect on the display for the left eye unless
  1358. * DDPSETPAL_VSYNC is specified and supported.
  1359. */
  1360. #define DDPCAPS_PRIMARYSURFACELEFT 0x00000020l
  1361. /*
  1362. * This palette can have all 256 entries defined
  1363. */
  1364. #define DDPCAPS_ALLOW256 0x00000040l
  1365. /*
  1366. * This palette can have modifications to it synced with the monitors
  1367. * refresh rate.
  1368. */
  1369. #define DDPCAPS_VSYNC 0x00000080l
  1370. /*
  1371. * Index is 1 bit. There are two color entries in the palette table.
  1372. */
  1373. #define DDPCAPS_1BIT 0x00000100l
  1374. /*
  1375. * Index is 2 bit. There are four color entries in the palette table.
  1376. */
  1377. #define DDPCAPS_2BIT 0x00000200l
  1378. /****************************************************************************
  1379. *
  1380. * DIRECTDRAWPALETTE SETENTRY CONSTANTS
  1381. *
  1382. ****************************************************************************/
  1383. /****************************************************************************
  1384. *
  1385. * DIRECTDRAWPALETTE GETENTRY CONSTANTS
  1386. *
  1387. ****************************************************************************/
  1388. /* 0 is the only legal value */
  1389. /****************************************************************************
  1390. *
  1391. * DIRECTDRAWSURFACE SETPALETTE CONSTANTS
  1392. *
  1393. ****************************************************************************/
  1394. /****************************************************************************
  1395. *
  1396. * DIRECTDRAW BITDEPTH CONSTANTS
  1397. *
  1398. * NOTE: These are only used to indicate supported bit depths. These
  1399. * are flags only, they are not to be used as an actual bit depth. The
  1400. * absolute numbers 1, 2, 4, 8, 16, 24 and 32 are used to indicate actual
  1401. * bit depths in a surface or for changing the display mode.
  1402. *
  1403. ****************************************************************************/
  1404. /*
  1405. * 1 bit per pixel.
  1406. */
  1407. #define DDBD_1 0x00004000l
  1408. /*
  1409. * 2 bits per pixel.
  1410. */
  1411. #define DDBD_2 0x00002000l
  1412. /*
  1413. * 4 bits per pixel.
  1414. */
  1415. #define DDBD_4 0x00001000l
  1416. /*
  1417. * 8 bits per pixel.
  1418. */
  1419. #define DDBD_8 0x00000800l
  1420. /*
  1421. * 16 bits per pixel.
  1422. */
  1423. #define DDBD_16 0x00000400l
  1424. /*
  1425. * 24 bits per pixel.
  1426. */
  1427. #define DDBD_24 0X00000200l
  1428. /*
  1429. * 32 bits per pixel.
  1430. */
  1431. #define DDBD_32 0x00000100l
  1432. /****************************************************************************
  1433. *
  1434. * DIRECTDRAWSURFACE SET/GET COLOR KEY FLAGS
  1435. *
  1436. ****************************************************************************/
  1437. /*
  1438. * Set if the structure contains a color space. Not set if the structure
  1439. * contains a single color key.
  1440. */
  1441. #define DDCKEY_COLORSPACE 0x00000001l
  1442. /*
  1443. * Set if the structure specifies a color key or color space which is to be
  1444. * used as a destination color key for blt operations.
  1445. */
  1446. #define DDCKEY_DESTBLT 0x00000002l
  1447. /*
  1448. * Set if the structure specifies a color key or color space which is to be
  1449. * used as a destination color key for overlay operations.
  1450. */
  1451. #define DDCKEY_DESTOVERLAY 0x00000004l
  1452. /*
  1453. * Set if the structure specifies a color key or color space which is to be
  1454. * used as a source color key for blt operations.
  1455. */
  1456. #define DDCKEY_SRCBLT 0x00000008l
  1457. /*
  1458. * Set if the structure specifies a color key or color space which is to be
  1459. * used as a source color key for overlay operations.
  1460. */
  1461. #define DDCKEY_SRCOVERLAY 0x00000010l
  1462. /****************************************************************************
  1463. *
  1464. * DIRECTDRAW COLOR KEY CAPABILITY FLAGS
  1465. *
  1466. ****************************************************************************/
  1467. /*
  1468. * Supports transparent blting using a color key to identify the replaceable
  1469. * bits of the destination surface for RGB colors.
  1470. */
  1471. #define DDCKEYCAPS_DESTBLT 0x00000001l
  1472. /*
  1473. * Supports transparent blting using a color space to identify the replaceable
  1474. * bits of the destination surface for RGB colors.
  1475. */
  1476. #define DDCKEYCAPS_DESTBLTCLRSPACE 0x00000002l
  1477. /*
  1478. * Supports transparent blting using a color space to identify the replaceable
  1479. * bits of the destination surface for YUV colors.
  1480. */
  1481. #define DDCKEYCAPS_DESTBLTCLRSPACEYUV 0x00000004l
  1482. /*
  1483. * Supports transparent blting using a color key to identify the replaceable
  1484. * bits of the destination surface for YUV colors.
  1485. */
  1486. #define DDCKEYCAPS_DESTBLTYUV 0x00000008l
  1487. /*
  1488. * Supports overlaying using colorkeying of the replaceable bits of the surface
  1489. * being overlayed for RGB colors.
  1490. */
  1491. #define DDCKEYCAPS_DESTOVERLAY 0x00000010l
  1492. /*
  1493. * Supports a color space as the color key for the destination for RGB colors.
  1494. */
  1495. #define DDCKEYCAPS_DESTOVERLAYCLRSPACE 0x00000020l
  1496. /*
  1497. * Supports a color space as the color key for the destination for YUV colors.
  1498. */
  1499. #define DDCKEYCAPS_DESTOVERLAYCLRSPACEYUV 0x00000040l
  1500. /*
  1501. * Supports only one active destination color key value for visible overlay
  1502. * surfaces.
  1503. */
  1504. #define DDCKEYCAPS_DESTOVERLAYONEACTIVE 0x00000080l
  1505. /*
  1506. * Supports overlaying using colorkeying of the replaceable bits of the
  1507. * surface being overlayed for YUV colors.
  1508. */
  1509. #define DDCKEYCAPS_DESTOVERLAYYUV 0x00000100l
  1510. /*
  1511. * Supports transparent blting using the color key for the source with
  1512. * this surface for RGB colors.
  1513. */
  1514. #define DDCKEYCAPS_SRCBLT 0x00000200l
  1515. /*
  1516. * Supports transparent blting using a color space for the source with
  1517. * this surface for RGB colors.
  1518. */
  1519. #define DDCKEYCAPS_SRCBLTCLRSPACE 0x00000400l
  1520. /*
  1521. * Supports transparent blting using a color space for the source with
  1522. * this surface for YUV colors.
  1523. */
  1524. #define DDCKEYCAPS_SRCBLTCLRSPACEYUV 0x00000800l
  1525. /*
  1526. * Supports transparent blting using the color key for the source with
  1527. * this surface for YUV colors.
  1528. */
  1529. #define DDCKEYCAPS_SRCBLTYUV 0x00001000l
  1530. /*
  1531. * Supports overlays using the color key for the source with this
  1532. * overlay surface for RGB colors.
  1533. */
  1534. #define DDCKEYCAPS_SRCOVERLAY 0x00002000l
  1535. /*
  1536. * Supports overlays using a color space as the source color key for
  1537. * the overlay surface for RGB colors.
  1538. */
  1539. #define DDCKEYCAPS_SRCOVERLAYCLRSPACE 0x00004000l
  1540. /*
  1541. * Supports overlays using a color space as the source color key for
  1542. * the overlay surface for YUV colors.
  1543. */
  1544. #define DDCKEYCAPS_SRCOVERLAYCLRSPACEYUV 0x00008000l
  1545. /*
  1546. * Supports only one active source color key value for visible
  1547. * overlay surfaces.
  1548. */
  1549. #define DDCKEYCAPS_SRCOVERLAYONEACTIVE 0x00010000l
  1550. /*
  1551. * Supports overlays using the color key for the source with this
  1552. * overlay surface for YUV colors.
  1553. */
  1554. #define DDCKEYCAPS_SRCOVERLAYYUV 0x00020000l
  1555. /*
  1556. * there are no bandwidth trade-offs for using colorkey with an overlay
  1557. */
  1558. #define DDCKEYCAPS_NOCOSTOVERLAY 0x00040000l
  1559. /****************************************************************************
  1560. *
  1561. * DIRECTDRAW PIXELFORMAT FLAGS
  1562. *
  1563. ****************************************************************************/
  1564. /*
  1565. * The surface has alpha channel information in the pixel format.
  1566. */
  1567. #define DDPF_ALPHAPIXELS 0x00000001l
  1568. /*
  1569. * The pixel format contains alpha only information
  1570. */
  1571. #define DDPF_ALPHA 0x00000002l
  1572. /*
  1573. * The FourCC code is valid.
  1574. */
  1575. #define DDPF_FOURCC 0x00000004l
  1576. /*
  1577. * The surface is 4-bit color indexed.
  1578. */
  1579. #define DDPF_PALETTEINDEXED4 0x00000008l
  1580. /*
  1581. * The surface is indexed into a palette which stores indices
  1582. * into the destination surface's 8-bit palette.
  1583. */
  1584. #define DDPF_PALETTEINDEXEDTO8 0x00000010l
  1585. /*
  1586. * The surface is 8-bit color indexed.
  1587. */
  1588. #define DDPF_PALETTEINDEXED8 0x00000020l
  1589. /*
  1590. * The RGB data in the pixel format structure is valid.
  1591. */
  1592. #define DDPF_RGB 0x00000040l
  1593. /*
  1594. * The surface will accept pixel data in the format specified
  1595. * and compress it during the write.
  1596. */
  1597. #define DDPF_COMPRESSED 0x00000080l
  1598. /*
  1599. * The surface will accept RGB data and translate it during
  1600. * the write to YUV data. The format of the data to be written
  1601. * will be contained in the pixel format structure. The DDPF_RGB
  1602. * flag will be set.
  1603. */
  1604. #define DDPF_RGBTOYUV 0x00000100l
  1605. /*
  1606. * pixel format is YUV - YUV data in pixel format struct is valid
  1607. */
  1608. #define DDPF_YUV 0x00000200l
  1609. /*
  1610. * pixel format is a z buffer only surface
  1611. */
  1612. #define DDPF_ZBUFFER 0x00000400l
  1613. /*
  1614. * The surface is 1-bit color indexed.
  1615. */
  1616. #define DDPF_PALETTEINDEXED1 0x00000800l
  1617. /*
  1618. * The surface is 2-bit color indexed.
  1619. */
  1620. #define DDPF_PALETTEINDEXED2 0x00001000l
  1621. /*===========================================================================
  1622. *
  1623. *
  1624. * DIRECTDRAW CALLBACK FLAGS
  1625. *
  1626. *
  1627. *==========================================================================*/
  1628. /****************************************************************************
  1629. *
  1630. * DIRECTDRAW ENUMSURFACES FLAGS
  1631. *
  1632. ****************************************************************************/
  1633. /*
  1634. * Enumerate all of the surfaces that meet the search criterion.
  1635. */
  1636. #define DDENUMSURFACES_ALL 0x00000001l
  1637. /*
  1638. * A search hit is a surface that matches the surface description.
  1639. */
  1640. #define DDENUMSURFACES_MATCH 0x00000002l
  1641. /*
  1642. * A search hit is a surface that does not match the surface description.
  1643. */
  1644. #define DDENUMSURFACES_NOMATCH 0x00000004l
  1645. /*
  1646. * Enumerate the first surface that can be created which meets the search criterion.
  1647. */
  1648. #define DDENUMSURFACES_CANBECREATED 0x00000008l
  1649. /*
  1650. * Enumerate the surfaces that already exist that meet the search criterion.
  1651. */
  1652. #define DDENUMSURFACES_DOESEXIST 0x00000010l
  1653. /****************************************************************************
  1654. *
  1655. * DIRECTDRAW ENUMDISPLAYMODES FLAGS
  1656. *
  1657. ****************************************************************************/
  1658. /*
  1659. * Enumerate Modes with different refresh rates. EnumDisplayModes guarantees
  1660. * that a particular mode will be enumerated only once. This flag specifies whether
  1661. * the refresh rate is taken into account when determining if a mode is unique.
  1662. */
  1663. #define DDEDM_REFRESHRATES 0x00000001l
  1664. /****************************************************************************
  1665. *
  1666. * DIRECTDRAW SETCOOPERATIVELEVEL FLAGS
  1667. *
  1668. ****************************************************************************/
  1669. /*
  1670. * Exclusive mode owner will be responsible for the entire primary surface.
  1671. * GDI can be ignored. used with DD
  1672. */
  1673. #define DDSCL_FULLSCREEN 0x00000001l
  1674. /*
  1675. * allow CTRL_ALT_DEL to work while in fullscreen exclusive mode
  1676. */
  1677. #define DDSCL_ALLOWREBOOT 0x00000002l
  1678. /*
  1679. * prevents DDRAW from modifying the application window.
  1680. * prevents DDRAW from minimize/restore the application window on activation.
  1681. */
  1682. #define DDSCL_NOWINDOWCHANGES 0x00000004l
  1683. /*
  1684. * app wants to work as a regular Windows application
  1685. */
  1686. #define DDSCL_NORMAL 0x00000008l
  1687. /*
  1688. * app wants exclusive access
  1689. */
  1690. #define DDSCL_EXCLUSIVE 0x00000010l
  1691. /*
  1692. * app can deal with non-windows display modes
  1693. */
  1694. #define DDSCL_ALLOWMODEX 0x00000040l
  1695. /****************************************************************************
  1696. *
  1697. * DIRECTDRAW BLT FLAGS
  1698. *
  1699. ****************************************************************************/
  1700. /*
  1701. * Use the alpha information in the pixel format or the alpha channel surface
  1702. * attached to the destination surface as the alpha channel for this blt.
  1703. */
  1704. #define DDBLT_ALPHADEST 0x00000001l
  1705. /*
  1706. * Use the dwConstAlphaDest field in the DDBLTFX structure as the alpha channel
  1707. * for the destination surface for this blt.
  1708. */
  1709. #define DDBLT_ALPHADESTCONSTOVERRIDE 0x00000002l
  1710. /*
  1711. * The NEG suffix indicates that the destination surface becomes more
  1712. * transparent as the alpha value increases. (0 is opaque)
  1713. */
  1714. #define DDBLT_ALPHADESTNEG 0x00000004l
  1715. /*
  1716. * Use the lpDDSAlphaDest field in the DDBLTFX structure as the alpha
  1717. * channel for the destination for this blt.
  1718. */
  1719. #define DDBLT_ALPHADESTSURFACEOVERRIDE 0x00000008l
  1720. /*
  1721. * Use the dwAlphaEdgeBlend field in the DDBLTFX structure as the alpha channel
  1722. * for the edges of the image that border the color key colors.
  1723. */
  1724. #define DDBLT_ALPHAEDGEBLEND 0x00000010l
  1725. /*
  1726. * Use the alpha information in the pixel format or the alpha channel surface
  1727. * attached to the source surface as the alpha channel for this blt.
  1728. */
  1729. #define DDBLT_ALPHASRC 0x00000020l
  1730. /*
  1731. * Use the dwConstAlphaSrc field in the DDBLTFX structure as the alpha channel
  1732. * for the source for this blt.
  1733. */
  1734. #define DDBLT_ALPHASRCCONSTOVERRIDE 0x00000040l
  1735. /*
  1736. * The NEG suffix indicates that the source surface becomes more transparent
  1737. * as the alpha value increases. (0 is opaque)
  1738. */
  1739. #define DDBLT_ALPHASRCNEG 0x00000080l
  1740. /*
  1741. * Use the lpDDSAlphaSrc field in the DDBLTFX structure as the alpha channel
  1742. * for the source for this blt.
  1743. */
  1744. #define DDBLT_ALPHASRCSURFACEOVERRIDE 0x00000100l
  1745. /*
  1746. * Do this blt asynchronously through the FIFO in the order received. If
  1747. * there is no room in the hardware FIFO fail the call.
  1748. */
  1749. #define DDBLT_ASYNC 0x00000200l
  1750. /*
  1751. * Uses the dwFillColor field in the DDBLTFX structure as the RGB color
  1752. * to fill the destination rectangle on the destination surface with.
  1753. */
  1754. #define DDBLT_COLORFILL 0x00000400l
  1755. /*
  1756. * Uses the dwDDFX field in the DDBLTFX structure to specify the effects
  1757. * to use for the blt.
  1758. */
  1759. #define DDBLT_DDFX 0x00000800l
  1760. /*
  1761. * Uses the dwDDROPS field in the DDBLTFX structure to specify the ROPS
  1762. * that are not part of the Win32 API.
  1763. */
  1764. #define DDBLT_DDROPS 0x00001000l
  1765. /*
  1766. * Use the color key associated with the destination surface.
  1767. */
  1768. #define DDBLT_KEYDEST 0x00002000l
  1769. /*
  1770. * Use the dckDestColorkey field in the DDBLTFX structure as the color key
  1771. * for the destination surface.
  1772. */
  1773. #define DDBLT_KEYDESTOVERRIDE 0x00004000l
  1774. /*
  1775. * Use the color key associated with the source surface.
  1776. */
  1777. #define DDBLT_KEYSRC 0x00008000l
  1778. /*
  1779. * Use the dckSrcColorkey field in the DDBLTFX structure as the color key
  1780. * for the source surface.
  1781. */
  1782. #define DDBLT_KEYSRCOVERRIDE 0x00010000l
  1783. /*
  1784. * Use the dwROP field in the DDBLTFX structure for the raster operation
  1785. * for this blt. These ROPs are the same as the ones defined in the Win32 API.
  1786. */
  1787. #define DDBLT_ROP 0x00020000l
  1788. /*
  1789. * Use the dwRotationAngle field in the DDBLTFX structure as the angle
  1790. * (specified in 1/100th of a degree) to rotate the surface.
  1791. */
  1792. #define DDBLT_ROTATIONANGLE 0x00040000l
  1793. /*
  1794. * Z-buffered blt using the z-buffers attached to the source and destination
  1795. * surfaces and the dwZBufferOpCode field in the DDBLTFX structure as the
  1796. * z-buffer opcode.
  1797. */
  1798. #define DDBLT_ZBUFFER 0x00080000l
  1799. /*
  1800. * Z-buffered blt using the dwConstDest Zfield and the dwZBufferOpCode field
  1801. * in the DDBLTFX structure as the z-buffer and z-buffer opcode respectively
  1802. * for the destination.
  1803. */
  1804. #define DDBLT_ZBUFFERDESTCONSTOVERRIDE 0x00100000l
  1805. /*
  1806. * Z-buffered blt using the lpDDSDestZBuffer field and the dwZBufferOpCode
  1807. * field in the DDBLTFX structure as the z-buffer and z-buffer opcode
  1808. * respectively for the destination.
  1809. */
  1810. #define DDBLT_ZBUFFERDESTOVERRIDE 0x00200000l
  1811. /*
  1812. * Z-buffered blt using the dwConstSrcZ field and the dwZBufferOpCode field
  1813. * in the DDBLTFX structure as the z-buffer and z-buffer opcode respectively
  1814. * for the source.
  1815. */
  1816. #define DDBLT_ZBUFFERSRCCONSTOVERRIDE 0x00400000l
  1817. /*
  1818. * Z-buffered blt using the lpDDSSrcZBuffer field and the dwZBufferOpCode
  1819. * field in the DDBLTFX structure as the z-buffer and z-buffer opcode
  1820. * respectively for the source.
  1821. */
  1822. #define DDBLT_ZBUFFERSRCOVERRIDE 0x00800000l
  1823. /*
  1824. * wait until the device is ready to handle the blt
  1825. * this will cause blt to not return DDERR_WASSTILLDRAWING
  1826. */
  1827. #define DDBLT_WAIT 0x01000000l
  1828. /*
  1829. * Uses the dwFillDepth field in the DDBLTFX structure as the depth value
  1830. * to fill the destination rectangle on the destination Z-buffer surface
  1831. * with.
  1832. */
  1833. #define DDBLT_DEPTHFILL 0x02000000l
  1834. /****************************************************************************
  1835. *
  1836. * BLTFAST FLAGS
  1837. *
  1838. ****************************************************************************/
  1839. #define DDBLTFAST_NOCOLORKEY 0x00000000
  1840. #define DDBLTFAST_SRCCOLORKEY 0x00000001
  1841. #define DDBLTFAST_DESTCOLORKEY 0x00000002
  1842. #define DDBLTFAST_WAIT 0x00000010
  1843. /****************************************************************************
  1844. *
  1845. * FLIP FLAGS
  1846. *
  1847. ****************************************************************************/
  1848. #define DDFLIP_WAIT 0x00000001l
  1849. /****************************************************************************
  1850. *
  1851. * DIRECTDRAW SURFACE OVERLAY FLAGS
  1852. *
  1853. ****************************************************************************/
  1854. /*
  1855. * Use the alpha information in the pixel format or the alpha channel surface
  1856. * attached to the destination surface as the alpha channel for the
  1857. * destination overlay.
  1858. */
  1859. #define DDOVER_ALPHADEST 0x00000001l
  1860. /*
  1861. * Use the dwConstAlphaDest field in the DDOVERLAYFX structure as the
  1862. * destination alpha channel for this overlay.
  1863. */
  1864. #define DDOVER_ALPHADESTCONSTOVERRIDE 0x00000002l
  1865. /*
  1866. * The NEG suffix indicates that the destination surface becomes more
  1867. * transparent as the alpha value increases.
  1868. */
  1869. #define DDOVER_ALPHADESTNEG 0x00000004l
  1870. /*
  1871. * Use the lpDDSAlphaDest field in the DDOVERLAYFX structure as the alpha
  1872. * channel destination for this overlay.
  1873. */
  1874. #define DDOVER_ALPHADESTSURFACEOVERRIDE 0x00000008l
  1875. /*
  1876. * Use the dwAlphaEdgeBlend field in the DDOVERLAYFX structure as the alpha
  1877. * channel for the edges of the image that border the color key colors.
  1878. */
  1879. #define DDOVER_ALPHAEDGEBLEND 0x00000010l
  1880. /*
  1881. * Use the alpha information in the pixel format or the alpha channel surface
  1882. * attached to the source surface as the source alpha channel for this overlay.
  1883. */
  1884. #define DDOVER_ALPHASRC 0x00000020l
  1885. /*
  1886. * Use the dwConstAlphaSrc field in the DDOVERLAYFX structure as the source
  1887. * alpha channel for this overlay.
  1888. */
  1889. #define DDOVER_ALPHASRCCONSTOVERRIDE 0x00000040l
  1890. /*
  1891. * The NEG suffix indicates that the source surface becomes more transparent
  1892. * as the alpha value increases.
  1893. */
  1894. #define DDOVER_ALPHASRCNEG 0x00000080l
  1895. /*
  1896. * Use the lpDDSAlphaSrc field in the DDOVERLAYFX structure as the alpha channel
  1897. * source for this overlay.
  1898. */
  1899. #define DDOVER_ALPHASRCSURFACEOVERRIDE 0x00000100l
  1900. /*
  1901. * Turn this overlay off.
  1902. */
  1903. #define DDOVER_HIDE 0x00000200l
  1904. /*
  1905. * Use the color key associated with the destination surface.
  1906. */
  1907. #define DDOVER_KEYDEST 0x00000400l
  1908. /*
  1909. * Use the dckDestColorkey field in the DDOVERLAYFX structure as the color key
  1910. * for the destination surface
  1911. */
  1912. #define DDOVER_KEYDESTOVERRIDE 0x00000800l
  1913. /*
  1914. * Use the color key associated with the source surface.
  1915. */
  1916. #define DDOVER_KEYSRC 0x00001000l
  1917. /*
  1918. * Use the dckSrcColorkey field in the DDOVERLAYFX structure as the color key
  1919. * for the source surface.
  1920. */
  1921. #define DDOVER_KEYSRCOVERRIDE 0x00002000l
  1922. /*
  1923. * Turn this overlay on.
  1924. */
  1925. #define DDOVER_SHOW 0x00004000l
  1926. /*
  1927. * Add a dirty rect to an emulated overlayed surface.
  1928. */
  1929. #define DDOVER_ADDDIRTYRECT 0x00008000l
  1930. /*
  1931. * Redraw all dirty rects on an emulated overlayed surface.
  1932. */
  1933. #define DDOVER_REFRESHDIRTYRECTS 0x00010000l
  1934. /*
  1935. * Redraw the entire surface on an emulated overlayed surface.
  1936. */
  1937. #define DDOVER_REFRESHALL 0x00020000l
  1938. /*
  1939. * Use the overlay FX flags to define special overlay FX
  1940. */
  1941. #define DDOVER_DDFX 0x00080000l
  1942. /****************************************************************************
  1943. *
  1944. * DIRECTDRAWSURFACE LOCK FLAGS
  1945. *
  1946. ****************************************************************************/
  1947. /*
  1948. * The default. Set to indicate that Lock should return a valid memory pointer
  1949. * to the top of the specified rectangle. If no rectangle is specified then a
  1950. * pointer to the top of the surface is returned.
  1951. */
  1952. #define DDLOCK_SURFACEMEMORYPTR 0x00000000L // default
  1953. /*
  1954. * Set to indicate that Lock should wait until it can obtain a valid memory
  1955. * pointer before returning. If this bit is set, Lock will never return
  1956. * DDERR_WASSTILLDRAWING.
  1957. */
  1958. #define DDLOCK_WAIT 0x00000001L
  1959. /*
  1960. * Set if an event handle is being passed to Lock. Lock will trigger the event
  1961. * when it can return the surface memory pointer requested.
  1962. */
  1963. #define DDLOCK_EVENT 0x00000002L
  1964. /*
  1965. * Indicates that the surface being locked will only be read from.
  1966. */
  1967. #define DDLOCK_READONLY 0x00000010L
  1968. /*
  1969. * Indicates that the surface being locked will only be written to
  1970. */
  1971. #define DDLOCK_WRITEONLY 0x00000020L
  1972. /****************************************************************************
  1973. *
  1974. * DIRECTDRAWSURFACE PAGELOCK FLAGS
  1975. *
  1976. ****************************************************************************/
  1977. /*
  1978. * No flags defined at present
  1979. */
  1980. /****************************************************************************
  1981. *
  1982. * DIRECTDRAWSURFACE PAGEUNLOCK FLAGS
  1983. *
  1984. ****************************************************************************/
  1985. /*
  1986. * No flags defined at present
  1987. */
  1988. /****************************************************************************
  1989. *
  1990. * DIRECTDRAWSURFACE BLT FX FLAGS
  1991. *
  1992. ****************************************************************************/
  1993. /*
  1994. * If stretching, use arithmetic stretching along the Y axis for this blt.
  1995. */
  1996. #define DDBLTFX_ARITHSTRETCHY 0x00000001l
  1997. /*
  1998. * Do this blt mirroring the surface left to right. Spin the
  1999. * surface around its y-axis.
  2000. */
  2001. #define DDBLTFX_MIRRORLEFTRIGHT 0x00000002l
  2002. /*
  2003. * Do this blt mirroring the surface up and down. Spin the surface
  2004. * around its x-axis.
  2005. */
  2006. #define DDBLTFX_MIRRORUPDOWN 0x00000004l
  2007. /*
  2008. * Schedule this blt to avoid tearing.
  2009. */
  2010. #define DDBLTFX_NOTEARING 0x00000008l
  2011. /*
  2012. * Do this blt rotating the surface one hundred and eighty degrees.
  2013. */
  2014. #define DDBLTFX_ROTATE180 0x00000010l
  2015. /*
  2016. * Do this blt rotating the surface two hundred and seventy degrees.
  2017. */
  2018. #define DDBLTFX_ROTATE270 0x00000020l
  2019. /*
  2020. * Do this blt rotating the surface ninety degrees.
  2021. */
  2022. #define DDBLTFX_ROTATE90 0x00000040l
  2023. /*
  2024. * Do this z blt using dwZBufferLow and dwZBufferHigh as range values
  2025. * specified to limit the bits copied from the source surface.
  2026. */
  2027. #define DDBLTFX_ZBUFFERRANGE 0x00000080l
  2028. /*
  2029. * Do this z blt adding the dwZBufferBaseDest to each of the sources z values
  2030. * before comparing it with the desting z values.
  2031. */
  2032. #define DDBLTFX_ZBUFFERBASEDEST 0x00000100l
  2033. /****************************************************************************
  2034. *
  2035. * DIRECTDRAWSURFACE OVERLAY FX FLAGS
  2036. *
  2037. ****************************************************************************/
  2038. /*
  2039. * If stretching, use arithmetic stretching along the Y axis for this overlay.
  2040. */
  2041. #define DDOVERFX_ARITHSTRETCHY 0x00000001l
  2042. /*
  2043. * Mirror the overlay across the vertical axis
  2044. */
  2045. #define DDOVERFX_MIRRORLEFTRIGHT 0x00000002l
  2046. /*
  2047. * Mirror the overlay across the horizontal axis
  2048. */
  2049. #define DDOVERFX_MIRRORUPDOWN 0x00000004l
  2050. /****************************************************************************
  2051. *
  2052. * DIRECTDRAW WAITFORVERTICALBLANK FLAGS
  2053. *
  2054. ****************************************************************************/
  2055. /*
  2056. * return when the vertical blank interval begins
  2057. */
  2058. #define DDWAITVB_BLOCKBEGIN 0x00000001l
  2059. /*
  2060. * set up an event to trigger when the vertical blank begins
  2061. */
  2062. #define DDWAITVB_BLOCKBEGINEVENT 0x00000002l
  2063. /*
  2064. * return when the vertical blank interval ends and display begins
  2065. */
  2066. #define DDWAITVB_BLOCKEND 0x00000004l
  2067. /****************************************************************************
  2068. *
  2069. * DIRECTDRAW GETFLIPSTATUS FLAGS
  2070. *
  2071. ****************************************************************************/
  2072. /*
  2073. * is it OK to flip now?
  2074. */
  2075. #define DDGFS_CANFLIP 0x00000001l
  2076. /*
  2077. * is the last flip finished?
  2078. */
  2079. #define DDGFS_ISFLIPDONE 0x00000002l
  2080. /****************************************************************************
  2081. *
  2082. * DIRECTDRAW GETBLTSTATUS FLAGS
  2083. *
  2084. ****************************************************************************/
  2085. /*
  2086. * is it OK to blt now?
  2087. */
  2088. #define DDGBS_CANBLT 0x00000001l
  2089. /*
  2090. * is the blt to the surface finished?
  2091. */
  2092. #define DDGBS_ISBLTDONE 0x00000002l
  2093. /****************************************************************************
  2094. *
  2095. * DIRECTDRAW ENUMOVERLAYZORDER FLAGS
  2096. *
  2097. ****************************************************************************/
  2098. /*
  2099. * Enumerate overlays back to front.
  2100. */
  2101. #define DDENUMOVERLAYZ_BACKTOFRONT 0x00000000l
  2102. /*
  2103. * Enumerate overlays front to back
  2104. */
  2105. #define DDENUMOVERLAYZ_FRONTTOBACK 0x00000001l
  2106. /****************************************************************************
  2107. *
  2108. * DIRECTDRAW UPDATEOVERLAYZORDER FLAGS
  2109. *
  2110. ****************************************************************************/
  2111. /*
  2112. * Send overlay to front
  2113. */
  2114. #define DDOVERZ_SENDTOFRONT 0x00000000l
  2115. /*
  2116. * Send overlay to back
  2117. */
  2118. #define DDOVERZ_SENDTOBACK 0x00000001l
  2119. /*
  2120. * Move Overlay forward
  2121. */
  2122. #define DDOVERZ_MOVEFORWARD 0x00000002l
  2123. /*
  2124. * Move Overlay backward
  2125. */
  2126. #define DDOVERZ_MOVEBACKWARD 0x00000003l
  2127. /*
  2128. * Move Overlay in front of relative surface
  2129. */
  2130. #define DDOVERZ_INSERTINFRONTOF 0x00000004l
  2131. /*
  2132. * Move Overlay in back of relative surface
  2133. */
  2134. #define DDOVERZ_INSERTINBACKOF 0x00000005l
  2135. /*===========================================================================
  2136. *
  2137. *
  2138. * DIRECTDRAW RETURN CODES
  2139. *
  2140. * The return values from DirectDraw Commands and Surface that return an HRESULT
  2141. * are codes from DirectDraw concerning the results of the action
  2142. * requested by DirectDraw.
  2143. *
  2144. *==========================================================================*/
  2145. /*
  2146. * Status is OK
  2147. *
  2148. * Issued by: DirectDraw Commands and all callbacks
  2149. */
  2150. #define DD_OK 0
  2151. /****************************************************************************
  2152. *
  2153. * DIRECTDRAW ENUMCALLBACK RETURN VALUES
  2154. *
  2155. * EnumCallback returns are used to control the flow of the DIRECTDRAW and
  2156. * DIRECTDRAWSURFACE object enumerations. They can only be returned by
  2157. * enumeration callback routines.
  2158. *
  2159. ****************************************************************************/
  2160. /*
  2161. * stop the enumeration
  2162. */
  2163. #define DDENUMRET_CANCEL 0
  2164. /*
  2165. * continue the enumeration
  2166. */
  2167. #define DDENUMRET_OK 1
  2168. /****************************************************************************
  2169. *
  2170. * DIRECTDRAW ERRORS
  2171. *
  2172. * Errors are represented by negative values and cannot be combined.
  2173. *
  2174. ****************************************************************************/
  2175. /*
  2176. * This object is already initialized
  2177. */
  2178. #define DDERR_ALREADYINITIALIZED MAKE_DDHRESULT( 5 )
  2179. /*
  2180. * This surface can not be attached to the requested surface.
  2181. */
  2182. #define DDERR_CANNOTATTACHSURFACE MAKE_DDHRESULT( 10 )
  2183. /*
  2184. * This surface can not be detached from the requested surface.
  2185. */
  2186. #define DDERR_CANNOTDETACHSURFACE MAKE_DDHRESULT( 20 )
  2187. /*
  2188. * Support is currently not available.
  2189. */
  2190. #define DDERR_CURRENTLYNOTAVAIL MAKE_DDHRESULT( 40 )
  2191. /*
  2192. * An exception was encountered while performing the requested operation
  2193. */
  2194. #define DDERR_EXCEPTION MAKE_DDHRESULT( 55 )
  2195. /*
  2196. * Generic failure.
  2197. */
  2198. #define DDERR_GENERIC E_FAIL
  2199. /*
  2200. * Height of rectangle provided is not a multiple of reqd alignment
  2201. */
  2202. #define DDERR_HEIGHTALIGN MAKE_DDHRESULT( 90 )
  2203. /*
  2204. * Unable to match primary surface creation request with existing
  2205. * primary surface.
  2206. */
  2207. #define DDERR_INCOMPATIBLEPRIMARY MAKE_DDHRESULT( 95 )
  2208. /*
  2209. * One or more of the caps bits passed to the callback are incorrect.
  2210. */
  2211. #define DDERR_INVALIDCAPS MAKE_DDHRESULT( 100 )
  2212. /*
  2213. * DirectDraw does not support provided Cliplist.
  2214. */
  2215. #define DDERR_INVALIDCLIPLIST MAKE_DDHRESULT( 110 )
  2216. /*
  2217. * DirectDraw does not support the requested mode
  2218. */
  2219. #define DDERR_INVALIDMODE MAKE_DDHRESULT( 120 )
  2220. /*
  2221. * DirectDraw received a pointer that was an invalid DIRECTDRAW object.
  2222. */
  2223. #define DDERR_INVALIDOBJECT MAKE_DDHRESULT( 130 )
  2224. /*
  2225. * One or more of the parameters passed to the callback function are
  2226. * incorrect.
  2227. */
  2228. #define DDERR_INVALIDPARAMS E_INVALIDARG
  2229. /*
  2230. * pixel format was invalid as specified
  2231. */
  2232. #define DDERR_INVALIDPIXELFORMAT MAKE_DDHRESULT( 145 )
  2233. /*
  2234. * Rectangle provided was invalid.
  2235. */
  2236. #define DDERR_INVALIDRECT MAKE_DDHRESULT( 150 )
  2237. /*
  2238. * Operation could not be carried out because one or more surfaces are locked
  2239. */
  2240. #define DDERR_LOCKEDSURFACES MAKE_DDHRESULT( 160 )
  2241. /*
  2242. * There is no 3D present.
  2243. */
  2244. #define DDERR_NO3D MAKE_DDHRESULT( 170 )
  2245. /*
  2246. * Operation could not be carried out because there is no alpha accleration
  2247. * hardware present or available.
  2248. */
  2249. #define DDERR_NOALPHAHW MAKE_DDHRESULT( 180 )
  2250. /*
  2251. * no clip list available
  2252. */
  2253. #define DDERR_NOCLIPLIST MAKE_DDHRESULT( 205 )
  2254. /*
  2255. * Operation could not be carried out because there is no color conversion
  2256. * hardware present or available.
  2257. */
  2258. #define DDERR_NOCOLORCONVHW MAKE_DDHRESULT( 210 )
  2259. /*
  2260. * Create function called without DirectDraw object method SetCooperativeLevel
  2261. * being called.
  2262. */
  2263. #define DDERR_NOCOOPERATIVELEVELSET MAKE_DDHRESULT( 212 )
  2264. /*
  2265. * Surface doesn't currently have a color key
  2266. */
  2267. #define DDERR_NOCOLORKEY MAKE_DDHRESULT( 215 )
  2268. /*
  2269. * Operation could not be carried out because there is no hardware support
  2270. * of the dest color key.
  2271. */
  2272. #define DDERR_NOCOLORKEYHW MAKE_DDHRESULT( 220 )
  2273. /*
  2274. * No DirectDraw support possible with current display driver
  2275. */
  2276. #define DDERR_NODIRECTDRAWSUPPORT MAKE_DDHRESULT( 222 )
  2277. /*
  2278. * Operation requires the application to have exclusive mode but the
  2279. * application does not have exclusive mode.
  2280. */
  2281. #define DDERR_NOEXCLUSIVEMODE MAKE_DDHRESULT( 225 )
  2282. /*
  2283. * Flipping visible surfaces is not supported.
  2284. */
  2285. #define DDERR_NOFLIPHW MAKE_DDHRESULT( 230 )
  2286. /*
  2287. * There is no GDI present.
  2288. */
  2289. #define DDERR_NOGDI MAKE_DDHRESULT( 240 )
  2290. /*
  2291. * Operation could not be carried out because there is no hardware present
  2292. * or available.
  2293. */
  2294. #define DDERR_NOMIRRORHW MAKE_DDHRESULT( 250 )
  2295. /*
  2296. * Requested item was not found
  2297. */
  2298. #define DDERR_NOTFOUND MAKE_DDHRESULT( 255 )
  2299. /*
  2300. * Operation could not be carried out because there is no overlay hardware
  2301. * present or available.
  2302. */
  2303. #define DDERR_NOOVERLAYHW MAKE_DDHRESULT( 260 )
  2304. /*
  2305. * Operation could not be carried out because there is no appropriate raster
  2306. * op hardware present or available.
  2307. */
  2308. #define DDERR_NORASTEROPHW MAKE_DDHRESULT( 280 )
  2309. /*
  2310. * Operation could not be carried out because there is no rotation hardware
  2311. * present or available.
  2312. */
  2313. #define DDERR_NOROTATIONHW MAKE_DDHRESULT( 290 )
  2314. /*
  2315. * Operation could not be carried out because there is no hardware support
  2316. * for stretching
  2317. */
  2318. #define DDERR_NOSTRETCHHW MAKE_DDHRESULT( 310 )
  2319. /*
  2320. * DirectDrawSurface is not in 4 bit color palette and the requested operation
  2321. * requires 4 bit color palette.
  2322. */
  2323. #define DDERR_NOT4BITCOLOR MAKE_DDHRESULT( 316 )
  2324. /*
  2325. * DirectDrawSurface is not in 4 bit color index palette and the requested
  2326. * operation requires 4 bit color index palette.
  2327. */
  2328. #define DDERR_NOT4BITCOLORINDEX MAKE_DDHRESULT( 317 )
  2329. /*
  2330. * DirectDraw Surface is not in 8 bit color mode and the requested operation
  2331. * requires 8 bit color.
  2332. */
  2333. #define DDERR_NOT8BITCOLOR MAKE_DDHRESULT( 320 )
  2334. /*
  2335. * Operation could not be carried out because there is no texture mapping
  2336. * hardware present or available.
  2337. */
  2338. #define DDERR_NOTEXTUREHW MAKE_DDHRESULT( 330 )
  2339. /*
  2340. * Operation could not be carried out because there is no hardware support
  2341. * for vertical blank synchronized operations.
  2342. */
  2343. #define DDERR_NOVSYNCHW MAKE_DDHRESULT( 335 )
  2344. /*
  2345. * Operation could not be carried out because there is no hardware support
  2346. * for zbuffer blting.
  2347. */
  2348. #define DDERR_NOZBUFFERHW MAKE_DDHRESULT( 340 )
  2349. /*
  2350. * Overlay surfaces could not be z layered based on their BltOrder because
  2351. * the hardware does not support z layering of overlays.
  2352. */
  2353. #define DDERR_NOZOVERLAYHW MAKE_DDHRESULT( 350 )
  2354. /*
  2355. * The hardware needed for the requested operation has already been
  2356. * allocated.
  2357. */
  2358. #define DDERR_OUTOFCAPS MAKE_DDHRESULT( 360 )
  2359. /*
  2360. * DirectDraw does not have enough memory to perform the operation.
  2361. */
  2362. #define DDERR_OUTOFMEMORY E_OUTOFMEMORY
  2363. /*
  2364. * DirectDraw does not have enough memory to perform the operation.
  2365. */
  2366. #define DDERR_OUTOFVIDEOMEMORY MAKE_DDHRESULT( 380 )
  2367. /*
  2368. * hardware does not support clipped overlays
  2369. */
  2370. #define DDERR_OVERLAYCANTCLIP MAKE_DDHRESULT( 382 )
  2371. /*
  2372. * Can only have ony color key active at one time for overlays
  2373. */
  2374. #define DDERR_OVERLAYCOLORKEYONLYONEACTIVE MAKE_DDHRESULT( 384 )
  2375. /*
  2376. * Access to this palette is being refused because the palette is already
  2377. * locked by another thread.
  2378. */
  2379. #define DDERR_PALETTEBUSY MAKE_DDHRESULT( 387 )
  2380. /*
  2381. * No src color key specified for this operation.
  2382. */
  2383. #define DDERR_COLORKEYNOTSET MAKE_DDHRESULT( 400 )
  2384. /*
  2385. * This surface is already attached to the surface it is being attached to.
  2386. */
  2387. #define DDERR_SURFACEALREADYATTACHED MAKE_DDHRESULT( 410 )
  2388. /*
  2389. * This surface is already a dependency of the surface it is being made a
  2390. * dependency of.
  2391. */
  2392. #define DDERR_SURFACEALREADYDEPENDENT MAKE_DDHRESULT( 420 )
  2393. /*
  2394. * Access to this surface is being refused because the surface is already
  2395. * locked by another thread.
  2396. */
  2397. #define DDERR_SURFACEBUSY MAKE_DDHRESULT( 430 )
  2398. /*
  2399. * Access to this surface is being refused because no driver exists
  2400. * which can supply a pointer to the surface.
  2401. * This is most likely to happen when attempting to lock the primary
  2402. * surface when no DCI provider is present.
  2403. */
  2404. #define DDERR_CANTLOCKSURFACE MAKE_DDHRESULT( 435 )
  2405. /*
  2406. * Access to Surface refused because Surface is obscured.
  2407. */
  2408. #define DDERR_SURFACEISOBSCURED MAKE_DDHRESULT( 440 )
  2409. /*
  2410. * Access to this surface is being refused because the surface is gone.
  2411. * The DIRECTDRAWSURFACE object representing this surface should
  2412. * have Restore called on it.
  2413. */
  2414. #define DDERR_SURFACELOST MAKE_DDHRESULT( 450 )
  2415. /*
  2416. * The requested surface is not attached.
  2417. */
  2418. #define DDERR_SURFACENOTATTACHED MAKE_DDHRESULT( 460 )
  2419. /*
  2420. * Height requested by DirectDraw is too large.
  2421. */
  2422. #define DDERR_TOOBIGHEIGHT MAKE_DDHRESULT( 470 )
  2423. /*
  2424. * Size requested by DirectDraw is too large -- The individual height and
  2425. * width are OK.
  2426. */
  2427. #define DDERR_TOOBIGSIZE MAKE_DDHRESULT( 480 )
  2428. /*
  2429. * Width requested by DirectDraw is too large.
  2430. */
  2431. #define DDERR_TOOBIGWIDTH MAKE_DDHRESULT( 490 )
  2432. /*
  2433. * Action not supported.
  2434. */
  2435. #define DDERR_UNSUPPORTED E_NOTIMPL
  2436. /*
  2437. * FOURCC format requested is unsupported by DirectDraw
  2438. */
  2439. #define DDERR_UNSUPPORTEDFORMAT MAKE_DDHRESULT( 510 )
  2440. /*
  2441. * Bitmask in the pixel format requested is unsupported by DirectDraw
  2442. */
  2443. #define DDERR_UNSUPPORTEDMASK MAKE_DDHRESULT( 520 )
  2444. /*
  2445. * vertical blank is in progress
  2446. */
  2447. #define DDERR_VERTICALBLANKINPROGRESS MAKE_DDHRESULT( 537 )
  2448. /*
  2449. * Informs DirectDraw that the previous Blt which is transfering information
  2450. * to or from this Surface is incomplete.
  2451. */
  2452. #define DDERR_WASSTILLDRAWING MAKE_DDHRESULT( 540 )
  2453. /*
  2454. * Rectangle provided was not horizontally aligned on reqd. boundary
  2455. */
  2456. #define DDERR_XALIGN MAKE_DDHRESULT( 560 )
  2457. /*
  2458. * The GUID passed to DirectDrawCreate is not a valid DirectDraw driver
  2459. * identifier.
  2460. */
  2461. #define DDERR_INVALIDDIRECTDRAWGUID MAKE_DDHRESULT( 561 )
  2462. /*
  2463. * A DirectDraw object representing this driver has already been created
  2464. * for this process.
  2465. */
  2466. #define DDERR_DIRECTDRAWALREADYCREATED MAKE_DDHRESULT( 562 )
  2467. /*
  2468. * A hardware only DirectDraw object creation was attempted but the driver
  2469. * did not support any hardware.
  2470. */
  2471. #define DDERR_NODIRECTDRAWHW MAKE_DDHRESULT( 563 )
  2472. /*
  2473. * this process already has created a primary surface
  2474. */
  2475. #define DDERR_PRIMARYSURFACEALREADYEXISTS MAKE_DDHRESULT( 564 )
  2476. /*
  2477. * software emulation not available.
  2478. */
  2479. #define DDERR_NOEMULATION MAKE_DDHRESULT( 565 )
  2480. /*
  2481. * region passed to Clipper::GetClipList is too small.
  2482. */
  2483. #define DDERR_REGIONTOOSMALL MAKE_DDHRESULT( 566 )
  2484. /*
  2485. * an attempt was made to set a clip list for a clipper objec that
  2486. * is already monitoring an hwnd.
  2487. */
  2488. #define DDERR_CLIPPERISUSINGHWND MAKE_DDHRESULT( 567 )
  2489. /*
  2490. * No clipper object attached to surface object
  2491. */
  2492. #define DDERR_NOCLIPPERATTACHED MAKE_DDHRESULT( 568 )
  2493. /*
  2494. * Clipper notification requires an HWND or
  2495. * no HWND has previously been set as the CooperativeLevel HWND.
  2496. */
  2497. #define DDERR_NOHWND MAKE_DDHRESULT( 569 )
  2498. /*
  2499. * HWND used by DirectDraw CooperativeLevel has been subclassed,
  2500. * this prevents DirectDraw from restoring state.
  2501. */
  2502. #define DDERR_HWNDSUBCLASSED MAKE_DDHRESULT( 570 )
  2503. /*
  2504. * The CooperativeLevel HWND has already been set.
  2505. * It can not be reset while the process has surfaces or palettes created.
  2506. */
  2507. #define DDERR_HWNDALREADYSET MAKE_DDHRESULT( 571 )
  2508. /*
  2509. * No palette object attached to this surface.
  2510. */
  2511. #define DDERR_NOPALETTEATTACHED MAKE_DDHRESULT( 572 )
  2512. /*
  2513. * No hardware support for 16 or 256 color palettes.
  2514. */
  2515. #define DDERR_NOPALETTEHW MAKE_DDHRESULT( 573 )
  2516. /*
  2517. * If a clipper object is attached to the source surface passed into a
  2518. * BltFast call.
  2519. */
  2520. #define DDERR_BLTFASTCANTCLIP MAKE_DDHRESULT( 574 )
  2521. /*
  2522. * No blter.
  2523. */
  2524. #define DDERR_NOBLTHW MAKE_DDHRESULT( 575 )
  2525. /*
  2526. * No DirectDraw ROP hardware.
  2527. */
  2528. #define DDERR_NODDROPSHW MAKE_DDHRESULT( 576 )
  2529. /*
  2530. * returned when GetOverlayPosition is called on a hidden overlay
  2531. */
  2532. #define DDERR_OVERLAYNOTVISIBLE MAKE_DDHRESULT( 577 )
  2533. /*
  2534. * returned when GetOverlayPosition is called on a overlay that UpdateOverlay
  2535. * has never been called on to establish a destionation.
  2536. */
  2537. #define DDERR_NOOVERLAYDEST MAKE_DDHRESULT( 578 )
  2538. /*
  2539. * returned when the position of the overlay on the destionation is no longer
  2540. * legal for that destionation.
  2541. */
  2542. #define DDERR_INVALIDPOSITION MAKE_DDHRESULT( 579 )
  2543. /*
  2544. * returned when an overlay member is called for a non-overlay surface
  2545. */
  2546. #define DDERR_NOTAOVERLAYSURFACE MAKE_DDHRESULT( 580 )
  2547. /*
  2548. * An attempt was made to set the cooperative level when it was already
  2549. * set to exclusive.
  2550. */
  2551. #define DDERR_EXCLUSIVEMODEALREADYSET MAKE_DDHRESULT( 581 )
  2552. /*
  2553. * An attempt has been made to flip a surface that is not flippable.
  2554. */
  2555. #define DDERR_NOTFLIPPABLE MAKE_DDHRESULT( 582 )
  2556. /*
  2557. * Can't duplicate primary & 3D surfaces, or surfaces that are implicitly
  2558. * created.
  2559. */
  2560. #define DDERR_CANTDUPLICATE MAKE_DDHRESULT( 583 )
  2561. /*
  2562. * Surface was not locked. An attempt to unlock a surface that was not
  2563. * locked at all, or by this process, has been attempted.
  2564. */
  2565. #define DDERR_NOTLOCKED MAKE_DDHRESULT( 584 )
  2566. /*
  2567. * Windows can not create any more DCs
  2568. */
  2569. #define DDERR_CANTCREATEDC MAKE_DDHRESULT( 585 )
  2570. /*
  2571. * No DC was ever created for this surface.
  2572. */
  2573. #define DDERR_NODC MAKE_DDHRESULT( 586 )
  2574. /*
  2575. * This surface can not be restored because it was created in a different
  2576. * mode.
  2577. */
  2578. #define DDERR_WRONGMODE MAKE_DDHRESULT( 587 )
  2579. /*
  2580. * This surface can not be restored because it is an implicitly created
  2581. * surface.
  2582. */
  2583. #define DDERR_IMPLICITLYCREATED MAKE_DDHRESULT( 588 )
  2584. /*
  2585. * The surface being used is not a palette-based surface
  2586. */
  2587. #define DDERR_NOTPALETTIZED MAKE_DDHRESULT( 589 )
  2588. /*
  2589. * The display is currently in an unsupported mode
  2590. */
  2591. #define DDERR_UNSUPPORTEDMODE MAKE_DDHRESULT( 590 )
  2592. /*
  2593. * Operation could not be carried out because there is no mip-map
  2594. * texture mapping hardware present or available.
  2595. */
  2596. #define DDERR_NOMIPMAPHW MAKE_DDHRESULT( 591 )
  2597. /*
  2598. * The requested action could not be performed because the surface was of
  2599. * the wrong type.
  2600. */
  2601. #define DDERR_INVALIDSURFACETYPE MAKE_DDHRESULT( 592 )
  2602. /*
  2603. * A DC has already been returned for this surface. Only one DC can be
  2604. * retrieved per surface.
  2605. */
  2606. #define DDERR_DCALREADYCREATED MAKE_DDHRESULT( 620 )
  2607. /*
  2608. * The attempt to page lock a surface failed.
  2609. */
  2610. #define DDERR_CANTPAGELOCK MAKE_DDHRESULT( 640 )
  2611. /*
  2612. * The attempt to page unlock a surface failed.
  2613. */
  2614. #define DDERR_CANTPAGEUNLOCK MAKE_DDHRESULT( 660 )
  2615. /*
  2616. * An attempt was made to page unlock a surface with no outstanding page locks.
  2617. */
  2618. #define DDERR_NOTPAGELOCKED MAKE_DDHRESULT( 680 )
  2619. /*
  2620. * An attempt was made to invoke an interface member of a DirectDraw object
  2621. * created by CoCreateInstance() before it was initialized.
  2622. */
  2623. #define DDERR_NOTINITIALIZED CO_E_NOTINITIALIZED
  2624. /* Alpha bit depth constants */
  2625. #ifdef __cplusplus
  2626. };
  2627. #endif
  2628. #endif