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.

89 lines
1.6 KiB

  1. /*++
  2. Copyright (c) 2000 Microsoft Corporation
  3. Module Name:
  4. glfcach.h
  5. Abstract:
  6. PCL XL glyph cache
  7. Environment:
  8. Windows Whistler
  9. Revision History:
  10. 11/09/00
  11. Created it.
  12. --*/
  13. #ifndef _GLFCACH_H_
  14. #define _GLFCACH_H_
  15. typedef struct _GLYPHID
  16. {
  17. ULONG ulGlyphID;
  18. struct _GLYPHID *pPrevGID;
  19. struct _GLYPHID *pNextGID;
  20. } GLYPHID, *PGLYPHID;
  21. typedef struct _GLYPHTABLE
  22. {
  23. WORD wGlyphNum;
  24. WORD wFontID;
  25. DWORD dwAvailableEntries;
  26. struct _GLYPHID *pFirstGID;
  27. struct _GLYPHID *pGlyphID;
  28. } GLYPHTABLE, *PGLYPHTABLE;
  29. class XLGlyphCache
  30. #if DBG
  31. : public XLDebug
  32. #endif
  33. {
  34. SIGNATURE( 'glyf' )
  35. public:
  36. //
  37. // Constructure/Destructure
  38. //
  39. XLGlyphCache::
  40. XLGlyphCache( VOID );
  41. XLGlyphCache::
  42. ~XLGlyphCache( VOID );
  43. //
  44. // Functions
  45. //
  46. HRESULT XLGlyphCache::XLCreateFont(ULONG ulFontID);
  47. HRESULT XLGlyphCache::AddGlyphID(ULONG ulFontID, ULONG ulGlyphID);
  48. ULONG XLGlyphCache::UlSearchFontID( ULONG ulFontID);
  49. #if DBG
  50. VOID
  51. SetDbgLevel(DWORD dwLevel);
  52. #endif
  53. private:
  54. #define INIT_ARRAY 8
  55. #define ADD_ARRAY 8
  56. #define INIT_GLYPH_ARRAY 16
  57. #define ADD_GLYPH_ARRAY 16
  58. ULONG m_ulNumberOfFonts;
  59. ULONG m_ulNumberOfArray;
  60. PULONG m_paulFontID;
  61. PGLYPHTABLE *m_ppGlyphTable;
  62. VOID FreeAll(VOID);
  63. HRESULT IncreaseArray(VOID);
  64. PGLYPHID PSearchGlyph( WORD wSearchRange, BOOL bForward, PGLYPHID pGlyphID);
  65. HRESULT IncreaseGlyphArray(ULONG ulFontID);
  66. };
  67. #endif // _GLFCACH_H_