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.

96 lines
2.7 KiB

  1. /******************************Module*Header*******************************\
  2. *
  3. * Module Name: font.h
  4. *
  5. * Author: Frido Garritsen
  6. *
  7. * Purpose: Define the font cache structures.
  8. *
  9. * Copyright (c) 1996 Cirrus Logic, Inc.
  10. *
  11. * $Log: X:/log/laguna/nt35/displays/cl546x/FONT.H $
  12. *
  13. * Rev 1.5 20 Aug 1996 11:04:56 noelv
  14. * Bugfix release from Frido 8-19-96
  15. *
  16. * Rev 1.0 14 Aug 1996 17:16:36 frido
  17. * Initial revision.
  18. *
  19. * Rev 1.4 25 Jul 1996 15:53:12 bennyn
  20. *
  21. * Modified for DirectDraw support
  22. *
  23. * Rev 1.3 05 Mar 1996 11:59:46 noelv
  24. * Frido version 19
  25. *
  26. * Rev 1.3 28 Feb 1996 22:39:06 frido
  27. * Removed bug in naming ulFontCountl.
  28. *
  29. * Rev 1.2 03 Feb 1996 12:22:20 frido
  30. * Added text clipping.
  31. *
  32. * Rev 1.1 25 Jan 1996 12:49:38 frido
  33. * Added font cache ID counter to FONTCACHE structure.
  34. *
  35. * Rev 1.0 23 Jan 1996 15:14:52 frido
  36. * Initial release.
  37. *
  38. \**************************************************************************/
  39. #define BYTES_PER_TILE 128 // Number of bytes per tile line.
  40. #define LINES_PER_TILE 16 // Number of lines per tile.
  41. #define CACHE_EXPAND_XPAR 0x105501F0 // DRAWBLTDEF register value.
  42. // support routines
  43. extern BYTE Swiz[];
  44. void AddToFontCacheChain(PDEV* ppdev,
  45. FONTOBJ* pfo,
  46. PFONTCACHE pfc);
  47. VOID AllocGlyph(
  48. PFONTCACHE pfc, // Pointer to font cache.
  49. GLYPHBITS* pgb, // Pointer to glyph to cache.
  50. PGLYPHCACHE pgc // Pointer to glyph cache structure.
  51. );
  52. long GetGlyphSize(
  53. GLYPHBITS* pgb, // Pointer to glyph.
  54. POINTL* pptlOrigin, // Pointer to return origin in.
  55. DWORD* pcSize // Pointer to return size of glyph in.
  56. );
  57. BOOL AllocFontCache(
  58. PFONTCACHE pfc, // Pointer to font cache.
  59. long cWidth, // Width (in bytes) to allocate.
  60. long cHeight, // Height to allocate.
  61. POINTL* ppnt // Point to return cooridinate in.
  62. );
  63. VOID FontCache(
  64. PFONTCACHE pfc, // Pointer to font cache.
  65. STROBJ* pstro // Pointer to glyphs.
  66. );
  67. VOID ClipCache(
  68. PFONTCACHE pfc, // Pointer to font cache.
  69. STROBJ* pstro, // Pointer to glyphs.
  70. RECTL rclBounds // Clipping rectangle.
  71. );
  72. VOID DrawGlyph(
  73. PDEV* ppdev, // Pointer to physical device.
  74. GLYPHBITS* pgb, // Pointer to glyph to draw.
  75. POINTL ptl // Location of glyph.
  76. );
  77. VOID ClipGlyph(
  78. PDEV* ppdev, // Pointer to physical device.
  79. GLYPHBITS* pgb, // Pointer to glyph to draw.
  80. POINTL ptl, // Location of glyph.
  81. RECTL rclBounds // Clipping rectangle.
  82. );
  83. #define PACK_XY(x, y) ((WORD)(x) | ((DWORD)(y) << 16))
  84.