2000-08-23 19:32:42 +02:00
|
|
|
/***************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* ftcmanag.h */
|
|
|
|
/* */
|
|
|
|
/* XXX */
|
|
|
|
/* */
|
|
|
|
/* Copyright 2000 by */
|
|
|
|
/* 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. */
|
|
|
|
/* */
|
|
|
|
/***************************************************************************/
|
|
|
|
|
|
|
|
|
2000-08-23 13:22:30 +02:00
|
|
|
#ifndef FTCMANAG_H
|
|
|
|
#define FTCMANAG_H
|
|
|
|
|
|
|
|
#include <cache/ftlru.h>
|
|
|
|
|
2000-08-23 19:32:42 +02:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
2000-08-23 13:22:30 +02:00
|
|
|
#define FTC_MAX_FACES 4
|
|
|
|
#define FTC_MAX_SIZES 8
|
|
|
|
|
2000-08-23 19:32:42 +02:00
|
|
|
|
2000-08-23 13:22:30 +02:00
|
|
|
typedef FT_Pointer FTC_FaceID;
|
|
|
|
|
2000-08-23 19:32:42 +02:00
|
|
|
typedef struct FTC_SizeRec_
|
2000-08-23 13:22:30 +02:00
|
|
|
{
|
2000-08-23 19:32:42 +02:00
|
|
|
FTC_FaceID face_id;
|
|
|
|
FT_UShort pix_width;
|
|
|
|
FT_UShort pix_height;
|
2000-08-23 13:22:30 +02:00
|
|
|
|
|
|
|
} FTC_SizeRec, *FTC_SizeID;
|
|
|
|
|
|
|
|
|
|
|
|
typedef FT_Error (*FTC_Face_Requester)( FTC_FaceID face_id,
|
|
|
|
FT_Pointer data,
|
2000-08-23 19:32:42 +02:00
|
|
|
FT_Face* aface );
|
2000-08-23 13:22:30 +02:00
|
|
|
|
|
|
|
|
|
|
|
typedef struct FTC_ManagerRec_* FTC_Manager;
|
|
|
|
|
2000-08-23 19:32:42 +02:00
|
|
|
typedef struct FTC_Manager_LruRec_
|
2000-08-23 13:22:30 +02:00
|
|
|
{
|
|
|
|
FT_LruRec root;
|
|
|
|
FTC_Manager manager;
|
|
|
|
|
|
|
|
} FTC_Manager_LruRec, *FTC_Manager_Lru;
|
|
|
|
|
|
|
|
|
2000-08-23 19:32:42 +02:00
|
|
|
typedef struct FTC_ManagerRec_
|
2000-08-23 13:22:30 +02:00
|
|
|
{
|
|
|
|
FT_Library library;
|
|
|
|
FT_Lru faces_lru;
|
|
|
|
FT_Lru sizes_lru;
|
|
|
|
|
|
|
|
FT_Pointer request_data;
|
|
|
|
FTC_Face_Requester request_face;
|
|
|
|
|
|
|
|
} FTC_ManagerRec;
|
|
|
|
|
|
|
|
|
2000-08-23 19:32:42 +02:00
|
|
|
FT_EXPORT_DEF( FT_Error ) FTC_Manager_New( FT_Library library,
|
2000-08-23 13:22:30 +02:00
|
|
|
FTC_Face_Requester requester,
|
|
|
|
FT_Pointer req_data,
|
2000-08-23 19:32:42 +02:00
|
|
|
FTC_Manager* amanager );
|
2000-08-23 13:22:30 +02:00
|
|
|
|
2000-08-23 19:32:42 +02:00
|
|
|
FT_EXPORT_DEF( void ) FTC_Manager_Done( FTC_Manager manager );
|
2000-08-23 13:22:30 +02:00
|
|
|
|
2000-08-23 19:32:42 +02:00
|
|
|
FT_EXPORT_DEF( void ) FTC_Manager_Reset( FTC_Manager manager );
|
2000-08-23 13:22:30 +02:00
|
|
|
|
2000-08-23 19:32:42 +02:00
|
|
|
FT_EXPORT_DEF( FT_Error ) FTC_Manager_Lookup_Face( FTC_Manager manager,
|
|
|
|
FTC_FaceID face_id,
|
|
|
|
FT_Face* aface );
|
2000-08-23 13:22:30 +02:00
|
|
|
|
2000-08-23 19:32:42 +02:00
|
|
|
FT_EXPORT_DEF( FT_Error ) FTC_Manager_Lookup_Size( FTC_Manager manager,
|
|
|
|
FTC_SizeID size_id,
|
|
|
|
FT_Face* aface,
|
|
|
|
FT_Size* asize );
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2000-08-23 13:22:30 +02:00
|
|
|
|
|
|
|
#endif /* FTCMANAG_H */
|
2000-08-23 19:32:42 +02:00
|
|
|
|
|
|
|
|
|
|
|
/* END */
|