| ftcache.h | ftcache.h | |||
|---|---|---|---|---|
| /************************************************************************** */ | /************************************************************************** */ | |||
| /* */ | /* */ | |||
| /* ftcache.h */ | /* ftcache.h */ | |||
| /* */ | /* */ | |||
| /* FreeType Cache subsystem (specification). */ | /* FreeType Cache subsystem (specification). */ | |||
| /* */ | /* */ | |||
| /* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 by */ | /* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010 by */ | |||
| /* David Turner, Robert Wilhelm, and Werner Lemberg. */ | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ | |||
| /* */ | /* */ | |||
| /* This file is part of the FreeType project, and may only be used, */ | /* This file is part of the FreeType project, and may only be used, */ | |||
| /* modified, and distributed under the terms of the FreeType project */ | /* modified, and distributed under the terms of the FreeType project */ | |||
| /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ | |||
| /* this file you indicate that you have read the license and */ | /* this file you indicate that you have read the license and */ | |||
| /* understand and accept it fully. */ | /* understand and accept it fully. */ | |||
| /* */ | /* */ | |||
| /************************************************************************** */ | /************************************************************************** */ | |||
| skipping to change at line 55 | skipping to change at line 55 | |||
| * The cache is highly portable and thus doesn't know anything about th e | * The cache is highly portable and thus doesn't know anything about th e | |||
| * fonts installed on your system, or how to access them. This implies | * fonts installed on your system, or how to access them. This implies | |||
| * the following scheme: | * the following scheme: | |||
| * | * | |||
| * First, available or installed font faces are uniquely identified by | * First, available or installed font faces are uniquely identified by | |||
| * @FTC_FaceID values, provided to the cache by the client. Note that | * @FTC_FaceID values, provided to the cache by the client. Note that | |||
| * the cache only stores and compares these values, and doesn't try to | * the cache only stores and compares these values, and doesn't try to | |||
| * interpret them in any way. | * interpret them in any way. | |||
| * | * | |||
| * Second, the cache calls, only when needed, a client-provided functio n | * Second, the cache calls, only when needed, a client-provided functio n | |||
| * to convert a @FTC_FaceID into a new @FT_Face object. The latter is | * to convert an @FTC_FaceID into a new @FT_Face object. The latter is | |||
| * then completely managed by the cache, including its termination | * then completely managed by the cache, including its termination | |||
| * through @FT_Done_Face. | * through @FT_Done_Face. To monitor termination of face objects, the | |||
| * finalizer callback in the `generic' field of the @FT_Face object can | ||||
| * be used, which might also be used to store the @FTC_FaceID of the | ||||
| * face. | ||||
| * | * | |||
| * Clients are free to map face IDs to anything else. The most simple | * Clients are free to map face IDs to anything else. The most simple | |||
| * usage is to associate them to a (pathname,face_index) pair that is | * usage is to associate them to a (pathname,face_index) pair that is | |||
| * used to call @FT_New_Face. However, more complex schemes are also | * used to call @FT_New_Face. However, more complex schemes are also | |||
| * possible. | * possible. | |||
| * | * | |||
| * Note that for the cache to work correctly, the face ID values must b e | * Note that for the cache to work correctly, the face ID values must b e | |||
| * *persistent*, which means that the contents they point to should not | * *persistent*, which means that the contents they point to should not | |||
| * change at runtime, or that their value should not become invalid. | * change at runtime, or that their value should not become invalid. | |||
| * | * | |||
| skipping to change at line 207 | skipping to change at line 210 | |||
| * transformation through @FT_Set_Transform! | * transformation through @FT_Set_Transform! | |||
| */ | */ | |||
| typedef FT_Error | typedef FT_Error | |||
| (*FTC_Face_Requester)( FTC_FaceID face_id, | (*FTC_Face_Requester)( FTC_FaceID face_id, | |||
| FT_Library library, | FT_Library library, | |||
| FT_Pointer request_data, | FT_Pointer request_data, | |||
| FT_Face* aface ); | FT_Face* aface ); | |||
| /* */ | /* */ | |||
| #ifdef FT_CONFIG_OPTION_OLD_INTERNALS | ||||
| /* these macros are incompatible with LLP64, should not be used */ | ||||
| #define FT_POINTER_TO_ULONG( p ) ( (FT_ULong)(FT_Pointer)(p) ) | #define FT_POINTER_TO_ULONG( p ) ( (FT_ULong)(FT_Pointer)(p) ) | |||
| #define FTC_FACE_ID_HASH( i ) \ | #define FTC_FACE_ID_HASH( i ) \ | |||
| ((FT_UInt32)(( FT_POINTER_TO_ULONG( i ) >> 3 ) ^ \ | ((FT_UInt32)(( FT_POINTER_TO_ULONG( i ) >> 3 ) ^ \ | |||
| ( FT_POINTER_TO_ULONG( i ) << 7 ) ) ) | ( FT_POINTER_TO_ULONG( i ) << 7 ) ) ) | |||
| #endif /* FT_CONFIG_OPTION_OLD_INTERNALS */ | ||||
| /************************************************************************ */ | /************************************************************************ */ | |||
| /************************************************************************ */ | /************************************************************************ */ | |||
| /************************************************************************ */ | /************************************************************************ */ | |||
| /***** **** */ | /***** **** */ | |||
| /***** CACHE MANAGER OBJECT **** */ | /***** CACHE MANAGER OBJECT **** */ | |||
| /***** **** */ | /***** **** */ | |||
| /************************************************************************ */ | /************************************************************************ */ | |||
| /************************************************************************ */ | /************************************************************************ */ | |||
| /************************************************************************ */ | /************************************************************************ */ | |||
| skipping to change at line 256 | skipping to change at line 265 | |||
| /************************************************************************ */ | /************************************************************************ */ | |||
| /* */ | /* */ | |||
| /* <Type> */ | /* <Type> */ | |||
| /* FTC_Node */ | /* FTC_Node */ | |||
| /* */ | /* */ | |||
| /* <Description> */ | /* <Description> */ | |||
| /* An opaque handle to a cache node object. Each cache node is */ | /* An opaque handle to a cache node object. Each cache node is */ | |||
| /* reference-counted. A node with a count of~0 might be flushed */ | /* reference-counted. A node with a count of~0 might be flushed */ | |||
| /* out of a full cache whenever a lookup request is performed. */ | /* out of a full cache whenever a lookup request is performed. */ | |||
| /* */ | /* */ | |||
| /* If you lookup nodes, you have the ability to `acquire' them, i.e., | /* If you look up nodes, you have the ability to `acquire' them, | |||
| */ | */ | |||
| /* to increment their reference count. This will prevent the node | /* i.e., to increment their reference count. This will prevent the | |||
| */ | */ | |||
| /* from being flushed out of the cache until you explicitly `release' | /* node from being flushed out of the cache until you explicitly | |||
| */ | */ | |||
| /* it (see @FTC_Node_Unref). | /* `release' it (see @FTC_Node_Unref). | |||
| */ | */ | |||
| /* */ | /* */ | |||
| /* See also @FTC_SBitCache_Lookup and @FTC_ImageCache_Lookup. */ | /* See also @FTC_SBitCache_Lookup and @FTC_ImageCache_Lookup. */ | |||
| /* */ | /* */ | |||
| typedef struct FTC_NodeRec_* FTC_Node; | typedef struct FTC_NodeRec_* FTC_Node; | |||
| /************************************************************************ */ | /************************************************************************ */ | |||
| /* */ | /* */ | |||
| /* <Function> */ | /* <Function> */ | |||
| /* FTC_Manager_New */ | /* FTC_Manager_New */ | |||
| /* */ | /* */ | |||
| skipping to change at line 672 | skipping to change at line 681 | |||
| */ | */ | |||
| typedef struct FTC_ImageTypeRec_* FTC_ImageType; | typedef struct FTC_ImageTypeRec_* FTC_ImageType; | |||
| /* */ | /* */ | |||
| #define FTC_IMAGE_TYPE_COMPARE( d1, d2 ) \ | #define FTC_IMAGE_TYPE_COMPARE( d1, d2 ) \ | |||
| ( (d1)->face_id == (d2)->face_id && \ | ( (d1)->face_id == (d2)->face_id && \ | |||
| (d1)->width == (d2)->width && \ | (d1)->width == (d2)->width && \ | |||
| (d1)->flags == (d2)->flags ) | (d1)->flags == (d2)->flags ) | |||
| #ifdef FT_CONFIG_OPTION_OLD_INTERNALS | ||||
| /* this macro is incompatible with LLP64, should not be used */ | ||||
| #define FTC_IMAGE_TYPE_HASH( d ) \ | #define FTC_IMAGE_TYPE_HASH( d ) \ | |||
| (FT_UFast)( FTC_FACE_ID_HASH( (d)->face_id ) ^ \ | (FT_UFast)( FTC_FACE_ID_HASH( (d)->face_id ) ^ \ | |||
| ( (d)->width << 8 ) ^ (d)->height ^ \ | ( (d)->width << 8 ) ^ (d)->height ^ \ | |||
| ( (d)->flags << 4 ) ) | ( (d)->flags << 4 ) ) | |||
| #endif /* FT_CONFIG_OPTION_OLD_INTERNALS */ | ||||
| /************************************************************************ */ | /************************************************************************ */ | |||
| /* */ | /* */ | |||
| /* <Type> */ | /* <Type> */ | |||
| /* FTC_ImageCache */ | /* FTC_ImageCache */ | |||
| /* */ | /* */ | |||
| /* <Description> */ | /* <Description> */ | |||
| /* A handle to an glyph image cache object. They are designed to */ | /* A handle to an glyph image cache object. They are designed to */ | |||
| /* hold many distinct glyph images while not exceeding a certain */ | /* hold many distinct glyph images while not exceeding a certain */ | |||
| /* memory threshold. */ | /* memory threshold. */ | |||
| /* */ | /* */ | |||
| skipping to change at line 1055 | skipping to change at line 1070 | |||
| } FTC_FontRec; | } FTC_FontRec; | |||
| /* */ | /* */ | |||
| #define FTC_FONT_COMPARE( f1, f2 ) \ | #define FTC_FONT_COMPARE( f1, f2 ) \ | |||
| ( (f1)->face_id == (f2)->face_id && \ | ( (f1)->face_id == (f2)->face_id && \ | |||
| (f1)->pix_width == (f2)->pix_width && \ | (f1)->pix_width == (f2)->pix_width && \ | |||
| (f1)->pix_height == (f2)->pix_height ) | (f1)->pix_height == (f2)->pix_height ) | |||
| /* this macro is incompatible with LLP64, should not be used */ | ||||
| #define FTC_FONT_HASH( f ) \ | #define FTC_FONT_HASH( f ) \ | |||
| (FT_UInt32)( FTC_FACE_ID_HASH((f)->face_id) ^ \ | (FT_UInt32)( FTC_FACE_ID_HASH((f)->face_id) ^ \ | |||
| ((f)->pix_width << 8) ^ \ | ((f)->pix_width << 8) ^ \ | |||
| ((f)->pix_height) ) | ((f)->pix_height) ) | |||
| typedef FTC_FontRec* FTC_Font; | typedef FTC_FontRec* FTC_Font; | |||
| FT_EXPORT( FT_Error ) | FT_EXPORT( FT_Error ) | |||
| FTC_Manager_Lookup_Face( FTC_Manager manager, | FTC_Manager_Lookup_Face( FTC_Manager manager, | |||
| FTC_FaceID face_id, | FTC_FaceID face_id, | |||
| End of changes. 9 change blocks. | ||||
| 11 lines changed or deleted | 27 lines changed or added | |||
This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/ | ||||