svsfnt.h

Go to the documentation of this file.
00001 /***************************************************************************/
00002 /*                                                                         */
00003 /*  svsfnt.h                                                               */
00004 /*                                                                         */
00005 /*    The FreeType SFNT table loading service (specification).             */
00006 /*                                                                         */
00007 /*  Copyright 2003, 2004 by                                                */
00008 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
00009 /*                                                                         */
00010 /*  This file is part of the FreeType project, and may only be used,       */
00011 /*  modified, and distributed under the terms of the FreeType project      */
00012 /*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
00013 /*  this file you indicate that you have read the license and              */
00014 /*  understand and accept it fully.                                        */
00015 /*                                                                         */
00016 /***************************************************************************/
00017 
00018 
00019 #ifndef __SVSFNT_H__
00020 #define __SVSFNT_H__
00021 
00022 #include FT_INTERNAL_SERVICE_H
00023 #include FT_TRUETYPE_TABLES_H
00024 
00025 
00026 FT_BEGIN_HEADER
00027 
00028 
00029   /*
00030    *  SFNT table loading service.
00031    */
00032 
00033 #define FT_SERVICE_ID_SFNT_TABLE  "sfnt-table"
00034 
00035 
00036   /*
00037    * Used to implement FT_Load_Sfnt_Table().
00038    */
00039   typedef FT_Error
00040   (*FT_SFNT_TableLoadFunc)( FT_Face    face,
00041                             FT_ULong   tag,
00042                             FT_Long    offset,
00043                             FT_Byte*   buffer,
00044                             FT_ULong*  length );
00045 
00046   /*
00047    * Used to implement FT_Get_Sfnt_Table().
00048    */
00049   typedef void*
00050   (*FT_SFNT_TableGetFunc)( FT_Face      face,
00051                            FT_Sfnt_Tag  tag );
00052 
00053 
00054   /*
00055    * Used to implement FT_Sfnt_Table_Info().
00056    */
00057   typedef FT_Error
00058   (*FT_SFNT_TableInfoFunc)( FT_Face    face,
00059                             FT_UInt    idx,
00060                             FT_ULong  *tag,
00061                             FT_ULong  *offset,
00062                             FT_ULong  *length );
00063 
00064 
00065   FT_DEFINE_SERVICE( SFNT_Table )
00066   {
00067     FT_SFNT_TableLoadFunc  load_table;
00068     FT_SFNT_TableGetFunc   get_table;
00069     FT_SFNT_TableInfoFunc  table_info;
00070   };
00071 
00072 #ifndef FT_CONFIG_OPTION_PIC
00073 
00074 #define FT_DEFINE_SERVICE_SFNT_TABLEREC(class_, load_, get_, info_)  \
00075   static const FT_Service_SFNT_TableRec class_ =                     \
00076   {                                                                  \
00077     load_, get_, info_                                               \
00078   };
00079 
00080 #else /* FT_CONFIG_OPTION_PIC */ 
00081 
00082 #define FT_DEFINE_SERVICE_SFNT_TABLEREC(class_, load_, get_, info_) \
00083   void                                                              \
00084   FT_Init_Class_##class_( FT_Service_SFNT_TableRec*  clazz )        \
00085   {                                                                 \
00086     clazz->load_table = load_;                                      \
00087     clazz->get_table = get_;                                        \
00088     clazz->table_info = info_;                                      \
00089   } 
00090 
00091 #endif /* FT_CONFIG_OPTION_PIC */ 
00092 
00093   /* */
00094 
00095 
00096 FT_END_HEADER
00097 
00098 
00099 #endif /* __SVSFNT_H__ */
00100 
00101 
00102 /* END */

Generated on Tue Jul 5 14:13:40 2011 for ROOT_528-00b_version by  doxygen 1.5.1