2006-03-20 12:48:13 +01:00
|
|
|
/***************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* ftcsbits.h */
|
|
|
|
/* */
|
|
|
|
/* A small-bitmap cache (specification). */
|
|
|
|
/* */
|
2006-03-20 17:55:32 +01:00
|
|
|
/* Copyright 2000-2001, 2002, 2003, 2006 by */
|
2006-03-20 12:48:13 +01:00
|
|
|
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
|
|
|
/* */
|
|
|
|
/* This file is part of the FreeType project, and may only be used, */
|
|
|
|
/* modified, and distributed under the terms of the FreeType project */
|
|
|
|
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
|
|
|
|
/* this file you indicate that you have read the license and */
|
|
|
|
/* understand and accept it fully. */
|
|
|
|
/* */
|
|
|
|
/***************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef __FTCSBITS_H__
|
|
|
|
#define __FTCSBITS_H__
|
|
|
|
|
|
|
|
|
|
|
|
#include <ft2build.h>
|
|
|
|
#include FT_CACHE_H
|
* include/freetype/cache/ftccache.h,
include/freetype/cache/ftccmap.h,
include/freetype/cache/ftcglyph.h
include/freetype/cache/ftcimage.h
include/freetype/cache/ftcmanag.h
include/freetype/cache/ftcmru.h
include/freetype/cache/ftcsbits.h:
removing these header files from the public include directory.
* include/freetype/config/ftheader.h:
changing the definition of FT_CACHE_INTERNAL_XXX_H macros to
redirect to FT_CACHE_H instead
* src/cache/ftcbasic.c, src/cache/ftccache.c, src/cache/ftccache.h,
src/cache/ftccback.h, src/cache/ftccmap.c, src/cache/ftcglyph.c,
src/cache/ftcglyph.h, src/cache/ftcimage.c, src/cache/ftcimage.h,
src/cache/ftcmanag.c, src/cache/ftcmanag.h, src/cache/ftcmru.c,
src/cache/ftcmru.h, src/cache/ftcsbits.c, src/cache/ftcsbits.h:
modifications to prevent using the FT_CACHE_INTERNAL_XXX_H macros,
and grab the headers in 'src/cache' instead (see below).
2006-03-20 13:10:24 +01:00
|
|
|
#include "ftcglyph.h"
|
2006-03-20 12:48:13 +01:00
|
|
|
|
|
|
|
|
|
|
|
FT_BEGIN_HEADER
|
|
|
|
|
|
|
|
#define FTC_SBIT_ITEMS_PER_NODE 16
|
|
|
|
|
|
|
|
typedef struct FTC_SNodeRec_
|
|
|
|
{
|
|
|
|
FTC_GNodeRec gnode;
|
|
|
|
FT_UInt count;
|
|
|
|
FTC_SBitRec sbits[FTC_SBIT_ITEMS_PER_NODE];
|
|
|
|
|
|
|
|
} FTC_SNodeRec, *FTC_SNode;
|
|
|
|
|
|
|
|
|
|
|
|
#define FTC_SNODE( x ) ( (FTC_SNode)( x ) )
|
|
|
|
#define FTC_SNODE_GINDEX( x ) FTC_GNODE( x )->gindex
|
|
|
|
#define FTC_SNODE_FAMILY( x ) FTC_GNODE( x )->family
|
|
|
|
|
|
|
|
typedef FT_UInt
|
|
|
|
(*FTC_SFamily_GetCountFunc)( FTC_Family family,
|
|
|
|
FTC_Manager manager );
|
|
|
|
|
|
|
|
typedef FT_Error
|
|
|
|
(*FTC_SFamily_LoadGlyphFunc)( FTC_Family family,
|
|
|
|
FT_UInt gindex,
|
|
|
|
FTC_Manager manager,
|
|
|
|
FT_Face *aface );
|
|
|
|
|
|
|
|
typedef struct FTC_SFamilyClassRec_
|
|
|
|
{
|
|
|
|
FTC_MruListClassRec clazz;
|
|
|
|
FTC_SFamily_GetCountFunc family_get_count;
|
|
|
|
FTC_SFamily_LoadGlyphFunc family_load_glyph;
|
|
|
|
|
|
|
|
} FTC_SFamilyClassRec;
|
|
|
|
|
|
|
|
typedef const FTC_SFamilyClassRec* FTC_SFamilyClass;
|
|
|
|
|
|
|
|
#define FTC_SFAMILY_CLASS( x ) ((FTC_SFamilyClass)(x))
|
|
|
|
|
|
|
|
#define FTC_CACHE__SFAMILY_CLASS( x ) \
|
|
|
|
FTC_SFAMILY_CLASS( FTC_CACHE__GCACHE_CLASS( x )->family_class )
|
|
|
|
|
|
|
|
|
* src/cache/ftccache.c, (ftc_node_mru_up, FTC_Cache_Lookup)
[!FTC_INLINE]: Compile conditionally.
* src/cache/ftccache.h: Updated.
* src/cache/ftcglyph.c (FTC_GNode_Init, FTC_GNode_UnselectFamily,
FTC_GNode_Done, FTC_GNode_Compare, FTC_Family_Init, FTC_GCache_New):
s/FT_EXPORT/FT_LOCAL/.
(FTC_GCache_Init, FTC_GCache_Done): Commented out.
(FTC_GCache_Lookup) [!FTC_INLINE]: Compile conditionally.
s/FT_EXPORT/FT_LOCAL/.
* src/cache/ftcglyph.h: Updated.
* src/cache/ftcimage.c (FTC_INode_Free, FTC_INode_New):
s/FT_EXPORT/FT_LOCAL/.
(FTC_INode_Weight): Commented out.
* src/cache/ftcimage.h: Updated.
* src/cache/ftmanag.c (FTC_Manager_Compress,
FTC_Manager_RegisterCache, FTC_Manager_FlushN):
s/FT_EXPORT/FT_LOCAL/.
* src/cache/ftmanag.h: Updated.
* src/cache/ftcsbits.c (FTC_SNode_Free, FTC_SNode_New,
FTC_SNode_Compare): s/FT_EXPORT/FT_LOCAL/.
(FTC_SNode_Weight): Commented out.
* src/cache/ftcsbits.h: Updated.
2006-03-22 16:30:41 +01:00
|
|
|
FT_LOCAL( void )
|
2006-03-20 12:48:13 +01:00
|
|
|
FTC_SNode_Free( FTC_SNode snode,
|
|
|
|
FTC_Cache cache );
|
|
|
|
|
* src/cache/ftccache.c, (ftc_node_mru_up, FTC_Cache_Lookup)
[!FTC_INLINE]: Compile conditionally.
* src/cache/ftccache.h: Updated.
* src/cache/ftcglyph.c (FTC_GNode_Init, FTC_GNode_UnselectFamily,
FTC_GNode_Done, FTC_GNode_Compare, FTC_Family_Init, FTC_GCache_New):
s/FT_EXPORT/FT_LOCAL/.
(FTC_GCache_Init, FTC_GCache_Done): Commented out.
(FTC_GCache_Lookup) [!FTC_INLINE]: Compile conditionally.
s/FT_EXPORT/FT_LOCAL/.
* src/cache/ftcglyph.h: Updated.
* src/cache/ftcimage.c (FTC_INode_Free, FTC_INode_New):
s/FT_EXPORT/FT_LOCAL/.
(FTC_INode_Weight): Commented out.
* src/cache/ftcimage.h: Updated.
* src/cache/ftmanag.c (FTC_Manager_Compress,
FTC_Manager_RegisterCache, FTC_Manager_FlushN):
s/FT_EXPORT/FT_LOCAL/.
* src/cache/ftmanag.h: Updated.
* src/cache/ftcsbits.c (FTC_SNode_Free, FTC_SNode_New,
FTC_SNode_Compare): s/FT_EXPORT/FT_LOCAL/.
(FTC_SNode_Weight): Commented out.
* src/cache/ftcsbits.h: Updated.
2006-03-22 16:30:41 +01:00
|
|
|
FT_LOCAL( FT_Error )
|
2006-03-20 12:48:13 +01:00
|
|
|
FTC_SNode_New( FTC_SNode *psnode,
|
|
|
|
FTC_GQuery gquery,
|
|
|
|
FTC_Cache cache );
|
|
|
|
|
* src/cache/ftccache.c, (ftc_node_mru_up, FTC_Cache_Lookup)
[!FTC_INLINE]: Compile conditionally.
* src/cache/ftccache.h: Updated.
* src/cache/ftcglyph.c (FTC_GNode_Init, FTC_GNode_UnselectFamily,
FTC_GNode_Done, FTC_GNode_Compare, FTC_Family_Init, FTC_GCache_New):
s/FT_EXPORT/FT_LOCAL/.
(FTC_GCache_Init, FTC_GCache_Done): Commented out.
(FTC_GCache_Lookup) [!FTC_INLINE]: Compile conditionally.
s/FT_EXPORT/FT_LOCAL/.
* src/cache/ftcglyph.h: Updated.
* src/cache/ftcimage.c (FTC_INode_Free, FTC_INode_New):
s/FT_EXPORT/FT_LOCAL/.
(FTC_INode_Weight): Commented out.
* src/cache/ftcimage.h: Updated.
* src/cache/ftmanag.c (FTC_Manager_Compress,
FTC_Manager_RegisterCache, FTC_Manager_FlushN):
s/FT_EXPORT/FT_LOCAL/.
* src/cache/ftmanag.h: Updated.
* src/cache/ftcsbits.c (FTC_SNode_Free, FTC_SNode_New,
FTC_SNode_Compare): s/FT_EXPORT/FT_LOCAL/.
(FTC_SNode_Weight): Commented out.
* src/cache/ftcsbits.h: Updated.
2006-03-22 16:30:41 +01:00
|
|
|
#if 0
|
|
|
|
FT_LOCAL( FT_ULong )
|
2006-03-20 12:48:13 +01:00
|
|
|
FTC_SNode_Weight( FTC_SNode inode );
|
* src/cache/ftccache.c, (ftc_node_mru_up, FTC_Cache_Lookup)
[!FTC_INLINE]: Compile conditionally.
* src/cache/ftccache.h: Updated.
* src/cache/ftcglyph.c (FTC_GNode_Init, FTC_GNode_UnselectFamily,
FTC_GNode_Done, FTC_GNode_Compare, FTC_Family_Init, FTC_GCache_New):
s/FT_EXPORT/FT_LOCAL/.
(FTC_GCache_Init, FTC_GCache_Done): Commented out.
(FTC_GCache_Lookup) [!FTC_INLINE]: Compile conditionally.
s/FT_EXPORT/FT_LOCAL/.
* src/cache/ftcglyph.h: Updated.
* src/cache/ftcimage.c (FTC_INode_Free, FTC_INode_New):
s/FT_EXPORT/FT_LOCAL/.
(FTC_INode_Weight): Commented out.
* src/cache/ftcimage.h: Updated.
* src/cache/ftmanag.c (FTC_Manager_Compress,
FTC_Manager_RegisterCache, FTC_Manager_FlushN):
s/FT_EXPORT/FT_LOCAL/.
* src/cache/ftmanag.h: Updated.
* src/cache/ftcsbits.c (FTC_SNode_Free, FTC_SNode_New,
FTC_SNode_Compare): s/FT_EXPORT/FT_LOCAL/.
(FTC_SNode_Weight): Commented out.
* src/cache/ftcsbits.h: Updated.
2006-03-22 16:30:41 +01:00
|
|
|
#endif
|
2006-03-20 12:48:13 +01:00
|
|
|
|
|
|
|
|
2011-01-09 12:47:37 +01:00
|
|
|
#ifdef FTC_INLINE
|
|
|
|
|
* src/cache/ftccache.c, (ftc_node_mru_up, FTC_Cache_Lookup)
[!FTC_INLINE]: Compile conditionally.
* src/cache/ftccache.h: Updated.
* src/cache/ftcglyph.c (FTC_GNode_Init, FTC_GNode_UnselectFamily,
FTC_GNode_Done, FTC_GNode_Compare, FTC_Family_Init, FTC_GCache_New):
s/FT_EXPORT/FT_LOCAL/.
(FTC_GCache_Init, FTC_GCache_Done): Commented out.
(FTC_GCache_Lookup) [!FTC_INLINE]: Compile conditionally.
s/FT_EXPORT/FT_LOCAL/.
* src/cache/ftcglyph.h: Updated.
* src/cache/ftcimage.c (FTC_INode_Free, FTC_INode_New):
s/FT_EXPORT/FT_LOCAL/.
(FTC_INode_Weight): Commented out.
* src/cache/ftcimage.h: Updated.
* src/cache/ftmanag.c (FTC_Manager_Compress,
FTC_Manager_RegisterCache, FTC_Manager_FlushN):
s/FT_EXPORT/FT_LOCAL/.
* src/cache/ftmanag.h: Updated.
* src/cache/ftcsbits.c (FTC_SNode_Free, FTC_SNode_New,
FTC_SNode_Compare): s/FT_EXPORT/FT_LOCAL/.
(FTC_SNode_Weight): Commented out.
* src/cache/ftcsbits.h: Updated.
2006-03-22 16:30:41 +01:00
|
|
|
FT_LOCAL( FT_Bool )
|
2006-03-20 12:48:13 +01:00
|
|
|
FTC_SNode_Compare( FTC_SNode snode,
|
|
|
|
FTC_GQuery gquery,
|
|
|
|
FTC_Cache cache );
|
|
|
|
|
2011-01-09 12:47:37 +01:00
|
|
|
#endif
|
|
|
|
|
2006-03-20 12:48:13 +01:00
|
|
|
/* */
|
|
|
|
|
|
|
|
FT_END_HEADER
|
|
|
|
|
|
|
|
#endif /* __FTCSBITS_H__ */
|
|
|
|
|
|
|
|
|
|
|
|
/* END */
|