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.

683 lines
18 KiB

  1. /*==========================================================================;
  2. *
  3. * Copyright (C) 1997 Microsoft Corporation. All Rights Reserved.
  4. *
  5. * File: ddkmapi.h
  6. * Content: Kernel mode APIs for accessing DirectDraw support.
  7. *@@BEGIN_MSINTERNAL
  8. * History:
  9. * Date By Reason
  10. * ==== == ======
  11. * 31-jan-97 scottm initial implementation
  12. *@@END_MSINTERNAL
  13. *
  14. ***************************************************************************/
  15. #ifndef __DDKMAPI_INCLUDED__
  16. #define __DDKMAPI_INCLUDED__
  17. /*
  18. * API entry point
  19. */
  20. DWORD
  21. FAR PASCAL
  22. DxApi(
  23. DWORD dwFunctionNum,
  24. LPVOID lpvInBuffer,
  25. DWORD cbInBuffer,
  26. LPVOID lpvOutBuffer,
  27. DWORD cbOutBuffer
  28. );
  29. typedef
  30. DWORD
  31. (FAR PASCAL *LPDXAPI)(
  32. DWORD dwFunctionNum,
  33. LPVOID lpvInBuffer,
  34. DWORD cbInBuffer,
  35. LPVOID lpvOutBuffer,
  36. DWORD cbOutBuffer
  37. );
  38. #define DXAPI_MAJORVERSION 1
  39. #define DXAPI_MINORVERSION 0
  40. #define DD_FIRST_DXAPI 0x500
  41. typedef ULONG (FAR PASCAL *LPDD_NOTIFYCALLBACK)(DWORD dwFlags, PVOID pContext, DWORD dwParam1, DWORD dwParam2);
  42. /*
  43. * Queries the DXAPI version number.
  44. *
  45. * Input: Null
  46. * Output: LPDDGETVERSIONNUMBER
  47. */
  48. #define DD_DXAPI_GETVERSIONNUMBER (DD_FIRST_DXAPI)
  49. typedef struct _DDGETVERSIONNUMBER
  50. {
  51. DWORD ddRVal;
  52. DWORD dwMajorVersion;
  53. DWORD dwMinorVersion;
  54. } DDGETVERSIONNUMBER, FAR *LPDDGETVERSIONNUMBER;
  55. /*
  56. * Closes the kernel mode handle.
  57. *
  58. * Input: LPDDCLOSEHANDLE
  59. * Output: DWORD DirectDraw return value
  60. */
  61. #define DD_DXAPI_CLOSEHANDLE (DD_FIRST_DXAPI+1)
  62. typedef struct _DDCLOSEHANDLE
  63. {
  64. HANDLE hHandle;
  65. } DDCLOSEHANDLE, FAR *LPDDCLOSEHANDLE;
  66. /*
  67. * Opens the DirectDraw object and returns a kernel mode handle.
  68. *
  69. * Input: LPDDOPENDIRECTDRAWIN
  70. * Output: LPDDOPENDIRECTDRAWOUT
  71. */
  72. #define DD_DXAPI_OPENDIRECTDRAW (DD_FIRST_DXAPI+2)
  73. typedef struct _DDOPENDIRECTDRAWIN
  74. {
  75. ULONG_PTR dwDirectDrawHandle;
  76. LPDD_NOTIFYCALLBACK pfnDirectDrawClose;
  77. PVOID pContext;
  78. } DDOPENDIRECTDRAWIN, FAR *LPDDOPENDIRECTDRAWIN;
  79. typedef struct _DDOPENDIRECTDRAWOUT
  80. {
  81. DWORD ddRVal;
  82. HANDLE hDirectDraw;
  83. } DDOPENDIRECTDRAWOUT, FAR *LPDDOPENDIRECTDRAWOUT;
  84. /*
  85. * Opens the surface and returns a kernel mode handle.
  86. *
  87. * Input: LPDDOPENSURFACEIN
  88. * Output: LPDDOPENSURFACEOUT
  89. */
  90. #define DD_DXAPI_OPENSURFACE (DD_FIRST_DXAPI+3)
  91. typedef struct _DDOPENSURFACEIN
  92. {
  93. HANDLE hDirectDraw;
  94. ULONG_PTR dwSurfaceHandle;
  95. LPDD_NOTIFYCALLBACK pfnSurfaceClose;
  96. PVOID pContext;
  97. } DDOPENSURFACEIN, FAR *LPDDOPENSURFACEIN;
  98. typedef struct _DDOPENSURFACEOUT
  99. {
  100. DWORD ddRVal;
  101. HANDLE hSurface;
  102. } DDOPENSURFACEOUT, FAR *LPDDOPENSURFACEOUT;
  103. /*
  104. * Opens the VideoPort and returns a kernel mode handle.
  105. *
  106. * Input: LPDDOPENVIDEOPORTIN
  107. * Output: LPDDOPENVIDEOPORTOUT
  108. */
  109. #define DD_DXAPI_OPENVIDEOPORT (DD_FIRST_DXAPI+4)
  110. typedef struct _DDOPENVIDEOPORTIN
  111. {
  112. HANDLE hDirectDraw;
  113. ULONG dwVideoPortHandle;
  114. LPDD_NOTIFYCALLBACK pfnVideoPortClose;
  115. PVOID pContext;
  116. } DDOPENVIDEOPORTIN, FAR *LPDDOPENVIDEOPORTIN;
  117. typedef struct _DDOPENVIDEOPORTOUT
  118. {
  119. DWORD ddRVal;
  120. HANDLE hVideoPort;
  121. } DDOPENVIDEOPORTOUT, FAR *LPDDOPENVIDEOPORTOUT;
  122. /*
  123. * Returns the kernel mode capabilities supported by the device
  124. *
  125. * Input: HANDLE hDirectDraw
  126. * Output: LPDDGETKERNELCAPSOUT
  127. */
  128. #define DD_DXAPI_GETKERNELCAPS (DD_FIRST_DXAPI+5)
  129. typedef struct _DDGETKERNELCAPSOUT
  130. {
  131. DWORD ddRVal;
  132. DWORD dwCaps;
  133. DWORD dwIRQCaps;
  134. } DDGETKERNELCAPSOUT, FAR *LPDDGETKERNELCAPSOUT;
  135. /*
  136. * Gets the current field number
  137. *
  138. * Input: LPDDGETFIELDNUMIN
  139. * Output: LPDDGETFIELDNUMOUT
  140. */
  141. #define DD_DXAPI_GET_VP_FIELD_NUMBER (DD_FIRST_DXAPI+6)
  142. typedef struct _DDGETFIELDNUMIN
  143. {
  144. HANDLE hDirectDraw;
  145. HANDLE hVideoPort;
  146. } DDGETFIELDNUMIN, FAR *LPDDGETFIELDNUMIN;
  147. typedef struct _DDGETFIELDNUMOUT
  148. {
  149. DWORD ddRVal;
  150. DWORD dwFieldNum;
  151. } DDGETFIELDNUMOUT, FAR *LPDDGETFIELDNUMOUT;
  152. /*
  153. * Sets the current field number
  154. *
  155. * Input: LPDDSETFIELDNUM
  156. * Output: DWORD DirectDraw return value
  157. */
  158. #define DD_DXAPI_SET_VP_FIELD_NUMBER (DD_FIRST_DXAPI+7)
  159. typedef struct _DDSETFIELDNUM
  160. {
  161. HANDLE hDirectDraw;
  162. HANDLE hVideoPort;
  163. DWORD dwFieldNum;
  164. } DDSETFIELDNUM, FAR *LPDDSETFIELDNUM;
  165. /*
  166. * Indicates which fields should be skipped to undo the 3:2 pulldown.
  167. *
  168. * Input: LPDDSETSKIPFIELD
  169. * Output: DWORD DirectDraw return value
  170. */
  171. #define DD_DXAPI_SET_VP_SKIP_FIELD (DD_FIRST_DXAPI+8)
  172. typedef struct _DDSETSKIPFIELD
  173. {
  174. HANDLE hDirectDraw;
  175. HANDLE hVideoPort;
  176. DWORD dwStartField;
  177. } DDSETSKIPFIELD, FAR *LPDDSETSKIPFIELD;
  178. /*
  179. * Notifies whether the surface is in bob or weave mode.
  180. *
  181. * Input: LPDDGETSURFACESTATEIN
  182. * Output: LPDDGETSURFACESTATEOUT
  183. */
  184. #define DD_DXAPI_GET_SURFACE_STATE (DD_FIRST_DXAPI+9)
  185. typedef struct _DDGETSURFACESTATEIN
  186. {
  187. HANDLE hDirectDraw;
  188. HANDLE hSurface;
  189. } DDGETSURFACESTATEIN, FAR *LPDDGETSURFACESTATEIN;
  190. typedef struct _DDGETSURFACESTATEOUT
  191. {
  192. DWORD ddRVal;
  193. DWORD dwStateCaps;
  194. DWORD dwStateStatus;
  195. } DDGETSURFACESTATEOUT, FAR *LPDDGETSURFACESTATEOUT;
  196. /*
  197. * Changes the surface between bob and weave mode.
  198. *
  199. * Input: LPDDSETSURFACESTATE
  200. * Output: DWORD DirectDraw return value
  201. */
  202. #define DD_DXAPI_SET_SURFACE_STATE (DD_FIRST_DXAPI+10)
  203. typedef struct _DDSETSURFACETATE
  204. {
  205. HANDLE hDirectDraw;
  206. HANDLE hSurface;
  207. DWORD dwState;
  208. DWORD dwStartField;
  209. } DDSETSURFACESTATE, FAR *LPDDSETSURFACESTATE;
  210. /*
  211. * Allows direct access to the surface memory
  212. *
  213. * Input: LPDDLOCKIN
  214. * Output: LPDDLOCKOUT
  215. */
  216. #define DD_DXAPI_LOCK (DD_FIRST_DXAPI+11)
  217. typedef struct _DDLOCKIN
  218. {
  219. HANDLE hDirectDraw;
  220. HANDLE hSurface;
  221. } DDLOCKIN, FAR *LPDDLOCKIN;
  222. typedef struct _DDLOCKOUT
  223. {
  224. DWORD ddRVal;
  225. DWORD dwSurfHeight;
  226. DWORD dwSurfWidth;
  227. LONG lSurfPitch;
  228. PVOID lpSurface;
  229. DWORD SurfaceCaps;
  230. DWORD dwFormatFlags;
  231. DWORD dwFormatFourCC;
  232. DWORD dwFormatBitCount;
  233. union
  234. {
  235. DWORD dwRBitMask;
  236. DWORD dwYBitMask;
  237. };
  238. union
  239. {
  240. DWORD dwGBitMask;
  241. DWORD dwUBitMask;
  242. };
  243. union
  244. {
  245. DWORD dwBBitMask;
  246. DWORD dwVBitMask;
  247. };
  248. } DDLOCKOUT, FAR *LPDDLOCKOUT;
  249. /*
  250. * Flips the overlay surface
  251. *
  252. * Input: LPDDFLIPOVERLAY
  253. * Output: DWORD DirectDraw return value
  254. */
  255. #define DD_DXAPI_FLIP_OVERLAY (DD_FIRST_DXAPI+12)
  256. typedef struct _DDFLIPOVERLAY
  257. {
  258. HANDLE hDirectDraw;
  259. HANDLE hCurrentSurface;
  260. HANDLE hTargetSurface;
  261. DWORD dwFlags;
  262. } DDFLIPOVERLAY, FAR *LPDDFLIPOVERLAY;
  263. /*
  264. * Flips the video port
  265. *
  266. * Input: LPDDFLIPOVERLAY
  267. * Output: DWORD DirectDraw return value
  268. */
  269. #define DD_DXAPI_FLIP_VP (DD_FIRST_DXAPI+13)
  270. typedef struct _DDFLIPVIDEOPORT
  271. {
  272. HANDLE hDirectDraw;
  273. HANDLE hVideoPort;
  274. HANDLE hCurrentSurface;
  275. HANDLE hTargetSurface;
  276. DWORD dwFlags;
  277. } DDFLIPVIDEOPORT, FAR *LPDDFLIPVIDEOPORT;
  278. /*
  279. * Returns the current surface receiving the data while autoflipping
  280. *
  281. * Input: LPDDGETAUTOFLIPIN
  282. * Output: LPDDGETAUTOFLIPOUT
  283. */
  284. #define DD_DXAPI_GET_CURRENT_VP_AUTOFLIP_SURFACE (DD_FIRST_DXAPI+14)
  285. typedef struct _DDGETAUTOFLIPIN
  286. {
  287. HANDLE hDirectDraw;
  288. HANDLE hVideoPort;
  289. } DDGETAUTOFLIPIN, FAR *LPDDGETAUTOFLIPIN;
  290. typedef struct _DDGETAUTOFLIPOUT
  291. {
  292. DWORD ddRVal;
  293. HANDLE hVideoSurface;
  294. HANDLE hVBISurface;
  295. BOOL bPolarity;
  296. } DDGETAUTOFLIPOUT, FAR *LPDDGETAUTOFLIPOUT;
  297. /*
  298. * Returns the surface that received the previous field of data (could
  299. * be the same as current if video is interleaved)
  300. *
  301. * Input: LPDDGETAUTOFLIPIN
  302. * Output: LPDDGETAUTOFLIPOUT
  303. */
  304. #define DD_DXAPI_GET_LAST_VP_AUTOFLIP_SURFACE (DD_FIRST_DXAPI+15)
  305. /*
  306. * Registers a callback for when various events occur.
  307. *
  308. * Input: LPDDREGISTERCALLBACK
  309. * Output: DWORD DirectDraw return value
  310. */
  311. #define DD_DXAPI_REGISTER_CALLBACK (DD_FIRST_DXAPI+16)
  312. typedef struct _DDREGISTERCALLBACK
  313. {
  314. HANDLE hDirectDraw;
  315. ULONG dwEvents;
  316. LPDD_NOTIFYCALLBACK pfnCallback;
  317. ULONG_PTR dwParam1;
  318. ULONG_PTR dwParam2;
  319. PVOID pContext;
  320. } DDREGISTERCALLBACK, FAR *LPDDREGISTERCALLBACK;
  321. /*
  322. * Unregisters a callback for when various events occur.
  323. *
  324. * Input: LPDDREGISTERCALLBACK
  325. * Output: DWORD DirectDraw return value
  326. */
  327. #define DD_DXAPI_UNREGISTER_CALLBACK (DD_FIRST_DXAPI+17)
  328. /*
  329. * Returns the polarity (odd/even) of the current field
  330. *
  331. * Input: LPDDGETPOLARITYIN
  332. * Output: LPDDGETPOLARITYOUT
  333. */
  334. #define DD_DXAPI_GET_POLARITY (DD_FIRST_DXAPI+18)
  335. typedef struct _DDGETPOLARITYIN
  336. {
  337. HANDLE hDirectDraw;
  338. HANDLE hVideoPort;
  339. } DDGETPOLARITYIN, FAR *LPDDGETPOLARITYIN;
  340. typedef struct _DDGETPOLARITYOUT
  341. {
  342. DWORD ddRVal;
  343. BOOL bPolarity;
  344. } DDGETPOLARITYOUT, FAR *LPDDGETPOLARITYOUT;
  345. /*
  346. * Opens the device for capture
  347. *
  348. * Input: LPDDOPENCAPTUREDEVICEIN
  349. * Output: LPDDOPENCAPTUREDEVICEOUT
  350. */
  351. #define DD_DXAPI_OPENVPCAPTUREDEVICE (DD_FIRST_DXAPI+19)
  352. typedef struct _DDOPENVPCAPTUREDEVICEIN
  353. {
  354. HANDLE hDirectDraw;
  355. HANDLE hVideoPort;
  356. DWORD dwStartLine;
  357. DWORD dwEndLine;
  358. DWORD dwCaptureEveryNFields;
  359. LPDD_NOTIFYCALLBACK pfnCaptureClose;
  360. PVOID pContext;
  361. DWORD dwFlags;
  362. } DDOPENVPCAPTUREDEVICEIN, FAR * LPDDOPENVPCAPTUREDEVICEIN;
  363. typedef struct _DDOPENVPCAPTUREDEVICEOUT
  364. {
  365. DWORD ddRVal;
  366. HANDLE hCapture;
  367. } DDOPENVPCAPTUREDEVICEOUT, FAR * LPDDOPENVPCAPTUREDEVICEOUT;
  368. #define DDOPENCAPTURE_VIDEO 0x0001 // Capture from the video stream
  369. #define DDOPENCAPTURE_VBI 0x0002 // Capture from the VBI stream
  370. /*
  371. * Adds a capture buffer to the internal video port capture queue
  372. *
  373. * Input: LPDDADDVPCAPTUREBUFF
  374. * Output: DWORD DirectDraw return value
  375. */
  376. #define DD_DXAPI_ADDVPCAPTUREBUFFER (DD_FIRST_DXAPI+20)
  377. typedef struct _DDCAPBUFFINFO
  378. {
  379. DWORD dwFieldNumber;
  380. DWORD bPolarity;
  381. LARGE_INTEGER liTimeStamp;
  382. DWORD ddRVal;
  383. } DDCAPBUFFINFO, FAR * LPDDCAPBUFFINFO;
  384. typedef struct _DDADDVPCAPTUREBUFF
  385. {
  386. HANDLE hCapture;
  387. DWORD dwFlags;
  388. PMDL pMDL;
  389. PKEVENT pKEvent;
  390. LPDDCAPBUFFINFO lpBuffInfo;
  391. } DDADDVPCAPTUREBUFF, FAR * LPDDADDVPCAPTUREBUFF;
  392. #define DDADDBUFF_SYSTEMMEMORY 0x0001 // lpBuffer points to sys mem
  393. #define DDADDBUFF_NONLOCALVIDMEM 0x0002 // lpBuffer points to AGP mem
  394. #define DDADDBUFF_INVERT 0x0004 // invert the buffer during capture
  395. /*
  396. * Flushes the internal video port capture queue
  397. *
  398. * Input: HANDLE to capture device
  399. * Output: DWORD DirectDraw return value
  400. */
  401. #define DD_DXAPI_FLUSHVPCAPTUREBUFFERS (DD_FIRST_DXAPI+21)
  402. //@@BEGIN_MSINTERNAL
  403. //#ifdef WIN95
  404. /*
  405. * These IOCTLS are private and should not be used by clients.
  406. * They are to allow DirectDraw to sync the state/data between
  407. * the two drivers
  408. */
  409. #define DDHANDLEADJUST 8
  410. /*
  411. * Input: LPDDINITDEVICEIN
  412. * Output: LPDDINITDEVICEOUT
  413. */
  414. #define DD_DXAPI_INIT_DEVICE (DD_FIRST_DXAPI+22)
  415. typedef struct _DDINITDEVICEIN
  416. {
  417. DWORD dwDeviceFlags;
  418. DWORD dwMaxVideoPorts;
  419. DDMINIVDDTABLE MiniVDDTable;
  420. } DDINITDEVICEIN, FAR *LPDDINITDEVICEIN;
  421. typedef struct _DDINITDEVICEOUT
  422. {
  423. DWORD ddRVal;
  424. DWORD dwDirectDrawHandle;
  425. ULONG_PTR pfnNotifyProc;
  426. DWORD bHaveIRQ;
  427. } DDINITDEVICEOUT, FAR *LPDDINITDEVICEOUT;
  428. /*
  429. * Input: DWORD dwDirectDrawHandle
  430. * Output: none
  431. */
  432. #define DD_DXAPI_RELEASE_DEVICE (DD_FIRST_DXAPI+23)
  433. /*
  434. * Input: LPDDKMSURFACEINFO
  435. * Output: LPDDGETSURFACEHANDLE
  436. */
  437. #define DD_DXAPI_GET_SURFACE_HANDLE (DD_FIRST_DXAPI+24)
  438. typedef struct _DDKMSURFACEINFO
  439. {
  440. DWORD dwDirectDrawHandle;
  441. DWORD ddsCaps; // Ring 3 creation caps
  442. DWORD dwSurfaceOffset; // Offset in frame buffer of surface
  443. ULONG_PTR fpLockPtr; // Surface lock ptr
  444. DWORD dwWidth; // Surface width
  445. DWORD dwHeight; // Surface height
  446. LONG lPitch; // Surface pitch
  447. DWORD dwOverlayFlags; // DDOVER_XX flags
  448. DWORD dwOverlayOffset; // Offset in frame buffer of overlay
  449. DWORD dwOverlaySrcWidth; // Src width of overlay
  450. DWORD dwOverlaySrcHeight; // Src height of overlay
  451. DWORD dwOverlayDestWidth; // Dest width of overlay
  452. DWORD dwOverlayDestHeight; // Dest height of overlay
  453. DWORD dwVideoPortId; // ID of video port (-1 if not connected to a video port)
  454. DWORD dwPhysicalPageTable;
  455. ULONG_PTR pPageTable;
  456. DWORD cPages;
  457. DWORD dwFormatFlags;
  458. DWORD dwFormatFourCC;
  459. DWORD dwFormatBitCount;
  460. DWORD dwRBitMask;
  461. DWORD dwGBitMask;
  462. DWORD dwBBitMask;
  463. ULONG_PTR dwDriverReserved1; // Reserved for the HAL/Mini VDD
  464. ULONG_PTR dwDriverReserved2; // Reserved for the HAL/Mini VDD
  465. ULONG_PTR dwDriverReserved3; // Reserved for the HAL/Mini VDD
  466. } DDKMSURFACEINFO, FAR *LPDDKMSURFACEINFO;
  467. typedef struct _DDGETSURFACEHANDLE
  468. {
  469. DWORD ddRVal; // Return code
  470. DWORD hSurface; // New surface handle
  471. } DDGETSURFACEHANDLE, FAR *LPDDGETSURFACEHANDLE;
  472. /*
  473. * Input: LPDDRELEASEHANDLE
  474. * Output: DWORD DirectDraw return value
  475. */
  476. #define DD_DXAPI_RELEASE_SURFACE_HANDLE (DD_FIRST_DXAPI+25)
  477. typedef struct _DDRELEASEHANDLE
  478. {
  479. DWORD dwDirectDrawHandle;
  480. DWORD hSurface; // Surface handle to release
  481. } DDRELEASEHANDLE, FAR *LPDDRELEASEHANDLE;
  482. /*
  483. * Input: LPDDKMSURFACEUPDATE
  484. * Output: DWORD DirectDraw return value
  485. */
  486. #define DD_DXAPI_UPDATE_SURFACE_INFO (DD_FIRST_DXAPI+26)
  487. typedef struct _DDKMSURFACEUPDATE
  488. {
  489. DWORD dwDirectDrawHandle;
  490. DWORD dwSurfaceHandle; // Handle of surface to update
  491. DDKMSURFACEINFO si; // New surface info
  492. } DDKMSURFACEUPDATE, FAR *LPDDKMSURFACEUPDATE;
  493. /*
  494. * Input: LPDDKMVIDEOPORTINFO
  495. * Output: DWORD DirectDraw return value
  496. */
  497. #define DD_DXAPI_UPDATE_VP_INFO (DD_FIRST_DXAPI+27)
  498. #define MAX_AUTOFLIP 10
  499. typedef struct _DDKMVIDEOPORTINFO
  500. {
  501. DWORD dwDirectDrawHandle;
  502. DWORD dwVideoPortId; // ID of video port (0 - MaxVideoPorts-1)
  503. DWORD dwVPFlags; // Offset in frame buffer of surface
  504. DWORD dwFlags; // Flags used internally
  505. DWORD dwOriginOffset; // Start address relative to surface
  506. DWORD dwHeight; // Height of total video region (per field)
  507. DWORD dwVBIHeight; // Height of VBI region (per field)
  508. DWORD dwNumAutoflipping; // Number of surfaces being autoflipped
  509. DWORD dwNumVBIAutoflipping; // Number of VBI surfaces being autoflipped
  510. DWORD dwSurfaceHandle[MAX_AUTOFLIP]; // Surface receiving the data (up to 10 autoflipping)
  511. DWORD dwVBISurfaceHandle[MAX_AUTOFLIP]; // Surface receiving VBI data (up to 10 autoflipping)
  512. ULONG_PTR dwDriverReserved1; // Reserved for the HAL/Mini VDD
  513. ULONG_PTR dwDriverReserved2; // Reserved for the HAL/Mini VDD
  514. ULONG_PTR dwDriverReserved3; // Reserved for the HAL/Mini VDD
  515. } DDKMVIDEOPORTINFO, FAR *LPDDKMVIDEOPORTINFO;
  516. /*
  517. * Same as DD_DXAPI_GET_SURFACE_STATE, but it doesn't require that
  518. * you open the surace first.
  519. *
  520. * Input: LPDDGETSURFACESTATEIN
  521. * Output: LPDDGETSURFACESTATEOUT
  522. */
  523. #define DD_DXAPI_PRIVATE_GET_SURFACE_STATE (DD_FIRST_DXAPI+28)
  524. /*
  525. * Input: LPDDSETDOSBOXEVENT
  526. * Output: DWORD DirectDraw return value
  527. */
  528. #define DD_DXAPI_SET_DOS_BOX_EVENT (DD_FIRST_DXAPI+29)
  529. typedef struct _DDSETDOSBOXEVENT
  530. {
  531. DWORD dwDirectDrawHandle;
  532. DWORD dwDOSBoxEvent;
  533. } DDSETDOSBOXEVENT, FAR *LPDDSETDOSBOXEVENT;
  534. /*
  535. * Input: LPDDSETKERNELCAPS
  536. * Output: DWORD DirectDraw return value
  537. */
  538. #define DD_DXAPI_SET_KERNEL_CAPS (DD_FIRST_DXAPI+30)
  539. typedef struct _DDSETKERNELCAPS
  540. {
  541. DWORD dwDirectDrawHandle;
  542. DWORD dwCaps;
  543. DWORD dwIRQCaps;
  544. } DDSETKERNELCAPS, FAR *LPDDSETKERNELCAPS;
  545. /*
  546. * Input: LPDDSETKERNELCAPS
  547. * Output: DWORD DirectDraw return value
  548. */
  549. #define DD_DXAPI_ENABLE_AUTOFLIP (DD_FIRST_DXAPI+31)
  550. typedef struct _DDENABLEAUTOLFIP
  551. {
  552. DWORD dwDirectDrawHandle;
  553. DWORD dwVideoPortId; // ID of video port (0 - MaxVideoPorts-1)
  554. BOOL bEnableAutoflip;
  555. } DDENABLEAUTOFLIP, FAR *LPDDENABLEAUTOFLIP;
  556. #define DD_LAST_DXAPI DD_DXAPI_ENABLE_AUTOFLIP
  557. //#endif
  558. //@@END_MSINTERNAL
  559. /*
  560. * State flags returned by DSVXD_DXAPI_DD_GET_SURFACE_STATE
  561. */
  562. #define DDSTATE_BOB 0x0001
  563. #define DDSTATE_WEAVE 0x0002
  564. #define DDSTATE_EXPLICITLY_SET 0x0004
  565. #define DDSTATE_SOFTWARE_AUTOFLIP 0x0008
  566. #define DDSTATE_SKIPEVENFIELDS 0x0010
  567. /*
  568. * Event flags - passed into RegisterCallback
  569. */
  570. #define DDEVENT_DISPLAY_VSYNC 0x0001
  571. #define DDEVENT_VP_VSYNC 0x0002
  572. #define DDEVENT_VP_LINE 0x0004
  573. #define DDEVENT_PRERESCHANGE 0x0008
  574. #define DDEVENT_POSTRESCHANGE 0x0010
  575. #define DDEVENT_PREDOSBOX 0x0020
  576. #define DDEVENT_POSTDOSBOX 0x0040
  577. /*
  578. * Notification flags - passed to the notification proc
  579. */
  580. #define DDNOTIFY_DISPLAY_VSYNC 0x0001 // dwParam1 = hDirectDraw
  581. #define DDNOTIFY_VP_VSYNC 0x0002 // dwParam1 = hVideoPort
  582. #define DDNOTIFY_VP_LINE 0x0004 // dwParam1 = hVideoPort
  583. #define DDNOTIFY_PRERESCHANGE 0x0008 // dwParam1 = hDirectDraw
  584. #define DDNOTIFY_POSTRESCHANGE 0x0010 // dwParam1 = hDirectDraw
  585. #define DDNOTIFY_PREDOSBOX 0x0020 // dwParam1 = hDirectDraw
  586. #define DDNOTIFY_POSTDOSBOX 0x0040 // dwParam1 = hDirectDraw
  587. #define DDNOTIFY_CLOSEDIRECTDRAW 0x0080 // dwParam1 = hDirectDraw
  588. #define DDNOTIFY_CLOSESURFACE 0x0100 // dwParam1 = hSurface
  589. #define DDNOTIFY_CLOSEVIDEOPORT 0x0200 // dwParam1 = hVideoPort
  590. #define DDNOTIFY_CLOSECAPTURE 0x0400 // dwParam1 = hCapture
  591. #endif