PageRenderTime 344ms CodeModel.GetById 161ms app.highlight 4ms RepoModel.GetById 177ms app.codeStats 0ms

/src/compiler/android-ndk/jni/freetype/include/freetype/internal/services/svsfnt.h

http://ftk.googlecode.com/
C++ Header | 102 lines | 45 code | 27 blank | 30 comment | 0 complexity | 492107f7ef92cfafbf36bcf9b5c34946 MD5 | raw file
  1/***************************************************************************/
  2/*                                                                         */
  3/*  svsfnt.h                                                               */
  4/*                                                                         */
  5/*    The FreeType SFNT table loading service (specification).             */
  6/*                                                                         */
  7/*  Copyright 2003, 2004 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 __SVSFNT_H__
 20#define __SVSFNT_H__
 21
 22#include FT_INTERNAL_SERVICE_H
 23#include FT_TRUETYPE_TABLES_H
 24
 25
 26FT_BEGIN_HEADER
 27
 28
 29  /*
 30   *  SFNT table loading service.
 31   */
 32
 33#define FT_SERVICE_ID_SFNT_TABLE  "sfnt-table"
 34
 35
 36  /*
 37   * Used to implement FT_Load_Sfnt_Table().
 38   */
 39  typedef FT_Error
 40  (*FT_SFNT_TableLoadFunc)( FT_Face    face,
 41                            FT_ULong   tag,
 42                            FT_Long    offset,
 43                            FT_Byte*   buffer,
 44                            FT_ULong*  length );
 45
 46  /*
 47   * Used to implement FT_Get_Sfnt_Table().
 48   */
 49  typedef void*
 50  (*FT_SFNT_TableGetFunc)( FT_Face      face,
 51                           FT_Sfnt_Tag  tag );
 52
 53
 54  /*
 55   * Used to implement FT_Sfnt_Table_Info().
 56   */
 57  typedef FT_Error
 58  (*FT_SFNT_TableInfoFunc)( FT_Face    face,
 59                            FT_UInt    idx,
 60                            FT_ULong  *tag,
 61                            FT_ULong  *offset,
 62                            FT_ULong  *length );
 63
 64
 65  FT_DEFINE_SERVICE( SFNT_Table )
 66  {
 67    FT_SFNT_TableLoadFunc  load_table;
 68    FT_SFNT_TableGetFunc   get_table;
 69    FT_SFNT_TableInfoFunc  table_info;
 70  };
 71
 72#ifndef FT_CONFIG_OPTION_PIC
 73
 74#define FT_DEFINE_SERVICE_SFNT_TABLEREC(class_, load_, get_, info_)  \
 75  static const FT_Service_SFNT_TableRec class_ =                     \
 76  {                                                                  \
 77    load_, get_, info_                                               \
 78  };
 79
 80#else /* FT_CONFIG_OPTION_PIC */ 
 81
 82#define FT_DEFINE_SERVICE_SFNT_TABLEREC(class_, load_, get_, info_) \
 83  void                                                              \
 84  FT_Init_Class_##class_( FT_Service_SFNT_TableRec*  clazz )        \
 85  {                                                                 \
 86    clazz->load_table = load_;                                      \
 87    clazz->get_table = get_;                                        \
 88    clazz->table_info = info_;                                      \
 89  } 
 90
 91#endif /* FT_CONFIG_OPTION_PIC */ 
 92
 93  /* */
 94
 95
 96FT_END_HEADER
 97
 98
 99#endif /* __SVSFNT_H__ */
100
101
102/* END */