2003-12-24 14:37:58 +01:00
|
|
|
/***************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* fttypes.h */
|
|
|
|
/* */
|
|
|
|
/* FreeType simple types definitions (specification only). */
|
|
|
|
/* */
|
Further C library abstraction. Based on a patch from
msn2@bidyut.com.
* include/freetype/config/ftstdlib.h (FT_CHAR_BIT, FT_FILE,
ft_fopen, ft_fclose, ft_fseek, ft_ftell, ft_fread, ft_smalloc,
ft_scalloc, ft_srealloc, ft_sfree, ft_labs): New wrapper macros for
C library functions. Update all users accordingly (and catch some
other places where the C library function was used instead of the
wrapper functions).
* src/base/ftsystem.c: Don't include stdio.h and stdlib.h.
* src/gzip/zutil.h [MSDOS && !(__TURBOC__ || __BORLANDC__)]: Don't
include malloc.h.
2006-04-29 09:31:16 +02:00
|
|
|
/* Copyright 1996-2001, 2002, 2004, 2006 by */
|
2003-12-24 14:37:58 +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 __FTTYPES_H__
|
|
|
|
#define __FTTYPES_H__
|
|
|
|
|
|
|
|
|
|
|
|
#include <ft2build.h>
|
|
|
|
#include FT_CONFIG_CONFIG_H
|
|
|
|
#include FT_SYSTEM_H
|
|
|
|
#include FT_IMAGE_H
|
|
|
|
|
|
|
|
#include <stddef.h>
|
|
|
|
|
|
|
|
|
|
|
|
FT_BEGIN_HEADER
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Section> */
|
|
|
|
/* basic_types */
|
|
|
|
/* */
|
|
|
|
/* <Title> */
|
|
|
|
/* Basic Data Types */
|
|
|
|
/* */
|
|
|
|
/* <Abstract> */
|
|
|
|
/* The basic data types defined by the library. */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* This section contains the basic data types defined by FreeType 2, */
|
|
|
|
/* ranging from simple scalar types to bitmap descriptors. More */
|
|
|
|
/* font-specific structures are defined in a different section. */
|
|
|
|
/* */
|
|
|
|
/* <Order> */
|
|
|
|
/* FT_Byte */
|
2004-08-30 07:27:57 +02:00
|
|
|
/* FT_Bytes */
|
2003-12-24 14:37:58 +01:00
|
|
|
/* FT_Char */
|
|
|
|
/* FT_Int */
|
|
|
|
/* FT_UInt */
|
|
|
|
/* FT_Short */
|
|
|
|
/* FT_UShort */
|
|
|
|
/* FT_Long */
|
|
|
|
/* FT_ULong */
|
|
|
|
/* FT_Bool */
|
|
|
|
/* FT_Offset */
|
|
|
|
/* FT_PtrDist */
|
|
|
|
/* FT_String */
|
2004-08-30 07:27:57 +02:00
|
|
|
/* FT_Tag */
|
2003-12-24 14:37:58 +01:00
|
|
|
/* FT_Error */
|
|
|
|
/* FT_Fixed */
|
|
|
|
/* FT_Pointer */
|
|
|
|
/* FT_Pos */
|
|
|
|
/* FT_Vector */
|
|
|
|
/* FT_BBox */
|
|
|
|
/* FT_Matrix */
|
|
|
|
/* FT_FWord */
|
|
|
|
/* FT_UFWord */
|
|
|
|
/* FT_F2Dot14 */
|
|
|
|
/* FT_UnitVector */
|
|
|
|
/* FT_F26Dot6 */
|
|
|
|
/* */
|
|
|
|
/* */
|
|
|
|
/* FT_Generic */
|
|
|
|
/* FT_Generic_Finalizer */
|
|
|
|
/* */
|
|
|
|
/* FT_Bitmap */
|
|
|
|
/* FT_Pixel_Mode */
|
|
|
|
/* FT_Palette_Mode */
|
|
|
|
/* FT_Glyph_Format */
|
|
|
|
/* FT_IMAGE_TAG */
|
|
|
|
/* */
|
|
|
|
/*************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Type> */
|
|
|
|
/* FT_Bool */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* A typedef of unsigned char, used for simple booleans. */
|
|
|
|
/* */
|
|
|
|
typedef unsigned char FT_Bool;
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Type> */
|
|
|
|
/* FT_FWord */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* A signed 16-bit integer used to store a distance in original font */
|
|
|
|
/* units. */
|
|
|
|
/* */
|
|
|
|
typedef signed short FT_FWord; /* distance in FUnits */
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Type> */
|
|
|
|
/* FT_UFWord */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* An unsigned 16-bit integer used to store a distance in original */
|
|
|
|
/* font units. */
|
|
|
|
/* */
|
|
|
|
typedef unsigned short FT_UFWord; /* unsigned distance */
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Type> */
|
|
|
|
/* FT_Char */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* A simple typedef for the _signed_ char type. */
|
|
|
|
/* */
|
|
|
|
typedef signed char FT_Char;
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Type> */
|
|
|
|
/* FT_Byte */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* A simple typedef for the _unsigned_ char type. */
|
|
|
|
/* */
|
|
|
|
typedef unsigned char FT_Byte;
|
|
|
|
|
|
|
|
|
2004-08-30 07:27:57 +02:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Type> */
|
|
|
|
/* FT_Bytes */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* A typedef for constant memory areas. */
|
|
|
|
/* */
|
|
|
|
typedef const FT_Byte* FT_Bytes;
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Type> */
|
|
|
|
/* FT_Tag */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* A typedef for 32bit tags (as used in the SFNT format). */
|
|
|
|
/* */
|
|
|
|
typedef FT_UInt32 FT_Tag;
|
|
|
|
|
|
|
|
|
2003-12-24 14:37:58 +01:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Type> */
|
|
|
|
/* FT_String */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* A simple typedef for the char type, usually used for strings. */
|
|
|
|
/* */
|
|
|
|
typedef char FT_String;
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Type> */
|
|
|
|
/* FT_Short */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* A typedef for signed short. */
|
|
|
|
/* */
|
|
|
|
typedef signed short FT_Short;
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Type> */
|
|
|
|
/* FT_UShort */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* A typedef for unsigned short. */
|
|
|
|
/* */
|
|
|
|
typedef unsigned short FT_UShort;
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Type> */
|
|
|
|
/* FT_Int */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* A typedef for the int type. */
|
|
|
|
/* */
|
2004-08-30 07:27:57 +02:00
|
|
|
typedef signed int FT_Int;
|
2003-12-24 14:37:58 +01:00
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Type> */
|
|
|
|
/* FT_UInt */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* A typedef for the unsigned int type. */
|
|
|
|
/* */
|
|
|
|
typedef unsigned int FT_UInt;
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Type> */
|
|
|
|
/* FT_Long */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* A typedef for signed long. */
|
|
|
|
/* */
|
|
|
|
typedef signed long FT_Long;
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Type> */
|
|
|
|
/* FT_ULong */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* A typedef for unsigned long. */
|
|
|
|
/* */
|
|
|
|
typedef unsigned long FT_ULong;
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Type> */
|
|
|
|
/* FT_F2Dot14 */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* A signed 2.14 fixed float type used for unit vectors. */
|
|
|
|
/* */
|
|
|
|
typedef signed short FT_F2Dot14;
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Type> */
|
|
|
|
/* FT_F26Dot6 */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* A signed 26.6 fixed float type used for vectorial pixel */
|
|
|
|
/* coordinates. */
|
|
|
|
/* */
|
|
|
|
typedef signed long FT_F26Dot6;
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Type> */
|
|
|
|
/* FT_Fixed */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
2006-05-12 06:00:44 +02:00
|
|
|
/* This type is used to store 16.16 fixed float values, like scaling */
|
|
|
|
/* values or matrix coefficients. */
|
2003-12-24 14:37:58 +01:00
|
|
|
/* */
|
|
|
|
typedef signed long FT_Fixed;
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Type> */
|
|
|
|
/* FT_Error */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* The FreeType error code type. A value of 0 is always interpreted */
|
|
|
|
/* as a successful operation. */
|
|
|
|
/* */
|
|
|
|
typedef int FT_Error;
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Type> */
|
|
|
|
/* FT_Pointer */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* A simple typedef for a typeless pointer. */
|
|
|
|
/* */
|
|
|
|
typedef void* FT_Pointer;
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Type> */
|
|
|
|
/* FT_Offset */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
Further C library abstraction. Based on a patch from
msn2@bidyut.com.
* include/freetype/config/ftstdlib.h (FT_CHAR_BIT, FT_FILE,
ft_fopen, ft_fclose, ft_fseek, ft_ftell, ft_fread, ft_smalloc,
ft_scalloc, ft_srealloc, ft_sfree, ft_labs): New wrapper macros for
C library functions. Update all users accordingly (and catch some
other places where the C library function was used instead of the
wrapper functions).
* src/base/ftsystem.c: Don't include stdio.h and stdlib.h.
* src/gzip/zutil.h [MSDOS && !(__TURBOC__ || __BORLANDC__)]: Don't
include malloc.h.
2006-04-29 09:31:16 +02:00
|
|
|
/* This is equivalent to the ANSI C `size_t' type, i.e., the largest */
|
2003-12-24 14:37:58 +01:00
|
|
|
/* _unsigned_ integer type used to express a file size or position, */
|
|
|
|
/* or a memory block size. */
|
|
|
|
/* */
|
|
|
|
typedef size_t FT_Offset;
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Type> */
|
|
|
|
/* FT_PtrDist */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
Further C library abstraction. Based on a patch from
msn2@bidyut.com.
* include/freetype/config/ftstdlib.h (FT_CHAR_BIT, FT_FILE,
ft_fopen, ft_fclose, ft_fseek, ft_ftell, ft_fread, ft_smalloc,
ft_scalloc, ft_srealloc, ft_sfree, ft_labs): New wrapper macros for
C library functions. Update all users accordingly (and catch some
other places where the C library function was used instead of the
wrapper functions).
* src/base/ftsystem.c: Don't include stdio.h and stdlib.h.
* src/gzip/zutil.h [MSDOS && !(__TURBOC__ || __BORLANDC__)]: Don't
include malloc.h.
2006-04-29 09:31:16 +02:00
|
|
|
/* This is equivalent to the ANSI C `ptrdiff_t' type, i.e., the */
|
2003-12-24 14:37:58 +01:00
|
|
|
/* largest _signed_ integer type used to express the distance */
|
|
|
|
/* between two pointers. */
|
|
|
|
/* */
|
2004-10-14 13:33:04 +02:00
|
|
|
typedef ft_ptrdiff_t FT_PtrDist;
|
2003-12-24 14:37:58 +01:00
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Struct> */
|
|
|
|
/* FT_UnitVector */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* A simple structure used to store a 2D vector unit vector. Uses */
|
|
|
|
/* FT_F2Dot14 types. */
|
|
|
|
/* */
|
|
|
|
/* <Fields> */
|
|
|
|
/* x :: Horizontal coordinate. */
|
|
|
|
/* */
|
|
|
|
/* y :: Vertical coordinate. */
|
|
|
|
/* */
|
|
|
|
typedef struct FT_UnitVector_
|
|
|
|
{
|
|
|
|
FT_F2Dot14 x;
|
|
|
|
FT_F2Dot14 y;
|
|
|
|
|
|
|
|
} FT_UnitVector;
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Struct> */
|
|
|
|
/* FT_Matrix */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* A simple structure used to store a 2x2 matrix. Coefficients are */
|
|
|
|
/* in 16.16 fixed float format. The computation performed is: */
|
|
|
|
/* */
|
|
|
|
/* { */
|
|
|
|
/* x' = x*xx + y*xy */
|
|
|
|
/* y' = x*yx + y*yy */
|
|
|
|
/* } */
|
|
|
|
/* */
|
|
|
|
/* <Fields> */
|
|
|
|
/* xx :: Matrix coefficient. */
|
|
|
|
/* */
|
|
|
|
/* xy :: Matrix coefficient. */
|
|
|
|
/* */
|
|
|
|
/* yx :: Matrix coefficient. */
|
|
|
|
/* */
|
|
|
|
/* yy :: Matrix coefficient. */
|
|
|
|
/* */
|
|
|
|
typedef struct FT_Matrix_
|
|
|
|
{
|
|
|
|
FT_Fixed xx, xy;
|
|
|
|
FT_Fixed yx, yy;
|
|
|
|
|
|
|
|
} FT_Matrix;
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Struct> */
|
|
|
|
/* FT_Data */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* Read-only binary data represented as a pointer and a length. */
|
|
|
|
/* */
|
|
|
|
/* <Fields> */
|
|
|
|
/* pointer :: The data. */
|
|
|
|
/* */
|
|
|
|
/* length :: The length of the data in bytes. */
|
|
|
|
/* */
|
|
|
|
typedef struct FT_Data_
|
|
|
|
{
|
|
|
|
const FT_Byte* pointer;
|
|
|
|
FT_Int length;
|
|
|
|
|
|
|
|
} FT_Data;
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <FuncType> */
|
|
|
|
/* FT_Generic_Finalizer */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* Describes a function used to destroy the `client' data of any */
|
2006-05-12 06:00:44 +02:00
|
|
|
/* FreeType object. See the description of the @FT_Generic type for */
|
2003-12-24 14:37:58 +01:00
|
|
|
/* details of usage. */
|
|
|
|
/* */
|
|
|
|
/* <Input> */
|
|
|
|
/* The address of the FreeType object which is under finalization. */
|
|
|
|
/* Its client data is accessed through its `generic' field. */
|
|
|
|
/* */
|
|
|
|
typedef void (*FT_Generic_Finalizer)(void* object);
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Struct> */
|
|
|
|
/* FT_Generic */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* Client applications often need to associate their own data to a */
|
|
|
|
/* variety of FreeType core objects. For example, a text layout API */
|
|
|
|
/* might want to associate a glyph cache to a given size object. */
|
|
|
|
/* */
|
|
|
|
/* Most FreeType object contains a `generic' field, of type */
|
|
|
|
/* FT_Generic, which usage is left to client applications and font */
|
|
|
|
/* servers. */
|
|
|
|
/* */
|
|
|
|
/* It can be used to store a pointer to client-specific data, as well */
|
|
|
|
/* as the address of a `finalizer' function, which will be called by */
|
|
|
|
/* FreeType when the object is destroyed (for example, the previous */
|
|
|
|
/* client example would put the address of the glyph cache destructor */
|
|
|
|
/* in the `finalizer' field). */
|
|
|
|
/* */
|
|
|
|
/* <Fields> */
|
|
|
|
/* data :: A typeless pointer to any client-specified data. This */
|
|
|
|
/* field is completely ignored by the FreeType library. */
|
|
|
|
/* */
|
|
|
|
/* finalizer :: A pointer to a `generic finalizer' function, which */
|
|
|
|
/* will be called when the object is destroyed. If this */
|
|
|
|
/* field is set to NULL, no code will be called. */
|
|
|
|
/* */
|
|
|
|
typedef struct FT_Generic_
|
|
|
|
{
|
|
|
|
void* data;
|
|
|
|
FT_Generic_Finalizer finalizer;
|
|
|
|
|
|
|
|
} FT_Generic;
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Macro> */
|
|
|
|
/* FT_MAKE_TAG */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
2006-05-12 06:00:44 +02:00
|
|
|
/* This macro converts four-letter tags which are used to label */
|
2003-12-24 14:37:58 +01:00
|
|
|
/* TrueType tables into an unsigned long to be used within FreeType. */
|
|
|
|
/* */
|
|
|
|
/* <Note> */
|
|
|
|
/* The produced values *must* be 32bit integers. Don't redefine this */
|
|
|
|
/* macro. */
|
|
|
|
/* */
|
|
|
|
#define FT_MAKE_TAG( _x1, _x2, _x3, _x4 ) \
|
|
|
|
( ( (FT_ULong)_x1 << 24 ) | \
|
|
|
|
( (FT_ULong)_x2 << 16 ) | \
|
|
|
|
( (FT_ULong)_x3 << 8 ) | \
|
|
|
|
(FT_ULong)_x4 )
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* L I S T M A N A G E M E N T */
|
|
|
|
/* */
|
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Section> */
|
|
|
|
/* list_processing */
|
|
|
|
/* */
|
|
|
|
/*************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Type> */
|
|
|
|
/* FT_ListNode */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
2006-05-12 10:00:13 +02:00
|
|
|
/* Many elements and objects in FreeType are listed through an */
|
|
|
|
/* @FT_List record (see @FT_ListRec). As its name suggests, an */
|
2003-12-24 14:37:58 +01:00
|
|
|
/* FT_ListNode is a handle to a single list element. */
|
|
|
|
/* */
|
|
|
|
typedef struct FT_ListNodeRec_* FT_ListNode;
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Type> */
|
|
|
|
/* FT_List */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
2006-05-12 10:00:13 +02:00
|
|
|
/* A handle to a list record (see @FT_ListRec). */
|
2003-12-24 14:37:58 +01:00
|
|
|
/* */
|
|
|
|
typedef struct FT_ListRec_* FT_List;
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Struct> */
|
|
|
|
/* FT_ListNodeRec */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* A structure used to hold a single list element. */
|
|
|
|
/* */
|
|
|
|
/* <Fields> */
|
|
|
|
/* prev :: The previous element in the list. NULL if first. */
|
|
|
|
/* */
|
|
|
|
/* next :: The next element in the list. NULL if last. */
|
|
|
|
/* */
|
|
|
|
/* data :: A typeless pointer to the listed object. */
|
|
|
|
/* */
|
|
|
|
typedef struct FT_ListNodeRec_
|
|
|
|
{
|
|
|
|
FT_ListNode prev;
|
|
|
|
FT_ListNode next;
|
|
|
|
void* data;
|
|
|
|
|
|
|
|
} FT_ListNodeRec;
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Struct> */
|
|
|
|
/* FT_ListRec */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* A structure used to hold a simple doubly-linked list. These are */
|
|
|
|
/* used in many parts of FreeType. */
|
|
|
|
/* */
|
|
|
|
/* <Fields> */
|
|
|
|
/* head :: The head (first element) of doubly-linked list. */
|
|
|
|
/* */
|
|
|
|
/* tail :: The tail (last element) of doubly-linked list. */
|
|
|
|
/* */
|
|
|
|
typedef struct FT_ListRec_
|
|
|
|
{
|
|
|
|
FT_ListNode head;
|
|
|
|
FT_ListNode tail;
|
|
|
|
|
|
|
|
} FT_ListRec;
|
|
|
|
|
|
|
|
|
|
|
|
/* */
|
|
|
|
|
|
|
|
#define FT_IS_EMPTY( list ) ( (list).head == 0 )
|
|
|
|
|
|
|
|
/* return base error code (without module-specific prefix) */
|
|
|
|
#define FT_ERROR_BASE( x ) ( (x) & 0xFF )
|
|
|
|
|
|
|
|
/* return module error code */
|
|
|
|
#define FT_ERROR_MODULE( x ) ( (x) & 0xFF00U )
|
|
|
|
|
|
|
|
#define FT_BOOL( x ) ( (FT_Bool)( x ) )
|
|
|
|
|
|
|
|
FT_END_HEADER
|
|
|
|
|
|
|
|
#endif /* __FTTYPES_H__ */
|
|
|
|
|
|
|
|
|
|
|
|
/* END */
|