misc/libfreetype/include/freetype/ftlzw.h
author unc0rr
Mon, 04 Feb 2013 00:13:55 +0400
changeset 8479 8d71109b04d2
parent 5172 88f2e05288ba
permissions -rw-r--r--
Some work on loading replay and interaction with checker
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
/*  ftlzw.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
/*    LZW-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 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 __FTLZW_H__
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    20
#define __FTLZW_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
  /*    lzw                                                                */
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
  /*    LZW 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 LZW-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 LZW-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
  * @function:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    53
  *   FT_Stream_OpenLZW
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
  * @description:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    56
  *   Open a new stream to parse LZW-compressed font files.  This is
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    57
  *   mainly used to support the compressed `*.pcf.Z' fonts that come
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    58
  *   with XFree86.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    59
  *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    60
  * @input:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    61
  *   stream :: The target embedding stream.
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
  *   source :: The source 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
  * @return:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    66
  *   FreeType error code.  0~means success.
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
  * @note:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    69
  *   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
    70
  *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    71
  *   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
    72
  *   *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
    73
  *   objects will be released to the heap.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    74
  *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    75
  *   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
    76
  *   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
    77
  *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    78
  *   In certain builds of the library, LZW compression recognition is
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    79
  *   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
    80
  *   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
    81
  *   compressed file, the library will try to open a LZW stream from it
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    82
  *   and re-open the face with it.
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
  *   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
    85
  *   of FreeType was not compiled with LZW support.
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
  FT_EXPORT( FT_Error )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    88
  FT_Stream_OpenLZW( FT_Stream  stream,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    89
                     FT_Stream  source );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    90
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
FT_END_HEADER
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
#endif /* __FTLZW_H__ */
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
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    99
/* END */