misc/libfreetype/include/freetype/ftsystem.h
author nemo
Sat, 27 Apr 2013 17:02:26 -0400
changeset 8940 181ea27122da
parent 5172 88f2e05288ba
permissions -rw-r--r--
This is something we need to check in all translations. Occasionally the source phrase ends w/ a space. Need to make sure translations take this into account.
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
/*  ftsystem.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 low-level system interface definition (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, 2005, 2010 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 __FTSYSTEM_H__
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    20
#define __FTSYSTEM_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
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
FT_BEGIN_HEADER
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    27
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
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    31
  /* <Section>                                                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    32
  /*   system_interface                                                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    33
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    34
  /* <Title>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    35
  /*   System Interface                                                    */
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
  /* <Abstract>                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    38
  /*   How FreeType manages memory and i/o.                                */
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
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    41
  /*   This section contains various definitions related to memory         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    42
  /*   management and i/o access.  You need to understand this             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    43
  /*   information if you want to use a custom memory manager or you own   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    44
  /*   i/o streams.                                                        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    45
  /*                                                                       */
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
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    49
  /*************************************************************************/
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
  /*                  M E M O R Y   M A N A G E M E N T                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    52
  /*                                                                       */
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
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    56
  /*************************************************************************
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    57
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    58
   * @type:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    59
   *   FT_Memory
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    60
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    61
   * @description:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    62
   *   A handle to a given memory manager object, defined with an
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    63
   *   @FT_MemoryRec structure.
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
   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    66
  typedef struct FT_MemoryRec_*  FT_Memory;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    67
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    68
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    69
  /*************************************************************************
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    70
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    71
   * @functype:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    72
   *   FT_Alloc_Func
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    73
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    74
   * @description:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    75
   *   A function used to allocate `size' bytes from `memory'.
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
   * @input:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    78
   *   memory ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    79
   *     A handle to the source memory manager.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    80
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    81
   *   size ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    82
   *     The size in bytes to allocate.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    83
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    84
   * @return:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    85
   *   Address of new memory block.  0~in case of failure.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    86
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    87
   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    88
  typedef void*
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    89
  (*FT_Alloc_Func)( FT_Memory  memory,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    90
                    long       size );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    91
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    92
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
   * @functype:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    96
   *   FT_Free_Func
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    97
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    98
   * @description:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    99
   *   A function used to release a given block of memory.
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
   * @input:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   102
   *   memory ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   103
   *     A handle to the source memory manager.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   104
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   105
   *   block ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   106
   *     The address of the target memory block.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   107
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   108
   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   109
  typedef void
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   110
  (*FT_Free_Func)( FT_Memory  memory,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   111
                   void*      block );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   112
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
   * @functype:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   117
   *   FT_Realloc_Func
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   118
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   119
   * @description:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   120
   *   A function used to re-allocate a given block of memory.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   121
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   122
   * @input:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   123
   *   memory ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   124
   *     A handle to the source memory manager.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   125
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   126
   *   cur_size ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   127
   *     The block's current size 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
   *   new_size ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   130
   *     The block's requested new size.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   131
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   132
   *   block ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   133
   *     The block's current address.
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
   * @return:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   136
   *   New block address.  0~in case of memory shortage.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   137
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   138
   * @note:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   139
   *   In case of error, the old block must still be available.
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
   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   142
  typedef void*
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   143
  (*FT_Realloc_Func)( FT_Memory  memory,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   144
                      long       cur_size,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   145
                      long       new_size,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   146
                      void*      block );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   147
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
  /*************************************************************************
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   150
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   151
   * @struct:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   152
   *   FT_MemoryRec
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
   * @description:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   155
   *   A structure used to describe a given memory manager to FreeType~2.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   156
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   157
   * @fields:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   158
   *   user ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   159
   *     A generic typeless pointer for user data.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   160
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   161
   *   alloc ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   162
   *     A pointer type to an allocation function.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   163
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   164
   *   free ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   165
   *     A pointer type to an memory freeing function.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   166
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   167
   *   realloc ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   168
   *     A pointer type to a reallocation function.
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
   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   171
  struct  FT_MemoryRec_
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   172
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   173
    void*            user;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   174
    FT_Alloc_Func    alloc;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   175
    FT_Free_Func     free;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   176
    FT_Realloc_Func  realloc;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   177
  };
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   178
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   179
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   180
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   181
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   182
  /*                       I / O   M A N A G E M E N T                     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   183
  /*                                                                       */
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
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
  /*************************************************************************
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   188
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   189
   * @type:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   190
   *   FT_Stream
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   191
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   192
   * @description:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   193
   *   A handle to an input stream.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   194
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   195
   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   196
  typedef struct FT_StreamRec_*  FT_Stream;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   197
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   198
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
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   201
   * @struct:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   202
   *   FT_StreamDesc
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   203
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   204
   * @description:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   205
   *   A union type used to store either a long or a pointer.  This is used
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   206
   *   to store a file descriptor or a `FILE*' in an input stream.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   207
   *
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
  typedef union  FT_StreamDesc_
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   210
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   211
    long   value;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   212
    void*  pointer;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   213
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   214
  } FT_StreamDesc;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   215
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
  /*************************************************************************
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
   * @functype:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   220
   *   FT_Stream_IoFunc
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   221
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   222
   * @description:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   223
   *   A function used to seek and read data from a given input stream.
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
   * @input:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   226
   *   stream ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   227
   *     A handle to the source stream.
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
   *   offset ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   230
   *     The offset of read in stream (always from start).
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   231
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   232
   *   buffer ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   233
   *     The address of the read buffer.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   234
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   235
   *   count ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   236
   *     The number of bytes to read from the stream.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   237
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   238
   * @return:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   239
   *   The number of bytes effectively read by the stream.
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
   * @note:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   242
   *   This function might be called to perform a seek or skip operation
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   243
   *   with a `count' of~0.  A non-zero return value then indicates an
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   244
   *   error.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   245
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   246
   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   247
  typedef unsigned long
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   248
  (*FT_Stream_IoFunc)( FT_Stream       stream,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   249
                       unsigned long   offset,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   250
                       unsigned char*  buffer,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   251
                       unsigned long   count );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   252
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   253
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
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   256
   * @functype:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   257
   *   FT_Stream_CloseFunc
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   258
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   259
   * @description:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   260
   *   A function used to close a given input stream.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   261
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   262
   * @input:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   263
   *  stream ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   264
   *     A handle to the target stream.
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
   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   267
  typedef void
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   268
  (*FT_Stream_CloseFunc)( FT_Stream  stream );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   269
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   270
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   271
  /*************************************************************************
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
   * @struct:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   274
   *   FT_StreamRec
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   275
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   276
   * @description:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   277
   *   A structure used to describe an input stream.
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
   * @input:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   280
   *   base ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   281
   *     For memory-based streams, this is the address of the first stream
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   282
   *     byte in memory.  This field should always be set to NULL for
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   283
   *     disk-based streams.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   284
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   285
   *   size ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   286
   *     The stream size in bytes.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   287
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   288
   *   pos ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   289
   *     The current position within the stream.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   290
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   291
   *   descriptor ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   292
   *     This field is a union that can hold an integer or a pointer.  It is
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   293
   *     used by stream implementations to store file descriptors or `FILE*'
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   294
   *     pointers.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   295
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   296
   *   pathname ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   297
   *     This field is completely ignored by FreeType.  However, it is often
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   298
   *     useful during debugging to use it to store the stream's filename
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   299
   *     (where available).
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   300
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   301
   *   read ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   302
   *     The stream's input function.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   303
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   304
   *   close ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   305
   *     The stream's close function.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   306
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   307
   *   memory ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   308
   *     The memory manager to use to preload frames.  This is set
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   309
   *     internally by FreeType and shouldn't be touched by stream
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   310
   *     implementations.
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
   *   cursor ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   313
   *     This field is set and used internally by FreeType when parsing
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   314
   *     frames.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   315
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   316
   *   limit ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   317
   *     This field is set and used internally by FreeType when parsing
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   318
   *     frames.
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
   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   321
  typedef struct  FT_StreamRec_
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   322
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   323
    unsigned char*       base;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   324
    unsigned long        size;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   325
    unsigned long        pos;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   326
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   327
    FT_StreamDesc        descriptor;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   328
    FT_StreamDesc        pathname;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   329
    FT_Stream_IoFunc     read;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   330
    FT_Stream_CloseFunc  close;
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
    FT_Memory            memory;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   333
    unsigned char*       cursor;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   334
    unsigned char*       limit;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   335
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   336
  } FT_StreamRec;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   337
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   338
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
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
FT_END_HEADER
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   343
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   344
#endif /* __FTSYSTEM_H__ */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   345
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   346
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   347
/* END */