misc fixes to get rrdtool working without included libraries.
[rrdtool.git] / libraries / freetype-2.0.5 / include / ahloader.h
1 /***************************************************************************/
2 /*                                                                         */
3 /*  ahloader.h                                                             */
4 /*                                                                         */
5 /*    Glyph loader for the auto-hinting module (declaration only).         */
6 /*                                                                         */
7 /*  Copyright 2000-2001 Catharon Productions Inc.                          */
8 /*  Author: David Turner                                                   */
9 /*                                                                         */
10 /*  This file is part of the Catharon Typography Project and shall only    */
11 /*  be used, modified, and distributed under the terms of the Catharon     */
12 /*  Open Source License that should come with this file under the name     */
13 /*  `CatharonLicense.txt'.  By continuing to use, modify, or distribute    */
14 /*  this file you indicate that you have read the license and              */
15 /*  understand and accept it fully.                                        */
16 /*                                                                         */
17 /*  Note that this license is compatible with the FreeType license.        */
18 /*                                                                         */
19 /***************************************************************************/
20
21
22   /*************************************************************************/
23   /*                                                                       */
24   /* This defines the AH_GlyphLoader type in two different ways:           */
25   /*                                                                       */
26   /* - If the module is compiled within FreeType 2, the type is simply a   */
27   /*   typedef to FT_GlyphLoader.                                          */
28   /*                                                                       */
29   /* - If the module is compiled as a standalone object, AH_GlyphLoader    */
30   /*   has its own implementation.                                         */
31   /*                                                                       */
32   /*************************************************************************/
33
34
35 #ifndef __AHLOADER_H__
36 #define __AHLOADER_H__
37
38
39 #include <ft2build.h>
40
41
42 FT_BEGIN_HEADER
43
44
45 #ifdef _STANDALONE_
46
47   typedef struct  AH_GlyphLoad_
48   {
49     FT_Outline    outline;       /* outline             */
50     FT_UInt       num_subglyphs; /* number of subglyphs */
51     FT_SubGlyph*  subglyphs;     /* subglyphs           */
52     FT_Vector*    extra_points;  /* extra points table  */
53
54   } AH_GlyphLoad;
55
56
57   struct  AH_GlyphLoader_
58   {
59     FT_Memory     memory;
60     FT_UInt       max_points;
61     FT_UInt       max_contours;
62     FT_UInt       max_subglyphs;
63     FT_Bool       use_extra;
64
65     AH_GlyphLoad  base;
66     AH_GlyphLoad  current;
67
68     void*         other;        /* for possible future extensions */
69   };
70
71
72   FT_LOCAL FT_Error
73   AH_GlyphLoader_New( FT_Memory         memory,
74                       AH_GlyphLoader**  aloader );
75
76   FT_LOCAL FT_Error
77   AH_GlyphLoader_Create_Extra( AH_GlyphLoader*  loader );
78
79   FT_LOCAL void
80   AH_GlyphLoader_Done( AH_GlyphLoader*  loader );
81
82   FT_LOCAL void
83   AH_GlyphLoader_Reset( AH_GlyphLoader*  loader );
84
85   FT_LOCAL void
86   AH_GlyphLoader_Rewind( AH_GlyphLoader*  loader );
87
88   FT_LOCAL FT_Error
89   AH_GlyphLoader_Check_Points( AH_GlyphLoader*  loader,
90                                FT_UInt          n_points,
91                                FT_UInt          n_contours );
92
93   FT_LOCAL FT_Error
94   AH_GlyphLoader_Check_Subglyphs( AH_GlyphLoader*  loader,
95                                   FT_UInt          n_subs );
96
97   FT_LOCAL void
98   AH_GlyphLoader_Prepare( AH_GlyphLoader*  loader );
99
100   FT_LOCAL void
101   AH_GlyphLoader_Add( AH_GlyphLoader*  loader );
102
103   FT_LOCAL FT_Error
104   AH_GlyphLoader_Copy_Points( AH_GlyphLoader*  target,
105                               FT_GlyphLoader*  source );
106
107 #else /* _STANDALONE */
108
109 #include FT_INTERNAL_OBJECTS_H
110
111   #define AH_Load    FT_GlyphLoad
112   #define AH_Loader  FT_GlyphLoader
113
114   #define ah_loader_new              FT_GlyphLoader_New
115   #define ah_loader_done             FT_GlyphLoader_Done
116   #define ah_loader_reset            FT_GlyphLoader_Reset
117   #define ah_loader_rewind           FT_GlyphLoader_Rewind
118   #define ah_loader_create_extra     FT_GlyphLoader_Create_Extra
119   #define ah_loader_check_points     FT_GlyphLoader_Check_Points
120   #define ah_loader_check_subglyphs  FT_GlyphLoader_Check_Subglyphs
121   #define ah_loader_prepare          FT_GlyphLoader_Prepare
122   #define ah_loader_add              FT_GlyphLoader_Add
123   #define ah_loader_copy_points      FT_GlyphLoader_Copy_Points
124
125 #endif /* _STANDALONE_ */
126
127
128 FT_END_HEADER
129
130 #endif /* __AHLOADER_H__ */
131
132
133 /* END */