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.

364 lines
8.0 KiB

  1. /*
  2. Copyright (c) 1994, Microsoft Corporation
  3. Module Name:
  4. ddirx.h
  5. Abstract:
  6. Defines and types for Rendering/CAD DDI Extension Interface.
  7. */
  8. #define DDIRXFUNCS 0x8000
  9. typedef LONG LONGFIX;
  10. typedef HANDLE DDIHANDLE;
  11. /* Rendering-function header */
  12. #define RX_CLIPINFO 0x0001
  13. typedef struct _DDIRXHDR {
  14. ULONG flags;
  15. ULONG cCmd;
  16. DDIHANDLE hDDIrc;
  17. DDIHANDLE hMem;
  18. ULONG ulMemOffset;
  19. } DDIRXHDR;
  20. /* Rendering-function header */
  21. typedef struct _DDIRXCMD {
  22. USHORT idFunc;
  23. USHORT flags;
  24. ULONG cData;
  25. ULONG buffer[1];
  26. } DDIRXCMD;
  27. typedef struct _DDIRXCLIPINFO {
  28. ULONG flags;
  29. ULONG idClip;
  30. ULONG cClip;
  31. RECT rclClient;
  32. RECT rclClip[1];
  33. } DDIRXCLIPINFO;
  34. #define FRONT_BUFFER 0
  35. #define BACK_BUFFER 1
  36. #define RX_FLAT 0
  37. #define RX_SMOOTH 1
  38. #define RX_COLOR_INDEXED 0
  39. #define RX_COLOR_RGBA 1
  40. #define RX_DISABLE 0
  41. #define RX_ENABLE_FASTEST 1
  42. #define RX_ENABLE_NICEST 2
  43. #define RX_LINEPAT 1
  44. #define RX_FILLPAT 2
  45. #define RX_ROP2 3
  46. #define RX_GLCOMPAT 4
  47. #define RX_WRITEBUFFER 5
  48. #define RX_PLANEMASK 6
  49. #define RX_ZMASK 7
  50. #define RX_Z_ENABLE 8
  51. #define RX_ALPHA_ENABLE 9
  52. #define RX_LAST_PIXEL 10
  53. #define RX_TEX_MAG 11
  54. #define RX_TEX_MIN 12
  55. #define RX_SRCBLEND 13
  56. #define RX_DSTBLEND 14
  57. #define RX_TEXBLEND 15
  58. #define RX_COLORMODE 16
  59. #define RX_PIXELMODE 17
  60. #define RX_ZFUNC 18
  61. #define RX_ALPHAREF 19
  62. #define RX_ALPHAFUNC 20
  63. #define RX_DITHER 21
  64. #define RX_BLEND 22
  65. #define RX_FILL 23
  66. #define RX_TEXTURE 24
  67. #define RX_FILLCOLOR 25
  68. #define RX_FILLZ 26
  69. #define RX_SOLIDCOLOR 27
  70. #define RX_TRANSPCOLOR 28
  71. #define RX_TRANSP_ENABLE 29
  72. #define RX_FLOAT_ENABLE 30
  73. #define RX_MASK_START 31
  74. #define RX_AAPOINT_MODE 32
  75. #define RX_AALINE_MODE 33
  76. #define RX_AAPOLY_MODE 34
  77. #define RX_SHADEMODE 35
  78. #define RX_VERTEXTYPE 36
  79. #define RX_SCANTYPE 37
  80. typedef struct _COLORREFA {
  81. BYTE b;
  82. BYTE g;
  83. BYTE r;
  84. BYTE a;
  85. } COLORREFA;
  86. typedef struct _COLORREFAFIX {
  87. LONGFIX b;
  88. LONGFIX g;
  89. LONGFIX r;
  90. LONGFIX a;
  91. } COLORREFAFIX;
  92. typedef struct _PTFIX {
  93. LONGFIX x;
  94. LONGFIX y;
  95. } PTFIX;
  96. typedef struct _PTFIXZ {
  97. LONGFIX x;
  98. LONGFIX y;
  99. ULONG z;
  100. } PTFIXZ;
  101. typedef struct _PTFIXZTEX {
  102. LONGFIX x;
  103. LONGFIX y;
  104. ULONG z;
  105. LONGFIX s;
  106. LONGFIX t;
  107. FLOAT q;
  108. FLOAT w;
  109. } PTFIXZTEX;
  110. typedef struct _COLORPTFIXZTEX {
  111. LONGFIX b;
  112. LONGFIX g;
  113. LONGFIX r;
  114. LONGFIX a;
  115. LONGFIX x;
  116. LONGFIX y;
  117. LONG z;
  118. LONGFIX s;
  119. LONGFIX t;
  120. FLOAT q;
  121. FLOAT w;
  122. } COLORPTFIXZTEX;
  123. typedef struct _RXLINEPAT {
  124. USHORT repFactor;
  125. USHORT linePattern;
  126. } RXLINEPAT;
  127. typedef struct _RXFILLPAT {
  128. ULONG fillPattern[32];
  129. } RXFILLPAT;
  130. typedef struct _RXBITBLT {
  131. ULONG pixType;
  132. DDIHANDLE hSrc;
  133. DDIHANDLE hDest;
  134. ULONG xSrc;
  135. ULONG ySrc;
  136. ULONG xDest;
  137. ULONG yDest;
  138. ULONG width;
  139. ULONG height;
  140. ULONG srcWidth;
  141. ULONG srcHeight;
  142. ULONG destWidth;
  143. ULONG destHeight;
  144. } RXBITBLT;
  145. #define RX_COLOR_COMPONENT 1
  146. #define RX_Z_COMPONENT 2
  147. #define RX_FL_FILLCOLOR 0x0001
  148. #define RX_FL_FILLZ 0x0002
  149. // Comparison functions. Test passes if new pixel value meets the
  150. // specified condition with the current pixel value.
  151. #define RX_CMP_NEVER 0x0001
  152. #define RX_CMP_LESS 0x0002
  153. #define RX_CMP_EQUAL 0x0004
  154. #define RX_CMP_LEQUAL 0x0008
  155. #define RX_CMP_GREATER 0x0010
  156. #define RX_CMP_NOTEQUAL 00x020
  157. #define RX_CMP_GEQUAL 0x0040
  158. #define RX_CMP_ALWAYS 0x0080
  159. #define RX_CMP_ALLGL 0x00ff
  160. // Primitive-drawing capability flags
  161. #define RX_SCANPRIM 0x0001
  162. #define RX_LINEPRIM 0x0002
  163. #define RX_FILLPRIM 0x0004
  164. #define RX_BITBLT 0x0008
  165. // Z-buffer resource flags
  166. #define RX_Z_PER_WINDOW 0x0001
  167. #define RX_Z_PER_SCREEN 0x0002
  168. // Mask capability flags
  169. #define RX_MASK_MSB 0x0001
  170. #define RX_MASK_LSB 0x0002
  171. #define RX_MASK_PLANES 0x0004
  172. // Blending flags
  173. #define RX_BLND_ZERO 0x0001
  174. #define RX_BLND_ONE 0x0002
  175. #define RX_BLND_SRC_COLOR 0x0004
  176. #define RX_BLND_INV_SRC_COLOR 0x0008
  177. #define RX_BLND_SRC_ALPHA 0x0010
  178. #define RX_BLND_INV_SRC_ALPHA 0x0020
  179. #define RX_BLND_DST_ALPHA 0x0040
  180. #define RX_BLND_INV_DST_ALPHA 0x0080
  181. #define RX_BLND_DST_COLOR 0x0100
  182. #define RX_BLND_INV_DST_COLOR 0x0200
  183. #define RX_BLND_SRC_ALPHA_SAT 0x0400
  184. #define RX_BLND_ALLGL 0x07ff
  185. // Texture-mapping flags
  186. #define RX_TEX_NEAREST 0x0001
  187. #define RX_TEX_LINEAR 0x0002
  188. #define RX_TEX_MIP_NEAREST 0x0004
  189. #define RX_TEX_MIP_LINEAR 0x0008
  190. #define RX_TEX_LINEAR_MIP_NEAREST 0x0010
  191. #define RX_TEX_LINEAR_MIP_LINEAR 0x0020
  192. // Texture blending flags
  193. #define RX_TEX_DECAL 0x0001
  194. #define RX_TEX_MODULATE 0x0002
  195. // Raster/color capability flags
  196. #define RX_RASTER_DITHER 0x0001
  197. #define RX_RASTER_ROP2 0x0002
  198. #define RX_RASTER_LINEPAT 0x0004
  199. #define RX_RASTER_FILLPAT 0x0008
  200. #define RX_RASTER_TRANSPARENCY 0x0010
  201. typedef struct _RXCAPS {
  202. ULONG verMajor;
  203. ULONG verMinor;
  204. ULONG maskCaps;
  205. ULONG rasterCaps;
  206. ULONG drawCaps;
  207. ULONG aaCaps;
  208. ULONG cCaps;
  209. ULONG zCaps;
  210. ULONG zCmpCaps;
  211. ULONG srcBlendCaps;
  212. ULONG dstBlendCaps;
  213. ULONG alphaCmpCaps;
  214. ULONG texCaps;
  215. ULONG texFilterCaps;
  216. ULONG texBlendCaps;
  217. ULONG texMaxWidth;
  218. ULONG texMaxHeight;
  219. ULONG miscCaps;
  220. } RXCAPS;
  221. #define RX_DEV_BITMAP 1
  222. #define RX_MEM_BITMAP 2
  223. typedef struct _RXSURFACEINFO {
  224. USHORT surfType;
  225. UCHAR cBytesPerPixel;
  226. UCHAR rDepth;
  227. UCHAR gDepth;
  228. UCHAR bDepth;
  229. UCHAR aDepth;
  230. UCHAR rBitShift;
  231. UCHAR gBitShift;
  232. UCHAR bBitShift;
  233. UCHAR aBitShift;
  234. UCHAR zBytesPerPixel;
  235. UCHAR zDepth;
  236. UCHAR zBitShift;
  237. VOID *pZBits;
  238. LONG zScanDelta;
  239. } RXSURFACEINFO;
  240. typedef struct _RXSHAREMEM {
  241. HANDLE hSourceProcess;
  242. HANDLE hSource;
  243. DWORD dwOffset;
  244. DWORD dwSize;
  245. } RXSHAREMEM;
  246. #define RX_SCAN_PIX 0x0001
  247. #define RX_SCAN_COLOR 0x0002
  248. #define RX_SCAN_COLORZ 0x0003
  249. #define RX_SCAN_COLORZTEX 0x0004
  250. #define RX_SCAN_DELTA 0x0001
  251. #define RX_SCAN_MASK 0x0002
  252. typedef struct _RXSCAN {
  253. USHORT x;
  254. USHORT y;
  255. USHORT flags;
  256. USHORT count;
  257. } RXSCAN;
  258. #define FL_SCAN3D_DELTA 0x0001
  259. #define FL_SCAN3D_PIX 0x0002
  260. #define FL_SCAN3D_MASK 0x0004
  261. typedef struct _RXSCANTEMPLATE {
  262. RXSCAN rxScan;
  263. COLORREFAFIX fixColor;
  264. PTFIXZTEX ptTex;
  265. } RXSCANTEMPLATE;
  266. #define RX_RESOURCE_TEX 1
  267. #define RX_MEMCACHE 1
  268. #define RX_MEMDEV 2
  269. #define RX_MEMANY 3
  270. typedef struct _RXTEXTURE {
  271. ULONG level;
  272. ULONG width;
  273. ULONG height;
  274. ULONG border;
  275. } RXTEXTURE;
  276. // Primitive types
  277. #define RXPRIM_POINTS 1
  278. #define RXPRIM_LINESTRIP 2
  279. #define RXPRIM_TRISTRIP 3
  280. #define RXPRIM_QUADSTRIP 4
  281. #define RX_PTFIX 1
  282. #define RX_PTFIXZ 2
  283. #define RX_PTFIXZTEX 3
  284. #define RX_INFO_CAPS 1
  285. #define RX_INFO_SURFACE 2
  286. #define DDIRX_GETINFO 1
  287. #define DDIRX_CREATECONTEXT 2
  288. #define DDIRX_DELETERESOURCE 3
  289. #define DDIRX_MAPMEM 4
  290. #define DDIRX_GETSURFACEHANDLE 5
  291. #define DDIRX_SETSTATE 6
  292. #define DDIRX_FILLRECT 7
  293. #define DDIRX_BITBLT 8
  294. #define DDIRX_POLYSCAN 9
  295. #define DDIRX_ALLOCRESOURCE 10
  296. #define DDIRX_LOADTEXTURE 11
  297. #define DDIRX_PRIMSTRIP 12