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.

78 lines
3.2 KiB

  1. /*******************************************************************************
  2. * font.h
  3. *
  4. * Structures for client side caching of char widths.
  5. *
  6. * Copyright (c) 1994-1999 Microsoft Corporation
  7. *
  8. *******************************************************************************/
  9. /**************************************************************************\
  10. *
  11. * CFONT's are a client side cache of font metric information. This includes
  12. * character widths for the first 256 glyphs as well as textmetric's and
  13. * average character width used by USER's GetCharDimensions. There are two
  14. * flavors of this cache, public and private.
  15. *
  16. * private:
  17. * for private fonts, the pUser field in the handle table points to a
  18. * LOCALFONT. The LOCALFONT has a chain of CFONT's hanging off it for
  19. * accumulating information per transform.
  20. *
  21. * public:
  22. * For public fonts which include both stock fonts and fonts USER makes
  23. * public, the CFONT structures live in a shared memory area in the
  24. * GDI_SHARED_MEMORY structure which is mapped into all processes with
  25. * the handle manager table. For these fonts, we only cache data for
  26. * the primary display and a 1-to-1 mapping (MM_TEXT). This way, there
  27. * is only CFONT per public font.
  28. *
  29. \**************************************************************************/
  30. // Flags for LOCALFONT.fl:
  31. #define LF_HARDWAY 0x0001 // Font not worth mapping client side.
  32. typedef struct _LOCALFONT
  33. {
  34. FLONG fl;
  35. CFONT *pcf;
  36. } LOCALFONT;
  37. LOCALFONT *plfCreateLOCALFONT(FLONG fl);
  38. VOID vDeleteLOCALFONT(LOCALFONT *plf);
  39. CFONT *pcfLocateCFONT(HDC hdc,PDC_ATTR pDcAttr,UINT iFirst,PVOID pch,UINT c,BOOL bType);
  40. BOOL bGetTextExtentA(HDC hdc,LPCSTR psz,int c,LPSIZE psizl,UINT fl);
  41. BOOL bGetTextExtentW(HDC hdc,LPCWSTR pwsz,int cwc,LPSIZE psizl,UINT fl);
  42. BOOL bComputeTextExtent(PDC_ATTR pDcAttr,CFONT *pcf,PVOID psz,int cc,UINT fl,SIZE *psizl, BOOL bType);
  43. BOOL bComputeCharWidths(CFONT *pcf,UINT iFirst, UINT iLast,ULONG fl,PVOID pv);
  44. BOOL bGetTextMetricsWInternal(HDC hdc,TMW_INTERNAL * ptmw,int cjTM,CFONT *pcf);
  45. VOID FASTCALL vTextMetricWToTextMetric(LPTEXTMETRICA,TMW_INTERNAL *);
  46. VOID FASTCALL vTextMetricWToTextMetricStrict(LPTEXTMETRICA,LPTEXTMETRICW);
  47. VOID vConvertEnumLogFontExDvAtoW(ENUMLOGFONTEXDVW *pelfw, ENUMLOGFONTEXDVA *pelfa);
  48. VOID vConvertLogFontW(ENUMLOGFONTEXDVW *pelfw, LOGFONTW *plfw);
  49. VOID vConvertLogFont(ENUMLOGFONTEXDVW *pelfw, LOGFONTA *plf);
  50. BOOL bConvertEnumLogFontExWToEnumLogFontExA(ENUMLOGFONTEXA *,ENUMLOGFONTEXW *);
  51. BOOL bConvertLogFontWToLogFontA(LOGFONTA *, LOGFONTW *);
  52. typedef struct _CLIENT_SIDE_FILEVIEW // fvw
  53. {
  54. HANDLE hf; // file handle
  55. HANDLE hSection; // section handle
  56. PVOID pvView; // pointer to the view of the memory mapped file
  57. ULONG cjView; // size, really end of the file information
  58. } CLIENT_SIDE_FILEVIEW, *PCLIENT_SIDE_FILEVIEW;
  59. BOOL bMapFileUNICODEClideSide(PWSTR pwszFileName, CLIENT_SIDE_FILEVIEW *pfvw, BOOL bNtPath);
  60. VOID vUnmapFileClideSide(PCLIENT_SIDE_FILEVIEW pfvw);
  61. #define WVT_PERF_EVAL
  62. VOID vGetWvtPerf(VOID);