summaryrefslogtreecommitdiff
path: root/glib
diff options
context:
space:
mode:
authorChristian Persch <chpe@gnome.org>2009-06-04 22:35:40 +0200
committerCarlos Garcia Campos <carlosgc@gnome.org>2009-06-05 09:47:13 +0200
commit0ca7e214fb5f9c9fb59792149bd23c1617d38cac (patch)
tree0cbd09496af6d5bb498b17231f248969fc9e7445 /glib
parent4ce04da0040e5a2626c110f94a128e2d272401b9 (diff)
Add poppler version defines and version check macro
Add POPPLER_[MAJOR|MINOR|MICRO]_VERSION defines and POPPLER_CHECK_VERSION macro. FDO bug #22091.
Diffstat (limited to 'glib')
-rw-r--r--glib/poppler-features.h.in9
-rw-r--r--glib/reference/poppler-docs.sgml1
-rw-r--r--glib/reference/poppler-sections.txt10
-rw-r--r--glib/reference/tmpl/poppler-features.sgml80
4 files changed, 100 insertions, 0 deletions
diff --git a/glib/poppler-features.h.in b/glib/poppler-features.h.in
index 7b72569c..99c7ed8e 100644
--- a/glib/poppler-features.h.in
+++ b/glib/poppler-features.h.in
@@ -22,4 +22,13 @@
@CAIRO_FEATURE@
@GDK_FEATURE@
+#define POPPLER_MAJOR_VERSION (@POPPLER_MAJOR_VERSION@)
+#define POPPLER_MINOR_VERSION (@POPPLER_MINOR_VERSION@)
+#define POPPLER_MICRO_VERSION (@POPPLER_MICRO_VERSION@)
+
+#define POPPLER_CHECK_VERSION(major,minor,micro) \
+ (POPPLER_MAJOR_VERSION > (major) || \
+ (POPPLER_MAJOR_VERSION == (major) && POPPLER_MINOR_VERSION > (minor)) || \
+ (POPPLER_MAJOR_VERSION == (major) && POPPLER_MINOR_VERSION == (minor) && POPPLER_MICRO_VERSION >= (micro)))
+
#endif /* __POPPLER_FEATURES_H__ */
diff --git a/glib/reference/poppler-docs.sgml b/glib/reference/poppler-docs.sgml
index e75d4cdc..33dc2c47 100644
--- a/glib/reference/poppler-docs.sgml
+++ b/glib/reference/poppler-docs.sgml
@@ -17,5 +17,6 @@
<xi:include href="xml/poppler-enums.xml"/>
<xi:include href="xml/poppler-annot.xml"/>
<xi:include href="xml/poppler-layer.xml"/>
+ <xi:include href="xml/poppler-features.xml"/>
</chapter>
</book>
diff --git a/glib/reference/poppler-sections.txt b/glib/reference/poppler-sections.txt
index 5388be06..070fdc9d 100644
--- a/glib/reference/poppler-sections.txt
+++ b/glib/reference/poppler-sections.txt
@@ -308,3 +308,13 @@ poppler_layer_hide
poppler_layer_is_parent
poppler_layer_get_radio_button_group_id
</SECTION>
+
+<SECTION>
+<FILE>poppler-features</FILE>
+POPPLER_HAS_CAIRO
+POPPLER_WITH_GDK
+POPPLER_MAJOR_VERSION
+POPPLER_MINOR_VERSION
+POPPLER_MICRO_VERSION
+POPPLER_CHECK_VERSION
+</SECTION>
diff --git a/glib/reference/tmpl/poppler-features.sgml b/glib/reference/tmpl/poppler-features.sgml
new file mode 100644
index 00000000..22f90b06
--- /dev/null
+++ b/glib/reference/tmpl/poppler-features.sgml
@@ -0,0 +1,80 @@
+<!-- ##### SECTION Title ##### -->
+Version and Features Information
+
+<!-- ##### SECTION Short_Description ##### -->
+Variables and functions to check the poppler version and features
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+Poppler provides version information, and information about features
+enabled at compile time. This is primarily useful in configure checks
+for builds that have a configure script, or for allowing code to optionally
+depend but not require a specific poppler version.
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### MACRO POPPLER_HAS_CAIRO ##### -->
+<para>
+Defined if poppler was compiled with cairo support.
+</para>
+
+
+
+<!-- ##### MACRO POPPLER_WITH_GDK ##### -->
+<para>
+Defined if poppler was compiled with GDK support.
+</para>
+
+
+
+<!-- ##### MACRO POPPLER_MAJOR_VERSION ##### -->
+<para>
+The major version number of the poppler header files (e.g. in poppler version
+0.1.2 this is 0.)
+</para>
+
+Since: 0.11
+
+
+
+<!-- ##### MACRO POPPLER_MINOR_VERSION ##### -->
+<para>
+
+</para>
+The major version number of the poppler header files (e.g. in poppler version
+0.1.2 this is 1.)
+
+Since: 0.11
+
+
+
+<!-- ##### MACRO POPPLER_MICRO_VERSION ##### -->
+<para>
+The micro version number of the poppler header files (e.g. in poppler version
+0.1.2 this is 2.)
+</para>
+
+Since: 0.11
+
+
+
+<!-- ##### MACRO POPPLER_CHECK_VERSION ##### -->
+<para>
+Returns %TRUE if the version of the poppler header files is the same
+as or newer than the passed-in version.
+</para>
+
+@major: major version (e.g. 0 for version 0.1.2)
+@minor: minor version (e.g. 1 for version 0.1.2)
+@micro: micro version (e.g. 2 for version 0.1.2)
+
+Since: 0.11
+
+