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