* docs/CHANGES: Updated. * include/freetype/ftmodapi.h (FT_Module_Get_Flags): New declaration. * src/base/ftobjs.c (FT_Module_Get_Flags): New function.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173
diff --git a/ChangeLog b/ChangeLog
index e430145..05dc9c6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,16 @@
2006-01-08 Werner Lemberg <wl@gnu.org>
+ * docs/CHANGES: Updated.
+
+2006-01-08 Huw D M Davies <h.davies1@physics.ox.ac.uk>
+
+ * include/freetype/ftmodapi.h (FT_Module_Get_Flags): New
+ declaration.
+
+ * src/base/ftobjs.c (FT_Module_Get_Flags): New function.
+
+2006-01-07 Werner Lemberg <wl@gnu.org>
+
* src/pcf/pcfread.c (pcf_get_bitmaps): Remove unused variable
`bitmaps'. Reported by Yu Lei <yulei0@gmail.com>.
diff --git a/docs/CHANGES b/docs/CHANGES
index f587fd9..79e07aa 100644
--- a/docs/CHANGES
+++ b/docs/CHANGES
@@ -66,6 +66,9 @@ LATEST CHANGES BETWEEN 2.2.0 and 2.1.10
enable the interpretation of the `gasp' table only if native
TrueType hinting is available.
+ - A new function `FT_Module_Get_Flags' (declared in `FT_MODULE_H')
+ can be used to get the module flags for a given module.
+
- The demo programs `ftview' and `ftstring' have been rewritten
for better readability.
@@ -2689,7 +2692,7 @@ Extensions support:
------------------------------------------------------------------------
-Copyright 2000, 2001, 2002, 2003, 2004, 2005 by
+Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006 by
David Turner, Robert Wilhelm, and Werner Lemberg.
This file is part of the FreeType project, and may only be used,
diff --git a/include/freetype/ftmodapi.h b/include/freetype/ftmodapi.h
index 1929ca0..6f25794 100644
--- a/include/freetype/ftmodapi.h
+++ b/include/freetype/ftmodapi.h
@@ -4,7 +4,7 @@
/* */
/* FreeType modules public interface (specification). */
/* */
-/* Copyright 1996-2001, 2002, 2003 by */
+/* Copyright 1996-2001, 2002, 2003, 2006 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -98,27 +98,27 @@ FT_BEGIN_HEADER
/* The module class descriptor. */
/* */
/* <Fields> */
- /* module_flags :: Bit flags describing the module. */
+ /* module_flags :: Bit flags describing the module. */
/* */
- /* module_size :: The size of one module object/instance in */
- /* bytes. */
+ /* module_size :: The size of one module object/instance in */
+ /* bytes. */
/* */
- /* module_name :: The name of the module. */
+ /* module_name :: The name of the module. */
/* */
- /* module_version :: The version, as a 16.16 fixed number */
- /* (major.minor). */
+ /* module_version :: The version, as a 16.16 fixed number */
+ /* (major.minor). */
/* */
- /* module_requires :: The version of FreeType this module requires */
- /* (starts at version 2.0, i.e 0x20000) */
+ /* module_requires :: The version of FreeType this module requires */
+ /* (starts at version 2.0, i.e., 0x20000) */
/* */
- /* module_init :: A function used to initialize (not create) a */
- /* new module object. */
+ /* module_init :: A function used to initialize (not create) a */
+ /* new module object. */
/* */
- /* module_done :: A function used to finalize (not destroy) a */
- /* given module object */
+ /* module_done :: A function used to finalize (not destroy) a */
+ /* given module object */
/* */
- /* get_interface :: Queries a given module for a specific */
- /* interface by name. */
+ /* get_interface :: Queries a given module for a specific */
+ /* interface by name. */
/* */
typedef struct FT_Module_Class_
{
@@ -216,6 +216,28 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
/* <Function> */
+ /* FT_Module_Get_Flags */
+ /* */
+ /* <Description> */
+ /* Gets the module flags for a given module. */
+ /* */
+ /* <Input> */
+ /* module :: A handle to a module object. */
+ /* */
+ /* <Output> */
+ /* flags :: The module's flags. */
+ /* */
+ /* <Return> */
+ /* FreeType error code. 0 means success. */
+ /* */
+ FT_EXPORT( FT_Error )
+ FT_Module_Get_Flags( FT_Module module,
+ FT_ULong* flags );
+
+
+ /*************************************************************************/
+ /* */
+ /* <Function> */
/* FT_New_Library */
/* */
/* <Description> */
@@ -290,7 +312,6 @@ FT_BEGIN_HEADER
FT_DebugHook_Func debug_hook );
-
/*************************************************************************/
/* */
/* <Function> */
diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c
index afdccf3..19d2c54 100644
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -4,7 +4,7 @@
/* */
/* The FreeType private base classes (body). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005 by */
+/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -3166,6 +3166,23 @@
}
+ /* documentation is in ftmodapi.h */
+
+ FT_EXPORT_DEF( FT_Error )
+ FT_Module_Get_Flags( FT_Module module,
+ FT_ULong* flags )
+ {
+ if ( !module )
+ return FT_Err_Invalid_Driver_Handle;
+
+ if ( !flags )
+ return FT_Err_Invalid_Argument;
+
+ *flags = module->clazz->module_flags;
+ return FT_Err_Ok;
+ }
+
+
/* documentation is in ftobjs.h */
FT_BASE_DEF( const void* )