update for HEAD-2003050101
[reactos.git] / lib / freetype / include / freetype / ftgzip.h
1 /***************************************************************************/
2 /*                                                                         */
3 /*  ftgzip.h                                                               */
4 /*                                                                         */
5 /*    Gzip-compressed stream support.                                      */
6 /*                                                                         */
7 /*  Copyright 2002 by                                                      */
8 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
9 /*                                                                         */
10 /*  This file is part of the FreeType project, and may only be used,       */
11 /*  modified, and distributed under the terms of the FreeType project      */
12 /*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
13 /*  this file you indicate that you have read the license and              */
14 /*  understand and accept it fully.                                        */
15 /*                                                                         */
16 /***************************************************************************/
17
18
19 #ifndef __FTGZIP_H__
20 #define __FTGZIP_H__
21
22 #include <ft2build.h>
23 #include FT_FREETYPE_H
24
25 FT_BEGIN_HEADER
26
27   /*************************************************************************/
28   /*                                                                       */
29   /* <Section>                                                             */
30   /*    gzip                                                               */
31   /*                                                                       */
32   /* <Title>                                                               */
33   /*    GZIP Streams                                                       */
34   /*                                                                       */
35   /* <Abstract>                                                            */
36   /*    Using gzip-compressed font files                                   */
37   /*                                                                       */
38   /* <Description>                                                         */
39   /*    This section contains the declaration of Gzip-specific functions.  */
40   /*                                                                       */
41   /*************************************************************************/
42
43  /************************************************************************
44   *
45   * @type: FT_Stream_OpenGzip
46   *
47   * @description:
48   *   open a new stream to parse gzip-compressed font files. This is
49   *   mainly used to support the compressed *.pcf.gz fonts that come
50   *   with XFree86
51   *
52   * @input:
53   *   stream :: target embedding stream
54   *   source :: source stream, used to
55   *
56   * @return:
57   *   error code. 0 means success
58   *
59   * @note:
60   *   the source stream must be opened _before_ calling this function.
61   *
62   *   calling @FT_Stream_Close on the new stream will *not* call
63   *   @FT_Stream_Close on the source stream. None of the stream objects
64   *   will be released to the heap.
65   *
66   *   the stream implementation is very basic, and resets the decompression
67   *   process each time seeking backwards is needed within the stream
68   *
69   *   in certain builds of the library, gzip compression recognition is
70   *   automatic when calling @FT_New_Face or @FT_Open_Face. This means that
71   *   if no font driver is capable of handling the raw compressed file,
72   *   the library will try to open a gzip stream from it and re-open
73   *   the face with it.
74   *
75   *   this function may return "FT_Err_Unimplemented" if your build of
76   *   FreeType was not compiled with zlib support.
77   */
78   FT_EXPORT( FT_Error )
79   FT_Stream_OpenGzip( FT_Stream    stream,
80                       FT_Stream    source );
81
82  /* */
83
84 FT_END_HEADER
85
86 #endif /* __FTGZIP_H__ */