vrshoot

view libs/ft2static/freetype/internal/services/svmm.h @ 0:b2f14e535253

initial commit
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 01 Feb 2014 19:58:19 +0200
parents
children
line source
1 /***************************************************************************/
2 /* */
3 /* svmm.h */
4 /* */
5 /* The FreeType Multiple Masters and GX var services (specification). */
6 /* */
7 /* Copyright 2003, 2004 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 /***************************************************************************/
19 #ifndef __SVMM_H__
20 #define __SVMM_H__
22 #include FT_INTERNAL_SERVICE_H
25 FT_BEGIN_HEADER
28 /*
29 * A service used to manage multiple-masters data in a given face.
30 *
31 * See the related APIs in `ftmm.h' (FT_MULTIPLE_MASTERS_H).
32 *
33 */
35 #define FT_SERVICE_ID_MULTI_MASTERS "multi-masters"
38 typedef FT_Error
39 (*FT_Get_MM_Func)( FT_Face face,
40 FT_Multi_Master* master );
42 typedef FT_Error
43 (*FT_Get_MM_Var_Func)( FT_Face face,
44 FT_MM_Var* *master );
46 typedef FT_Error
47 (*FT_Set_MM_Design_Func)( FT_Face face,
48 FT_UInt num_coords,
49 FT_Long* coords );
51 typedef FT_Error
52 (*FT_Set_Var_Design_Func)( FT_Face face,
53 FT_UInt num_coords,
54 FT_Fixed* coords );
56 typedef FT_Error
57 (*FT_Set_MM_Blend_Func)( FT_Face face,
58 FT_UInt num_coords,
59 FT_Long* coords );
62 FT_DEFINE_SERVICE( MultiMasters )
63 {
64 FT_Get_MM_Func get_mm;
65 FT_Set_MM_Design_Func set_mm_design;
66 FT_Set_MM_Blend_Func set_mm_blend;
67 FT_Get_MM_Var_Func get_mm_var;
68 FT_Set_Var_Design_Func set_var_design;
69 };
71 #ifndef FT_CONFIG_OPTION_PIC
73 #define FT_DEFINE_SERVICE_MULTIMASTERSREC(class_, get_mm_, set_mm_design_, \
74 set_mm_blend_, get_mm_var_, set_var_design_) \
75 static const FT_Service_MultiMastersRec class_ = \
76 { \
77 get_mm_, set_mm_design_, set_mm_blend_, get_mm_var_, set_var_design_ \
78 };
80 #else /* FT_CONFIG_OPTION_PIC */
82 #define FT_DEFINE_SERVICE_MULTIMASTERSREC(class_, get_mm_, set_mm_design_, \
83 set_mm_blend_, get_mm_var_, set_var_design_) \
84 void \
85 FT_Init_Class_##class_( FT_Service_MultiMastersRec* clazz ) \
86 { \
87 clazz->get_mm = get_mm_; \
88 clazz->set_mm_design = set_mm_design_; \
89 clazz->set_mm_blend = set_mm_blend_; \
90 clazz->get_mm_var = get_mm_var_; \
91 clazz->set_var_design = set_var_design_; \
92 }
94 #endif /* FT_CONFIG_OPTION_PIC */
96 /* */
99 FT_END_HEADER
101 #endif /* __SVMM_H__ */
104 /* END */