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.

416 lines
9.8 KiB

  1. /******************************Module*Header*******************************\
  2. * Module Name: server.h *
  3. * *
  4. * Server side stubs for GDI functions. *
  5. * *
  6. * Created: 14-Jan-1992 11:04:08 *
  7. * Author: Eric Kutter [erick] *
  8. * *
  9. * Copyright (c) 1990-1999 Microsoft Corporation *
  10. \**************************************************************************/
  11. int APIENTRY GreSetDIBitsToDeviceInternal(
  12. HDC hdcDest,
  13. int xDst,
  14. int yDst,
  15. DWORD cx,
  16. DWORD cy,
  17. int xSrc,
  18. int ySrc,
  19. DWORD iStartScan,
  20. DWORD cNumScan,
  21. LPBYTE pInitBits,
  22. LPBITMAPINFO pInfoHeader,
  23. DWORD iUsage,
  24. UINT cjMaxBits,
  25. UINT cjMaxInfo,
  26. BOOL bTransformoordinates,
  27. HANDLE hcmXform);
  28. BOOL
  29. GreTransparentDIBits(
  30. HDC hdcDst,
  31. LONG xDst,
  32. LONG yDst,
  33. LONG cxDst,
  34. LONG cyDst,
  35. LPBYTE pInitBits,
  36. LPBITMAPINFO pInfoHeader,
  37. UINT iUsage,
  38. LONG xSrc,
  39. LONG ySrc,
  40. LONG cxSrc,
  41. LONG cySrc,
  42. COLORREF TransColor,
  43. ULONG cjMaxInfo,
  44. ULONG cjMaxBits,
  45. HANDLE hcmXform
  46. );
  47. HBITMAP APIENTRY
  48. GreCreateDIBitmapComp(
  49. HDC hdc,
  50. INT cx,
  51. INT cy,
  52. DWORD fInit,
  53. LPBYTE pInitBits,
  54. LPBITMAPINFO pInitInfo,
  55. DWORD iUsage,
  56. UINT cjMaxInitInfo,
  57. UINT cjMaxBits,
  58. FLONG fl,
  59. HANDLE hcmXform);
  60. HBITMAP APIENTRY
  61. GreCreateDIBitmapReal(
  62. HDC hdc,
  63. DWORD fInit,
  64. LPBYTE pInitBits,
  65. LPBITMAPINFO pInitInfo,
  66. DWORD iUsage,
  67. UINT cjMaxInitInfo,
  68. UINT cjMaxBits,
  69. HANDLE hSection,
  70. DWORD dwOffset,
  71. HANDLE hSecure,
  72. FLONG fl,
  73. ULONG_PTR dwClientColorSpace, //dwClientColorSpace used to pass pointer
  74. PVOID *ppvBits);
  75. HBITMAP APIENTRY GreCreateDIBitmapInternal(
  76. HDC hdc,
  77. LPBITMAPINFOHEADER pInfoHeader,
  78. DWORD fInit,
  79. LPBYTE pInitBits,
  80. LPBITMAPINFO pInitInfo,
  81. DWORD iUsage,
  82. UINT cjMaxInfo,
  83. UINT cjMaxInitInfo,
  84. UINT cjMaxBits,
  85. FLONG fl);
  86. int APIENTRY GreSetDIBitsInternal(
  87. HDC hdc,
  88. HBITMAP hbm,
  89. UINT iStartScans,
  90. UINT cNumScans,
  91. LPBYTE pInitBits,
  92. LPBITMAPINFO pInitInfo,
  93. UINT iUsage,
  94. UINT cjMaxInfo,
  95. UINT cjMaxBits,
  96. HANDLE hcmXform);
  97. int APIENTRY GreStretchDIBitsInternal(
  98. HDC hdc,
  99. int xDest,
  100. int yDest,
  101. int cWidthDest,
  102. int cHeightDest,
  103. int xSrc,
  104. int ySrc,
  105. int cWidthSrc,
  106. int cHeightSrc,
  107. LPBYTE pjBits,
  108. LPBITMAPINFO lpBitsInfo,
  109. DWORD iUsage,
  110. DWORD Rop,
  111. UINT cjMaxInfo,
  112. UINT cjMaxBits,
  113. HANDLE hcmXform
  114. );
  115. BOOL APIENTRY GrePolyPolygonInternal(
  116. HDC hdc,
  117. LPPOINT pptl,
  118. LPINT pcptl,
  119. int ccptl,
  120. UINT cMaxPoints);
  121. typedef struct _POLYPATBLT POLYPATBLT,*PPOLYPATBLT;
  122. BOOL
  123. GrePolyPatBlt(
  124. HDC hdcDst,
  125. DWORD rop4,
  126. PPOLYPATBLT pPolyPat,
  127. DWORD Count,
  128. DWORD Mode
  129. );
  130. BOOL APIENTRY GrePolyPolylineInternal(
  131. HDC hdc,
  132. CONST POINT *pptl,
  133. PULONG pcptl,
  134. ULONG ccptl,
  135. UINT cMaxPoints);
  136. HRGN APIENTRY GreCreatePolyPolygonRgnInternal(
  137. CONST POINT *aptl,
  138. CONST INT *acptl,
  139. int cPoly,
  140. int iFill,
  141. UINT cMaxPoints);
  142. BOOL GetFontResourceInfoInternalW(
  143. LPWSTR lpPathname,
  144. ULONG cwc,
  145. ULONG cFiles,
  146. UINT cjIn,
  147. PSIZE_T lpBytes,
  148. LPVOID lpBuffer,
  149. DWORD iType);
  150. HBRUSH GreCreateDIBBrush(PVOID pv, FLONG fl, UINT cjMax, BOOL b8X8, BOOL bPen, PVOID pClient);
  151. HPALETTE APIENTRY GreCreatePaletteInternal(LPLOGPALETTE pLogPal, UINT cEntries);
  152. ULONG GreGetKerningPairs(HDC hdc, ULONG cPairs, KERNINGPAIR *pkpDst);
  153. BOOL GrePlayScript(
  154. PULONG pulScript,
  155. ULONG cjScript,
  156. PULONG pulEnv,
  157. ULONG cjEnv,
  158. PULONG pulOut,
  159. ULONG cjOut,
  160. ULONG cLimit);
  161. BOOL GreXformUpdate( HDC, FLONG, LONG, LONG, LONG, LONG, LONG, PVOID );
  162. BOOL GreArcInternal
  163. (
  164. ARCTYPE arctype,
  165. HDC hdc,
  166. int x1,
  167. int y1,
  168. int x2,
  169. int y2,
  170. int x3,
  171. int y3,
  172. int x4,
  173. int y4
  174. );
  175. LONG GreGetBitmapBits(HBITMAP hbm, ULONG cjTotal, PBYTE pjBuffer, PLONG pOffset);
  176. LONG GreSetBitmapBits(HBITMAP hbm, ULONG cjTotal, PBYTE pjBuffer, PLONG pOffset);
  177. BOOL GreGetRasterizerCaps(LPRASTERIZER_STATUS praststat);
  178. ULONG GreSetPolyFillMode(HDC hdc, int iPolyFillMode);
  179. ULONG GreSetROP2(HDC hdc,int iROP);
  180. HANDLE GreGetDCObject (HDC hdc, int itype);
  181. HBRUSH GreCreateSolidBrushInternal(COLORREF clrr,BOOL bPen,HBRUSH hbr);
  182. HBRUSH GreCreateHatchBrushInternal(ULONG iStyle, COLORREF clrr, BOOL bPen);
  183. HBRUSH GreCreatePatternBrushInternal(HBITMAP hbm,BOOL bPen,BOOL b8X8);
  184. ULONG GreGetOutlineTextMetricsInternalW(
  185. HDC hdc,
  186. ULONG cjotm,
  187. OUTLINETEXTMETRICW *potmw,
  188. TMDIFF *ptmd
  189. );
  190. BOOL APIENTRY GreDeleteObjectApp(HANDLE hobj);
  191. NTSTATUS GdiServerDllInitialization(PVOID psrv);
  192. BOOL bSyncBrushObj(
  193. HBRUSH hbr);
  194. typedef struct _WIDTHDATA WIDTHDATA;
  195. BOOL GreGetWidthTable
  196. (
  197. HDC hdc,
  198. ULONG cSpecial,
  199. WCHAR *pwc,
  200. ULONG cwc,
  201. USHORT *psWidth,
  202. WIDTHDATA *pwd,
  203. FLONG *pflInfo
  204. );
  205. HANDLE
  206. APIENTRY
  207. GreSelectObject(
  208. HDC hdc,
  209. HANDLE h
  210. );
  211. HDC hdcOpenDCW(
  212. PWSZ pwszDevice,
  213. DEVMODEW *pdriv,
  214. ULONG iType,
  215. HANDLE hspool,
  216. PREMOTETYPEONENODE prton,
  217. DRIVER_INFO_2W *pDriverInfo,
  218. PVOID pUMdhpdev
  219. );
  220. // WINBUG #83106 2-7-2000 bhouse Investigate moving prototypes to ntgdi.h
  221. // Old Comment:
  222. // - This prototype should go in ntgdi.h
  223. BOOL GreGetDCDword( HDC hdc, UINT u, DWORD *Result);
  224. BOOL GreGetAndSetDCDword( HDC hdc, UINT u, DWORD value, DWORD *result );
  225. BOOL APIENTRY GreGetDCPoint(HDC,UINT,PPOINTL);
  226. BOOL APIENTRY GreScaleViewportExtEx(HDC,int,int,int,int,LPSIZE);
  227. BOOL APIENTRY GreScaleWindowExtEx(HDC,int,int,int,int,LPSIZE);
  228. BOOL APIENTRY GreSetVirtualResolution(HDC,int,int,int,int);
  229. BOOL APIENTRY GreTransformPoints(HDC hdc,PPOINT pptIn,PPOINT pptOut,int c,int iMode);
  230. BOOL GreDeleteClientObj(HANDLE h);
  231. HANDLE GreFixUpHandle(HANDLE h);
  232. int GreAddFontResourceWInternal(LPWSTR pwszFileName, ULONG cwc, ULONG cFiles, FLONG fl, DWORD dwPidTid, DESIGNVECTOR *pdv, ULONG cjDV);
  233. HANDLE GreAddFontMemResourceEx(PVOID pvBuffer, DWORD cjBuffer, DESIGNVECTOR *pdv, DWORD cjDV, DWORD *pNumFonts);
  234. BOOL GreRemoveFontResourceW(LPWSTR pwszPath, ULONG cwc, ULONG cFiles, FLONG fl, DWORD dwPidTid, DESIGNVECTOR *pdv, ULONG cjDV);
  235. BOOL GreRemoveFontMemResourceEx(HANDLE hMMFont);
  236. LONG cCapString(WCHAR *pwcDst, const WCHAR *pwcSrc,INT cMax);
  237. BOOL bGetPathName (
  238. PWCHAR awcPathName,
  239. LPWSTR pwszFileName
  240. );
  241. HDC
  242. GreGetDCforBitmap(
  243. HBITMAP hsurf
  244. );
  245. BOOL
  246. GreDoBanding( HDC hdc,BOOL bStart,POINTL *pptl );
  247. BOOL
  248. GreGetUFI( HDC hdc,
  249. PUNIVERSAL_FONT_ID pufi,
  250. DESIGNVECTOR *pdv,
  251. ULONG *pcjDV,
  252. ULONG *pulCheckSumDV,
  253. FLONG *pfl,
  254. VOID **pfontID);
  255. BOOL
  256. GreForceUFIMapping(HDC hdc, PUNIVERSAL_FONT_ID pufi);
  257. BOOL
  258. GreGetUFIPathname(
  259. PUNIVERSAL_FONT_ID pufi,
  260. ULONG* pcwc,
  261. LPWSTR pwszPathname,
  262. ULONG* pcNumFiles,
  263. FLONG fl,
  264. BOOL* pbMemFont,
  265. ULONG* pcjView,
  266. PVOID pvView,
  267. BOOL* pbTTC,
  268. ULONG* iTTC
  269. );
  270. ULONG APIENTRY GreGetEmbedFonts();
  271. BOOL APIENTRY GreChangeGhostFont(VOID *fontID, BOOL bLoad);
  272. DWORD APIENTRY GreGetCharacterPlacementW(HDC, LPWSTR, DWORD, DWORD, LPGCP_RESULTSW, DWORD);
  273. ULONG GreGetGlyphOutlineInternal (
  274. HDC hdc,
  275. WCHAR wch,
  276. UINT ulFormat,
  277. LPGLYPHMETRICS lpgm,
  278. ULONG cjBuffer,
  279. PVOID pvBuffer,
  280. LPMAT2 lpmat2,
  281. BOOL bIgnoreRotation
  282. );
  283. BOOL GreResetDCInternal( HDC, DEVMODEW*, BOOL*, DRIVER_INFO_2W *, VOID * );
  284. // It actually returns a handle
  285. ULONG_PTR GreEnumFontOpen (
  286. HDC hdc,
  287. ULONG iEnumType,
  288. FLONG flWin31Compat,
  289. ULONG cwchMax,
  290. PWSZ pwszName,
  291. ULONG lfCharSet,
  292. ULONG *pulCount
  293. );
  294. BOOL
  295. GreSetupDCAttributes(
  296. HDC hdc
  297. );
  298. BOOL
  299. GreFreeDCAttributes(
  300. HDC hdc
  301. );
  302. INT
  303. GreQueryFonts(
  304. PUNIVERSAL_FONT_ID pufiFontList,
  305. ULONG nBufferSize,
  306. PLARGE_INTEGER pTimeStamp
  307. );
  308. LPBITMAPINFO
  309. pbmiConvertInfo(
  310. CONST BITMAPINFO *pbmi,
  311. ULONG iUsage);
  312. BOOL bSetupBrushAttr (HBRUSH hbrush);
  313. ULONG GreMakeFontDir(
  314. FLONG flEmbed, // mark file as "hidden"
  315. PBYTE pjFontDir, // pointer to structure to fill
  316. PWSZ pwszPathname // path of font file to use
  317. );
  318. DWORD GreGetGlyphIndicesW (
  319. HDC hdc,
  320. WCHAR *pwc,
  321. DWORD cwc,
  322. USHORT *pgi,
  323. DWORD iMode,
  324. BOOL bSubset
  325. );
  326. DWORD GreGetFontUnicodeRanges(HDC, LPGLYPHSET);
  327. #ifdef LANGPACK
  328. BOOL GreGetRealizationInfo(HDC, PREALIZATION_INFO);
  329. #endif
  330. #define STRETCHBLT_ENABLE_ICM 0x0001
  331. BOOL GreStretchBltInternal(
  332. HDC hdcTrg,
  333. int x,
  334. int y,
  335. int cx,
  336. int cy,
  337. HDC hdcSrc,
  338. int xSrc,
  339. int ySrc,
  340. int cxSrc,
  341. int cySrc,
  342. DWORD rop4,
  343. DWORD crBackColor,
  344. FLONG ulFlags
  345. );