Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

977 lines
51 KiB

  1. /*========================================================================== *
  2. *
  3. * Copyright (C) 1994-1995 Microsoft Corporation. All Rights Reserved.
  4. *
  5. * File: ddcallbk.c
  6. * Content: Callback tables management code
  7. * History:
  8. * Date By Reason
  9. * ==== == ======
  10. * 23-jan-96 kylej initial implementation
  11. * 03-feb-96 colinmc fixed DirectDraw QueryInterface bug
  12. * 24-feb-96 colinmc added a function to enable a client to determine if
  13. * the callback tables had already been initialized.
  14. * 13-mar-96 kylej added DD_Surface_GetDDInterface
  15. * 21-mar-96 colinmc added special "unitialized" interfaces for the
  16. * driver and clipper objects
  17. * 13-jan-97 jvanaken basic support for IDirectDrawSurface3 interface
  18. * 29-jan-97 smac Removed un-needed VPE functions
  19. * 03-mar-97 smac Added kernel mode interface
  20. * 08-mar-97 colinmc New member to set surface memory pointer
  21. * 30-sep-97 jeffno IDirectDraw4
  22. * 03-oct-97 jeffno DDSCAPS2 and DDSURFACEDESC2
  23. *
  24. ***************************************************************************/
  25. #include "ddrawpr.h"
  26. /*
  27. * Under Windows95 only one copy of a callback table exists and it is
  28. * shared among all processes using DirectDraw. Under Windows NT, there
  29. * is a unique callback table for each process using DirectDraw. This is
  30. * because the address of the member functions is guaranteed to be the
  31. * same from process to process under Windows 95 but may be different in
  32. * each process under Windows NT. We initialize the callback tables in
  33. * a function rather than initializing them at compile time so that the
  34. * callback tables will not be shared under NT.
  35. */
  36. DIRECTDRAWCALLBACKS ddCallbacks;
  37. DIRECTDRAWCALLBACKS ddUninitCallbacks;
  38. DIRECTDRAW2CALLBACKS dd2UninitCallbacks;
  39. DIRECTDRAW2CALLBACKS dd2Callbacks;
  40. DIRECTDRAW4CALLBACKS dd4UninitCallbacks;
  41. DIRECTDRAW4CALLBACKS dd4Callbacks;
  42. DIRECTDRAW7CALLBACKS dd7UninitCallbacks;
  43. DIRECTDRAW7CALLBACKS dd7Callbacks;
  44. DIRECTDRAWSURFACECALLBACKS ddSurfaceCallbacks;
  45. DIRECTDRAWSURFACE2CALLBACKS ddSurface2Callbacks;
  46. DIRECTDRAWSURFACE3CALLBACKS ddSurface3Callbacks;
  47. DIRECTDRAWSURFACE4CALLBACKS ddSurface4Callbacks;
  48. DIRECTDRAWSURFACE7CALLBACKS ddSurface7Callbacks;
  49. DIRECTDRAWPALETTECALLBACKS ddPaletteCallbacks;
  50. DIRECTDRAWCLIPPERCALLBACKS ddClipperCallbacks;
  51. DIRECTDRAWCLIPPERCALLBACKS ddUninitClipperCallbacks;
  52. DDVIDEOPORTCONTAINERCALLBACKS ddVideoPortContainerCallbacks;
  53. DIRECTDRAWVIDEOPORTCALLBACKS ddVideoPortCallbacks;
  54. DIRECTDRAWVIDEOPORTNOTIFYCALLBACKS ddVideoPortNotifyCallbacks;
  55. DIRECTDRAWCOLORCONTROLCALLBACKS ddColorControlCallbacks;
  56. DIRECTDRAWGAMMACONTROLCALLBACKS ddGammaControlCallbacks;
  57. DIRECTDRAWKERNELCALLBACKS ddKernelCallbacks;
  58. DIRECTDRAWSURFACEKERNELCALLBACKS ddSurfaceKernelCallbacks;
  59. DDVIDEOACCELERATORCONTAINERCALLBACKS ddMotionCompContainerCallbacks;
  60. DIRECTDRAWVIDEOACCELERATORCALLBACKS ddMotionCompCallbacks;
  61. #ifdef POSTPONED
  62. DIRECTDRAWSURFACEPERSISTCALLBACKS ddSurfacePersistCallbacks;
  63. DIRECTDRAWSURFACEPERSISTSTREAMCALLBACKS ddSurfacePersistStreamCallbacks;
  64. DIRECTDRAWPALETTEPERSISTCALLBACKS ddPalettePersistCallbacks;
  65. DIRECTDRAWPALETTEPERSISTSTREAMCALLBACKS ddPalettePersistStreamCallbacks;
  66. DIRECTDRAWOPTSURFACECALLBACKS ddOptSurfaceCallbacks;
  67. DDFACTORY2CALLBACKS ddFactory2Callbacks;
  68. DIRECTDRAWPALETTE2CALLBACKS ddPalette2Callbacks;
  69. #endif
  70. #ifdef POSTPONED
  71. NONDELEGATINGUNKNOWNCALLBACKS ddNonDelegatingUnknownCallbacks;
  72. NONDELEGATINGUNKNOWNCALLBACKS ddUninitNonDelegatingUnknownCallbacks;
  73. /*
  74. * This is an interface which points to the nondelegating unknowns
  75. */
  76. LPVOID NonDelegatingIUnknownInterface;
  77. LPVOID UninitNonDelegatingIUnknownInterface;
  78. #endif
  79. #ifdef STREAMING
  80. DIRECTDRAWSURFACESTREAMINGCALLBACKS ddSurfaceStreamingCallbacks;
  81. #endif
  82. #ifdef COMPOSITION
  83. DIRECTDRAWSURFACECOMPOSITIONCALLBACKS ddSurfaceCompositionCallbacks;
  84. #endif
  85. #undef DPF_MODNAME
  86. #define DPF_MODNAME "Uninitialized"
  87. /*
  88. * The horror, the horror...
  89. *
  90. * These are placeholder functions which sit in the interfaces of
  91. * uninitialized objects. They are there to prevent people calling
  92. * member functions before Initialize() is called.
  93. *
  94. * Now, you may well be wondering why there are five of them rather
  95. * than just one. Well, unfortunately, DDAPI expands out to __stdcall
  96. * which means that it is the callee's responsibility to clean up the
  97. * stack. Hence, if we have one, zero argument function say and it is
  98. * called through the vtable in place of a four argument function we
  99. * will leave four dwords on the stack when we exit. This is ugly
  100. * and potentially dangerous. Therefore, we have one stub function for
  101. * each number of arguments in the member interfaces (between 1 and 5).
  102. * This works because we are very regular in passing only DWORD/LPVOID
  103. * size parameters on the stack. Ugly but there it is.
  104. */
  105. HRESULT DDAPI DD_Uninitialized1Arg( LPVOID arg1 )
  106. {
  107. DPF_ERR( "Object is not initialized - call Initialized()" );
  108. return DDERR_NOTINITIALIZED;
  109. }
  110. HRESULT DDAPI DD_Uninitialized2Arg( LPVOID arg1, LPVOID arg2 )
  111. {
  112. DPF_ERR( "Object is not initialized - call Initialized()" );
  113. return DDERR_NOTINITIALIZED;
  114. }
  115. HRESULT DDAPI DD_Uninitialized3Arg( LPVOID arg1, LPVOID arg2, LPVOID arg3 )
  116. {
  117. DPF_ERR( "Object is not initialized - call Initialized()" );
  118. return DDERR_NOTINITIALIZED;
  119. }
  120. HRESULT DDAPI DD_Uninitialized4Arg( LPVOID arg1, LPVOID arg2, LPVOID arg3, LPVOID arg4 )
  121. {
  122. DPF_ERR( "Object is not initialized - call Initialized()" );
  123. return DDERR_NOTINITIALIZED;
  124. }
  125. HRESULT DDAPI DD_Uninitialized5Arg( LPVOID arg1, LPVOID arg2, LPVOID arg3, LPVOID arg4, LPVOID arg5 )
  126. {
  127. DPF_ERR( "Object is not initialized - call Initialized()" );
  128. return DDERR_NOTINITIALIZED;
  129. }
  130. HRESULT DDAPI DD_Uninitialized6Arg( LPVOID arg1, LPVOID arg2, LPVOID arg3, LPVOID arg4, LPVOID arg5, LPVOID arg6 )
  131. {
  132. DPF_ERR( "Object is not initialized - call Initialized()" );
  133. return DDERR_NOTINITIALIZED;
  134. }
  135. #undef DPF_MODNAME
  136. #define DPF_MODNAME "CallbackTablesInitialized"
  137. BOOL CallbackTablesInitialized( void )
  138. {
  139. /*
  140. * Arbitrarily we check to see if ddCallbacks.QueryInterface
  141. * contains the correct value to determine whether the
  142. * callbacks are already initialized.
  143. */
  144. if( ddCallbacks.QueryInterface == DD_QueryInterface )
  145. return TRUE;
  146. else
  147. return FALSE;
  148. }
  149. #undef DPF_MODNAME
  150. #define DPF_MODNAME "InitCallbackTables"
  151. void InitCallbackTables( void )
  152. {
  153. /*
  154. * DirectDraw object methods Ver 1.0
  155. */
  156. #ifdef POSTPONED
  157. ddCallbacks.QueryInterface = DD_DelegatingQueryInterface;
  158. ddCallbacks.AddRef = DD_DelegatingAddRef;
  159. ddCallbacks.Release = DD_DelegatingRelease;
  160. #else
  161. ddCallbacks.QueryInterface = DD_QueryInterface;
  162. ddCallbacks.AddRef = DD_AddRef;
  163. ddCallbacks.Release = DD_Release;
  164. #endif
  165. ddCallbacks.Compact = DD_Compact;
  166. ddCallbacks.CreateClipper = DD_CreateClipper;
  167. ddCallbacks.CreatePalette = DD_CreatePalette;
  168. ddCallbacks.CreateSurface = DD_CreateSurface;
  169. ddCallbacks.DuplicateSurface = DD_DuplicateSurface;
  170. ddCallbacks.EnumDisplayModes = DD_EnumDisplayModes;
  171. ddCallbacks.EnumSurfaces = DD_EnumSurfaces;
  172. ddCallbacks.FlipToGDISurface = DD_FlipToGDISurface;
  173. ddCallbacks.GetCaps = DD_GetCaps;
  174. ddCallbacks.GetDisplayMode = DD_GetDisplayMode;
  175. ddCallbacks.GetFourCCCodes = DD_GetFourCCCodes;
  176. ddCallbacks.GetGDISurface = DD_GetGDISurface;
  177. ddCallbacks.GetMonitorFrequency = DD_GetMonitorFrequency;
  178. ddCallbacks.GetScanLine = DD_GetScanLine;
  179. ddCallbacks.GetVerticalBlankStatus = DD_GetVerticalBlankStatus;
  180. ddCallbacks.Initialize = DD_Initialize;
  181. ddCallbacks.RestoreDisplayMode = DD_RestoreDisplayMode;
  182. ddCallbacks.SetCooperativeLevel = DD_SetCooperativeLevel;
  183. ddCallbacks.SetDisplayMode = DD_SetDisplayMode;
  184. ddCallbacks.WaitForVerticalBlank = DD_WaitForVerticalBlank;
  185. #ifdef POSTPONED
  186. /*
  187. * Delegating Unknown Callbacks
  188. */
  189. ddNonDelegatingUnknownCallbacks.QueryInterface = (LPVOID)DD_QueryInterface;
  190. ddNonDelegatingUnknownCallbacks.AddRef = (LPVOID)DD_AddRef;
  191. ddNonDelegatingUnknownCallbacks.Release = (LPVOID)DD_Release;
  192. /*
  193. * Uninitialized Delegating Unknown Callbacks
  194. */
  195. ddUninitNonDelegatingUnknownCallbacks.QueryInterface = (LPVOID)DD_UnInitedQueryInterface;
  196. ddUninitNonDelegatingUnknownCallbacks.AddRef = (LPVOID)DD_AddRef;
  197. ddUninitNonDelegatingUnknownCallbacks.Release = (LPVOID)DD_Release;
  198. /*
  199. * This is a special static interface whose vtable points to the nondelegating unknown
  200. */
  201. NonDelegatingIUnknownInterface = (LPVOID) &ddNonDelegatingUnknownCallbacks;
  202. UninitNonDelegatingIUnknownInterface = (LPVOID) &ddUninitNonDelegatingUnknownCallbacks;
  203. #endif
  204. /*
  205. * DirectDraw "uninitialized" object methods Ver 1.0
  206. */
  207. #ifdef POSTPONED
  208. ddUninitCallbacks.QueryInterface = (LPVOID)DD_DelegatingQueryInterface;
  209. ddUninitCallbacks.AddRef = (LPVOID)DD_DelegatingAddRef;
  210. ddUninitCallbacks.Release = (LPVOID)DD_DelegatingRelease;
  211. #else
  212. ddUninitCallbacks.QueryInterface = (LPVOID)DD_QueryInterface;
  213. ddUninitCallbacks.AddRef = (LPVOID)DD_AddRef;
  214. ddUninitCallbacks.Release = (LPVOID)DD_Release;
  215. #endif
  216. ddUninitCallbacks.Compact = (LPVOID)DD_Uninitialized1Arg;
  217. ddUninitCallbacks.CreateClipper = (LPVOID)DD_Uninitialized4Arg;
  218. ddUninitCallbacks.CreatePalette = (LPVOID)DD_Uninitialized5Arg;
  219. ddUninitCallbacks.CreateSurface = (LPVOID)DD_Uninitialized4Arg;
  220. ddUninitCallbacks.DuplicateSurface = (LPVOID)DD_Uninitialized3Arg;
  221. ddUninitCallbacks.EnumDisplayModes = (LPVOID)DD_Uninitialized5Arg;
  222. ddUninitCallbacks.EnumSurfaces = (LPVOID)DD_Uninitialized5Arg;
  223. ddUninitCallbacks.FlipToGDISurface = (LPVOID)DD_Uninitialized1Arg;
  224. ddUninitCallbacks.GetCaps = (LPVOID)DD_Uninitialized3Arg;
  225. ddUninitCallbacks.GetDisplayMode = (LPVOID)DD_Uninitialized2Arg;
  226. ddUninitCallbacks.GetFourCCCodes = (LPVOID)DD_Uninitialized3Arg;
  227. ddUninitCallbacks.GetGDISurface = (LPVOID)DD_Uninitialized2Arg;
  228. ddUninitCallbacks.GetMonitorFrequency = (LPVOID)DD_Uninitialized2Arg;
  229. ddUninitCallbacks.GetScanLine = (LPVOID)DD_Uninitialized2Arg;
  230. ddUninitCallbacks.GetVerticalBlankStatus = (LPVOID)DD_Uninitialized2Arg;
  231. ddUninitCallbacks.Initialize = DD_Initialize;
  232. ddUninitCallbacks.RestoreDisplayMode = (LPVOID)DD_Uninitialized1Arg;
  233. ddUninitCallbacks.SetCooperativeLevel = (LPVOID)DD_Uninitialized3Arg;
  234. ddUninitCallbacks.SetDisplayMode = (LPVOID)DD_Uninitialized4Arg;
  235. ddUninitCallbacks.WaitForVerticalBlank = (LPVOID)DD_Uninitialized3Arg;
  236. /*
  237. * DirectDraw "uninitialized" object methods Ver 2.0
  238. */
  239. #ifdef POSTPONED
  240. dd2UninitCallbacks.QueryInterface = (LPVOID)DD_DelegatingQueryInterface;
  241. dd2UninitCallbacks.AddRef = (LPVOID)DD_DelegatingAddRef;
  242. dd2UninitCallbacks.Release = (LPVOID)DD_DelegatingRelease;
  243. #else
  244. dd2UninitCallbacks.QueryInterface = (LPVOID)DD_QueryInterface;
  245. dd2UninitCallbacks.AddRef = (LPVOID)DD_AddRef;
  246. dd2UninitCallbacks.Release = (LPVOID)DD_Release;
  247. #endif
  248. dd2UninitCallbacks.Compact = (LPVOID)DD_Uninitialized1Arg;
  249. dd2UninitCallbacks.CreateClipper = (LPVOID)DD_Uninitialized4Arg;
  250. dd2UninitCallbacks.CreatePalette = (LPVOID)DD_Uninitialized5Arg;
  251. dd2UninitCallbacks.CreateSurface = (LPVOID)DD_Uninitialized4Arg;
  252. dd2UninitCallbacks.DuplicateSurface = (LPVOID)DD_Uninitialized3Arg;
  253. dd2UninitCallbacks.EnumDisplayModes = (LPVOID)DD_Uninitialized5Arg;
  254. dd2UninitCallbacks.EnumSurfaces = (LPVOID)DD_Uninitialized5Arg;
  255. dd2UninitCallbacks.FlipToGDISurface = (LPVOID)DD_Uninitialized1Arg;
  256. dd2UninitCallbacks.GetCaps = (LPVOID)DD_Uninitialized3Arg;
  257. dd2UninitCallbacks.GetDisplayMode = (LPVOID)DD_Uninitialized2Arg;
  258. dd2UninitCallbacks.GetFourCCCodes = (LPVOID)DD_Uninitialized3Arg;
  259. dd2UninitCallbacks.GetGDISurface = (LPVOID)DD_Uninitialized2Arg;
  260. dd2UninitCallbacks.GetMonitorFrequency = (LPVOID)DD_Uninitialized2Arg;
  261. dd2UninitCallbacks.GetScanLine = (LPVOID)DD_Uninitialized2Arg;
  262. dd2UninitCallbacks.GetVerticalBlankStatus = (LPVOID)DD_Uninitialized2Arg;
  263. dd2UninitCallbacks.Initialize = (LPVOID)DD_Initialize;
  264. dd2UninitCallbacks.RestoreDisplayMode = (LPVOID)DD_Uninitialized1Arg;
  265. dd2UninitCallbacks.SetCooperativeLevel = (LPVOID)DD_Uninitialized3Arg;
  266. dd2UninitCallbacks.SetDisplayMode = (LPVOID)DD_Uninitialized6Arg;
  267. dd2UninitCallbacks.WaitForVerticalBlank = (LPVOID)DD_Uninitialized3Arg;
  268. /*
  269. * DirectDraw "uninitialized" object methods Ver 4.0
  270. */
  271. #ifdef POSTPONED
  272. dd4UninitCallbacks.QueryInterface = (LPVOID)DD_DelegatingQueryInterface;
  273. dd4UninitCallbacks.AddRef = (LPVOID)DD_DelegatingAddRef;
  274. dd4UninitCallbacks.Release = (LPVOID)DD_DelegatingRelease;
  275. #else
  276. dd4UninitCallbacks.QueryInterface = (LPVOID)DD_QueryInterface;
  277. dd4UninitCallbacks.AddRef = (LPVOID)DD_AddRef;
  278. dd4UninitCallbacks.Release = (LPVOID)DD_Release;
  279. #endif
  280. dd4UninitCallbacks.Compact = (LPVOID)DD_Uninitialized1Arg;
  281. dd4UninitCallbacks.CreateClipper = (LPVOID)DD_Uninitialized4Arg;
  282. dd4UninitCallbacks.CreatePalette = (LPVOID)DD_Uninitialized5Arg;
  283. dd4UninitCallbacks.CreateSurface = (LPVOID)DD_Uninitialized4Arg;
  284. dd4UninitCallbacks.DuplicateSurface = (LPVOID)DD_Uninitialized3Arg;
  285. dd4UninitCallbacks.EnumDisplayModes = (LPVOID)DD_Uninitialized5Arg;
  286. dd4UninitCallbacks.EnumSurfaces = (LPVOID)DD_Uninitialized5Arg;
  287. dd4UninitCallbacks.FlipToGDISurface = (LPVOID)DD_Uninitialized1Arg;
  288. dd4UninitCallbacks.GetCaps = (LPVOID)DD_Uninitialized3Arg;
  289. dd4UninitCallbacks.GetDisplayMode = (LPVOID)DD_Uninitialized2Arg;
  290. dd4UninitCallbacks.GetFourCCCodes = (LPVOID)DD_Uninitialized3Arg;
  291. dd4UninitCallbacks.GetGDISurface = (LPVOID)DD_Uninitialized2Arg;
  292. dd4UninitCallbacks.GetMonitorFrequency = (LPVOID)DD_Uninitialized2Arg;
  293. dd4UninitCallbacks.GetScanLine = (LPVOID)DD_Uninitialized2Arg;
  294. dd4UninitCallbacks.GetVerticalBlankStatus = (LPVOID)DD_Uninitialized2Arg;
  295. dd4UninitCallbacks.Initialize = (LPVOID)DD_Initialize;
  296. dd4UninitCallbacks.RestoreDisplayMode = (LPVOID)DD_Uninitialized1Arg;
  297. dd4UninitCallbacks.SetCooperativeLevel = (LPVOID)DD_Uninitialized3Arg;
  298. dd4UninitCallbacks.SetDisplayMode = (LPVOID)DD_Uninitialized6Arg;
  299. dd4UninitCallbacks.WaitForVerticalBlank = (LPVOID)DD_Uninitialized3Arg;
  300. dd4UninitCallbacks.GetSurfaceFromDC = (LPVOID) DD_Uninitialized3Arg;
  301. dd4UninitCallbacks.RestoreAllSurfaces = (LPVOID) DD_Uninitialized1Arg;
  302. dd4UninitCallbacks.TestCooperativeLevel = (LPVOID) DD_Uninitialized1Arg;
  303. dd4UninitCallbacks.GetDeviceIdentifier = (LPVOID) DD_Uninitialized2Arg;
  304. /*
  305. * DirectDraw "uninitialized" object methods Ver 5.0
  306. */
  307. #ifdef POSTPONED
  308. dd7UninitCallbacks.QueryInterface = (LPVOID)DD_DelegatingQueryInterface;
  309. dd7UninitCallbacks.AddRef = (LPVOID)DD_DelegatingAddRef;
  310. dd7UninitCallbacks.Release = (LPVOID)DD_DelegatingRelease;
  311. #else
  312. dd7UninitCallbacks.QueryInterface = (LPVOID)DD_QueryInterface;
  313. dd7UninitCallbacks.AddRef = (LPVOID)DD_AddRef;
  314. dd7UninitCallbacks.Release = (LPVOID)DD_Release;
  315. #endif
  316. dd7UninitCallbacks.Compact = (LPVOID)DD_Uninitialized1Arg;
  317. dd7UninitCallbacks.CreateClipper = (LPVOID)DD_Uninitialized4Arg;
  318. dd7UninitCallbacks.CreatePalette = (LPVOID)DD_Uninitialized5Arg;
  319. dd7UninitCallbacks.CreateSurface = (LPVOID)DD_Uninitialized4Arg;
  320. dd7UninitCallbacks.DuplicateSurface = (LPVOID)DD_Uninitialized3Arg;
  321. dd7UninitCallbacks.EnumDisplayModes = (LPVOID)DD_Uninitialized5Arg;
  322. dd7UninitCallbacks.EnumSurfaces = (LPVOID)DD_Uninitialized5Arg;
  323. dd7UninitCallbacks.FlipToGDISurface = (LPVOID)DD_Uninitialized1Arg;
  324. dd7UninitCallbacks.GetCaps = (LPVOID)DD_Uninitialized3Arg;
  325. dd7UninitCallbacks.GetDisplayMode = (LPVOID)DD_Uninitialized2Arg;
  326. dd7UninitCallbacks.GetFourCCCodes = (LPVOID)DD_Uninitialized3Arg;
  327. dd7UninitCallbacks.GetGDISurface = (LPVOID)DD_Uninitialized2Arg;
  328. dd7UninitCallbacks.GetMonitorFrequency = (LPVOID)DD_Uninitialized2Arg;
  329. dd7UninitCallbacks.GetScanLine = (LPVOID)DD_Uninitialized2Arg;
  330. dd7UninitCallbacks.GetVerticalBlankStatus = (LPVOID)DD_Uninitialized2Arg;
  331. dd7UninitCallbacks.Initialize = (LPVOID)DD_Initialize;
  332. dd7UninitCallbacks.RestoreDisplayMode = (LPVOID)DD_Uninitialized1Arg;
  333. dd7UninitCallbacks.SetCooperativeLevel = (LPVOID)DD_Uninitialized3Arg;
  334. dd7UninitCallbacks.SetDisplayMode = (LPVOID)DD_Uninitialized6Arg;
  335. dd7UninitCallbacks.WaitForVerticalBlank = (LPVOID)DD_Uninitialized3Arg;
  336. dd7UninitCallbacks.GetSurfaceFromDC = (LPVOID) DD_Uninitialized3Arg;
  337. dd7UninitCallbacks.RestoreAllSurfaces = (LPVOID) DD_Uninitialized1Arg;
  338. dd7UninitCallbacks.TestCooperativeLevel = (LPVOID) DD_Uninitialized1Arg;
  339. dd7UninitCallbacks.GetDeviceIdentifier = (LPVOID) DD_Uninitialized2Arg;
  340. #ifdef POSTPONED
  341. dd7UninitCallbacks.CreateSurfaceFromStream = (LPVOID) DD_Uninitialized5Arg;
  342. dd7UninitCallbacks.CreateSurfaceFromFile = (LPVOID) DD_Uninitialized5Arg;
  343. #endif
  344. /*
  345. * DirectDraw object methods Ver 2.0
  346. */
  347. #ifdef POSTPONED
  348. dd2Callbacks.QueryInterface = (LPVOID)DD_DelegatingQueryInterface;
  349. dd2Callbacks.AddRef = (LPVOID)DD_DelegatingAddRef;
  350. dd2Callbacks.Release = (LPVOID)DD_DelegatingRelease;
  351. #else
  352. dd2Callbacks.QueryInterface = (LPVOID)DD_QueryInterface;
  353. dd2Callbacks.AddRef = (LPVOID)DD_AddRef;
  354. dd2Callbacks.Release = (LPVOID)DD_Release;
  355. #endif
  356. dd2Callbacks.Compact = (LPVOID)DD_Compact;
  357. dd2Callbacks.CreateClipper = (LPVOID)DD_CreateClipper;
  358. dd2Callbacks.CreatePalette = (LPVOID)DD_CreatePalette;
  359. dd2Callbacks.CreateSurface = (LPVOID)DD_CreateSurface;
  360. dd2Callbacks.DuplicateSurface = (LPVOID)DD_DuplicateSurface;
  361. dd2Callbacks.EnumDisplayModes = (LPVOID)DD_EnumDisplayModes;
  362. dd2Callbacks.EnumSurfaces = (LPVOID)DD_EnumSurfaces;
  363. dd2Callbacks.FlipToGDISurface = (LPVOID)DD_FlipToGDISurface;
  364. dd2Callbacks.GetAvailableVidMem = (LPVOID)DD_GetAvailableVidMem;
  365. dd2Callbacks.GetCaps = (LPVOID)DD_GetCaps;
  366. dd2Callbacks.GetDisplayMode = (LPVOID)DD_GetDisplayMode;
  367. dd2Callbacks.GetFourCCCodes = (LPVOID)DD_GetFourCCCodes;
  368. dd2Callbacks.GetGDISurface = (LPVOID)DD_GetGDISurface;
  369. dd2Callbacks.GetMonitorFrequency = (LPVOID)DD_GetMonitorFrequency;
  370. dd2Callbacks.GetScanLine = (LPVOID)DD_GetScanLine;
  371. dd2Callbacks.GetVerticalBlankStatus = (LPVOID)DD_GetVerticalBlankStatus;
  372. dd2Callbacks.Initialize = (LPVOID)DD_Initialize;
  373. dd2Callbacks.RestoreDisplayMode = (LPVOID)DD_RestoreDisplayMode;
  374. dd2Callbacks.SetCooperativeLevel = (LPVOID)DD_SetCooperativeLevel;
  375. dd2Callbacks.SetDisplayMode = (LPVOID)DD_SetDisplayMode2;
  376. dd2Callbacks.WaitForVerticalBlank = (LPVOID)DD_WaitForVerticalBlank;
  377. /*
  378. * DirectDraw object methods Ver 4.0
  379. */
  380. #ifdef POSTPONED
  381. dd4Callbacks.QueryInterface = (LPVOID)DD_DelegatingQueryInterface;
  382. dd4Callbacks.AddRef = (LPVOID)DD_DelegatingAddRef;
  383. dd4Callbacks.Release = (LPVOID)DD_DelegatingRelease;
  384. #else
  385. dd4Callbacks.QueryInterface = (LPVOID)DD_QueryInterface;
  386. dd4Callbacks.AddRef = (LPVOID)DD_AddRef;
  387. dd4Callbacks.Release = (LPVOID)DD_Release;
  388. #endif
  389. dd4Callbacks.Compact = (LPVOID)DD_Compact;
  390. dd4Callbacks.CreateClipper = (LPVOID)DD_CreateClipper;
  391. dd4Callbacks.CreatePalette = (LPVOID)DD_CreatePalette;
  392. dd4Callbacks.CreateSurface = (LPVOID)DD_CreateSurface4;
  393. dd4Callbacks.DuplicateSurface = (LPVOID)DD_DuplicateSurface;
  394. dd4Callbacks.EnumDisplayModes = (LPVOID)DD_EnumDisplayModes4;
  395. dd4Callbacks.EnumSurfaces = (LPVOID)DD_EnumSurfaces4;
  396. dd4Callbacks.FlipToGDISurface = (LPVOID)DD_FlipToGDISurface;
  397. dd4Callbacks.GetAvailableVidMem = (LPVOID)DD_GetAvailableVidMem4;
  398. dd4Callbacks.GetCaps = (LPVOID)DD_GetCaps;
  399. dd4Callbacks.GetDisplayMode = (LPVOID)DD_GetDisplayMode;
  400. dd4Callbacks.GetFourCCCodes = (LPVOID)DD_GetFourCCCodes;
  401. dd4Callbacks.GetGDISurface = (LPVOID)DD_GetGDISurface;
  402. dd4Callbacks.GetMonitorFrequency = (LPVOID)DD_GetMonitorFrequency;
  403. dd4Callbacks.GetScanLine = (LPVOID)DD_GetScanLine;
  404. dd4Callbacks.GetVerticalBlankStatus = (LPVOID)DD_GetVerticalBlankStatus;
  405. dd4Callbacks.Initialize = (LPVOID)DD_Initialize;
  406. dd4Callbacks.RestoreDisplayMode = (LPVOID)DD_RestoreDisplayMode;
  407. dd4Callbacks.SetCooperativeLevel = (LPVOID)DD_SetCooperativeLevel;
  408. dd4Callbacks.SetDisplayMode = (LPVOID)DD_SetDisplayMode2;
  409. dd4Callbacks.WaitForVerticalBlank = (LPVOID)DD_WaitForVerticalBlank;
  410. dd4Callbacks.GetSurfaceFromDC = (LPVOID) DD_GetSurfaceFromDC;
  411. dd4Callbacks.RestoreAllSurfaces = (LPVOID) DD_RestoreAllSurfaces;
  412. dd4Callbacks.TestCooperativeLevel = (LPVOID) DD_TestCooperativeLevel;
  413. dd4Callbacks.GetDeviceIdentifier = (LPVOID) DD_GetDeviceIdentifier;
  414. /*
  415. * DirectDraw object methods Ver 5.0
  416. */
  417. #ifdef POSTPONED
  418. dd7Callbacks.QueryInterface = (LPVOID)DD_DelegatingQueryInterface;
  419. dd7Callbacks.AddRef = (LPVOID)DD_DelegatingAddRef;
  420. dd7Callbacks.Release = (LPVOID)DD_DelegatingRelease;
  421. #else
  422. dd7Callbacks.QueryInterface = (LPVOID)DD_QueryInterface;
  423. dd7Callbacks.AddRef = (LPVOID)DD_AddRef;
  424. dd7Callbacks.Release = (LPVOID)DD_Release;
  425. #endif
  426. dd7Callbacks.Compact = (LPVOID)DD_Compact;
  427. dd7Callbacks.CreateClipper = (LPVOID)DD_CreateClipper;
  428. dd7Callbacks.CreatePalette = (LPVOID)DD_CreatePalette;
  429. dd7Callbacks.CreateSurface = (LPVOID)DD_CreateSurface4;
  430. dd7Callbacks.DuplicateSurface = (LPVOID)DD_DuplicateSurface;
  431. dd7Callbacks.EnumDisplayModes = (LPVOID)DD_EnumDisplayModes4;
  432. dd7Callbacks.EnumSurfaces = (LPVOID)DD_EnumSurfaces4;
  433. dd7Callbacks.FlipToGDISurface = (LPVOID)DD_FlipToGDISurface;
  434. dd7Callbacks.GetAvailableVidMem = (LPVOID)DD_GetAvailableVidMem4;
  435. dd7Callbacks.GetCaps = (LPVOID)DD_GetCaps;
  436. dd7Callbacks.GetDisplayMode = (LPVOID)DD_GetDisplayMode;
  437. dd7Callbacks.GetFourCCCodes = (LPVOID)DD_GetFourCCCodes;
  438. dd7Callbacks.GetGDISurface = (LPVOID)DD_GetGDISurface;
  439. dd7Callbacks.GetMonitorFrequency = (LPVOID)DD_GetMonitorFrequency;
  440. dd7Callbacks.GetScanLine = (LPVOID)DD_GetScanLine;
  441. dd7Callbacks.GetVerticalBlankStatus = (LPVOID)DD_GetVerticalBlankStatus;
  442. dd7Callbacks.Initialize = (LPVOID)DD_Initialize;
  443. dd7Callbacks.RestoreDisplayMode = (LPVOID)DD_RestoreDisplayMode;
  444. dd7Callbacks.SetCooperativeLevel = (LPVOID)DD_SetCooperativeLevel;
  445. dd7Callbacks.SetDisplayMode = (LPVOID)DD_SetDisplayMode2;
  446. dd7Callbacks.WaitForVerticalBlank = (LPVOID)DD_WaitForVerticalBlank;
  447. dd7Callbacks.GetSurfaceFromDC = (LPVOID) DD_GetSurfaceFromDC;
  448. dd7Callbacks.RestoreAllSurfaces = (LPVOID) DD_RestoreAllSurfaces;
  449. dd7Callbacks.TestCooperativeLevel = (LPVOID) DD_TestCooperativeLevel;
  450. dd7Callbacks.GetDeviceIdentifier = (LPVOID) DD_GetDeviceIdentifier7;
  451. dd7Callbacks.StartModeTest = (LPVOID) DD_StartModeTest;
  452. dd7Callbacks.EvaluateMode = (LPVOID) DD_EvaluateMode;
  453. #ifdef POSTPONED
  454. dd7Callbacks.CreateSurfaceFromStream = (LPVOID) DD_CreateSurfaceFromStream;
  455. dd7Callbacks.CreateSurfaceFromFile = (LPVOID) DD_CreateSurfaceFromFile;
  456. #endif
  457. /*
  458. * DirectDraw Surface object methods Ver 1.0
  459. */
  460. ddSurfaceCallbacks.QueryInterface = DD_Surface_QueryInterface;
  461. ddSurfaceCallbacks.AddRef = DD_Surface_AddRef;
  462. ddSurfaceCallbacks.Release = DD_Surface_Release;
  463. ddSurfaceCallbacks.AddAttachedSurface = DD_Surface_AddAttachedSurface;
  464. ddSurfaceCallbacks.AddOverlayDirtyRect = DD_Surface_AddOverlayDirtyRect;
  465. ddSurfaceCallbacks.Blt = DD_Surface_Blt;
  466. ddSurfaceCallbacks.BltBatch = DD_Surface_BltBatch;
  467. ddSurfaceCallbacks.BltFast = DD_Surface_BltFast;
  468. ddSurfaceCallbacks.DeleteAttachedSurface = DD_Surface_DeleteAttachedSurfaces;
  469. ddSurfaceCallbacks.EnumAttachedSurfaces = DD_Surface_EnumAttachedSurfaces;
  470. ddSurfaceCallbacks.EnumOverlayZOrders = DD_Surface_EnumOverlayZOrders;
  471. ddSurfaceCallbacks.Flip = DD_Surface_Flip;
  472. ddSurfaceCallbacks.GetAttachedSurface = DD_Surface_GetAttachedSurface;
  473. ddSurfaceCallbacks.GetBltStatus = DD_Surface_GetBltStatus;
  474. ddSurfaceCallbacks.GetCaps = DD_Surface_GetCaps;
  475. ddSurfaceCallbacks.GetClipper = DD_Surface_GetClipper;
  476. ddSurfaceCallbacks.GetColorKey = DD_Surface_GetColorKey;
  477. ddSurfaceCallbacks.GetDC = DD_Surface_GetDC;
  478. ddSurfaceCallbacks.GetFlipStatus = DD_Surface_GetFlipStatus;
  479. ddSurfaceCallbacks.GetOverlayPosition = DD_Surface_GetOverlayPosition;
  480. ddSurfaceCallbacks.GetPalette = DD_Surface_GetPalette;
  481. ddSurfaceCallbacks.GetPixelFormat = DD_Surface_GetPixelFormat;
  482. ddSurfaceCallbacks.GetSurfaceDesc = DD_Surface_GetSurfaceDesc;
  483. ddSurfaceCallbacks.Initialize = DD_Surface_Initialize;
  484. ddSurfaceCallbacks.IsLost = DD_Surface_IsLost;
  485. ddSurfaceCallbacks.Lock = DD_Surface_Lock;
  486. ddSurfaceCallbacks.ReleaseDC = DD_Surface_ReleaseDC;
  487. ddSurfaceCallbacks.Restore = DD_Surface_Restore;
  488. ddSurfaceCallbacks.SetClipper = DD_Surface_SetClipper;
  489. ddSurfaceCallbacks.SetColorKey = DD_Surface_SetColorKey;
  490. ddSurfaceCallbacks.SetOverlayPosition = DD_Surface_SetOverlayPosition;
  491. ddSurfaceCallbacks.SetPalette = DD_Surface_SetPalette;
  492. ddSurfaceCallbacks.Unlock = DD_Surface_Unlock;
  493. ddSurfaceCallbacks.UpdateOverlay = DD_Surface_UpdateOverlay;
  494. ddSurfaceCallbacks.UpdateOverlayDisplay = DD_Surface_UpdateOverlayDisplay;
  495. ddSurfaceCallbacks.UpdateOverlayZOrder = DD_Surface_UpdateOverlayZOrder;
  496. /*
  497. * DirectDraw Surface object methods Ver 2.0
  498. */
  499. ddSurface2Callbacks.QueryInterface = (LPVOID)DD_Surface_QueryInterface;
  500. ddSurface2Callbacks.AddRef = (LPVOID)DD_Surface_AddRef;
  501. ddSurface2Callbacks.Release = (LPVOID)DD_Surface_Release;
  502. ddSurface2Callbacks.AddAttachedSurface = (LPVOID)DD_Surface_AddAttachedSurface;
  503. ddSurface2Callbacks.AddOverlayDirtyRect = (LPVOID)DD_Surface_AddOverlayDirtyRect;
  504. ddSurface2Callbacks.Blt = (LPVOID)DD_Surface_Blt;
  505. ddSurface2Callbacks.BltBatch = (LPVOID)DD_Surface_BltBatch;
  506. ddSurface2Callbacks.BltFast = (LPVOID)DD_Surface_BltFast;
  507. ddSurface2Callbacks.DeleteAttachedSurface = (LPVOID)DD_Surface_DeleteAttachedSurfaces;
  508. ddSurface2Callbacks.EnumAttachedSurfaces = (LPVOID)DD_Surface_EnumAttachedSurfaces;
  509. ddSurface2Callbacks.EnumOverlayZOrders = (LPVOID)DD_Surface_EnumOverlayZOrders;
  510. ddSurface2Callbacks.Flip = (LPVOID)DD_Surface_Flip;
  511. ddSurface2Callbacks.GetAttachedSurface = (LPVOID)DD_Surface_GetAttachedSurface;
  512. ddSurface2Callbacks.GetBltStatus = (LPVOID)DD_Surface_GetBltStatus;
  513. ddSurface2Callbacks.GetCaps = (LPVOID)DD_Surface_GetCaps;
  514. ddSurface2Callbacks.GetClipper = (LPVOID)DD_Surface_GetClipper;
  515. ddSurface2Callbacks.GetColorKey = (LPVOID)DD_Surface_GetColorKey;
  516. ddSurface2Callbacks.GetDC = (LPVOID)DD_Surface_GetDC;
  517. ddSurface2Callbacks.GetDDInterface = (LPVOID)DD_Surface_GetDDInterface;
  518. ddSurface2Callbacks.GetFlipStatus = (LPVOID)DD_Surface_GetFlipStatus;
  519. ddSurface2Callbacks.GetOverlayPosition = (LPVOID)DD_Surface_GetOverlayPosition;
  520. ddSurface2Callbacks.GetPalette = (LPVOID)DD_Surface_GetPalette;
  521. ddSurface2Callbacks.GetPixelFormat = (LPVOID)DD_Surface_GetPixelFormat;
  522. ddSurface2Callbacks.GetSurfaceDesc = (LPVOID)DD_Surface_GetSurfaceDesc;
  523. ddSurface2Callbacks.Initialize = (LPVOID)DD_Surface_Initialize;
  524. ddSurface2Callbacks.IsLost = (LPVOID)DD_Surface_IsLost;
  525. ddSurface2Callbacks.Lock = (LPVOID)DD_Surface_Lock;
  526. ddSurface2Callbacks.ReleaseDC = (LPVOID)DD_Surface_ReleaseDC;
  527. ddSurface2Callbacks.Restore = (LPVOID)DD_Surface_Restore;
  528. ddSurface2Callbacks.SetClipper = (LPVOID)DD_Surface_SetClipper;
  529. ddSurface2Callbacks.SetColorKey = (LPVOID)DD_Surface_SetColorKey;
  530. ddSurface2Callbacks.SetOverlayPosition = (LPVOID)DD_Surface_SetOverlayPosition;
  531. ddSurface2Callbacks.SetPalette = (LPVOID)DD_Surface_SetPalette;
  532. ddSurface2Callbacks.Unlock = (LPVOID)DD_Surface_Unlock;
  533. ddSurface2Callbacks.UpdateOverlay = (LPVOID)DD_Surface_UpdateOverlay;
  534. ddSurface2Callbacks.UpdateOverlayDisplay = (LPVOID)DD_Surface_UpdateOverlayDisplay;
  535. ddSurface2Callbacks.UpdateOverlayZOrder = (LPVOID)DD_Surface_UpdateOverlayZOrder;
  536. ddSurface2Callbacks.PageLock = (LPVOID)DD_Surface_PageLock;
  537. ddSurface2Callbacks.PageUnlock = (LPVOID)DD_Surface_PageUnlock;
  538. /*
  539. * DirectDraw Surface object methods Ver 3.0
  540. */
  541. ddSurface3Callbacks.QueryInterface = (LPVOID)DD_Surface_QueryInterface;
  542. ddSurface3Callbacks.AddRef = (LPVOID)DD_Surface_AddRef;
  543. ddSurface3Callbacks.Release = (LPVOID)DD_Surface_Release;
  544. ddSurface3Callbacks.AddAttachedSurface = (LPVOID)DD_Surface_AddAttachedSurface;
  545. ddSurface3Callbacks.AddOverlayDirtyRect = (LPVOID)DD_Surface_AddOverlayDirtyRect;
  546. ddSurface3Callbacks.Blt = (LPVOID)DD_Surface_Blt;
  547. ddSurface3Callbacks.BltBatch = (LPVOID)DD_Surface_BltBatch;
  548. ddSurface3Callbacks.BltFast = (LPVOID)DD_Surface_BltFast;
  549. ddSurface3Callbacks.DeleteAttachedSurface = (LPVOID)DD_Surface_DeleteAttachedSurfaces;
  550. ddSurface3Callbacks.EnumAttachedSurfaces = (LPVOID)DD_Surface_EnumAttachedSurfaces;
  551. ddSurface3Callbacks.EnumOverlayZOrders = (LPVOID)DD_Surface_EnumOverlayZOrders;
  552. ddSurface3Callbacks.Flip = (LPVOID)DD_Surface_Flip;
  553. ddSurface3Callbacks.GetAttachedSurface = (LPVOID)DD_Surface_GetAttachedSurface;
  554. ddSurface3Callbacks.GetBltStatus = (LPVOID)DD_Surface_GetBltStatus;
  555. ddSurface3Callbacks.GetCaps = (LPVOID)DD_Surface_GetCaps;
  556. ddSurface3Callbacks.GetClipper = (LPVOID)DD_Surface_GetClipper;
  557. ddSurface3Callbacks.GetColorKey = (LPVOID)DD_Surface_GetColorKey;
  558. ddSurface3Callbacks.GetDC = (LPVOID)DD_Surface_GetDC;
  559. ddSurface3Callbacks.GetDDInterface = (LPVOID)DD_Surface_GetDDInterface;
  560. ddSurface3Callbacks.GetFlipStatus = (LPVOID)DD_Surface_GetFlipStatus;
  561. ddSurface3Callbacks.GetOverlayPosition = (LPVOID)DD_Surface_GetOverlayPosition;
  562. ddSurface3Callbacks.GetPalette = (LPVOID)DD_Surface_GetPalette;
  563. ddSurface3Callbacks.GetPixelFormat = (LPVOID)DD_Surface_GetPixelFormat;
  564. ddSurface3Callbacks.GetSurfaceDesc = (LPVOID)DD_Surface_GetSurfaceDesc;
  565. ddSurface3Callbacks.Initialize = (LPVOID)DD_Surface_Initialize;
  566. ddSurface3Callbacks.IsLost = (LPVOID)DD_Surface_IsLost;
  567. ddSurface3Callbacks.Lock = (LPVOID)DD_Surface_Lock;
  568. ddSurface3Callbacks.ReleaseDC = (LPVOID)DD_Surface_ReleaseDC;
  569. ddSurface3Callbacks.Restore = (LPVOID)DD_Surface_Restore;
  570. ddSurface3Callbacks.SetClipper = (LPVOID)DD_Surface_SetClipper;
  571. ddSurface3Callbacks.SetColorKey = (LPVOID)DD_Surface_SetColorKey;
  572. ddSurface3Callbacks.SetOverlayPosition = (LPVOID)DD_Surface_SetOverlayPosition;
  573. ddSurface3Callbacks.SetPalette = (LPVOID)DD_Surface_SetPalette;
  574. ddSurface3Callbacks.Unlock = (LPVOID)DD_Surface_Unlock;
  575. ddSurface3Callbacks.UpdateOverlay = (LPVOID)DD_Surface_UpdateOverlay;
  576. ddSurface3Callbacks.UpdateOverlayDisplay = (LPVOID)DD_Surface_UpdateOverlayDisplay;
  577. ddSurface3Callbacks.UpdateOverlayZOrder = (LPVOID)DD_Surface_UpdateOverlayZOrder;
  578. ddSurface3Callbacks.PageLock = (LPVOID)DD_Surface_PageLock;
  579. ddSurface3Callbacks.PageUnlock = (LPVOID)DD_Surface_PageUnlock;
  580. ddSurface3Callbacks.SetSurfaceDesc = (LPVOID)DD_Surface_SetSurfaceDesc;
  581. /*
  582. * DirectDraw Surface object methods Ver 4.0
  583. */
  584. ddSurface4Callbacks.QueryInterface = (LPVOID)DD_Surface_QueryInterface;
  585. ddSurface4Callbacks.AddRef = (LPVOID)DD_Surface_AddRef;
  586. ddSurface4Callbacks.Release = (LPVOID)DD_Surface_Release;
  587. ddSurface4Callbacks.AddAttachedSurface = (LPVOID)DD_Surface_AddAttachedSurface;
  588. ddSurface4Callbacks.AddOverlayDirtyRect = (LPVOID)DD_Surface_AddOverlayDirtyRect;
  589. ddSurface4Callbacks.Blt = (LPVOID)DD_Surface_Blt;
  590. ddSurface4Callbacks.BltBatch = (LPVOID)DD_Surface_BltBatch;
  591. ddSurface4Callbacks.BltFast = (LPVOID)DD_Surface_BltFast;
  592. ddSurface4Callbacks.ChangeUniquenessValue = (LPVOID) DD_Surface_ChangeUniquenessValue;
  593. ddSurface4Callbacks.DeleteAttachedSurface = (LPVOID)DD_Surface_DeleteAttachedSurfaces;
  594. ddSurface4Callbacks.EnumAttachedSurfaces = (LPVOID)DD_Surface_EnumAttachedSurfaces;
  595. ddSurface4Callbacks.EnumOverlayZOrders = (LPVOID)DD_Surface_EnumOverlayZOrders;
  596. ddSurface4Callbacks.Flip = (LPVOID)DD_Surface_Flip;
  597. ddSurface4Callbacks.GetAttachedSurface = (LPVOID)DD_Surface_GetAttachedSurface4;
  598. ddSurface4Callbacks.GetBltStatus = (LPVOID)DD_Surface_GetBltStatus;
  599. ddSurface4Callbacks.GetCaps = (LPVOID)DD_Surface_GetCaps4;
  600. ddSurface4Callbacks.GetClipper = (LPVOID)DD_Surface_GetClipper;
  601. ddSurface4Callbacks.GetColorKey = (LPVOID)DD_Surface_GetColorKey;
  602. ddSurface4Callbacks.GetDC = (LPVOID)DD_Surface_GetDC;
  603. ddSurface4Callbacks.GetDDInterface = (LPVOID)DD_Surface_GetDDInterface;
  604. ddSurface4Callbacks.GetFlipStatus = (LPVOID)DD_Surface_GetFlipStatus;
  605. ddSurface4Callbacks.GetOverlayPosition = (LPVOID)DD_Surface_GetOverlayPosition;
  606. ddSurface4Callbacks.GetPalette = (LPVOID)DD_Surface_GetPalette;
  607. ddSurface4Callbacks.GetPixelFormat = (LPVOID)DD_Surface_GetPixelFormat;
  608. ddSurface4Callbacks.GetSurfaceDesc = (LPVOID)DD_Surface_GetSurfaceDesc4;
  609. ddSurface4Callbacks.GetUniquenessValue = (LPVOID)DD_Surface_GetUniquenessValue;
  610. ddSurface4Callbacks.Initialize = (LPVOID)DD_Surface_Initialize;
  611. ddSurface4Callbacks.IsLost = (LPVOID)DD_Surface_IsLost;
  612. ddSurface4Callbacks.Lock = (LPVOID)DD_Surface_Lock;
  613. ddSurface4Callbacks.ReleaseDC = (LPVOID)DD_Surface_ReleaseDC;
  614. ddSurface4Callbacks.Restore = (LPVOID)DD_Surface_Restore;
  615. ddSurface4Callbacks.SetClipper = (LPVOID)DD_Surface_SetClipper;
  616. ddSurface4Callbacks.SetColorKey = (LPVOID)DD_Surface_SetColorKey;
  617. ddSurface4Callbacks.SetOverlayPosition = (LPVOID)DD_Surface_SetOverlayPosition;
  618. ddSurface4Callbacks.SetPalette = (LPVOID)DD_Surface_SetPalette;
  619. ddSurface4Callbacks.Unlock = (LPVOID)DD_Surface_Unlock4;
  620. ddSurface4Callbacks.UpdateOverlay = (LPVOID)DD_Surface_UpdateOverlay;
  621. ddSurface4Callbacks.UpdateOverlayDisplay = (LPVOID)DD_Surface_UpdateOverlayDisplay;
  622. ddSurface4Callbacks.UpdateOverlayZOrder = (LPVOID)DD_Surface_UpdateOverlayZOrder;
  623. ddSurface4Callbacks.PageLock = (LPVOID)DD_Surface_PageLock;
  624. ddSurface4Callbacks.PageUnlock = (LPVOID)DD_Surface_PageUnlock;
  625. ddSurface4Callbacks.SetSurfaceDesc = (LPVOID)DD_Surface_SetSurfaceDesc4;
  626. ddSurface4Callbacks.SetPrivateData = (LPVOID)DD_Surface_SetPrivateData;
  627. ddSurface4Callbacks.GetPrivateData = (LPVOID)DD_Surface_GetPrivateData;
  628. ddSurface4Callbacks.FreePrivateData = (LPVOID)DD_Surface_FreePrivateData;
  629. /*
  630. * DirectDraw Surface object methods Ver 5.0
  631. */
  632. ddSurface7Callbacks.QueryInterface = (LPVOID)DD_Surface_QueryInterface;
  633. ddSurface7Callbacks.AddRef = (LPVOID)DD_Surface_AddRef;
  634. ddSurface7Callbacks.Release = (LPVOID)DD_Surface_Release;
  635. ddSurface7Callbacks.AddAttachedSurface = (LPVOID)DD_Surface_AddAttachedSurface;
  636. ddSurface7Callbacks.AddOverlayDirtyRect = (LPVOID)DD_Surface_AddOverlayDirtyRect;
  637. ddSurface7Callbacks.Blt = (LPVOID)DD_Surface_Blt;
  638. ddSurface7Callbacks.BltBatch = (LPVOID)DD_Surface_BltBatch;
  639. ddSurface7Callbacks.BltFast = (LPVOID)DD_Surface_BltFast;
  640. ddSurface7Callbacks.ChangeUniquenessValue = (LPVOID) DD_Surface_ChangeUniquenessValue;
  641. ddSurface7Callbacks.DeleteAttachedSurface = (LPVOID)DD_Surface_DeleteAttachedSurfaces;
  642. ddSurface7Callbacks.EnumAttachedSurfaces = (LPVOID)DD_Surface_EnumAttachedSurfaces;
  643. ddSurface7Callbacks.EnumOverlayZOrders = (LPVOID)DD_Surface_EnumOverlayZOrders;
  644. ddSurface7Callbacks.Flip = (LPVOID)DD_Surface_Flip;
  645. ddSurface7Callbacks.GetAttachedSurface = (LPVOID)DD_Surface_GetAttachedSurface7;
  646. ddSurface7Callbacks.GetBltStatus = (LPVOID)DD_Surface_GetBltStatus;
  647. ddSurface7Callbacks.GetCaps = (LPVOID)DD_Surface_GetCaps4;
  648. ddSurface7Callbacks.GetClipper = (LPVOID)DD_Surface_GetClipper;
  649. ddSurface7Callbacks.GetColorKey = (LPVOID)DD_Surface_GetColorKey;
  650. ddSurface7Callbacks.GetDC = (LPVOID)DD_Surface_GetDC;
  651. ddSurface7Callbacks.GetDDInterface = (LPVOID)DD_Surface_GetDDInterface;
  652. ddSurface7Callbacks.GetFlipStatus = (LPVOID)DD_Surface_GetFlipStatus;
  653. ddSurface7Callbacks.GetOverlayPosition = (LPVOID)DD_Surface_GetOverlayPosition;
  654. ddSurface7Callbacks.GetPalette = (LPVOID)DD_Surface_GetPalette;
  655. ddSurface7Callbacks.GetPixelFormat = (LPVOID)DD_Surface_GetPixelFormat;
  656. ddSurface7Callbacks.GetSurfaceDesc = (LPVOID)DD_Surface_GetSurfaceDesc4;
  657. ddSurface7Callbacks.GetUniquenessValue = (LPVOID)DD_Surface_GetUniquenessValue;
  658. ddSurface7Callbacks.Initialize = (LPVOID)DD_Surface_Initialize;
  659. ddSurface7Callbacks.IsLost = (LPVOID)DD_Surface_IsLost;
  660. ddSurface7Callbacks.Lock = (LPVOID)DD_Surface_Lock;
  661. ddSurface7Callbacks.ReleaseDC = (LPVOID)DD_Surface_ReleaseDC;
  662. ddSurface7Callbacks.Restore = (LPVOID)DD_Surface_Restore;
  663. ddSurface7Callbacks.SetClipper = (LPVOID)DD_Surface_SetClipper;
  664. ddSurface7Callbacks.SetColorKey = (LPVOID)DD_Surface_SetColorKey;
  665. ddSurface7Callbacks.SetOverlayPosition = (LPVOID)DD_Surface_SetOverlayPosition;
  666. ddSurface7Callbacks.SetPalette = (LPVOID)DD_Surface_SetPalette;
  667. ddSurface7Callbacks.Unlock = (LPVOID)DD_Surface_Unlock4;
  668. ddSurface7Callbacks.UpdateOverlay = (LPVOID)DD_Surface_UpdateOverlay;
  669. ddSurface7Callbacks.UpdateOverlayDisplay = (LPVOID)DD_Surface_UpdateOverlayDisplay;
  670. ddSurface7Callbacks.UpdateOverlayZOrder = (LPVOID)DD_Surface_UpdateOverlayZOrder;
  671. ddSurface7Callbacks.PageLock = (LPVOID)DD_Surface_PageLock;
  672. ddSurface7Callbacks.PageUnlock = (LPVOID)DD_Surface_PageUnlock;
  673. ddSurface7Callbacks.SetSurfaceDesc = (LPVOID)DD_Surface_SetSurfaceDesc4;
  674. ddSurface7Callbacks.SetPrivateData = (LPVOID)DD_Surface_SetPrivateData;
  675. ddSurface7Callbacks.GetPrivateData = (LPVOID)DD_Surface_GetPrivateData;
  676. ddSurface7Callbacks.FreePrivateData = (LPVOID)DD_Surface_FreePrivateData;
  677. #ifdef POSTPONED2
  678. ddSurface7Callbacks.AlphaBlt = (LPVOID)DD_Surface_AlphaBlt;
  679. ddSurface7Callbacks.SetSpriteDisplayList = (LPVOID)DD_Surface_SetSpriteDisplayList;
  680. ddSurface7Callbacks.Resize = (LPVOID)DD_Surface_Resize;
  681. #endif //POSTPONED2
  682. ddSurface7Callbacks.SetPriority = (LPVOID)DD_Surface_SetPriority;
  683. ddSurface7Callbacks.GetPriority = (LPVOID)DD_Surface_GetPriority;
  684. ddSurface7Callbacks.SetLOD = (LPVOID)DD_Surface_SetLOD;
  685. ddSurface7Callbacks.GetLOD = (LPVOID)DD_Surface_GetLOD;
  686. /*
  687. * DirectDraw Palette object methods V1.0
  688. */
  689. ddPaletteCallbacks.QueryInterface = DD_Palette_QueryInterface;
  690. ddPaletteCallbacks.AddRef = DD_Palette_AddRef;
  691. ddPaletteCallbacks.Release = DD_Palette_Release;
  692. ddPaletteCallbacks.GetCaps = DD_Palette_GetCaps;
  693. ddPaletteCallbacks.GetEntries = DD_Palette_GetEntries;
  694. ddPaletteCallbacks.Initialize = DD_Palette_Initialize;
  695. ddPaletteCallbacks.SetEntries = DD_Palette_SetEntries;
  696. /*
  697. * DirectDraw Clipper object methods V1.0
  698. */
  699. ddClipperCallbacks.QueryInterface = DD_Clipper_QueryInterface;
  700. ddClipperCallbacks.AddRef = DD_Clipper_AddRef;
  701. ddClipperCallbacks.Release = DD_Clipper_Release;
  702. ddClipperCallbacks.GetClipList = DD_Clipper_GetClipList;
  703. ddClipperCallbacks.GetHWnd = DD_Clipper_GetHWnd;
  704. ddClipperCallbacks.Initialize = DD_Clipper_Initialize;
  705. ddClipperCallbacks.IsClipListChanged = DD_Clipper_IsClipListChanged;
  706. ddClipperCallbacks.SetClipList = DD_Clipper_SetClipList;
  707. ddClipperCallbacks.SetHWnd = DD_Clipper_SetHWnd;
  708. /*
  709. * DirectDraw "uninitialied" Clipper object methods V1.0
  710. */
  711. #ifdef WINNT
  712. ddUninitClipperCallbacks.QueryInterface = (LPVOID)DD_UnInitedClipperQueryInterface;
  713. #else
  714. ddUninitClipperCallbacks.QueryInterface = (LPVOID)DD_Uninitialized3Arg;
  715. #endif
  716. ddUninitClipperCallbacks.AddRef = (LPVOID)DD_Clipper_AddRef;
  717. ddUninitClipperCallbacks.Release = (LPVOID)DD_Clipper_Release;
  718. ddUninitClipperCallbacks.GetClipList = (LPVOID)DD_Uninitialized4Arg;
  719. ddUninitClipperCallbacks.GetHWnd = (LPVOID)DD_Uninitialized2Arg;
  720. ddUninitClipperCallbacks.Initialize = DD_Clipper_Initialize;
  721. ddUninitClipperCallbacks.IsClipListChanged = (LPVOID)DD_Uninitialized2Arg;
  722. ddUninitClipperCallbacks.SetClipList = (LPVOID)DD_Uninitialized3Arg;
  723. ddUninitClipperCallbacks.SetHWnd = (LPVOID)DD_Uninitialized3Arg;
  724. #ifdef STREAMING
  725. ddSurfaceStreamingCallbacks.QueryInterface = DD_Surface_QueryInterface;
  726. ddSurfaceStreamingCallbacks.AddRef = DD_Surface_AddRef;
  727. ddSurfaceStreamingCallbacks.Release = DD_Surface_Release;
  728. ddSurfaceStreamingCallbacks.Lock = DD_SurfaceStreaming_Lock;
  729. ddSurfaceStreamingCallbacks.SetNotificationCallback = DD_SurfaceStreaming_SetNotificationCallback;
  730. ddSurfaceStreamingCallbacks.Unlock = DD_SurfaceStreaming_Unlock;
  731. #endif
  732. #ifdef COMPOSITION
  733. ddSurfaceCompositionCallbacks.QueryInterface = DD_Surface_QueryInterface;
  734. ddSurfaceCompositionCallbacks.AddRef = DD_Surface_AddRef;
  735. ddSurfaceCompositionCallbacks.Release = DD_Surface_Release;
  736. ddSurfaceCompositionCallbacks.AddSurfaceDependency = DD_SurfaceComposition_AddSurfaceDependency;
  737. ddSurfaceCompositionCallbacks.Compose = DD_SurfaceComposition_Compose;
  738. ddSurfaceCompositionCallbacks.DeleteSurfaceDependency = DD_SurfaceComposition_DeleteSurfaceDependency;
  739. ddSurfaceCompositionCallbacks.DestLock = DD_SurfaceComposition_DestLock;
  740. ddSurfaceCompositionCallbacks.DestUnlock = DD_SurfaceComposition_DestUnlock;
  741. ddSurfaceCompositionCallbacks.EnumSurfaceDependencies = DD_SurfaceComposition_EnumSurfaceDependencies;
  742. ddSurfaceCompositionCallbacks.GetCompositionOrder = DD_SurfaceComposition_GetCompositionOrder;
  743. ddSurfaceCompositionCallbacks.SetCompositionOrder = DD_SurfaceComposition_SetCompositionOrder;
  744. #endif
  745. /*
  746. * DirectDrawVideoPort object methods Ver 1.0
  747. */
  748. #ifdef POSTPONED
  749. ddVideoPortContainerCallbacks.QueryInterface = (LPVOID)DD_DelegatingQueryInterface;
  750. ddVideoPortContainerCallbacks.AddRef = (LPVOID)DD_DelegatingAddRef;
  751. ddVideoPortContainerCallbacks.Release = (LPVOID)DD_DelegatingRelease;
  752. #else
  753. ddVideoPortContainerCallbacks.QueryInterface = (LPVOID)DD_QueryInterface;
  754. ddVideoPortContainerCallbacks.AddRef = (LPVOID)DD_AddRef;
  755. ddVideoPortContainerCallbacks.Release = (LPVOID)DD_Release;
  756. #endif
  757. ddVideoPortContainerCallbacks.CreateVideoPort = DDVPC_CreateVideoPort;
  758. ddVideoPortContainerCallbacks.EnumVideoPorts = DDVPC_EnumVideoPorts;
  759. ddVideoPortContainerCallbacks.GetVideoPortConnectInfo = DDVPC_GetVideoPortConnectInfo;
  760. ddVideoPortContainerCallbacks.QueryVideoPortStatus = DDVPC_QueryVideoPortStatus;
  761. /*
  762. * DirectDrawVideoPortStream object methods Ver 1.0
  763. */
  764. ddVideoPortCallbacks.QueryInterface = (LPVOID)DD_VP_QueryInterface;
  765. ddVideoPortCallbacks.AddRef = DD_VP_AddRef;
  766. ddVideoPortCallbacks.Release = DD_VP_Release;
  767. ddVideoPortCallbacks.SetTargetSurface = DD_VP_SetTargetSurface;
  768. ddVideoPortCallbacks.Flip = DD_VP_Flip;
  769. ddVideoPortCallbacks.GetBandwidthInfo = DD_VP_GetBandwidth;
  770. ddVideoPortCallbacks.GetColorControls = DD_VP_GetColorControls;
  771. ddVideoPortCallbacks.GetInputFormats = DD_VP_GetInputFormats;
  772. ddVideoPortCallbacks.GetOutputFormats = DD_VP_GetOutputFormats;
  773. ddVideoPortCallbacks.GetFieldPolarity = DD_VP_GetField;
  774. ddVideoPortCallbacks.GetVideoLine = DD_VP_GetLine;
  775. ddVideoPortCallbacks.GetVideoSignalStatus = DD_VP_GetSignalStatus;
  776. ddVideoPortCallbacks.StartVideo = DD_VP_StartVideo;
  777. ddVideoPortCallbacks.StopVideo = DD_VP_StopVideo;
  778. ddVideoPortCallbacks.UpdateVideo = DD_VP_UpdateVideo;
  779. ddVideoPortCallbacks.WaitForSync = DD_VP_WaitForSync;
  780. ddVideoPortCallbacks.SetColorControls = DD_VP_SetColorControls;
  781. #ifdef WINNT
  782. /*
  783. * DirectDrawVideoPortNotify object methods Ver 1.0
  784. */
  785. ddVideoPortNotifyCallbacks.QueryInterface = (LPVOID)DD_VP_QueryInterface;
  786. ddVideoPortNotifyCallbacks.AddRef = (LPVOID)DD_VP_AddRef;
  787. ddVideoPortNotifyCallbacks.Release = (LPVOID)DD_VP_Release;
  788. ddVideoPortNotifyCallbacks.AcquireNotification = DD_VP_Notify_AcquireNotification;
  789. ddVideoPortNotifyCallbacks.ReleaseNotification = DD_VP_Notify_ReleaseNotification;
  790. #endif
  791. /*
  792. * DirectDrawColorControl object methods Ver 1.0
  793. */
  794. ddColorControlCallbacks.QueryInterface = (LPVOID)DD_Surface_QueryInterface;
  795. ddColorControlCallbacks.AddRef = (LPVOID)DD_Surface_AddRef;
  796. ddColorControlCallbacks.Release = (LPVOID)DD_Surface_Release;
  797. ddColorControlCallbacks.GetColorControls = DD_Color_GetColorControls;
  798. ddColorControlCallbacks.SetColorControls = DD_Color_SetColorControls;
  799. /*
  800. * DirectDrawKernel interface
  801. */
  802. #ifdef POSTPONED
  803. ddKernelCallbacks.QueryInterface = (LPVOID)DD_DelegatingQueryInterface;
  804. ddKernelCallbacks.AddRef = (LPVOID)DD_DelegatingAddRef;
  805. ddKernelCallbacks.Release = (LPVOID)DD_DelegatingRelease;
  806. #else
  807. ddKernelCallbacks.QueryInterface = (LPVOID)DD_QueryInterface;
  808. ddKernelCallbacks.AddRef = (LPVOID)DD_AddRef;
  809. ddKernelCallbacks.Release = (LPVOID)DD_Release;
  810. #endif
  811. ddKernelCallbacks.GetCaps = DD_Kernel_GetCaps;
  812. ddKernelCallbacks.GetKernelHandle = DD_Kernel_GetKernelHandle;
  813. ddKernelCallbacks.ReleaseKernelHandle = DD_Kernel_ReleaseKernelHandle;
  814. /*
  815. * DirectDrawSurfaceKernel interface
  816. */
  817. ddSurfaceKernelCallbacks.QueryInterface = (LPVOID)DD_Surface_QueryInterface;
  818. ddSurfaceKernelCallbacks.AddRef = (LPVOID)DD_Surface_AddRef;
  819. ddSurfaceKernelCallbacks.Release = (LPVOID)DD_Surface_Release;
  820. ddSurfaceKernelCallbacks.GetKernelHandle = DD_SurfaceKernel_GetKernelHandle;
  821. ddSurfaceKernelCallbacks.ReleaseKernelHandle = DD_SurfaceKernel_ReleaseKernelHandle;
  822. #ifdef POSTPONED
  823. /*
  824. * DirectDraw Palette object methods V2.0
  825. */
  826. ddPalette2Callbacks.QueryInterface = (LPVOID) DD_Palette_QueryInterface;
  827. ddPalette2Callbacks.AddRef = (LPVOID) DD_Palette_AddRef;
  828. ddPalette2Callbacks.Release = (LPVOID) DD_Palette_Release;
  829. ddPalette2Callbacks.ChangeUniquenessValue = (LPVOID) DD_Palette_ChangeUniquenessValue;
  830. ddPalette2Callbacks.GetCaps = (LPVOID) DD_Palette_GetCaps;
  831. ddPalette2Callbacks.GetEntries = (LPVOID) DD_Palette_GetEntries;
  832. ddPalette2Callbacks.Initialize = (LPVOID) DD_Palette_Initialize;
  833. ddPalette2Callbacks.SetEntries = (LPVOID) DD_Palette_SetEntries;
  834. ddPalette2Callbacks.SetPrivateData = (LPVOID) DD_Palette_SetPrivateData;
  835. ddPalette2Callbacks.GetPrivateData = (LPVOID) DD_Palette_GetPrivateData;
  836. ddPalette2Callbacks.FreePrivateData = (LPVOID) DD_Palette_FreePrivateData;
  837. ddPalette2Callbacks.GetUniquenessValue = (LPVOID) DD_Palette_GetUniquenessValue;
  838. ddPalette2Callbacks.IsEqual = (LPVOID) DD_Palette_IsEqual;
  839. /*
  840. * DirectDrawFactory2 callbacks
  841. */
  842. ddFactory2Callbacks.QueryInterface = DDFac2_QueryInterface;
  843. ddFactory2Callbacks.AddRef = DDFac2_AddRef;
  844. ddFactory2Callbacks.Release = DDFac2_Release;
  845. ddFactory2Callbacks.CreateDirectDraw = (LPVOID)DDFac2_CreateDirectDraw;
  846. ddFactory2Callbacks.DirectDrawEnumerate = (LPVOID)DDFac2_DirectDrawEnumerate;
  847. /*
  848. * Surface IPersist interface
  849. */
  850. ddSurfacePersistCallbacks.QueryInterface = (LPVOID) DD_Surface_QueryInterface;
  851. ddSurfacePersistCallbacks.AddRef = (LPVOID)DD_Surface_AddRef;
  852. ddSurfacePersistCallbacks.Release = (LPVOID)DD_Surface_Release;
  853. ddSurfacePersistCallbacks.GetClassID = (LPVOID) DD_Surface_Persist_GetClassID;
  854. /*
  855. * Surface IPersistStream interface
  856. */
  857. ddSurfacePersistStreamCallbacks.QueryInterface = (LPVOID) DD_Surface_QueryInterface;
  858. ddSurfacePersistStreamCallbacks.AddRef = (LPVOID)DD_Surface_AddRef;
  859. ddSurfacePersistStreamCallbacks.Release = (LPVOID)DD_Surface_Release;
  860. ddSurfacePersistStreamCallbacks.GetClassID = (LPVOID) DD_Surface_Persist_GetClassID;
  861. ddSurfacePersistStreamCallbacks.IsDirty = (LPVOID) DD_Surface_PStream_IsDirty;
  862. ddSurfacePersistStreamCallbacks.Load = (LPVOID) DD_Surface_PStream_Load;
  863. ddSurfacePersistStreamCallbacks.Save = (LPVOID) DD_Surface_PStream_Save;
  864. ddSurfacePersistStreamCallbacks.GetSizeMax = (LPVOID) DD_PStream_GetSizeMax;
  865. /*
  866. * Palette IPersist interface
  867. */
  868. ddPalettePersistCallbacks.QueryInterface = (LPVOID) DD_Palette_QueryInterface;
  869. ddPalettePersistCallbacks.AddRef = (LPVOID)DD_Palette_AddRef;
  870. ddPalettePersistCallbacks.Release = (LPVOID)DD_Palette_Release;
  871. ddPalettePersistCallbacks.GetClassID = (LPVOID) DD_Palette_Persist_GetClassID;
  872. /*
  873. * Palette IPersistStream interface
  874. */
  875. ddPalettePersistStreamCallbacks.QueryInterface = (LPVOID) DD_Palette_QueryInterface;
  876. ddPalettePersistStreamCallbacks.AddRef = (LPVOID)DD_Palette_AddRef;
  877. ddPalettePersistStreamCallbacks.Release = (LPVOID)DD_Palette_Release;
  878. ddPalettePersistStreamCallbacks.GetClassID = (LPVOID) DD_Palette_Persist_GetClassID;
  879. ddPalettePersistStreamCallbacks.IsDirty = (LPVOID) DD_Palette_PStream_IsDirty;
  880. ddPalettePersistStreamCallbacks.Load = (LPVOID) DD_Palette_PStream_Load;
  881. ddPalettePersistStreamCallbacks.Save = (LPVOID) DD_Palette_PStream_Save;
  882. ddPalettePersistStreamCallbacks.GetSizeMax = (LPVOID) DD_PStream_GetSizeMax;
  883. /*
  884. * DirectDraw OptSurface object methods
  885. */
  886. ddOptSurfaceCallbacks.QueryInterface = (LPVOID)DD_Surface_QueryInterface;
  887. ddOptSurfaceCallbacks.AddRef = (LPVOID)DD_Surface_AddRef;
  888. ddOptSurfaceCallbacks.Release = (LPVOID)DD_Surface_Release;
  889. ddOptSurfaceCallbacks.GetOptSurfaceDesc = (LPVOID)DD_OptSurface_GetOptSurfaceDesc;
  890. ddOptSurfaceCallbacks.LoadUnoptimizedSurf = (LPVOID)DD_OptSurface_LoadUnoptimizedSurf;
  891. ddOptSurfaceCallbacks.CopyOptimizedSurf = (LPVOID)DD_OptSurface_CopyOptimizedSurf;
  892. ddOptSurfaceCallbacks.Unoptimize = (LPVOID)DD_OptSurface_Unoptimize;
  893. #endif //POSTPONED
  894. /*
  895. * DDMotionCompContainer object methods Ver 1.0
  896. */
  897. ddMotionCompContainerCallbacks.QueryInterface = (LPVOID)DD_QueryInterface;
  898. ddMotionCompContainerCallbacks.AddRef = (LPVOID)DD_AddRef;
  899. ddMotionCompContainerCallbacks.Release = (LPVOID)DD_Release;
  900. ddMotionCompContainerCallbacks.CreateVideoAccelerator = DDMCC_CreateMotionComp;
  901. ddMotionCompContainerCallbacks.GetCompBufferInfo = DDMCC_GetCompBuffInfo;
  902. ddMotionCompContainerCallbacks.GetInternalMemInfo = DDMCC_GetInternalMoCompInfo;
  903. ddMotionCompContainerCallbacks.GetUncompFormatsSupported = DDMCC_GetUncompressedFormats;
  904. ddMotionCompContainerCallbacks.GetVideoAcceleratorGUIDs = DDMCC_GetMotionCompGUIDs;
  905. /*
  906. * DirectDrawMotionComp object methods Ver 1.0
  907. */
  908. ddMotionCompCallbacks.QueryInterface = (LPVOID)DD_MC_QueryInterface;
  909. ddMotionCompCallbacks.AddRef = (LPVOID)DD_MC_AddRef;
  910. ddMotionCompCallbacks.Release = (LPVOID)DD_MC_Release;
  911. ddMotionCompCallbacks.BeginFrame = DD_MC_BeginFrame;
  912. ddMotionCompCallbacks.EndFrame = DD_MC_EndFrame;
  913. ddMotionCompCallbacks.QueryRenderStatus = DD_MC_QueryRenderStatus;
  914. ddMotionCompCallbacks.Execute = DD_MC_RenderMacroBlocks;
  915. /*
  916. * DirectDrawColorControl object methods Ver 1.0
  917. */
  918. ddGammaControlCallbacks.QueryInterface = (LPVOID)DD_Surface_QueryInterface;
  919. ddGammaControlCallbacks.AddRef = (LPVOID)DD_Surface_AddRef;
  920. ddGammaControlCallbacks.Release = (LPVOID)DD_Surface_Release;
  921. ddGammaControlCallbacks.GetGammaRamp = DD_Gamma_GetGammaRamp;
  922. ddGammaControlCallbacks.SetGammaRamp = DD_Gamma_SetGammaRamp;
  923. }