summaryrefslogtreecommitdiffstats
path: root/src/version.h
diff options
context:
space:
mode:
authorMenTaLguY <mental@rydia.net>2006-01-16 02:36:01 +0000
committermental <mental@users.sourceforge.net>2006-01-16 02:36:01 +0000
commit179fa413b047bede6e32109e2ce82437c5fb8d34 (patch)
treea5a6ac2c1708bd02288fbd8edb2ff500ff2e0916 /src/version.h
downloadinkscape-179fa413b047bede6e32109e2ce82437c5fb8d34.tar.gz
inkscape-179fa413b047bede6e32109e2ce82437c5fb8d34.zip
moving trunk for module inkscape
(bzr r1)
Diffstat (limited to 'src/version.h')
-rw-r--r--src/version.h58
1 files changed, 58 insertions, 0 deletions
diff --git a/src/version.h b/src/version.h
new file mode 100644
index 000000000..0c4d85d4a
--- /dev/null
+++ b/src/version.h
@@ -0,0 +1,58 @@
+/*
+ * Authors:
+ * MenTaLguY <mental@rydia.net>
+ *
+ * Copyright (C) 2003 MenTaLguY
+ *
+ * Released under GNU GPL, read the file 'COPYING' for more information
+ */
+
+#ifndef SEEN_INKSCAPE_VERSION_H
+#define SEEN_INKSCAPE_VERSION_H
+
+#include <glib.h>
+
+#define SVG_VERSION "1.0"
+#define SODIPODI_VERSION "0.32"
+
+namespace Inkscape {
+
+struct Version {
+ Version() {}
+ Version(unsigned mj, unsigned mn) {
+ // somebody pollutes our namespace with major() and minor()
+ // macros, so we can't use new-style initializers
+ major = mj;
+ minor = mn;
+ }
+
+ unsigned major;
+ unsigned minor;
+
+ bool operator>(Version const &other) const {
+ return major > other.major ||
+ ( major == other.major && minor > other.minor );
+ }
+ bool operator==(Version const &other) const {
+ return major == other.major && minor == other.minor;
+ }
+ bool operator!=(Version const &other) const {
+ return major != other.major || minor != other.minor;
+ }
+ bool operator<(Version const &other) const {
+ return major < other.major ||
+ ( major == other.major && minor < other.minor );
+ }
+};
+
+}
+
+#define SP_VERSION_IS_ZERO (v) (!(v).major && !(v).minor)
+
+gboolean sp_version_from_string (const gchar *string, Inkscape::Version *version);
+gchar *sp_version_to_string (Inkscape::Version version);
+gboolean sp_version_inside_range (Inkscape::Version version,
+ unsigned major_min, unsigned minor_min,
+ unsigned major_max, unsigned minor_max);
+
+#endif