misc/libfreetype/include/freetype/ftgzip.h
author unc0rr
Fri, 22 Jun 2012 08:13:51 +0400
changeset 7266 74ad631a72bf
parent 5172 88f2e05288ba
permissions -rw-r--r--
Swap order of actions
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
/*  ftgzip.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
/*    Gzip-compressed stream support.                                      */
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 2002, 2003, 2004, 2006 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 __FTGZIP_H__
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    20
#define __FTGZIP_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
#include <ft2build.h>
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    23
#include FT_FREETYPE_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
#ifdef FREETYPE_H
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    26
#error "freetype.h of FreeType 1 has been loaded!"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    27
#error "Please fix the directory search order for header files"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    28
#error "so that freetype.h of FreeType 2 is found first."
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    29
#endif
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
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    32
FT_BEGIN_HEADER
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
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    35
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    36
  /* <Section>                                                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    37
  /*    gzip                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    38
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    39
  /* <Title>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    40
  /*    GZIP Streams                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    41
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    42
  /* <Abstract>                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    43
  /*    Using gzip-compressed font files.                                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    44
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    45
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    46
  /*    This section contains the declaration of Gzip-specific functions.  */
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
 /************************************************************************
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
  * @function:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    54
  *   FT_Stream_OpenGzip
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
  * @description:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    57
  *   Open a new stream to parse gzip-compressed font files.  This is
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    58
  *   mainly used to support the compressed `*.pcf.gz' fonts that come
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    59
  *   with XFree86.
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
  * @input:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    62
  *   stream ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    63
  *     The target embedding stream.
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
  *   source ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    66
  *     The source stream.
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
  * @return:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    69
  *   FreeType error code.  0~means success.
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
  * @note:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    72
  *   The source stream must be opened _before_ calling this function.
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
  *   Calling the internal function `FT_Stream_Close' on the new stream will
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    75
  *   *not* call `FT_Stream_Close' on the source stream.  None of the stream
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    76
  *   objects will be released to the heap.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    77
  *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    78
  *   The stream implementation is very basic and resets the decompression
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    79
  *   process each time seeking backwards is needed within the stream.
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
  *   In certain builds of the library, gzip compression recognition is
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    82
  *   automatically handled when calling @FT_New_Face or @FT_Open_Face.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    83
  *   This means that if no font driver is capable of handling the raw
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    84
  *   compressed file, the library will try to open a gzipped stream from
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    85
  *   it and re-open the face with it.
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
  *   This function may return `FT_Err_Unimplemented_Feature' if your build
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    88
  *   of FreeType was not compiled with zlib support.
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
  FT_EXPORT( FT_Error )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    91
  FT_Stream_OpenGzip( FT_Stream  stream,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    92
                      FT_Stream  source );
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
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    96
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    97
FT_END_HEADER
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    98
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    99
#endif /* __FTGZIP_H__ */
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
/* END */