contrib/OWB: add correct SDL dependency, fix compilers used
[AROS-Contrib.git] / freetype1 / lib / ttengine.h
blobe946d06ce2b200755b3aca3af96f00821b031449
1 /*******************************************************************
3 * ttengine.h 1.1
5 * Engine instance structure definition.
7 * Copyright 1996-1999 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 * New in 1.1 :
18 * - added the 'raster_lock' mutex field to synchronize
19 * scan-line conversion in thread-safe and re-entrant builds.
21 ******************************************************************/
23 #ifndef TTENGINE_H
24 #define TTENGINE_H
26 #include "tttypes.h"
27 #include "ttconfig.h"
28 #include "freetype.h"
29 #include "ttmutex.h"
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
35 /********************************************************************/
36 /* */
37 /* The freetype engine instance structure. */
38 /* */
39 /* This structure holds all the data that is necessary to run */
40 /* one instance of the freetype engine. It is needed to get a */
41 /* completely re-entrant version of the library. */
42 /* */
43 /* The goal is to move _all_ component-specific variables, either */
44 /* static or global in the structure; the component initializers */
45 /* and finalizers will all be called with the address of a valid */
46 /* TEngine_Instance. */
47 /* */
48 /********************************************************************/
50 struct TEngine_Instance_
52 TMutex lock; /* engine lock */
54 void* list_free_elements;
56 void* objs_face_class; /* the face cache class */
57 void* objs_instance_class; /* the instance cache class */
58 void* objs_execution_class; /* the context cache class */
59 void* objs_glyph_class; /* the glyph cache class */
61 void* objs_face_cache; /* these caches are used to track */
62 void* objs_exec_cache; /* the current face and execution */
63 /* context objects */
65 void* file_component; /* ttfile implementation dependent */
67 TMutex raster_lock; /* mutex for this engine's render pool */
68 void* raster_component; /* ttraster implementation depedent */
69 Byte raster_palette[5]; /* gray-levels palette for anti-aliasing */
71 void* extension_component; /* extensions dependent */
73 #if 0
74 TT_Glyph_Loader_Callback glCallback; /* glyph loader callback, if any */
75 #endif
78 /* NOTE : The raster's lock is only acquired by the Render_Glyph and */
79 /* Render_Gray_Glyph functions, which always release it on exit */
80 /* They do not lock the engine mutex. This means you shouldn't */
81 /* be concerned about deadlocks between the two mutexes, as these */
82 /* should never appear.. */
84 typedef struct TEngine_Instance_ TEngine_Instance;
85 typedef TEngine_Instance* PEngine_Instance;
88 #ifdef TT_CONFIG_OPTION_THREAD_SAFE /* for re-entrant builds */
90 #define ENGINE_ARG TEngine_Instance* _engine
91 #define ENGINE_ARGS TEngine_Instance* _engine,
93 #define ENGINE_VAR _engine
94 #define ENGINE_VARS _engine,
96 #define ENGINE _engine
98 #else /* for thread-safe builds */
100 #define ENGINE_ARG /* void */
101 #define ENGINE_ARGS
103 #define ENGINE_VAR
104 #define ENGINE_VARS
106 #endif /* TT_CONFIG_OPTION_THREAD_SAFE */
108 #ifdef __cplusplus
110 #endif
112 #endif /* TTENGINE_H */
115 /* END */