OLD | NEW |
(Empty) | |
| 1 /***************************************************************************/ |
| 2 /* */ |
| 3 /* svprop.h */ |
| 4 /* */ |
| 5 /* The FreeType property service (specification). */ |
| 6 /* */ |
| 7 /* Copyright 2012 by */ |
| 8 /* David Turner, Robert Wilhelm, and Werner Lemberg. */ |
| 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 __SVPROP_H__ |
| 20 #define __SVPROP_H__ |
| 21 |
| 22 |
| 23 FT_BEGIN_HEADER |
| 24 |
| 25 |
| 26 #define FT_SERVICE_ID_PROPERTIES "properties" |
| 27 |
| 28 |
| 29 typedef FT_Error |
| 30 (*FT_Properties_SetFunc)( FT_Module module, |
| 31 const char* property_name, |
| 32 const void* value ); |
| 33 |
| 34 typedef FT_Error |
| 35 (*FT_Properties_GetFunc)( FT_Module module, |
| 36 const char* property_name, |
| 37 void* value ); |
| 38 |
| 39 |
| 40 FT_DEFINE_SERVICE( Properties ) |
| 41 { |
| 42 FT_Properties_SetFunc set_property; |
| 43 FT_Properties_GetFunc get_property; |
| 44 }; |
| 45 |
| 46 |
| 47 #ifndef FT_CONFIG_OPTION_PIC |
| 48 |
| 49 #define FT_DEFINE_SERVICE_PROPERTIESREC( class_, \ |
| 50 set_property_, \ |
| 51 get_property_ ) \ |
| 52 static const FT_Service_PropertiesRec class_ = \ |
| 53 { \ |
| 54 set_property_, \ |
| 55 get_property_ \ |
| 56 }; |
| 57 |
| 58 #else /* FT_CONFIG_OPTION_PIC */ |
| 59 |
| 60 #define FT_DEFINE_SERVICE_PROPERTIESREC( class_, \ |
| 61 set_property_, \ |
| 62 get_property_ ) \ |
| 63 void \ |
| 64 FT_Init_Class_ ## class_( FT_Service_PropertiesRec* clazz ) \ |
| 65 { \ |
| 66 clazz->set_property = set_property_; \ |
| 67 clazz->get_property = get_property_; \ |
| 68 } |
| 69 |
| 70 #endif /* FT_CONFIG_OPTION_PIC */ |
| 71 |
| 72 /* */ |
| 73 |
| 74 |
| 75 FT_END_HEADER |
| 76 |
| 77 |
| 78 #endif /* __SVPROP_H__ */ |
| 79 |
| 80 |
| 81 /* END */ |
OLD | NEW |