1 /***************************************************************************/ 2 /* */ 3 /* basepic.h */ 4 /* */ 5 /* The FreeType position independent code services for base. */ 6 /* */ 7 /* Copyright 2009-2018 by */ 8 /* Oran Agra and Mickey Gabel. */ 9 /* */ 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. */ 15 /* */ 16 /***************************************************************************/ 17 18 19 #ifndef BASEPIC_H_ 20 #define BASEPIC_H_ 21 22 23 #include FT_INTERNAL_PIC_H 24 25 26 #ifndef FT_CONFIG_OPTION_PIC 27 28 #define FT_OUTLINE_GLYPH_CLASS_GET &ft_outline_glyph_class 29 #define FT_BITMAP_GLYPH_CLASS_GET &ft_bitmap_glyph_class 30 #define FT_DEFAULT_MODULES_GET ft_default_modules 31 32 #ifdef FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK 33 #define FT_RACCESS_GUESS_TABLE_GET ft_raccess_guess_table 34 #endif 35 36 #else /* FT_CONFIG_OPTION_PIC */ 37 38 #include FT_GLYPH_H 39 40 #ifdef FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK 41 #include FT_INTERNAL_RFORK_H 42 #endif 43 44 45 FT_BEGIN_HEADER 46 47 typedef struct BasePIC_ 48 { 49 FT_Module_Class** default_module_classes; 50 FT_Glyph_Class ft_outline_glyph_class; 51 FT_Glyph_Class ft_bitmap_glyph_class; 52 53 #ifdef FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK 54 ft_raccess_guess_rec ft_raccess_guess_table[FT_RACCESS_N_RULES]; 55 #endif 56 57 } BasePIC; 58 59 60 #define GET_PIC( lib ) ( (BasePIC*)( (lib)->pic_container.base ) ) 61 62 #define FT_OUTLINE_GLYPH_CLASS_GET \ 63 ( &GET_PIC( library )->ft_outline_glyph_class ) 64 #define FT_BITMAP_GLYPH_CLASS_GET \ 65 ( &GET_PIC( library )->ft_bitmap_glyph_class ) 66 #define FT_DEFAULT_MODULES_GET \ 67 ( GET_PIC( library )->default_module_classes ) 68 69 #ifdef FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK 70 #define FT_RACCESS_GUESS_TABLE_GET \ 71 ( GET_PIC( library )->ft_raccess_guess_table ) 72 #endif 73 74 75 /* see basepic.c for the implementation */ 76 void 77 ft_base_pic_free( FT_Library library ); 78 79 FT_Error 80 ft_base_pic_init( FT_Library library ); 81 82 FT_END_HEADER 83 84 #endif /* FT_CONFIG_OPTION_PIC */ 85 86 /* */ 87 88 #endif /* BASEPIC_H_ */ 89 90 91 /* END */ 92