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.

301 lines
7.8 KiB

  1. /*==========================================================================;
  2. *
  3. * Copyright (C) Microsoft Corporation. All Rights Reserved.
  4. *
  5. * File: ddkernel.h
  6. * Content: APIs for accessing kernel mode support.
  7. *
  8. ***************************************************************************/
  9. #ifndef __DDKM_INCLUDED__
  10. #define __DDKM_INCLUDED__
  11. #if defined( _WIN32 ) && !defined( _NO_COM )
  12. #define COM_NO_WINDOWS_H
  13. #include <objbase.h>
  14. #else
  15. #define IUnknown void
  16. #undef CO_E_NOTINITIALIZED
  17. #define CO_E_NOTINITIALIZED 0x800401F0L
  18. #endif
  19. #ifdef __cplusplus
  20. extern "C" {
  21. #endif
  22. /*
  23. * GUIDS used by to get kernel interfaces
  24. */
  25. #if defined( _WIN32 ) && !defined( _NO_COM )
  26. DEFINE_GUID( IID_IDirectDrawKernel, 0x8D56C120,0x6A08,0x11D0,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8 );
  27. DEFINE_GUID( IID_IDirectDrawSurfaceKernel, 0x60755DA0,0x6A40,0x11D0,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8 );
  28. #endif
  29. /*============================================================================
  30. *
  31. * DirectDraw Structures
  32. *
  33. * Various structures used to invoke the kernel API functions.
  34. *
  35. *==========================================================================*/
  36. typedef struct IDirectDrawKernel FAR *LPDIRECTDRAWKERNEL;
  37. typedef struct IDirectDrawSurfaceKernel FAR *LPDIRECTDRAWSURFACEKERNEL;
  38. typedef struct _DDKERNELCAPS FAR *LPDDKERNELCAPS;
  39. /*
  40. * INTERACES FOLLOW:
  41. * IDirectDrawKernel
  42. * IVideoPort
  43. */
  44. /*
  45. * IDirectDrawKernel
  46. */
  47. #if defined( _WIN32 ) && !defined( _NO_COM )
  48. #undef INTERFACE
  49. #define INTERFACE IDirectDrawKernel
  50. DECLARE_INTERFACE_( IDirectDrawKernel, IUnknown )
  51. {
  52. /*** IUnknown methods ***/
  53. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  54. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  55. STDMETHOD_(ULONG,Release) (THIS) PURE;
  56. /*** IDirectDraw methods ***/
  57. STDMETHOD(GetCaps)(THIS_ LPDDKERNELCAPS) PURE;
  58. STDMETHOD(GetKernelHandle)(THIS_ PULONG_PTR) PURE;
  59. STDMETHOD(ReleaseKernelHandle)(THIS) PURE;
  60. };
  61. #if !defined(__cplusplus) || defined(CINTERFACE)
  62. #define IDirectDrawKernel_GetCaps(p, a) (p)->lpVtbl->GetCaps(p, a)
  63. #define IDirectDrawKernel_GetKernelHandle(p, a) (p)->lpVtbl->GetKernelHandle(p, a)
  64. #define IDirectDrawKernel_ReleaseKernelHandle(p) (p)->lpVtbl->ReleaseKernelHandle(p)
  65. #endif
  66. #endif
  67. /*
  68. * IDirectDrawSurfaceKernel
  69. */
  70. #if defined( _WIN32 ) && !defined( _NO_COM )
  71. #undef INTERFACE
  72. #define INTERFACE IDirectDrawSurfaceKernel
  73. DECLARE_INTERFACE_( IDirectDrawSurfaceKernel, IUnknown )
  74. {
  75. /*** IUnknown methods ***/
  76. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  77. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  78. STDMETHOD_(ULONG,Release) (THIS) PURE;
  79. /*** IDirectDraw methods ***/
  80. STDMETHOD(GetKernelHandle)(THIS_ PULONG_PTR) PURE;
  81. STDMETHOD(ReleaseKernelHandle)(THIS) PURE;
  82. };
  83. #if !defined(__cplusplus) || defined(CINTERFACE)
  84. #define IDirectDrawSurfaceKernel_GetKernelHandle(p, a) (p)->lpVtbl->GetKernelHandle(p, a)
  85. #define IDirectDrawSurfaceKernel_ReleaseKernelHandle(p) (p)->lpVtbl->ReleaseKernelHandle(p)
  86. #endif
  87. #endif
  88. /*
  89. * DDKERNELCAPS
  90. */
  91. typedef struct _DDKERNELCAPS
  92. {
  93. DWORD dwSize; // size of the DDKERNELCAPS structure
  94. DWORD dwCaps; // Contains the DDKERNELCAPS_XXX flags
  95. DWORD dwIRQCaps; // Contains the DDIRQ_XXX flags
  96. } DDKERNELCAPS, FAR *LPDDKERNELCAPS;
  97. /****************************************************************************
  98. *
  99. * DDKERNELCAPS CAPS
  100. *
  101. ****************************************************************************/
  102. /*
  103. * Indicates that the device supports field skipping.
  104. */
  105. #define DDKERNELCAPS_SKIPFIELDS 0x00000001l
  106. /*
  107. * Indicates that the device can support software autoflipping.
  108. */
  109. #define DDKERNELCAPS_AUTOFLIP 0x00000002l
  110. /*
  111. * Indicates that the device can switch between bob and weave.
  112. */
  113. #define DDKERNELCAPS_SETSTATE 0x00000004l
  114. /*
  115. * Indicates that a client can gain direct access to the frame buffer.
  116. */
  117. #define DDKERNELCAPS_LOCK 0x00000008l
  118. /*
  119. * Indicates that a client can manually flip the video port.
  120. */
  121. #define DDKERNELCAPS_FLIPVIDEOPORT 0x00000010l
  122. /*
  123. * Indicates that a client can manually flip the overlay.
  124. */
  125. #define DDKERNELCAPS_FLIPOVERLAY 0x00000020l
  126. /*
  127. * Indicates that the device supports a video port capture interface
  128. * capable of transfering data to system memory.
  129. */
  130. #define DDKERNELCAPS_CAPTURE_SYSMEM 0x00000040l
  131. /*
  132. * Indicates that the device supports a video port capture interface
  133. * capable of transfering data to non-local video memory.
  134. */
  135. #define DDKERNELCAPS_CAPTURE_NONLOCALVIDMEM 0x00000080l
  136. /*
  137. * Indicates that the device can report the polarity (even/odd) of
  138. * the curent video field.
  139. */
  140. #define DDKERNELCAPS_FIELDPOLARITY 0x00000100l
  141. /*
  142. * Indicates that the device supports inverting the DIBs while capturing
  143. * the data.
  144. */
  145. #define DDKERNELCAPS_CAPTURE_INVERTED 0x00000200l
  146. /****************************************************************************
  147. *
  148. * DDKERNELCAPS IRQ CAPS
  149. *
  150. ****************************************************************************/
  151. /*
  152. * The device can generate display VSYNC IRQs
  153. */
  154. #define DDIRQ_DISPLAY_VSYNC 0x00000001l
  155. /*
  156. * Reserved
  157. */
  158. #define DDIRQ_RESERVED1 0x00000002l
  159. /*
  160. * The device can generate video ports VSYNC IRQs using video port 0
  161. */
  162. #define DDIRQ_VPORT0_VSYNC 0x00000004l
  163. /*
  164. * The device can generate video ports line IRQs using video port 0
  165. */
  166. #define DDIRQ_VPORT0_LINE 0x00000008l
  167. /*
  168. * The device can generate video ports VSYNC IRQs using video port 1
  169. */
  170. #define DDIRQ_VPORT1_VSYNC 0x00000010l
  171. /*
  172. * The device can generate video ports line IRQs using video port 1
  173. */
  174. #define DDIRQ_VPORT1_LINE 0x00000020l
  175. /*
  176. * The device can generate video ports VSYNC IRQs using video port 2
  177. */
  178. #define DDIRQ_VPORT2_VSYNC 0x00000040l
  179. /*
  180. * The device can generate video ports line IRQs using video port 2
  181. */
  182. #define DDIRQ_VPORT2_LINE 0x00000080l
  183. /*
  184. * The device can generate video ports VSYNC IRQs using video port 3
  185. */
  186. #define DDIRQ_VPORT3_VSYNC 0x00000100l
  187. /*
  188. * The device can generate video ports line IRQs using video port 3
  189. */
  190. #define DDIRQ_VPORT3_LINE 0x00000200l
  191. /*
  192. * The device can generate video ports VSYNC IRQs using video port 4
  193. */
  194. #define DDIRQ_VPORT4_VSYNC 0x00000400l
  195. /*
  196. * The device can generate video ports line IRQs using video port 4
  197. */
  198. #define DDIRQ_VPORT4_LINE 0x00000800l
  199. /*
  200. * The device can generate video ports VSYNC IRQs using video port 5
  201. */
  202. #define DDIRQ_VPORT5_VSYNC 0x00001000l
  203. /*
  204. * The device can generate video ports line IRQs using video port 5
  205. */
  206. #define DDIRQ_VPORT5_LINE 0x00002000l
  207. /*
  208. * The device can generate video ports VSYNC IRQs using video port 6
  209. */
  210. #define DDIRQ_VPORT6_VSYNC 0x00004000l
  211. /*
  212. * The device can generate video ports line IRQs using video port 6
  213. */
  214. #define DDIRQ_VPORT6_LINE 0x00008000l
  215. /*
  216. * The device can generate video ports VSYNC IRQs using video port 7
  217. */
  218. #define DDIRQ_VPORT7_VSYNC 0x00010000l
  219. /*
  220. * The device can generate video ports line IRQs using video port 7
  221. */
  222. #define DDIRQ_VPORT7_LINE 0x00020000l
  223. /*
  224. * The device can generate video ports VSYNC IRQs using video port 8
  225. */
  226. #define DDIRQ_VPORT8_VSYNC 0x00040000l
  227. /*
  228. * The device can generate video ports line IRQs using video port 8
  229. */
  230. #define DDIRQ_VPORT8_LINE 0x00080000l
  231. /*
  232. * The device can generate video ports VSYNC IRQs using video port 9
  233. */
  234. #define DDIRQ_VPORT9_VSYNC 0x00010000l
  235. /*
  236. * The device can generate video ports line IRQs using video port 9
  237. */
  238. #define DDIRQ_VPORT9_LINE 0x00020000l
  239. #ifdef __cplusplus
  240. };
  241. #endif
  242. #endif