OLD | NEW |
1 /***************************************************************************/ | 1 /***************************************************************************/ |
2 /* */ | 2 /* */ |
3 /* basepic.h */ | 3 /* basepic.h */ |
4 /* */ | 4 /* */ |
5 /* The FreeType position independent code services for base. */ | 5 /* The FreeType position independent code services for base. */ |
6 /* */ | 6 /* */ |
7 /* Copyright 2009 by */ | 7 /* Copyright 2009 by */ |
8 /* Oran Agra and Mickey Gabel. */ | 8 /* Oran Agra and Mickey Gabel. */ |
9 /* */ | 9 /* */ |
10 /* This file is part of the FreeType project, and may only be used, */ | 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 */ | 11 /* modified, and distributed under the terms of the FreeType project */ |
12 /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ | 12 /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ |
13 /* this file you indicate that you have read the license and */ | 13 /* this file you indicate that you have read the license and */ |
14 /* understand and accept it fully. */ | 14 /* understand and accept it fully. */ |
15 /* */ | 15 /* */ |
16 /***************************************************************************/ | 16 /***************************************************************************/ |
17 | 17 |
18 | 18 |
19 #ifndef __BASEPIC_H__ | 19 #ifndef __BASEPIC_H__ |
20 #define __BASEPIC_H__ | 20 #define __BASEPIC_H__ |
21 | 21 |
22 | 22 |
23 FT_BEGIN_HEADER | 23 FT_BEGIN_HEADER |
24 | 24 |
25 #include FT_INTERNAL_PIC_H | 25 #include FT_INTERNAL_PIC_H |
26 | 26 |
27 #ifndef FT_CONFIG_OPTION_PIC | 27 #ifndef FT_CONFIG_OPTION_PIC |
28 #define FT_OUTLINE_GLYPH_CLASS_GET &ft_outline_glyph_class | 28 |
29 #define FT_BITMAP_GLYPH_CLASS_GET &ft_bitmap_glyph_class | 29 #define FT_OUTLINE_GLYPH_CLASS_GET &ft_outline_glyph_class |
30 #define FT_DEFAULT_MODULES_GET ft_default_modules | 30 #define FT_BITMAP_GLYPH_CLASS_GET &ft_bitmap_glyph_class |
| 31 #define FT_DEFAULT_MODULES_GET ft_default_modules |
| 32 |
31 #ifdef FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK | 33 #ifdef FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK |
32 #define FT_RACCESS_GUESS_TABLE_GET ft_raccess_guess_table | 34 #define FT_RACCESS_GUESS_TABLE_GET ft_raccess_guess_table |
33 #endif | 35 #endif |
34 | 36 |
35 #else /* FT_CONFIG_OPTION_PIC */ | 37 #else /* FT_CONFIG_OPTION_PIC */ |
36 | 38 |
37 #include FT_GLYPH_H | 39 #include FT_GLYPH_H |
38 | 40 |
39 #ifdef FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK | 41 #ifdef FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK |
40 #include FT_INTERNAL_RFORK_H | 42 #include FT_INTERNAL_RFORK_H |
41 #endif | 43 #endif |
42 | 44 |
43 | 45 |
44 typedef struct BasePIC_ | 46 typedef struct BasePIC_ |
45 { | 47 { |
46 FT_Module_Class** default_module_classes; | 48 FT_Module_Class** default_module_classes; |
47 FT_Glyph_Class ft_outline_glyph_class; | 49 FT_Glyph_Class ft_outline_glyph_class; |
48 FT_Glyph_Class ft_bitmap_glyph_class; | 50 FT_Glyph_Class ft_bitmap_glyph_class; |
| 51 |
49 #ifdef FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK | 52 #ifdef FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK |
50 ft_raccess_guess_rec ft_raccess_guess_table[FT_RACCESS_N_RULES]; | 53 ft_raccess_guess_rec ft_raccess_guess_table[FT_RACCESS_N_RULES]; |
51 #endif | 54 #endif |
| 55 |
52 } BasePIC; | 56 } BasePIC; |
53 | 57 |
54 #define GET_PIC(lib) ((BasePIC*)((lib)->pic_container.base)) | 58 |
55 #define FT_OUTLINE_GLYPH_CLASS_GET (&GET_PIC(library)->ft_outline_glyph_class
) | 59 #define GET_PIC( lib ) ( (BasePIC*)( (lib)->pic_container.base ) ) |
56 #define FT_BITMAP_GLYPH_CLASS_GET (&GET_PIC(library)->ft_bitmap_glyph_class) | 60 |
57 #define FT_DEFAULT_MODULES_GET (GET_PIC(library)->default_module_classes) | 61 #define FT_OUTLINE_GLYPH_CLASS_GET \ |
| 62 ( &GET_PIC( library )->ft_outline_glyph_class ) |
| 63 #define FT_BITMAP_GLYPH_CLASS_GET \ |
| 64 ( &GET_PIC( library )->ft_bitmap_glyph_class ) |
| 65 #define FT_DEFAULT_MODULES_GET \ |
| 66 ( GET_PIC( library )->default_module_classes ) |
| 67 |
58 #ifdef FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK | 68 #ifdef FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK |
59 #define FT_RACCESS_GUESS_TABLE_GET (GET_PIC(library)->ft_raccess_guess_table) | 69 #define FT_RACCESS_GUESS_TABLE_GET \ |
| 70 ( GET_PIC( library )->ft_raccess_guess_table ) |
60 #endif | 71 #endif |
61 | 72 |
62 /* see basepic.c for the implementation. */ | 73 |
| 74 /* see basepic.c for the implementation */ |
63 void | 75 void |
64 ft_base_pic_free( FT_Library library ); | 76 ft_base_pic_free( FT_Library library ); |
65 | 77 |
66 FT_Error | 78 FT_Error |
67 ft_base_pic_init( FT_Library library ); | 79 ft_base_pic_init( FT_Library library ); |
68 | 80 |
69 #endif /* FT_CONFIG_OPTION_PIC */ | 81 #endif /* FT_CONFIG_OPTION_PIC */ |
70 /* */ | 82 |
| 83 /* */ |
71 | 84 |
72 FT_END_HEADER | 85 FT_END_HEADER |
73 | 86 |
74 #endif /* __BASEPIC_H__ */ | 87 #endif /* __BASEPIC_H__ */ |
75 | 88 |
76 | 89 |
77 /* END */ | 90 /* END */ |
OLD | NEW |