Source code of Windows XP (NT5)
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.

303 lines
6.9 KiB

  1. /******************************Module*Header*******************************\
  2. * Module Name: mcdint.h
  3. *
  4. * Internal client/server-side data structure for MCD driver interface.
  5. *
  6. * Copyright (c) 1996 Microsoft Corporation
  7. *
  8. \**************************************************************************/
  9. // Private flags for initialization (registry)
  10. #define MCDPRIVATE_MCD_ENABLED 0x0001
  11. #define MCDPRIVATE_PALETTEFORMATS 0x0002
  12. #define MCDPRIVATE_USEGENERICSTENCIL 0x0004
  13. #define MCDPRIVATE_EMULATEICD 0x0008
  14. #ifdef MCD95
  15. // Cross-process named mutex.
  16. #define MCDMUTEXNAME TEXT("MCDSRV32 Interprocess Synchronization Object")
  17. #endif
  18. // Internal command codes
  19. #define MCD_DESCRIBEPIXELFORMAT 0x10001
  20. #define MCD_DRIVERINFO 0x10002
  21. #define MCD_ALLOC 0x10003
  22. #define MCD_FREE 0x10004
  23. #define MCD_STATE 0x10005
  24. #define MCD_VIEWPORT 0x10006
  25. #define MCD_QUERYMEMSTATUS 0x10007
  26. #define MCD_READSPAN 0x10008
  27. #define MCD_WRITESPAN 0x10009
  28. #define MCD_CLEAR 0x1000a
  29. #define MCD_SWAP 0x1000b
  30. #define MCD_SCISSOR 0x1000c
  31. #define MCD_DELETERC 0x1000d
  32. #define MCD_GETBUFFERS 0x1000e
  33. #define MCD_ALLOCBUFFERS 0x1000f
  34. #define MCD_LOCK 0x10010
  35. #define MCD_UNLOCK 0x10011
  36. #define MCD_BINDCONTEXT 0x10012
  37. #define MCD_SYNC 0x10013
  38. #define MCD_CREATE_TEXTURE 0x10014
  39. #define MCD_DELETE_TEXTURE 0x10015
  40. #define MCD_UPDATE_SUB_TEXTURE 0x10016
  41. #define MCD_UPDATE_TEXTURE_PALETTE 0x10017
  42. #define MCD_UPDATE_TEXTURE_PRIORITY 0x10018
  43. #define MCD_UPDATE_TEXTURE_STATE 0x10019
  44. #define MCD_TEXTURE_STATUS 0x1001a
  45. #define MCD_GET_TEXTURE_KEY 0x1001b
  46. #define MCD_DESCRIBELAYERPLANE 0x1001c
  47. #define MCD_SETLAYERPALETTE 0x1001d
  48. #define MCD_DRAW_PIXELS 0x1001e
  49. #define MCD_READ_PIXELS 0x1001f
  50. #define MCD_COPY_PIXELS 0x10020
  51. #define MCD_PIXEL_MAP 0x10021
  52. #define MCD_DESTROY_WINDOW 0x10022
  53. #define MCD_GET_TEXTURE_FORMATS 0x10023
  54. #define MCD_SWAP_MULTIPLE 0x10024
  55. #define MCD_PROCESS 0x10025
  56. // Internal command structures for calling through client-server layer
  57. typedef struct _MCDCREATECONTEXT {
  58. // Must be first element for MCDESC compatibility.
  59. MCDESC_CREATE_CONTEXT escCreate;
  60. int ipfd;
  61. int iLayer;
  62. ULONG mcdFlags;
  63. MCDRCINFOPRIV *pRcInfo;
  64. } MCDCREATECONTEXT;
  65. typedef struct _MCDCMDI {
  66. ULONG command;
  67. } MCDCMDI;
  68. typedef struct _MCDDRIVERINFOCMDI {
  69. ULONG command;
  70. } MCDDRIVERINFOCMDI;
  71. typedef struct _MCDPIXELFORMATCMDI {
  72. ULONG command;
  73. LONG iPixelFormat;
  74. } MCDPIXELFORMATCMDI;
  75. typedef struct _MCDALLOCCMDI {
  76. ULONG command;
  77. ULONG sourceProcessID;
  78. ULONG numBytes;
  79. ULONG flags;
  80. } MCDALLOCCMDI;
  81. typedef struct _MCDFREECMDI {
  82. ULONG command;
  83. HANDLE hMCDMem;
  84. } MCDFREECMDI;
  85. typedef struct _MCDSTATECMDI {
  86. ULONG command;
  87. ULONG numStates;
  88. MCDSTATE *pNextState;
  89. MCDSTATE *pMaxState;
  90. } MCDSTATECMDI;
  91. typedef struct _MCDVIEWPORTCMDI {
  92. ULONG command;
  93. MCDVIEWPORT MCDViewport;
  94. } MCDVIEWPORTCMDI;
  95. typedef struct _MCDMEMSTATUSCMDI {
  96. ULONG command;
  97. MCDHANDLE hMCDMem;
  98. } MCDMEMSTATUSCMDI;
  99. typedef struct _MCDSPANCMDI {
  100. ULONG command;
  101. HANDLE hMem;
  102. MCDSPAN MCDSpan;
  103. } MCDSPANCMDI;
  104. typedef struct _MCDCLEARCMDI {
  105. ULONG command;
  106. ULONG buffers;
  107. } MCDCLEARCMDI;
  108. typedef struct _MCDSCISSORCMDI {
  109. ULONG command;
  110. RECTL rect;
  111. BOOL bEnabled;
  112. } MCDSCISSORCMDI;
  113. typedef struct _MCDSWAPCMDI {
  114. ULONG command;
  115. ULONG flags;
  116. } MCDSWAPCMDI;
  117. typedef struct _MCDDELETERCCMDI {
  118. ULONG command;
  119. } MCDDELETERCCMDI;
  120. typedef struct _MCDGETBUFFERSCMDI {
  121. ULONG command;
  122. BOOL getRect;
  123. } MCDGETBUFFERSCMDI;
  124. typedef struct _MCDALLOCBUFFERSCMDI {
  125. ULONG command;
  126. RECTL WndRect;
  127. } MCDALLOCBUFFERSCMDI;
  128. typedef struct _MCDLOCKCMDI {
  129. ULONG command;
  130. } MCDLOCKCMDI;
  131. typedef struct _MCDBINDCONTEXTCMDI {
  132. ULONG command;
  133. HWND hWnd;
  134. } MCDBINDCONTEXTCMDI;
  135. typedef struct _MCDSYNCCMDI {
  136. ULONG command;
  137. } MCDSYNCCMDI;
  138. typedef struct _MCDCREATETEXCMDI {
  139. ULONG command;
  140. MCDTEXTUREDATA *pTexData;
  141. ULONG flags;
  142. VOID *pSurface;
  143. } MCDCREATETEXCMDI;
  144. typedef struct _MCDDELETETEXCMDI {
  145. ULONG command;
  146. MCDHANDLE hTex;
  147. } MCDDELETETEXCMDI;
  148. typedef struct _MCDUPDATESUBTEXCMDI {
  149. ULONG command;
  150. MCDHANDLE hTex;
  151. MCDTEXTUREDATA *pTexData;
  152. ULONG lod;
  153. RECTL rect;
  154. } MCDUPDATESUBTEXCMDI;
  155. typedef struct _MCDUPDATETEXPALETTECMDI {
  156. ULONG command;
  157. MCDHANDLE hTex;
  158. MCDTEXTUREDATA *pTexData;
  159. ULONG start;
  160. ULONG numEntries;
  161. } MCDUPDATETEXPALETTECMDI;
  162. typedef struct _MCDUPDATETEXPRIORITYCMDI {
  163. ULONG command;
  164. MCDHANDLE hTex;
  165. MCDTEXTUREDATA *pTexData;
  166. } MCDUPDATETEXPRIORITYCMDI;
  167. typedef struct _MCDUPDATETEXSTATECMDI {
  168. ULONG command;
  169. MCDHANDLE hTex;
  170. MCDTEXTUREDATA *pTexData;
  171. } MCDUPDATETEXSTATECMDI;
  172. typedef struct _MCDTEXSTATUSCMDI {
  173. ULONG command;
  174. MCDHANDLE hTex;
  175. } MCDTEXSTATUSCMDI;
  176. typedef struct _MCDTEXKEYCMDI {
  177. ULONG command;
  178. MCDHANDLE hTex;
  179. } MCDTEXKEYCMDI;
  180. typedef struct _MCDLAYERPLANECMDI {
  181. ULONG command;
  182. LONG iPixelFormat;
  183. LONG iLayerPlane;
  184. } MCDLAYERPLANECMDI;
  185. typedef struct _MCDSETLAYERPALCMDI {
  186. ULONG command;
  187. LONG iLayerPlane;
  188. BOOL bRealize;
  189. LONG cEntries;
  190. COLORREF acr[1];
  191. } MCDSETLAYERPALCMDI;
  192. typedef struct _MCDDRAWPIXELSCMDI {
  193. ULONG command;
  194. ULONG width;
  195. ULONG height;
  196. ULONG format;
  197. ULONG type;
  198. BOOL packed;
  199. VOID *pPixels;
  200. } MCDDRAWPIXELSCMDI;
  201. typedef struct _MCDREADPIXELSCMDI {
  202. ULONG command;
  203. LONG x;
  204. LONG y;
  205. ULONG width;
  206. ULONG height;
  207. ULONG format;
  208. ULONG type;
  209. VOID *pPixels;
  210. } MCDREADPIXELSCMDI;
  211. typedef struct _MCDCOPYPIXELSCMDI {
  212. ULONG command;
  213. LONG x;
  214. LONG y;
  215. ULONG width;
  216. ULONG height;
  217. ULONG format;
  218. ULONG type;
  219. } MCDCOPYPIXELSCMDI;
  220. typedef struct _MCDPIXELMAPCMDI {
  221. ULONG command;
  222. ULONG mapType;
  223. ULONG mapSize;
  224. VOID *pMap;
  225. } MCDPIXELMAPCMDI;
  226. typedef struct _MCDDESTROYWINDOWCMDI {
  227. ULONG command;
  228. } MCDDESTROYWINDOWCMDI;
  229. typedef struct _MCDGETTEXTUREFORMATSCMDI {
  230. ULONG command;
  231. int nFmts;
  232. } MCDGETTEXTUREFORMATSCMDI;
  233. typedef struct _MCDSWAPMULTIPLECMDI {
  234. ULONG command;
  235. UINT cBuffers;
  236. UINT auiFlags[MCDESC_MAX_EXTRA_WNDOBJ];
  237. ULONG_PTR adwMcdWindow[MCDESC_MAX_EXTRA_WNDOBJ];
  238. } MCDSWAPMULTIPLECMDI;
  239. typedef struct _MCDPROCESSCMDI {
  240. ULONG command;
  241. HANDLE hMCDPrimMem;
  242. MCDCOMMAND *pMCDFirstCmd;
  243. ULONG cmdFlagsAll;
  244. ULONG primFlags;
  245. MCDTRANSFORM *pMCDTransform;
  246. MCDMATERIALCHANGES *pMCDMatChanges;
  247. } MCDPROCESSCMDI;
  248. // Internal client-side memory structure
  249. typedef struct _MCDMEMHDRI {
  250. ULONG flags;
  251. ULONG numBytes;
  252. VOID *maxMem;
  253. HANDLE hMCDMem;
  254. UCHAR *pMaxMem;
  255. UCHAR *pBase;
  256. MCDCONTEXT *pMCDContext;
  257. } MCDMEMHDRI;