rev |
line source |
nuclear@0
|
1 /***************************************************************************/
|
nuclear@0
|
2 /* */
|
nuclear@0
|
3 /* fttypes.h */
|
nuclear@0
|
4 /* */
|
nuclear@0
|
5 /* FreeType simple types definitions (specification only). */
|
nuclear@0
|
6 /* */
|
nuclear@0
|
7 /* Copyright 1996-2001, 2002, 2004, 2006, 2007, 2008 by */
|
nuclear@0
|
8 /* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
nuclear@0
|
9 /* */
|
nuclear@0
|
10 /* This file is part of the FreeType project, and may only be used, */
|
nuclear@0
|
11 /* modified, and distributed under the terms of the FreeType project */
|
nuclear@0
|
12 /* license, LICENSE.TXT. By continuing to use, modify, or distribute */
|
nuclear@0
|
13 /* this file you indicate that you have read the license and */
|
nuclear@0
|
14 /* understand and accept it fully. */
|
nuclear@0
|
15 /* */
|
nuclear@0
|
16 /***************************************************************************/
|
nuclear@0
|
17
|
nuclear@0
|
18
|
nuclear@0
|
19 #ifndef __FTTYPES_H__
|
nuclear@0
|
20 #define __FTTYPES_H__
|
nuclear@0
|
21
|
nuclear@0
|
22
|
nuclear@0
|
23 #include <ft2build.h>
|
nuclear@0
|
24 #include FT_CONFIG_CONFIG_H
|
nuclear@0
|
25 #include FT_SYSTEM_H
|
nuclear@0
|
26 #include FT_IMAGE_H
|
nuclear@0
|
27
|
nuclear@0
|
28 #include <stddef.h>
|
nuclear@0
|
29
|
nuclear@0
|
30
|
nuclear@0
|
31 FT_BEGIN_HEADER
|
nuclear@0
|
32
|
nuclear@0
|
33
|
nuclear@0
|
34 /*************************************************************************/
|
nuclear@0
|
35 /* */
|
nuclear@0
|
36 /* <Section> */
|
nuclear@0
|
37 /* basic_types */
|
nuclear@0
|
38 /* */
|
nuclear@0
|
39 /* <Title> */
|
nuclear@0
|
40 /* Basic Data Types */
|
nuclear@0
|
41 /* */
|
nuclear@0
|
42 /* <Abstract> */
|
nuclear@0
|
43 /* The basic data types defined by the library. */
|
nuclear@0
|
44 /* */
|
nuclear@0
|
45 /* <Description> */
|
nuclear@0
|
46 /* This section contains the basic data types defined by FreeType~2, */
|
nuclear@0
|
47 /* ranging from simple scalar types to bitmap descriptors. More */
|
nuclear@0
|
48 /* font-specific structures are defined in a different section. */
|
nuclear@0
|
49 /* */
|
nuclear@0
|
50 /* <Order> */
|
nuclear@0
|
51 /* FT_Byte */
|
nuclear@0
|
52 /* FT_Bytes */
|
nuclear@0
|
53 /* FT_Char */
|
nuclear@0
|
54 /* FT_Int */
|
nuclear@0
|
55 /* FT_UInt */
|
nuclear@0
|
56 /* FT_Int16 */
|
nuclear@0
|
57 /* FT_UInt16 */
|
nuclear@0
|
58 /* FT_Int32 */
|
nuclear@0
|
59 /* FT_UInt32 */
|
nuclear@0
|
60 /* FT_Short */
|
nuclear@0
|
61 /* FT_UShort */
|
nuclear@0
|
62 /* FT_Long */
|
nuclear@0
|
63 /* FT_ULong */
|
nuclear@0
|
64 /* FT_Bool */
|
nuclear@0
|
65 /* FT_Offset */
|
nuclear@0
|
66 /* FT_PtrDist */
|
nuclear@0
|
67 /* FT_String */
|
nuclear@0
|
68 /* FT_Tag */
|
nuclear@0
|
69 /* FT_Error */
|
nuclear@0
|
70 /* FT_Fixed */
|
nuclear@0
|
71 /* FT_Pointer */
|
nuclear@0
|
72 /* FT_Pos */
|
nuclear@0
|
73 /* FT_Vector */
|
nuclear@0
|
74 /* FT_BBox */
|
nuclear@0
|
75 /* FT_Matrix */
|
nuclear@0
|
76 /* FT_FWord */
|
nuclear@0
|
77 /* FT_UFWord */
|
nuclear@0
|
78 /* FT_F2Dot14 */
|
nuclear@0
|
79 /* FT_UnitVector */
|
nuclear@0
|
80 /* FT_F26Dot6 */
|
nuclear@0
|
81 /* */
|
nuclear@0
|
82 /* */
|
nuclear@0
|
83 /* FT_Generic */
|
nuclear@0
|
84 /* FT_Generic_Finalizer */
|
nuclear@0
|
85 /* */
|
nuclear@0
|
86 /* FT_Bitmap */
|
nuclear@0
|
87 /* FT_Pixel_Mode */
|
nuclear@0
|
88 /* FT_Palette_Mode */
|
nuclear@0
|
89 /* FT_Glyph_Format */
|
nuclear@0
|
90 /* FT_IMAGE_TAG */
|
nuclear@0
|
91 /* */
|
nuclear@0
|
92 /*************************************************************************/
|
nuclear@0
|
93
|
nuclear@0
|
94
|
nuclear@0
|
95 /*************************************************************************/
|
nuclear@0
|
96 /* */
|
nuclear@0
|
97 /* <Type> */
|
nuclear@0
|
98 /* FT_Bool */
|
nuclear@0
|
99 /* */
|
nuclear@0
|
100 /* <Description> */
|
nuclear@0
|
101 /* A typedef of unsigned char, used for simple booleans. As usual, */
|
nuclear@0
|
102 /* values 1 and~0 represent true and false, respectively. */
|
nuclear@0
|
103 /* */
|
nuclear@0
|
104 typedef unsigned char FT_Bool;
|
nuclear@0
|
105
|
nuclear@0
|
106
|
nuclear@0
|
107 /*************************************************************************/
|
nuclear@0
|
108 /* */
|
nuclear@0
|
109 /* <Type> */
|
nuclear@0
|
110 /* FT_FWord */
|
nuclear@0
|
111 /* */
|
nuclear@0
|
112 /* <Description> */
|
nuclear@0
|
113 /* A signed 16-bit integer used to store a distance in original font */
|
nuclear@0
|
114 /* units. */
|
nuclear@0
|
115 /* */
|
nuclear@0
|
116 typedef signed short FT_FWord; /* distance in FUnits */
|
nuclear@0
|
117
|
nuclear@0
|
118
|
nuclear@0
|
119 /*************************************************************************/
|
nuclear@0
|
120 /* */
|
nuclear@0
|
121 /* <Type> */
|
nuclear@0
|
122 /* FT_UFWord */
|
nuclear@0
|
123 /* */
|
nuclear@0
|
124 /* <Description> */
|
nuclear@0
|
125 /* An unsigned 16-bit integer used to store a distance in original */
|
nuclear@0
|
126 /* font units. */
|
nuclear@0
|
127 /* */
|
nuclear@0
|
128 typedef unsigned short FT_UFWord; /* unsigned distance */
|
nuclear@0
|
129
|
nuclear@0
|
130
|
nuclear@0
|
131 /*************************************************************************/
|
nuclear@0
|
132 /* */
|
nuclear@0
|
133 /* <Type> */
|
nuclear@0
|
134 /* FT_Char */
|
nuclear@0
|
135 /* */
|
nuclear@0
|
136 /* <Description> */
|
nuclear@0
|
137 /* A simple typedef for the _signed_ char type. */
|
nuclear@0
|
138 /* */
|
nuclear@0
|
139 typedef signed char FT_Char;
|
nuclear@0
|
140
|
nuclear@0
|
141
|
nuclear@0
|
142 /*************************************************************************/
|
nuclear@0
|
143 /* */
|
nuclear@0
|
144 /* <Type> */
|
nuclear@0
|
145 /* FT_Byte */
|
nuclear@0
|
146 /* */
|
nuclear@0
|
147 /* <Description> */
|
nuclear@0
|
148 /* A simple typedef for the _unsigned_ char type. */
|
nuclear@0
|
149 /* */
|
nuclear@0
|
150 typedef unsigned char FT_Byte;
|
nuclear@0
|
151
|
nuclear@0
|
152
|
nuclear@0
|
153 /*************************************************************************/
|
nuclear@0
|
154 /* */
|
nuclear@0
|
155 /* <Type> */
|
nuclear@0
|
156 /* FT_Bytes */
|
nuclear@0
|
157 /* */
|
nuclear@0
|
158 /* <Description> */
|
nuclear@0
|
159 /* A typedef for constant memory areas. */
|
nuclear@0
|
160 /* */
|
nuclear@0
|
161 typedef const FT_Byte* FT_Bytes;
|
nuclear@0
|
162
|
nuclear@0
|
163
|
nuclear@0
|
164 /*************************************************************************/
|
nuclear@0
|
165 /* */
|
nuclear@0
|
166 /* <Type> */
|
nuclear@0
|
167 /* FT_Tag */
|
nuclear@0
|
168 /* */
|
nuclear@0
|
169 /* <Description> */
|
nuclear@0
|
170 /* A typedef for 32-bit tags (as used in the SFNT format). */
|
nuclear@0
|
171 /* */
|
nuclear@0
|
172 typedef FT_UInt32 FT_Tag;
|
nuclear@0
|
173
|
nuclear@0
|
174
|
nuclear@0
|
175 /*************************************************************************/
|
nuclear@0
|
176 /* */
|
nuclear@0
|
177 /* <Type> */
|
nuclear@0
|
178 /* FT_String */
|
nuclear@0
|
179 /* */
|
nuclear@0
|
180 /* <Description> */
|
nuclear@0
|
181 /* A simple typedef for the char type, usually used for strings. */
|
nuclear@0
|
182 /* */
|
nuclear@0
|
183 typedef char FT_String;
|
nuclear@0
|
184
|
nuclear@0
|
185
|
nuclear@0
|
186 /*************************************************************************/
|
nuclear@0
|
187 /* */
|
nuclear@0
|
188 /* <Type> */
|
nuclear@0
|
189 /* FT_Short */
|
nuclear@0
|
190 /* */
|
nuclear@0
|
191 /* <Description> */
|
nuclear@0
|
192 /* A typedef for signed short. */
|
nuclear@0
|
193 /* */
|
nuclear@0
|
194 typedef signed short FT_Short;
|
nuclear@0
|
195
|
nuclear@0
|
196
|
nuclear@0
|
197 /*************************************************************************/
|
nuclear@0
|
198 /* */
|
nuclear@0
|
199 /* <Type> */
|
nuclear@0
|
200 /* FT_UShort */
|
nuclear@0
|
201 /* */
|
nuclear@0
|
202 /* <Description> */
|
nuclear@0
|
203 /* A typedef for unsigned short. */
|
nuclear@0
|
204 /* */
|
nuclear@0
|
205 typedef unsigned short FT_UShort;
|
nuclear@0
|
206
|
nuclear@0
|
207
|
nuclear@0
|
208 /*************************************************************************/
|
nuclear@0
|
209 /* */
|
nuclear@0
|
210 /* <Type> */
|
nuclear@0
|
211 /* FT_Int */
|
nuclear@0
|
212 /* */
|
nuclear@0
|
213 /* <Description> */
|
nuclear@0
|
214 /* A typedef for the int type. */
|
nuclear@0
|
215 /* */
|
nuclear@0
|
216 typedef signed int FT_Int;
|
nuclear@0
|
217
|
nuclear@0
|
218
|
nuclear@0
|
219 /*************************************************************************/
|
nuclear@0
|
220 /* */
|
nuclear@0
|
221 /* <Type> */
|
nuclear@0
|
222 /* FT_UInt */
|
nuclear@0
|
223 /* */
|
nuclear@0
|
224 /* <Description> */
|
nuclear@0
|
225 /* A typedef for the unsigned int type. */
|
nuclear@0
|
226 /* */
|
nuclear@0
|
227 typedef unsigned int FT_UInt;
|
nuclear@0
|
228
|
nuclear@0
|
229
|
nuclear@0
|
230 /*************************************************************************/
|
nuclear@0
|
231 /* */
|
nuclear@0
|
232 /* <Type> */
|
nuclear@0
|
233 /* FT_Long */
|
nuclear@0
|
234 /* */
|
nuclear@0
|
235 /* <Description> */
|
nuclear@0
|
236 /* A typedef for signed long. */
|
nuclear@0
|
237 /* */
|
nuclear@0
|
238 typedef signed long FT_Long;
|
nuclear@0
|
239
|
nuclear@0
|
240
|
nuclear@0
|
241 /*************************************************************************/
|
nuclear@0
|
242 /* */
|
nuclear@0
|
243 /* <Type> */
|
nuclear@0
|
244 /* FT_ULong */
|
nuclear@0
|
245 /* */
|
nuclear@0
|
246 /* <Description> */
|
nuclear@0
|
247 /* A typedef for unsigned long. */
|
nuclear@0
|
248 /* */
|
nuclear@0
|
249 typedef unsigned long FT_ULong;
|
nuclear@0
|
250
|
nuclear@0
|
251
|
nuclear@0
|
252 /*************************************************************************/
|
nuclear@0
|
253 /* */
|
nuclear@0
|
254 /* <Type> */
|
nuclear@0
|
255 /* FT_F2Dot14 */
|
nuclear@0
|
256 /* */
|
nuclear@0
|
257 /* <Description> */
|
nuclear@0
|
258 /* A signed 2.14 fixed float type used for unit vectors. */
|
nuclear@0
|
259 /* */
|
nuclear@0
|
260 typedef signed short FT_F2Dot14;
|
nuclear@0
|
261
|
nuclear@0
|
262
|
nuclear@0
|
263 /*************************************************************************/
|
nuclear@0
|
264 /* */
|
nuclear@0
|
265 /* <Type> */
|
nuclear@0
|
266 /* FT_F26Dot6 */
|
nuclear@0
|
267 /* */
|
nuclear@0
|
268 /* <Description> */
|
nuclear@0
|
269 /* A signed 26.6 fixed float type used for vectorial pixel */
|
nuclear@0
|
270 /* coordinates. */
|
nuclear@0
|
271 /* */
|
nuclear@0
|
272 typedef signed long FT_F26Dot6;
|
nuclear@0
|
273
|
nuclear@0
|
274
|
nuclear@0
|
275 /*************************************************************************/
|
nuclear@0
|
276 /* */
|
nuclear@0
|
277 /* <Type> */
|
nuclear@0
|
278 /* FT_Fixed */
|
nuclear@0
|
279 /* */
|
nuclear@0
|
280 /* <Description> */
|
nuclear@0
|
281 /* This type is used to store 16.16 fixed float values, like scaling */
|
nuclear@0
|
282 /* values or matrix coefficients. */
|
nuclear@0
|
283 /* */
|
nuclear@0
|
284 typedef signed long FT_Fixed;
|
nuclear@0
|
285
|
nuclear@0
|
286
|
nuclear@0
|
287 /*************************************************************************/
|
nuclear@0
|
288 /* */
|
nuclear@0
|
289 /* <Type> */
|
nuclear@0
|
290 /* FT_Error */
|
nuclear@0
|
291 /* */
|
nuclear@0
|
292 /* <Description> */
|
nuclear@0
|
293 /* The FreeType error code type. A value of~0 is always interpreted */
|
nuclear@0
|
294 /* as a successful operation. */
|
nuclear@0
|
295 /* */
|
nuclear@0
|
296 typedef int FT_Error;
|
nuclear@0
|
297
|
nuclear@0
|
298
|
nuclear@0
|
299 /*************************************************************************/
|
nuclear@0
|
300 /* */
|
nuclear@0
|
301 /* <Type> */
|
nuclear@0
|
302 /* FT_Pointer */
|
nuclear@0
|
303 /* */
|
nuclear@0
|
304 /* <Description> */
|
nuclear@0
|
305 /* A simple typedef for a typeless pointer. */
|
nuclear@0
|
306 /* */
|
nuclear@0
|
307 typedef void* FT_Pointer;
|
nuclear@0
|
308
|
nuclear@0
|
309
|
nuclear@0
|
310 /*************************************************************************/
|
nuclear@0
|
311 /* */
|
nuclear@0
|
312 /* <Type> */
|
nuclear@0
|
313 /* FT_Offset */
|
nuclear@0
|
314 /* */
|
nuclear@0
|
315 /* <Description> */
|
nuclear@0
|
316 /* This is equivalent to the ANSI~C `size_t' type, i.e., the largest */
|
nuclear@0
|
317 /* _unsigned_ integer type used to express a file size or position, */
|
nuclear@0
|
318 /* or a memory block size. */
|
nuclear@0
|
319 /* */
|
nuclear@0
|
320 typedef size_t FT_Offset;
|
nuclear@0
|
321
|
nuclear@0
|
322
|
nuclear@0
|
323 /*************************************************************************/
|
nuclear@0
|
324 /* */
|
nuclear@0
|
325 /* <Type> */
|
nuclear@0
|
326 /* FT_PtrDist */
|
nuclear@0
|
327 /* */
|
nuclear@0
|
328 /* <Description> */
|
nuclear@0
|
329 /* This is equivalent to the ANSI~C `ptrdiff_t' type, i.e., the */
|
nuclear@0
|
330 /* largest _signed_ integer type used to express the distance */
|
nuclear@0
|
331 /* between two pointers. */
|
nuclear@0
|
332 /* */
|
nuclear@0
|
333 typedef ft_ptrdiff_t FT_PtrDist;
|
nuclear@0
|
334
|
nuclear@0
|
335
|
nuclear@0
|
336 /*************************************************************************/
|
nuclear@0
|
337 /* */
|
nuclear@0
|
338 /* <Struct> */
|
nuclear@0
|
339 /* FT_UnitVector */
|
nuclear@0
|
340 /* */
|
nuclear@0
|
341 /* <Description> */
|
nuclear@0
|
342 /* A simple structure used to store a 2D vector unit vector. Uses */
|
nuclear@0
|
343 /* FT_F2Dot14 types. */
|
nuclear@0
|
344 /* */
|
nuclear@0
|
345 /* <Fields> */
|
nuclear@0
|
346 /* x :: Horizontal coordinate. */
|
nuclear@0
|
347 /* */
|
nuclear@0
|
348 /* y :: Vertical coordinate. */
|
nuclear@0
|
349 /* */
|
nuclear@0
|
350 typedef struct FT_UnitVector_
|
nuclear@0
|
351 {
|
nuclear@0
|
352 FT_F2Dot14 x;
|
nuclear@0
|
353 FT_F2Dot14 y;
|
nuclear@0
|
354
|
nuclear@0
|
355 } FT_UnitVector;
|
nuclear@0
|
356
|
nuclear@0
|
357
|
nuclear@0
|
358 /*************************************************************************/
|
nuclear@0
|
359 /* */
|
nuclear@0
|
360 /* <Struct> */
|
nuclear@0
|
361 /* FT_Matrix */
|
nuclear@0
|
362 /* */
|
nuclear@0
|
363 /* <Description> */
|
nuclear@0
|
364 /* A simple structure used to store a 2x2 matrix. Coefficients are */
|
nuclear@0
|
365 /* in 16.16 fixed float format. The computation performed is: */
|
nuclear@0
|
366 /* */
|
nuclear@0
|
367 /* { */
|
nuclear@0
|
368 /* x' = x*xx + y*xy */
|
nuclear@0
|
369 /* y' = x*yx + y*yy */
|
nuclear@0
|
370 /* } */
|
nuclear@0
|
371 /* */
|
nuclear@0
|
372 /* <Fields> */
|
nuclear@0
|
373 /* xx :: Matrix coefficient. */
|
nuclear@0
|
374 /* */
|
nuclear@0
|
375 /* xy :: Matrix coefficient. */
|
nuclear@0
|
376 /* */
|
nuclear@0
|
377 /* yx :: Matrix coefficient. */
|
nuclear@0
|
378 /* */
|
nuclear@0
|
379 /* yy :: Matrix coefficient. */
|
nuclear@0
|
380 /* */
|
nuclear@0
|
381 typedef struct FT_Matrix_
|
nuclear@0
|
382 {
|
nuclear@0
|
383 FT_Fixed xx, xy;
|
nuclear@0
|
384 FT_Fixed yx, yy;
|
nuclear@0
|
385
|
nuclear@0
|
386 } FT_Matrix;
|
nuclear@0
|
387
|
nuclear@0
|
388
|
nuclear@0
|
389 /*************************************************************************/
|
nuclear@0
|
390 /* */
|
nuclear@0
|
391 /* <Struct> */
|
nuclear@0
|
392 /* FT_Data */
|
nuclear@0
|
393 /* */
|
nuclear@0
|
394 /* <Description> */
|
nuclear@0
|
395 /* Read-only binary data represented as a pointer and a length. */
|
nuclear@0
|
396 /* */
|
nuclear@0
|
397 /* <Fields> */
|
nuclear@0
|
398 /* pointer :: The data. */
|
nuclear@0
|
399 /* */
|
nuclear@0
|
400 /* length :: The length of the data in bytes. */
|
nuclear@0
|
401 /* */
|
nuclear@0
|
402 typedef struct FT_Data_
|
nuclear@0
|
403 {
|
nuclear@0
|
404 const FT_Byte* pointer;
|
nuclear@0
|
405 FT_Int length;
|
nuclear@0
|
406
|
nuclear@0
|
407 } FT_Data;
|
nuclear@0
|
408
|
nuclear@0
|
409
|
nuclear@0
|
410 /*************************************************************************/
|
nuclear@0
|
411 /* */
|
nuclear@0
|
412 /* <FuncType> */
|
nuclear@0
|
413 /* FT_Generic_Finalizer */
|
nuclear@0
|
414 /* */
|
nuclear@0
|
415 /* <Description> */
|
nuclear@0
|
416 /* Describe a function used to destroy the `client' data of any */
|
nuclear@0
|
417 /* FreeType object. See the description of the @FT_Generic type for */
|
nuclear@0
|
418 /* details of usage. */
|
nuclear@0
|
419 /* */
|
nuclear@0
|
420 /* <Input> */
|
nuclear@0
|
421 /* The address of the FreeType object which is under finalization. */
|
nuclear@0
|
422 /* Its client data is accessed through its `generic' field. */
|
nuclear@0
|
423 /* */
|
nuclear@0
|
424 typedef void (*FT_Generic_Finalizer)(void* object);
|
nuclear@0
|
425
|
nuclear@0
|
426
|
nuclear@0
|
427 /*************************************************************************/
|
nuclear@0
|
428 /* */
|
nuclear@0
|
429 /* <Struct> */
|
nuclear@0
|
430 /* FT_Generic */
|
nuclear@0
|
431 /* */
|
nuclear@0
|
432 /* <Description> */
|
nuclear@0
|
433 /* Client applications often need to associate their own data to a */
|
nuclear@0
|
434 /* variety of FreeType core objects. For example, a text layout API */
|
nuclear@0
|
435 /* might want to associate a glyph cache to a given size object. */
|
nuclear@0
|
436 /* */
|
nuclear@0
|
437 /* Most FreeType object contains a `generic' field, of type */
|
nuclear@0
|
438 /* FT_Generic, which usage is left to client applications and font */
|
nuclear@0
|
439 /* servers. */
|
nuclear@0
|
440 /* */
|
nuclear@0
|
441 /* It can be used to store a pointer to client-specific data, as well */
|
nuclear@0
|
442 /* as the address of a `finalizer' function, which will be called by */
|
nuclear@0
|
443 /* FreeType when the object is destroyed (for example, the previous */
|
nuclear@0
|
444 /* client example would put the address of the glyph cache destructor */
|
nuclear@0
|
445 /* in the `finalizer' field). */
|
nuclear@0
|
446 /* */
|
nuclear@0
|
447 /* <Fields> */
|
nuclear@0
|
448 /* data :: A typeless pointer to any client-specified data. This */
|
nuclear@0
|
449 /* field is completely ignored by the FreeType library. */
|
nuclear@0
|
450 /* */
|
nuclear@0
|
451 /* finalizer :: A pointer to a `generic finalizer' function, which */
|
nuclear@0
|
452 /* will be called when the object is destroyed. If this */
|
nuclear@0
|
453 /* field is set to NULL, no code will be called. */
|
nuclear@0
|
454 /* */
|
nuclear@0
|
455 typedef struct FT_Generic_
|
nuclear@0
|
456 {
|
nuclear@0
|
457 void* data;
|
nuclear@0
|
458 FT_Generic_Finalizer finalizer;
|
nuclear@0
|
459
|
nuclear@0
|
460 } FT_Generic;
|
nuclear@0
|
461
|
nuclear@0
|
462
|
nuclear@0
|
463 /*************************************************************************/
|
nuclear@0
|
464 /* */
|
nuclear@0
|
465 /* <Macro> */
|
nuclear@0
|
466 /* FT_MAKE_TAG */
|
nuclear@0
|
467 /* */
|
nuclear@0
|
468 /* <Description> */
|
nuclear@0
|
469 /* This macro converts four-letter tags which are used to label */
|
nuclear@0
|
470 /* TrueType tables into an unsigned long to be used within FreeType. */
|
nuclear@0
|
471 /* */
|
nuclear@0
|
472 /* <Note> */
|
nuclear@0
|
473 /* The produced values *must* be 32-bit integers. Don't redefine */
|
nuclear@0
|
474 /* this macro. */
|
nuclear@0
|
475 /* */
|
nuclear@0
|
476 #define FT_MAKE_TAG( _x1, _x2, _x3, _x4 ) \
|
nuclear@0
|
477 (FT_Tag) \
|
nuclear@0
|
478 ( ( (FT_ULong)_x1 << 24 ) | \
|
nuclear@0
|
479 ( (FT_ULong)_x2 << 16 ) | \
|
nuclear@0
|
480 ( (FT_ULong)_x3 << 8 ) | \
|
nuclear@0
|
481 (FT_ULong)_x4 )
|
nuclear@0
|
482
|
nuclear@0
|
483
|
nuclear@0
|
484 /*************************************************************************/
|
nuclear@0
|
485 /*************************************************************************/
|
nuclear@0
|
486 /* */
|
nuclear@0
|
487 /* L I S T M A N A G E M E N T */
|
nuclear@0
|
488 /* */
|
nuclear@0
|
489 /*************************************************************************/
|
nuclear@0
|
490 /*************************************************************************/
|
nuclear@0
|
491
|
nuclear@0
|
492
|
nuclear@0
|
493 /*************************************************************************/
|
nuclear@0
|
494 /* */
|
nuclear@0
|
495 /* <Section> */
|
nuclear@0
|
496 /* list_processing */
|
nuclear@0
|
497 /* */
|
nuclear@0
|
498 /*************************************************************************/
|
nuclear@0
|
499
|
nuclear@0
|
500
|
nuclear@0
|
501 /*************************************************************************/
|
nuclear@0
|
502 /* */
|
nuclear@0
|
503 /* <Type> */
|
nuclear@0
|
504 /* FT_ListNode */
|
nuclear@0
|
505 /* */
|
nuclear@0
|
506 /* <Description> */
|
nuclear@0
|
507 /* Many elements and objects in FreeType are listed through an */
|
nuclear@0
|
508 /* @FT_List record (see @FT_ListRec). As its name suggests, an */
|
nuclear@0
|
509 /* FT_ListNode is a handle to a single list element. */
|
nuclear@0
|
510 /* */
|
nuclear@0
|
511 typedef struct FT_ListNodeRec_* FT_ListNode;
|
nuclear@0
|
512
|
nuclear@0
|
513
|
nuclear@0
|
514 /*************************************************************************/
|
nuclear@0
|
515 /* */
|
nuclear@0
|
516 /* <Type> */
|
nuclear@0
|
517 /* FT_List */
|
nuclear@0
|
518 /* */
|
nuclear@0
|
519 /* <Description> */
|
nuclear@0
|
520 /* A handle to a list record (see @FT_ListRec). */
|
nuclear@0
|
521 /* */
|
nuclear@0
|
522 typedef struct FT_ListRec_* FT_List;
|
nuclear@0
|
523
|
nuclear@0
|
524
|
nuclear@0
|
525 /*************************************************************************/
|
nuclear@0
|
526 /* */
|
nuclear@0
|
527 /* <Struct> */
|
nuclear@0
|
528 /* FT_ListNodeRec */
|
nuclear@0
|
529 /* */
|
nuclear@0
|
530 /* <Description> */
|
nuclear@0
|
531 /* A structure used to hold a single list element. */
|
nuclear@0
|
532 /* */
|
nuclear@0
|
533 /* <Fields> */
|
nuclear@0
|
534 /* prev :: The previous element in the list. NULL if first. */
|
nuclear@0
|
535 /* */
|
nuclear@0
|
536 /* next :: The next element in the list. NULL if last. */
|
nuclear@0
|
537 /* */
|
nuclear@0
|
538 /* data :: A typeless pointer to the listed object. */
|
nuclear@0
|
539 /* */
|
nuclear@0
|
540 typedef struct FT_ListNodeRec_
|
nuclear@0
|
541 {
|
nuclear@0
|
542 FT_ListNode prev;
|
nuclear@0
|
543 FT_ListNode next;
|
nuclear@0
|
544 void* data;
|
nuclear@0
|
545
|
nuclear@0
|
546 } FT_ListNodeRec;
|
nuclear@0
|
547
|
nuclear@0
|
548
|
nuclear@0
|
549 /*************************************************************************/
|
nuclear@0
|
550 /* */
|
nuclear@0
|
551 /* <Struct> */
|
nuclear@0
|
552 /* FT_ListRec */
|
nuclear@0
|
553 /* */
|
nuclear@0
|
554 /* <Description> */
|
nuclear@0
|
555 /* A structure used to hold a simple doubly-linked list. These are */
|
nuclear@0
|
556 /* used in many parts of FreeType. */
|
nuclear@0
|
557 /* */
|
nuclear@0
|
558 /* <Fields> */
|
nuclear@0
|
559 /* head :: The head (first element) of doubly-linked list. */
|
nuclear@0
|
560 /* */
|
nuclear@0
|
561 /* tail :: The tail (last element) of doubly-linked list. */
|
nuclear@0
|
562 /* */
|
nuclear@0
|
563 typedef struct FT_ListRec_
|
nuclear@0
|
564 {
|
nuclear@0
|
565 FT_ListNode head;
|
nuclear@0
|
566 FT_ListNode tail;
|
nuclear@0
|
567
|
nuclear@0
|
568 } FT_ListRec;
|
nuclear@0
|
569
|
nuclear@0
|
570
|
nuclear@0
|
571 /* */
|
nuclear@0
|
572
|
nuclear@0
|
573 #define FT_IS_EMPTY( list ) ( (list).head == 0 )
|
nuclear@0
|
574
|
nuclear@0
|
575 /* return base error code (without module-specific prefix) */
|
nuclear@0
|
576 #define FT_ERROR_BASE( x ) ( (x) & 0xFF )
|
nuclear@0
|
577
|
nuclear@0
|
578 /* return module error code */
|
nuclear@0
|
579 #define FT_ERROR_MODULE( x ) ( (x) & 0xFF00U )
|
nuclear@0
|
580
|
nuclear@0
|
581 #define FT_BOOL( x ) ( (FT_Bool)( x ) )
|
nuclear@0
|
582
|
nuclear@0
|
583 FT_END_HEADER
|
nuclear@0
|
584
|
nuclear@0
|
585 #endif /* __FTTYPES_H__ */
|
nuclear@0
|
586
|
nuclear@0
|
587
|
nuclear@0
|
588 /* END */
|