41 #include FT_CONFIG_CONFIG_H
42 #include FT_INTERNAL_OBJECTS_H
43 #include FT_INTERNAL_DEBUG_H
55 #define FT_COMPONENT trace_init
58 #ifndef FT_CONFIG_OPTION_PIC
63 #define FT_USE_MODULE( type, x ) extern "C" const type x;
65 #define FT_USE_MODULE( type, x ) extern const type x;
68 #include FT_CONFIG_MODULES_H
71 #define FT_USE_MODULE( type, x ) (const FT_Module_Class*)&(x),
76 #include FT_CONFIG_MODULES_H
85 #define FT_EXTERNC extern "C"
87 #define FT_EXTERNC extern
92 #define FT_USE_MODULE( type, x ) \
94 FT_Create_Class_ ## x( FT_Library library, \
95 FT_Module_Class* *output_class ); \
97 FT_Destroy_Class_ ## x( FT_Library library, \
98 FT_Module_Class* clazz );
100 #include FT_CONFIG_MODULES_H
104 #define FT_USE_MODULE( type, x ) MODULE_CLASS_ ## x,
108 #include FT_CONFIG_MODULES_H
109 FT_NUM_MODULE_CLASSES
114 #define FT_USE_MODULE( type, x ) \
117 FT_Destroy_Class_ ## x( library, classes[i] ); \
128 BasePIC* pic_container = (BasePIC*)library->pic_container.base;
131 if ( !pic_container->default_module_classes )
134 memory = library->memory;
135 classes = pic_container->default_module_classes;
138 #include FT_CONFIG_MODULES_H
141 pic_container->default_module_classes = 0;
147 #define FT_USE_MODULE( type, x ) \
148 error = FT_Create_Class_ ## x( library, &clazz ); \
151 classes[i++] = clazz;
155 ft_create_default_module_classes(
FT_Library library )
162 BasePIC* pic_container = (BasePIC*)library->pic_container.base;
165 memory = library->memory;
167 pic_container->default_module_classes = 0;
170 ( FT_NUM_MODULE_CLASSES + 1 ) ) )
174 for ( i = 0; i < FT_NUM_MODULE_CLASSES; i++ )
176 classes[FT_NUM_MODULE_CLASSES] = 0;
180 #include FT_CONFIG_MODULES_H
184 ft_destroy_default_module_classes( library );
186 pic_container->default_module_classes = classes;
205 #ifdef FT_CONFIG_OPTION_PIC
222 " Cannot install `%s', error = 0x%x\n",
223 (*cur)->module_name, error ));
244 FT_ERROR((
"FT_Init_FreeType: cannot find memory manager\n" ));
245 return FT_Err_Unimplemented_Feature;
#define FT_ALLOC(ptr, size)
#define FT_DEFAULT_MODULES_GET
FT_Done_Library(FT_Library library)
FT_Done_FreeType(FT_Library library)
FT_Init_FreeType(FT_Library *alibrary)
#define FT_ERROR(varformat)
FT_Add_Module(FT_Library library, const FT_Module_Class *clazz)
static const FT_Module_Class *const ft_default_modules[]
#define FT_TRACE0(varformat)
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
FT_New_Library(FT_Memory memory, FT_Library *alibrary)
FT_Add_Default_Modules(FT_Library library)
FT_Done_Memory(FT_Memory memory)