/modules/freetype2/src/cache/ftcsbits.h

http://github.com/zpao/v8monkey · C Header · 98 lines · 51 code · 29 blank · 18 comment · 0 complexity · 7cdc97061968172240e5de5df2328570 MD5 · raw file

  1. /***************************************************************************/
  2. /* */
  3. /* ftcsbits.h */
  4. /* */
  5. /* A small-bitmap cache (specification). */
  6. /* */
  7. /* Copyright 2000-2001, 2002, 2003, 2006 by */
  8. /* David Turner, Robert Wilhelm, and Werner Lemberg. */
  9. /* */
  10. /* This file is part of the FreeType project, and may only be used, */
  11. /* modified, and distributed under the terms of the FreeType project */
  12. /* license, LICENSE.TXT. By continuing to use, modify, or distribute */
  13. /* this file you indicate that you have read the license and */
  14. /* understand and accept it fully. */
  15. /* */
  16. /***************************************************************************/
  17. #ifndef __FTCSBITS_H__
  18. #define __FTCSBITS_H__
  19. #include <ft2build.h>
  20. #include FT_CACHE_H
  21. #include "ftcglyph.h"
  22. FT_BEGIN_HEADER
  23. #define FTC_SBIT_ITEMS_PER_NODE 16
  24. typedef struct FTC_SNodeRec_
  25. {
  26. FTC_GNodeRec gnode;
  27. FT_UInt count;
  28. FTC_SBitRec sbits[FTC_SBIT_ITEMS_PER_NODE];
  29. } FTC_SNodeRec, *FTC_SNode;
  30. #define FTC_SNODE( x ) ( (FTC_SNode)( x ) )
  31. #define FTC_SNODE_GINDEX( x ) FTC_GNODE( x )->gindex
  32. #define FTC_SNODE_FAMILY( x ) FTC_GNODE( x )->family
  33. typedef FT_UInt
  34. (*FTC_SFamily_GetCountFunc)( FTC_Family family,
  35. FTC_Manager manager );
  36. typedef FT_Error
  37. (*FTC_SFamily_LoadGlyphFunc)( FTC_Family family,
  38. FT_UInt gindex,
  39. FTC_Manager manager,
  40. FT_Face *aface );
  41. typedef struct FTC_SFamilyClassRec_
  42. {
  43. FTC_MruListClassRec clazz;
  44. FTC_SFamily_GetCountFunc family_get_count;
  45. FTC_SFamily_LoadGlyphFunc family_load_glyph;
  46. } FTC_SFamilyClassRec;
  47. typedef const FTC_SFamilyClassRec* FTC_SFamilyClass;
  48. #define FTC_SFAMILY_CLASS( x ) ((FTC_SFamilyClass)(x))
  49. #define FTC_CACHE__SFAMILY_CLASS( x ) \
  50. FTC_SFAMILY_CLASS( FTC_CACHE__GCACHE_CLASS( x )->family_class )
  51. FT_LOCAL( void )
  52. FTC_SNode_Free( FTC_SNode snode,
  53. FTC_Cache cache );
  54. FT_LOCAL( FT_Error )
  55. FTC_SNode_New( FTC_SNode *psnode,
  56. FTC_GQuery gquery,
  57. FTC_Cache cache );
  58. #if 0
  59. FT_LOCAL( FT_ULong )
  60. FTC_SNode_Weight( FTC_SNode inode );
  61. #endif
  62. FT_LOCAL( FT_Bool )
  63. FTC_SNode_Compare( FTC_SNode snode,
  64. FTC_GQuery gquery,
  65. FTC_Cache cache );
  66. /* */
  67. FT_END_HEADER
  68. #endif /* __FTCSBITS_H__ */
  69. /* END */