2000-05-16 21:51:49 +02:00
|
|
|
/***************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* fttypes.h */
|
|
|
|
/* */
|
2000-07-14 08:16:47 +02:00
|
|
|
/* FreeType simple types definitions (specification only). */
|
2000-05-16 21:51:49 +02:00
|
|
|
/* */
|
|
|
|
/* Copyright 1996-2000 by */
|
|
|
|
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
|
|
|
/* */
|
2000-07-11 08:12:20 +02:00
|
|
|
/* This file is part of the FreeType project, and may only be used, */
|
|
|
|
/* modified, and distributed under the terms of the FreeType project */
|
2000-05-16 21:51:49 +02:00
|
|
|
/* 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-07-11 08:12:20 +02:00
|
|
|
|
2000-12-01 00:12:33 +01:00
|
|
|
#ifndef __FTTYPES_H__
|
|
|
|
#define __FTTYPES_H__
|
2000-05-16 21:51:49 +02:00
|
|
|
|
2000-12-09 01:45:38 +01:00
|
|
|
|
|
|
|
#include <ft2build.h>
|
|
|
|
#include FT_SYSTEM_H
|
|
|
|
#include FT_IMAGE_H
|
* include/freetype/config/ft2build.h (FT2_ROOT, FT2_CONFIG_ROOT):
Removed. ANSI C doesn't (explicitly) allow macro expansion in
arguments using `##'.
(FT2_PUBLIC_FILE, FT2_CONFIG_FILE, FT2_INTERNAL_FILE): Use directory
names directly. Make them configurable. Use `##' to strip leading
and trailing spaces from arguments.
* builds/unix/ft2unix.h: Adapted.
* src/base/ftsystem.c (ft_alloc, ft_realloc, ft_free, ft_io_stream,
ft_close_stream): Use FT_CALLBACK_DEF.
* builds/unix/ftsystem.c: Use new header scheme.
(FT_Done_Memory): Use free() from FT_Memory structure.
* src/base/ftinit.c, src/base/ftmac.c: Header scheme fixes.
* include/freetype/config/ft2build.h (FT2_CONFIG_ROOT,
FT2_PUBLIC_FILE, FT2_CONFIG_FILE, FT2_INTERNAL_FILE,
FT_SOURCE_FILE): Use `##' operator to be really ANSI C compliant.
2000-12-12 23:28:12 +01:00
|
|
|
|
2000-12-09 01:45:38 +01:00
|
|
|
#include <stddef.h>
|
|
|
|
|
2000-12-01 00:12:33 +01:00
|
|
|
|
|
|
|
FT_BEGIN_HEADER
|
2000-08-01 15:17:04 +02:00
|
|
|
|
2001-01-11 10:27:49 +01:00
|
|
|
|
2001-03-04 22:53:08 +01:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Section> */
|
|
|
|
/* basic_types */
|
|
|
|
/* */
|
|
|
|
/* <Title> */
|
|
|
|
/* Basic 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 font specific ones. */
|
|
|
|
/* */
|
|
|
|
/* <Order> */
|
|
|
|
/* FT_Byte */
|
|
|
|
/* FT_Char */
|
|
|
|
/* FT_Int */
|
|
|
|
/* FT_UInt */
|
|
|
|
/* FT_Short */
|
|
|
|
/* FT_UShort */
|
|
|
|
/* FT_Long */
|
|
|
|
/* FT_ULong */
|
|
|
|
/* FT_Bool */
|
2001-03-20 12:14:24 +01:00
|
|
|
/* FT_Offset */
|
|
|
|
/* FT_PtrDist */
|
2001-03-04 22:53:08 +01:00
|
|
|
/* FT_Error */
|
|
|
|
/* FT_Fixed */
|
|
|
|
/* FT_Pointer */
|
|
|
|
/* FT_Pos */
|
|
|
|
/* FT_Vector */
|
|
|
|
/* FT_BBox */
|
|
|
|
/* FT_Matrix */
|
|
|
|
/* */
|
|
|
|
/* FT_Generic */
|
|
|
|
/* FT_Generic_Finalizer */
|
|
|
|
/* */
|
|
|
|
/* FT_Bitmap */
|
|
|
|
/* FT_Pixel_Mode */
|
|
|
|
/* FT_Palette_Mode */
|
|
|
|
/* FT_Glyph_Format */
|
|
|
|
/* FT_IMAGE_TAG */
|
|
|
|
/* FT_Glyph_Format */
|
|
|
|
/* */
|
|
|
|
/*************************************************************************/
|
|
|
|
|
2001-06-08 15:29:36 +02:00
|
|
|
|
2000-05-16 21:51:49 +02:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <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. */
|
|
|
|
/* */
|
2000-07-11 08:12:20 +02:00
|
|
|
typedef signed short FT_FWord; /* distance in FUnits */
|
2000-05-16 21:51:49 +02:00
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Type> */
|
|
|
|
/* FT_UFWord */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* An unsigned 16-bit integer used to store a distance in original */
|
|
|
|
/* font units. */
|
|
|
|
/* */
|
2000-07-11 08:12:20 +02:00
|
|
|
typedef unsigned short FT_UFWord; /* unsigned distance */
|
2000-05-16 21:51:49 +02:00
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <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;
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <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. */
|
|
|
|
/* */
|
|
|
|
typedef int FT_Int;
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <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> */
|
|
|
|
/* This type is used to store 16.16 fixed float values, like scales */
|
|
|
|
/* or matrix coefficients. */
|
|
|
|
/* */
|
|
|
|
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;
|
|
|
|
|
2000-07-11 08:12:20 +02:00
|
|
|
|
2001-03-20 12:14:24 +01:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Type> */
|
|
|
|
/* FT_Offset */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
* builds/win32/detekt.mk: Fix .PHONY target for Intel compiler.
Renamed "ftnames.h" to "ftsnames.h", and FT_NAMES_H to
FT_SFNT_NAMES_H.
* docs/docmaker.py: Added generation of INDEX link in table of
contents.
* INSTALL, docs/BUILD: Updated documentation to indicate that the
compilation process has changed slightly (no more `src' required in
* builds/*/*-def.mk: Changed the objects directory from "obj" to
"objs".
* include/freetype/config/ftheader.h: Removed obsolete macros like
FT_SOURCE_FILE, etc. and added cache-specific macro definitions that
were previously defined in <freetype/ftcache.h>. Added comments to
be included in a new API Reference section.
* src/*/*: Removed the use of FT_SOURCE_FILE, etc. Now, each
component needs to add its own directory to the include path at
compile time. Modified all "rules.mk" and "descrip.mms"
accordingly.
* src/cid/cidobjs.c, src/cid/cidload.c, src/pcf/pcfread.c,
src/type1/t1load.c, src/type1/t1objs.c: Added a few casts to remove
compiler warnings in pedantic modes.
* include/config/ft2build.h, include/config/ftheader.h: The file
top-level <ft2build.h>.
* include/config/ftheader.h: Added new section describing the #include
macros.
the Type 2 glyph charstring (used by conversion programs).
* docs/docmaker.py: Added cross-references generation as well as
seac emulation provided by the Type 2 endchar operator.
* src/cid/cidafm.c, src/cid/cidafm.h: removed un-needed files,
Added support for clipped direct rendering in the smooth renderer.
* src/cff/t2objs.c (T2_Init_Face): For pure CFF fonts, set
2001-03-20 23:58:56 +01:00
|
|
|
/* This is equivalent to the ANSI C `size_t' type, i.e. the largest */
|
|
|
|
/* _unsigned_ integer type used to express a file size or position, */
|
|
|
|
/* or a memory block size. */
|
2001-03-20 12:14:24 +01:00
|
|
|
/* */
|
|
|
|
typedef size_t FT_Offset;
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Type> */
|
|
|
|
/* FT_PtrDist */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
* builds/win32/detekt.mk: Fix .PHONY target for Intel compiler.
Renamed "ftnames.h" to "ftsnames.h", and FT_NAMES_H to
FT_SFNT_NAMES_H.
* docs/docmaker.py: Added generation of INDEX link in table of
contents.
* INSTALL, docs/BUILD: Updated documentation to indicate that the
compilation process has changed slightly (no more `src' required in
* builds/*/*-def.mk: Changed the objects directory from "obj" to
"objs".
* include/freetype/config/ftheader.h: Removed obsolete macros like
FT_SOURCE_FILE, etc. and added cache-specific macro definitions that
were previously defined in <freetype/ftcache.h>. Added comments to
be included in a new API Reference section.
* src/*/*: Removed the use of FT_SOURCE_FILE, etc. Now, each
component needs to add its own directory to the include path at
compile time. Modified all "rules.mk" and "descrip.mms"
accordingly.
* src/cid/cidobjs.c, src/cid/cidload.c, src/pcf/pcfread.c,
src/type1/t1load.c, src/type1/t1objs.c: Added a few casts to remove
compiler warnings in pedantic modes.
* include/config/ft2build.h, include/config/ftheader.h: The file
top-level <ft2build.h>.
* include/config/ftheader.h: Added new section describing the #include
macros.
the Type 2 glyph charstring (used by conversion programs).
* docs/docmaker.py: Added cross-references generation as well as
seac emulation provided by the Type 2 endchar operator.
* src/cid/cidafm.c, src/cid/cidafm.h: removed un-needed files,
Added support for clipped direct rendering in the smooth renderer.
* src/cff/t2objs.c (T2_Init_Face): For pure CFF fonts, set
2001-03-20 23:58:56 +01:00
|
|
|
/* This is equivalent to the ANSI C `ptrdiff_t' type, i.e. the */
|
2001-03-20 12:14:24 +01:00
|
|
|
/* largest _signed_ integer type used to express the distance */
|
|
|
|
/* between two pointers. */
|
|
|
|
/* */
|
|
|
|
typedef size_t FT_PtrDist;
|
|
|
|
|
|
|
|
|
2000-05-16 21:51:49 +02:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Struct> */
|
|
|
|
/* FT_UnitVector */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
2000-07-11 08:12:20 +02:00
|
|
|
/* A simple structure used to store a 2D vector unit vector. Uses */
|
2000-05-16 21:51:49 +02:00
|
|
|
/* FT_F2Dot14 types. */
|
|
|
|
/* */
|
|
|
|
/* <Fields> */
|
|
|
|
/* x :: Horizontal coordinate. */
|
2000-07-11 08:12:20 +02:00
|
|
|
/* */
|
2000-05-16 21:51:49 +02:00
|
|
|
/* 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. */
|
2000-07-11 08:12:20 +02:00
|
|
|
/* */
|
2000-05-16 21:51:49 +02:00
|
|
|
/* xy :: Matrix coefficient. */
|
2000-07-11 08:12:20 +02:00
|
|
|
/* */
|
2000-05-16 21:51:49 +02:00
|
|
|
/* yx :: Matrix coefficient. */
|
2000-07-11 08:12:20 +02:00
|
|
|
/* */
|
2000-05-16 21:51:49 +02:00
|
|
|
/* yy :: Matrix coefficient. */
|
|
|
|
/* */
|
|
|
|
typedef struct FT_Matrix_
|
|
|
|
{
|
|
|
|
FT_Fixed xx, xy;
|
|
|
|
FT_Fixed yx, yy;
|
|
|
|
|
|
|
|
} FT_Matrix;
|
|
|
|
|
|
|
|
|
2001-01-10 07:53:49 +01:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <FuncType> */
|
|
|
|
/* FT_Generic_Finalizer */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* Describes a function used to destroy the `client' data of any */
|
|
|
|
/* FreeType object. See the description of the FT_Generic type for */
|
|
|
|
/* 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;
|
|
|
|
|
|
|
|
|
2000-05-16 21:51:49 +02:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Macro> */
|
|
|
|
/* FT_MAKE_TAG */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* This macro converts four letter tags which are used to label */
|
|
|
|
/* TrueType tables into an unsigned long to be used within FreeType. */
|
|
|
|
/* */
|
|
|
|
#define FT_MAKE_TAG( _x1, _x2, _x3, _x4 ) \
|
2000-07-11 08:12:20 +02:00
|
|
|
( ( (FT_ULong)_x1 << 24 ) | \
|
|
|
|
( (FT_ULong)_x2 << 16 ) | \
|
|
|
|
( (FT_ULong)_x3 << 8 ) | \
|
|
|
|
(FT_ULong)_x4 )
|
2000-05-16 21:51:49 +02:00
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* L I S T M A N A G E M E N T */
|
|
|
|
/* */
|
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
|
2001-01-11 10:27:49 +01:00
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Section> */
|
|
|
|
/* list_processing */
|
|
|
|
/* */
|
|
|
|
/*************************************************************************/
|
|
|
|
|
2000-05-16 21:51:49 +02:00
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Type> */
|
|
|
|
/* FT_ListNode */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* Many elements and objects in FreeType are listed through a */
|
|
|
|
/* FT_List record (see FT_ListRec). As its name suggests, a */
|
|
|
|
/* FT_ListNode is a handle to a single list element. */
|
|
|
|
/* */
|
|
|
|
typedef struct FT_ListNodeRec_* FT_ListNode;
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Type> */
|
|
|
|
/* FT_List */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* A handle to a list record (see FT_ListRec). */
|
|
|
|
/* */
|
|
|
|
typedef struct FT_ListRec_* FT_List;
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Struct> */
|
|
|
|
/* FT_ListNodeRec */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* A structure used to hold a single list element. */
|
|
|
|
/* */
|
|
|
|
/* <Fields> */
|
2000-07-11 08:12:20 +02:00
|
|
|
/* 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. */
|
2000-05-16 21:51:49 +02:00
|
|
|
/* */
|
|
|
|
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> */
|
2000-07-11 08:12:20 +02:00
|
|
|
/* head :: The head (first element) of doubly-linked list. */
|
|
|
|
/* */
|
|
|
|
/* tail :: The tail (last element) of doubly-linked list. */
|
2000-05-16 21:51:49 +02:00
|
|
|
/* */
|
|
|
|
typedef struct FT_ListRec_
|
|
|
|
{
|
|
|
|
FT_ListNode head;
|
|
|
|
FT_ListNode tail;
|
|
|
|
|
|
|
|
} FT_ListRec;
|
|
|
|
|
2001-01-11 10:27:49 +01:00
|
|
|
|
2000-12-01 00:12:33 +01:00
|
|
|
/* */
|
2000-05-16 21:51:49 +02:00
|
|
|
|
2000-07-11 08:12:20 +02:00
|
|
|
#define FT_IS_EMPTY( list ) ( (list).head == 0 )
|
|
|
|
|
2001-06-08 23:17:29 +02:00
|
|
|
/* return base error code (without module-specific prefix) */
|
|
|
|
#define FT_ERROR_BASE( x ) ( (x) & 255 )
|
|
|
|
|
2000-12-09 01:45:38 +01:00
|
|
|
|
2000-12-01 00:12:33 +01:00
|
|
|
FT_END_HEADER
|
2000-05-16 21:51:49 +02:00
|
|
|
|
2000-12-01 00:12:33 +01:00
|
|
|
#endif /* __FTTYPES_H__ */
|
2000-05-16 21:51:49 +02:00
|
|
|
|
2000-07-11 08:12:20 +02:00
|
|
|
|
|
|
|
/* END */
|