misc/libfreetype/include/freetype/internal/ftdriver.h
author koda
Mon, 25 Apr 2011 01:46:54 +0200
changeset 5172 88f2e05288ba
permissions -rw-r--r--
aaand let's add freetype as well while we are at it other smaller changes
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5172
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     1
/***************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     2
/*                                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     3
/*  ftdriver.h                                                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     4
/*                                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     5
/*    FreeType font driver interface (specification).                      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     6
/*                                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     7
/*  Copyright 1996-2001, 2002, 2003, 2006, 2008 by                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     8
/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     9
/*                                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    10
/*  This file is part of the FreeType project, and may only be used,       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    11
/*  modified, and distributed under the terms of the FreeType project      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    12
/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    13
/*  this file you indicate that you have read the license and              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    14
/*  understand and accept it fully.                                        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    15
/*                                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    16
/***************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    17
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    18
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    19
#ifndef __FTDRIVER_H__
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    20
#define __FTDRIVER_H__
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    21
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    22
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    23
#include <ft2build.h>
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    24
#include FT_MODULE_H
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    25
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    26
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    27
FT_BEGIN_HEADER
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    28
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    29
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    30
  typedef FT_Error
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    31
  (*FT_Face_InitFunc)( FT_Stream      stream,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    32
                       FT_Face        face,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    33
                       FT_Int         typeface_index,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    34
                       FT_Int         num_params,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    35
                       FT_Parameter*  parameters );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    36
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    37
  typedef void
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    38
  (*FT_Face_DoneFunc)( FT_Face  face );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    39
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    40
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    41
  typedef FT_Error
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    42
  (*FT_Size_InitFunc)( FT_Size  size );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    43
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    44
  typedef void
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    45
  (*FT_Size_DoneFunc)( FT_Size  size );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    46
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    47
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    48
  typedef FT_Error
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    49
  (*FT_Slot_InitFunc)( FT_GlyphSlot  slot );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    50
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    51
  typedef void
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    52
  (*FT_Slot_DoneFunc)( FT_GlyphSlot  slot );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    53
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    54
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    55
  typedef FT_Error
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    56
  (*FT_Size_RequestFunc)( FT_Size          size,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    57
                          FT_Size_Request  req );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    58
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    59
  typedef FT_Error
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    60
  (*FT_Size_SelectFunc)( FT_Size   size,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    61
                         FT_ULong  size_index );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    62
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    63
#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    64
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    65
  typedef FT_Error
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    66
  (*FT_Size_ResetPointsFunc)( FT_Size     size,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    67
                              FT_F26Dot6  char_width,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    68
                              FT_F26Dot6  char_height,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    69
                              FT_UInt     horz_resolution,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    70
                              FT_UInt     vert_resolution );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    71
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    72
  typedef FT_Error
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    73
  (*FT_Size_ResetPixelsFunc)( FT_Size  size,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    74
                              FT_UInt  pixel_width,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    75
                              FT_UInt  pixel_height );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    76
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    77
#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    78
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    79
  typedef FT_Error
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    80
  (*FT_Slot_LoadFunc)( FT_GlyphSlot  slot,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    81
                       FT_Size       size,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    82
                       FT_UInt       glyph_index,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    83
                       FT_Int32      load_flags );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    84
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    85
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    86
  typedef FT_UInt
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    87
  (*FT_CharMap_CharIndexFunc)( FT_CharMap  charmap,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    88
                               FT_Long     charcode );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    89
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    90
  typedef FT_Long
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    91
  (*FT_CharMap_CharNextFunc)( FT_CharMap  charmap,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    92
                              FT_Long     charcode );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    93
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    94
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    95
  typedef FT_Error
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    96
  (*FT_Face_GetKerningFunc)( FT_Face     face,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    97
                             FT_UInt     left_glyph,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    98
                             FT_UInt     right_glyph,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    99
                             FT_Vector*  kerning );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   100
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   101
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   102
  typedef FT_Error
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   103
  (*FT_Face_AttachFunc)( FT_Face    face,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   104
                         FT_Stream  stream );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   105
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   106
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   107
  typedef FT_Error
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   108
  (*FT_Face_GetAdvancesFunc)( FT_Face    face,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   109
                              FT_UInt    first,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   110
                              FT_UInt    count,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   111
                              FT_Int32   flags,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   112
                              FT_Fixed*  advances );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   113
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   114
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   115
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   116
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   117
  /* <Struct>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   118
  /*    FT_Driver_ClassRec                                                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   119
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   120
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   121
  /*    The font driver class.  This structure mostly contains pointers to */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   122
  /*    driver methods.                                                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   123
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   124
  /* <Fields>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   125
  /*    root             :: The parent module.                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   126
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   127
  /*    face_object_size :: The size of a face object in bytes.            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   128
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   129
  /*    size_object_size :: The size of a size object in bytes.            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   130
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   131
  /*    slot_object_size :: The size of a glyph object in bytes.           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   132
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   133
  /*    init_face        :: The format-specific face constructor.          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   134
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   135
  /*    done_face        :: The format-specific face destructor.           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   136
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   137
  /*    init_size        :: The format-specific size constructor.          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   138
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   139
  /*    done_size        :: The format-specific size destructor.           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   140
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   141
  /*    init_slot        :: The format-specific slot constructor.          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   142
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   143
  /*    done_slot        :: The format-specific slot destructor.           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   144
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   145
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   146
  /*    load_glyph       :: A function handle to load a glyph to a slot.   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   147
  /*                        This field is mandatory!                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   148
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   149
  /*    get_kerning      :: A function handle to return the unscaled       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   150
  /*                        kerning for a given pair of glyphs.  Can be    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   151
  /*                        set to 0 if the format doesn't support         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   152
  /*                        kerning.                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   153
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   154
  /*    attach_file      :: This function handle is used to read           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   155
  /*                        additional data for a face from another        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   156
  /*                        file/stream.  For example, this can be used to */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   157
  /*                        add data from AFM or PFM files on a Type 1     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   158
  /*                        face, or a CIDMap on a CID-keyed face.         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   159
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   160
  /*    get_advances     :: A function handle used to return advance       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   161
  /*                        widths of `count' glyphs (in font units),      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   162
  /*                        starting at `first'.  The `vertical' flag must */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   163
  /*                        be set to get vertical advance heights.  The   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   164
  /*                        `advances' buffer is caller-allocated.         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   165
  /*                        Currently not implemented.  The idea of this   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   166
  /*                        function is to be able to perform              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   167
  /*                        device-independent text layout without loading */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   168
  /*                        a single glyph image.                          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   169
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   170
  /*    request_size     :: A handle to a function used to request the new */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   171
  /*                        character size.  Can be set to 0 if the        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   172
  /*                        scaling done in the base layer suffices.       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   173
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   174
  /*    select_size      :: A handle to a function used to select a new    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   175
  /*                        fixed size.  It is used only if                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   176
  /*                        @FT_FACE_FLAG_FIXED_SIZES is set.  Can be set  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   177
  /*                        to 0 if the scaling done in the base layer     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   178
  /*                        suffices.                                      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   179
  /* <Note>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   180
  /*    Most function pointers, with the exception of `load_glyph', can be */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   181
  /*    set to 0 to indicate a default behaviour.                          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   182
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   183
  typedef struct  FT_Driver_ClassRec_
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   184
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   185
    FT_Module_Class           root;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   186
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   187
    FT_Long                   face_object_size;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   188
    FT_Long                   size_object_size;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   189
    FT_Long                   slot_object_size;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   190
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   191
    FT_Face_InitFunc          init_face;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   192
    FT_Face_DoneFunc          done_face;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   193
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   194
    FT_Size_InitFunc          init_size;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   195
    FT_Size_DoneFunc          done_size;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   196
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   197
    FT_Slot_InitFunc          init_slot;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   198
    FT_Slot_DoneFunc          done_slot;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   199
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   200
#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   201
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   202
    FT_Size_ResetPointsFunc   set_char_sizes;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   203
    FT_Size_ResetPixelsFunc   set_pixel_sizes;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   204
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   205
#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   206
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   207
    FT_Slot_LoadFunc          load_glyph;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   208
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   209
    FT_Face_GetKerningFunc    get_kerning;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   210
    FT_Face_AttachFunc        attach_file;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   211
    FT_Face_GetAdvancesFunc   get_advances;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   212
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   213
    /* since version 2.2 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   214
    FT_Size_RequestFunc       request_size;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   215
    FT_Size_SelectFunc        select_size;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   216
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   217
  } FT_Driver_ClassRec, *FT_Driver_Class;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   218
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   219
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   220
  /*
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   221
   *  The following functions are used as stubs for `set_char_sizes' and
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   222
   *  `set_pixel_sizes'; the code uses `request_size' and `select_size'
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   223
   *  functions instead.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   224
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   225
   *  Implementation is in `src/base/ftobjs.c'.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   226
   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   227
#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   228
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   229
  FT_BASE( FT_Error )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   230
  ft_stub_set_char_sizes( FT_Size     size,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   231
                          FT_F26Dot6  width,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   232
                          FT_F26Dot6  height,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   233
                          FT_UInt     horz_res,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   234
                          FT_UInt     vert_res );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   235
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   236
  FT_BASE( FT_Error )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   237
  ft_stub_set_pixel_sizes( FT_Size  size,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   238
                           FT_UInt  width,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   239
                           FT_UInt  height );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   240
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   241
#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   242
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   243
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   244
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   245
  /* <Macro>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   246
  /*    FT_DECLARE_DRIVER                                                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   247
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   248
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   249
  /*    Used to create a forward declaration of a                          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   250
  /*    FT_Driver_ClassRec stract instance.                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   251
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   252
  /* <Macro>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   253
  /*    FT_DEFINE_DRIVER                                                   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   254
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   255
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   256
  /*    Used to initialize an instance of FT_Driver_ClassRec struct.       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   257
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   258
  /*    When FT_CONFIG_OPTION_PIC is defined a Create funtion will need    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   259
  /*    to called with a pointer where the allocated stracture is returned.*/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   260
  /*    And when it is no longer needed a Destroy function needs           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   261
  /*    to be called to release that allocation.                           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   262
  /*    fcinit.c (ft_create_default_module_classes) already contains       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   263
  /*    a mechanism to call these functions for the default modules        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   264
  /*    described in ftmodule.h                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   265
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   266
  /*    Notice that the created Create and Destroy functions call          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   267
  /*    pic_init and pic_free function to allow you to manually allocate   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   268
  /*    and initialize any additional global data, like module specific    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   269
  /*    interface, and put them in the global pic container defined in     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   270
  /*    ftpic.h. if you don't need them just implement the functions as    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   271
  /*    empty to resolve the link error.                                   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   272
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   273
  /*    When FT_CONFIG_OPTION_PIC is not defined the struct will be        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   274
  /*    allocated in the global scope (or the scope where the macro        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   275
  /*    is used).                                                          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   276
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   277
#ifndef FT_CONFIG_OPTION_PIC
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   278
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   279
#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   280
#define FT_DEFINE_DRIVERS_OLD_INTERNALS(a_,b_) \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   281
  a_, b_,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   282
#else
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   283
  #define FT_DEFINE_DRIVERS_OLD_INTERNALS(a_,b_)
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   284
#endif
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   285
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   286
#define FT_DECLARE_DRIVER(class_)    \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   287
  FT_CALLBACK_TABLE                  \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   288
  const FT_Driver_ClassRec  class_;  
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   289
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   290
#define FT_DEFINE_DRIVER(class_,                                             \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   291
                         flags_, size_, name_, version_, requires_,          \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   292
                         interface_, init_, done_, get_interface_,           \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   293
                         face_object_size_, size_object_size_,               \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   294
                         slot_object_size_, init_face_, done_face_,          \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   295
                         init_size_, done_size_, init_slot_, done_slot_,     \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   296
                         old_set_char_sizes_, old_set_pixel_sizes_,          \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   297
                         load_glyph_, get_kerning_, attach_file_,            \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   298
                         get_advances_, request_size_, select_size_ )        \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   299
  FT_CALLBACK_TABLE_DEF                                                      \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   300
  const FT_Driver_ClassRec class_ =                                          \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   301
  {                                                                          \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   302
    FT_DEFINE_ROOT_MODULE(flags_,size_,name_,version_,requires_,interface_,  \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   303
                          init_,done_,get_interface_)                        \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   304
                                                                             \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   305
    face_object_size_,                                                       \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   306
    size_object_size_,                                                       \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   307
    slot_object_size_,                                                       \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   308
                                                                             \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   309
    init_face_,                                                              \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   310
    done_face_,                                                              \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   311
                                                                             \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   312
    init_size_,                                                              \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   313
    done_size_,                                                              \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   314
                                                                             \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   315
    init_slot_,                                                              \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   316
    done_slot_,                                                              \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   317
                                                                             \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   318
    FT_DEFINE_DRIVERS_OLD_INTERNALS(old_set_char_sizes_, old_set_pixel_sizes_) \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   319
                                                                             \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   320
    load_glyph_,                                                             \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   321
                                                                             \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   322
    get_kerning_,                                                            \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   323
    attach_file_,                                                            \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   324
    get_advances_,                                                           \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   325
                                                                             \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   326
    request_size_,                                                           \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   327
    select_size_                                                             \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   328
  };
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   329
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   330
#else /* FT_CONFIG_OPTION_PIC */ 
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   331
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   332
#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   333
#define FT_DEFINE_DRIVERS_OLD_INTERNALS(a_,b_) \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   334
  clazz->set_char_sizes = a_; \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   335
  clazz->set_pixel_sizes = b_;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   336
#else
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   337
  #define FT_DEFINE_DRIVERS_OLD_INTERNALS(a_,b_)
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   338
#endif
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   339
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   340
#define FT_DECLARE_DRIVER(class_)    FT_DECLARE_MODULE(class_)
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   341
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   342
#define FT_DEFINE_DRIVER(class_,                                             \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   343
                         flags_, size_, name_, version_, requires_,          \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   344
                         interface_, init_, done_, get_interface_,           \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   345
                         face_object_size_, size_object_size_,               \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   346
                         slot_object_size_, init_face_, done_face_,          \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   347
                         init_size_, done_size_, init_slot_, done_slot_,     \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   348
                         old_set_char_sizes_, old_set_pixel_sizes_,          \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   349
                         load_glyph_, get_kerning_, attach_file_,            \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   350
                         get_advances_, request_size_, select_size_ )        \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   351
  void class_##_pic_free( FT_Library library );                              \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   352
  FT_Error class_##_pic_init( FT_Library library );                          \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   353
                                                                             \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   354
  void                                                                       \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   355
  FT_Destroy_Class_##class_( FT_Library        library,                      \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   356
                             FT_Module_Class*  clazz )                       \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   357
  {                                                                          \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   358
    FT_Memory       memory = library->memory;                                \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   359
    FT_Driver_Class dclazz = (FT_Driver_Class)clazz;                         \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   360
    class_##_pic_free( library );                                            \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   361
    if ( dclazz )                                                            \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   362
      FT_FREE( dclazz );                                                     \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   363
  }                                                                          \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   364
                                                                             \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   365
  FT_Error                                                                   \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   366
  FT_Create_Class_##class_( FT_Library        library,                       \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   367
                            FT_Module_Class**  output_class )                \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   368
  {                                                                          \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   369
    FT_Driver_Class  clazz;                                                  \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   370
    FT_Error         error;                                                  \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   371
    FT_Memory        memory = library->memory;                               \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   372
                                                                             \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   373
    if ( FT_ALLOC( clazz, sizeof(*clazz) ) )                                 \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   374
      return error;                                                          \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   375
                                                                             \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   376
    error = class_##_pic_init( library );                                    \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   377
    if(error)                                                                \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   378
    {                                                                        \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   379
      FT_FREE( clazz );                                                      \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   380
      return error;                                                          \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   381
    }                                                                        \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   382
                                                                             \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   383
    FT_DEFINE_ROOT_MODULE(flags_,size_,name_,version_,requires_,interface_,  \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   384
                          init_,done_,get_interface_)                        \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   385
                                                                             \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   386
    clazz->face_object_size    = face_object_size_;                          \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   387
    clazz->size_object_size    = size_object_size_;                          \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   388
    clazz->slot_object_size    = slot_object_size_;                          \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   389
                                                                             \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   390
    clazz->init_face           = init_face_;                                 \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   391
    clazz->done_face           = done_face_;                                 \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   392
                                                                             \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   393
    clazz->init_size           = init_size_;                                 \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   394
    clazz->done_size           = done_size_;                                 \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   395
                                                                             \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   396
    clazz->init_slot           = init_slot_;                                 \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   397
    clazz->done_slot           = done_slot_;                                 \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   398
                                                                             \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   399
    FT_DEFINE_DRIVERS_OLD_INTERNALS(old_set_char_sizes_, old_set_pixel_sizes_) \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   400
                                                                             \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   401
    clazz->load_glyph          = load_glyph_;                                \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   402
                                                                             \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   403
    clazz->get_kerning         = get_kerning_;                               \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   404
    clazz->attach_file         = attach_file_;                               \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   405
    clazz->get_advances        = get_advances_;                              \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   406
                                                                             \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   407
    clazz->request_size        = request_size_;                              \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   408
    clazz->select_size         = select_size_;                               \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   409
                                                                             \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   410
    *output_class = (FT_Module_Class*)clazz;                                 \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   411
    return FT_Err_Ok;                                                        \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   412
  }                
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   413
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   414
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   415
#endif /* FT_CONFIG_OPTION_PIC */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   416
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   417
FT_END_HEADER
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   418
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   419
#endif /* __FTDRIVER_H__ */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   420
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   421
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   422
/* END */