summaryrefslogtreecommitdiff
path: root/pango/pango-utils.h
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@gnome.org>2006-12-07 03:40:54 +0000
committerBehdad Esfahbod <behdad@src.gnome.org>2006-12-07 03:40:54 +0000
commitd6956a1ad956ad4f5322059fff7baac70ea3c039 (patch)
treea2fc3a3c05e4753f4ad73893a840ffaa41a4e498 /pango/pango-utils.h
parent5b6f118ba4b87c2d9ba834620b11c3f44119dce1 (diff)
downloadpango-d6956a1ad956ad4f5322059fff7baac70ea3c039.tar.gz
New generated public header file pango-features.h. Currently contains the
2006-12-06 Behdad Esfahbod <behdad@gnome.org> * configure.in: * pango/Makefile.am: New generated public header file pango-features.h. Currently contains the version information. In the future, can be expanded to define which backends have been enabled, etc. * pango/pango.def: * pango/pango-utils.h: * pango/pango-utils.c: New public macros and functions: PANGO_VERSION_ENCODE(), PANGO_VERSION_MAJOR, PANGO_VERSION_MINOR, PANGO_VERSION_MICRO, PANGO_VERSION, PANGO_VERSION_STRING, PANGO_VERSION_CHECK(), pango_version(), pango_version_string(), pango_version_check(). * docs/pango-docs.sgml: * docs/pango-sections.txt: * docs/tmpl/pango-version.sgml: Docs for new symbols, in a new section. * examples/renderdemo.c (show_version): If run-time Pango lib version is different than the compile-time one, show that one too. * pango/pango.h: #include <pango-utils.h> as well as almost all other public pango-*.h headers (though, the other ones were already included indirectly). The only public pango-*.h header pango.h shouldn't include are pango-ot.h (which is really misnamed) and pango-modules.h (that should not be needed by 99.99% users anyway). * docs/Makefile.am: * docs/check.docs: Test to check that all symbols are documented and properly hooked into documentation tree. * pango/pango.rc.in: * pango/pangoft2.rc.in: * pango/pangowin32.rc.in: Update, reflecting some internal symbol changes. * pango/check.defs: Improve.
Diffstat (limited to 'pango/pango-utils.h')
-rw-r--r--pango/pango-utils.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/pango/pango-utils.h b/pango/pango-utils.h
index f0392f72..7b008a90 100644
--- a/pango/pango-utils.h
+++ b/pango/pango-utils.h
@@ -97,6 +97,36 @@ guint8 * pango_log2vis_get_embedding_levels (const gchar *text,
*/
gboolean pango_is_zero_width (gunichar ch) G_GNUC_CONST;
+/* Pango version checking */
+
+/* Encode a Pango version as an integer */
+#define PANGO_VERSION_ENCODE(major, minor, micro) ( \
+ ((major) * 10000) \
+ + ((minor) * 100) \
+ + ((micro) * 1))
+
+/* Encoded version of Pango at compile-time */
+#define PANGO_VERSION PANGO_VERSION_ENCODE( \
+ PANGO_VERSION_MAJOR, \
+ PANGO_VERSION_MINOR, \
+ PANGO_VERSION_MICRO)
+
+/* Check that compile-time Pango is as new as required */
+#define PANGO_VERSION_CHECK(major,minor,micro) \
+ (PANGO_VERSION >= PANGO_VERSION_ENCODE(major,minor,micro))
+
+
+/* Return encoded version of Pango at run-time */
+int pango_version (void) G_GNUC_CONST;
+
+/* Return run-time Pango version as an string */
+G_CONST_RETURN char * pango_version_string (void);
+
+/* Check that run-time Pango is as new as required */
+G_CONST_RETURN char * pango_version_check (int required_major,
+ int required_minor,
+ int required_micro);
+
G_END_DECLS
#endif /* __PANGO_UTILS_H__ */