1/*
2 * Copyright (C) 1998-2004  David Turner and Werner Lemberg
3 * Copyright (C) 2006  Behdad Esfahbod
4 *
5 * This is part of HarfBuzz, an OpenType Layout engine library.
6 *
7 * Permission is hereby granted, without written agreement and without
8 * license or royalty fees, to use, copy, modify, and distribute this
9 * software and its documentation for any purpose, provided that the
10 * above copyright notice and the following two paragraphs appear in
11 * all copies of this software.
12 *
13 * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
14 * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
15 * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
16 * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
17 * DAMAGE.
18 *
19 * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
20 * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
21 * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
22 * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
23 * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
24 */
25
26#ifndef HARFBUZZ_OPEN_PRIVATE_H
27#define HARFBUZZ_OPEN_PRIVATE_H
28
29#include "harfbuzz-impl.h"
30#include "harfbuzz-open.h"
31#include "harfbuzz-gsub-private.h"
32#include "harfbuzz-gpos-private.h"
33
34HB_BEGIN_HEADER
35
36
37struct  HB_SubTable_
38{
39  union
40  {
41    HB_GSUB_SubTable  gsub;
42    HB_GPOS_SubTable  gpos;
43  } st;
44};
45
46
47HB_INTERNAL HB_Error
48_HB_OPEN_Load_ScriptList( HB_ScriptList* sl,
49			   HB_Stream     input );
50HB_INTERNAL HB_Error
51_HB_OPEN_Load_FeatureList( HB_FeatureList* fl,
52			    HB_Stream         input );
53HB_INTERNAL HB_Error
54_HB_OPEN_Load_LookupList( HB_LookupList*  ll,
55			   HB_Stream        input,
56			   HB_Type         type );
57
58HB_INTERNAL HB_Error
59_HB_OPEN_Load_Coverage( HB_Coverage* c,
60			 HB_Stream      input );
61HB_INTERNAL HB_Error
62_HB_OPEN_Load_ClassDefinition( HB_ClassDefinition* cd,
63				HB_UShort             limit,
64				HB_Stream             input );
65HB_INTERNAL HB_Error
66_HB_OPEN_Load_EmptyOrClassDefinition( HB_ClassDefinition* cd,
67					       HB_UShort             limit,
68					       HB_UInt              class_offset,
69					       HB_UInt              base_offset,
70					       HB_Stream             input );
71HB_INTERNAL HB_Error
72_HB_OPEN_Load_Device( HB_Device** d,
73		       HB_Stream    input );
74
75HB_INTERNAL void  _HB_OPEN_Free_ScriptList( HB_ScriptList*  sl );
76HB_INTERNAL void  _HB_OPEN_Free_FeatureList( HB_FeatureList*  fl );
77HB_INTERNAL void  _HB_OPEN_Free_LookupList( HB_LookupList*  ll,
78		       HB_Type         type );
79
80HB_INTERNAL void  _HB_OPEN_Free_Coverage( HB_Coverage*  c );
81HB_INTERNAL void  _HB_OPEN_Free_ClassDefinition( HB_ClassDefinition*  cd );
82HB_INTERNAL void  _HB_OPEN_Free_Device( HB_Device*  d );
83
84
85
86HB_INTERNAL HB_Error
87_HB_OPEN_Coverage_Index( HB_Coverage* c,
88			  HB_UShort      glyphID,
89			  HB_UShort*     index );
90HB_INTERNAL HB_Error
91_HB_OPEN_Get_Class( HB_ClassDefinition* cd,
92		     HB_UShort             glyphID,
93		    HB_UShort*          klass,
94		     HB_UShort*            index );
95HB_INTERNAL HB_Error
96_HB_OPEN_Get_Device( HB_Device* d,
97		      HB_UShort    size,
98		      HB_Short*    value );
99
100HB_END_HEADER
101
102#endif /* HARFBUZZ_OPEN_PRIVATE_H */
103