]>
git.saurik.com Git - wxWidgets.git/blob - src/freetype/freetype/fttypes.h
1 /***************************************************************************/
5 /* FreeType simple types definitions (specification only). */
7 /* Copyright 1996-2000 by */
8 /* David Turner, Robert Wilhelm, and Werner Lemberg. */
10 /* This file is part of the FreeType project, and may only be used, */
11 /* modified, and distributed under the terms of the FreeType project */
12 /* license, LICENSE.TXT. By continuing to use, modify, or distribute */
13 /* this file you indicate that you have read the license and */
14 /* understand and accept it fully. */
16 /***************************************************************************/
23 #include <freetype/ftsystem.h>
24 #include <freetype/ftimage.h>
27 /*************************************************************************/
33 /* A typedef of unsigned char, used for simple booleans. */
35 typedef unsigned char FT_Bool
;
38 /*************************************************************************/
44 /* A signed 16-bit integer used to store a distance in original font */
47 typedef signed short FT_FWord
; /* distance in FUnits */
50 /*************************************************************************/
56 /* An unsigned 16-bit integer used to store a distance in original */
59 typedef unsigned short FT_UFWord
; /* unsigned distance */
62 /*************************************************************************/
68 /* A simple typedef for the _signed_ char type. */
70 typedef signed char FT_Char
;
73 /*************************************************************************/
79 /* A simple typedef for the _unsigned_ char type. */
81 typedef unsigned char FT_Byte
;
84 /*************************************************************************/
90 /* A simple typedef for the char type, usually used for strings. */
92 typedef char FT_String
;
95 /*************************************************************************/
101 /* A typedef for signed short. */
103 typedef signed short FT_Short
;
106 /*************************************************************************/
112 /* A typedef for unsigned short. */
114 typedef unsigned short FT_UShort
;
117 /*************************************************************************/
123 /* A typedef for the int type. */
128 /*************************************************************************/
134 /* A typedef for the unsigned int type. */
136 typedef unsigned int FT_UInt
;
139 /*************************************************************************/
145 /* A typedef for signed long. */
147 typedef signed long FT_Long
;
150 /*************************************************************************/
156 /* A typedef for unsigned long. */
158 typedef unsigned long FT_ULong
;
161 /*************************************************************************/
167 /* A signed 2.14 fixed float type used for unit vectors. */
169 typedef signed short FT_F2Dot14
;
172 /*************************************************************************/
178 /* A signed 26.6 fixed float type used for vectorial pixel */
181 typedef signed long FT_F26Dot6
;
184 /*************************************************************************/
190 /* This type is used to store 16.16 fixed float values, like scales */
191 /* or matrix coefficients. */
193 typedef signed long FT_Fixed
;
196 /*************************************************************************/
202 /* The FreeType error code type. A value of 0 is always interpreted */
203 /* as a successful operation. */
205 typedef int FT_Error
;
208 /*************************************************************************/
214 /* A simple typedef for a typeless pointer. */
216 typedef void* FT_Pointer
;
219 /*************************************************************************/
225 /* A simple structure used to store a 2D vector unit vector. Uses */
226 /* FT_F2Dot14 types. */
229 /* x :: Horizontal coordinate. */
231 /* y :: Vertical coordinate. */
233 typedef struct FT_UnitVector_
241 /*************************************************************************/
247 /* A simple structure used to store a 2x2 matrix. Coefficients are */
248 /* in 16.16 fixed float format. The computation performed is: */
251 /* x' = x*xx + y*xy */
252 /* y' = x*yx + y*yy */
256 /* xx :: Matrix coefficient. */
258 /* xy :: Matrix coefficient. */
260 /* yx :: Matrix coefficient. */
262 /* yy :: Matrix coefficient. */
264 typedef struct FT_Matrix_
272 /*************************************************************************/
278 /* A structure used to hold an outline's bounding box, i.e., the */
279 /* coordinates of its extrema in the horizontal and vertical */
283 /* xMin :: The horizontal minimum (left-most). */
285 /* yMin :: The vertical minimum (bottom-most). */
287 /* xMax :: The horizontal maximum (right-most). */
289 /* yMax :: The vertical maximum (top-most). */
291 typedef struct FT_BBox_
299 /*************************************************************************/
305 /* This macro converts four letter tags which are used to label */
306 /* TrueType tables into an unsigned long to be used within FreeType. */
308 #define FT_MAKE_TAG( _x1, _x2, _x3, _x4 ) \
309 ( ( (FT_ULong)_x1 << 24 ) | \
310 ( (FT_ULong)_x2 << 16 ) | \
311 ( (FT_ULong)_x3 << 8 ) | \
315 /*************************************************************************/
316 /*************************************************************************/
318 /* L I S T M A N A G E M E N T */
320 /*************************************************************************/
321 /*************************************************************************/
324 /*************************************************************************/
330 /* Many elements and objects in FreeType are listed through a */
331 /* FT_List record (see FT_ListRec). As its name suggests, a */
332 /* FT_ListNode is a handle to a single list element. */
334 typedef struct FT_ListNodeRec_
* FT_ListNode
;
337 /*************************************************************************/
343 /* A handle to a list record (see FT_ListRec). */
345 typedef struct FT_ListRec_
* FT_List
;
348 /*************************************************************************/
354 /* A structure used to hold a single list element. */
357 /* prev :: The previous element in the list. NULL if first. */
359 /* next :: The next element in the list. NULL if last. */
361 /* data :: A typeless pointer to the listed object. */
363 typedef struct FT_ListNodeRec_
372 /*************************************************************************/
378 /* A structure used to hold a simple doubly-linked list. These are */
379 /* used in many parts of FreeType. */
382 /* head :: The head (first element) of doubly-linked list. */
384 /* tail :: The tail (last element) of doubly-linked list. */
386 typedef struct FT_ListRec_
394 #define FT_IS_EMPTY( list ) ( (list).head == 0 )
397 #endif /* FTTYPES_H */