[vte] misc: Add functions to get the version at runtime



commit be56dd13d7327a597202eedd70cde87a603c54e5
Author: Christian Persch <chpe gnome org>
Date:   Wed Nov 19 22:00:23 2014 +0100

    misc: Add functions to get the version at runtime

 src/vte.c           |   54 +++++++++++++++++++++++++++++++++++++++++++++++++++
 src/vteversion.h.in |    6 +++++
 2 files changed, 60 insertions(+), 0 deletions(-)
---
diff --git a/src/vte.c b/src/vte.c
index 5b7c09a..975677f 100644
--- a/src/vte.c
+++ b/src/vte.c
@@ -13631,3 +13631,57 @@ vte_terminal_get_input_enabled (VteTerminal *terminal)
 
         return terminal->pvt->input_enabled;
 }
+
+/**
+ * vte_get_major_version:
+ *
+ * Returns the major version of the VTE library at runtime.
+ * Contrast this with %VTE_MAJOR_VERSION which represents
+ * the version of the VTE library that the code was compiled
+ * with.
+ *
+ * Returns: the major version
+ *
+ * Since: 0.40
+ */
+guint
+vte_get_major_version (void)
+{
+        return VTE_MAJOR_VERSION;
+}
+
+/**
+ * vte_get_minor_version:
+ *
+ * Returns the minor version of the VTE library at runtime.
+ * Contrast this with %VTE_MINOR_VERSION which represents
+ * the version of the VTE library that the code was compiled
+ * with.
+ *
+ * Returns: the minor version
+ *
+ * Since: 0.40
+ */
+guint
+vte_get_minor_version (void)
+{
+        return VTE_MINOR_VERSION;
+}
+
+/**
+ * vte_get_micro_version:
+ *
+ * Returns the micro version of the VTE library at runtime.
+ * Contrast this with %VTE_MICRO_VERSION which represents
+ * the version of the VTE library that the code was compiled
+ * with.
+ *
+ * Returns: the micro version
+ *
+ * Since: 0.40
+ */
+guint
+vte_get_micro_version (void)
+{
+        return VTE_MICRO_VERSION;
+}
diff --git a/src/vteversion.h.in b/src/vteversion.h.in
index 2ce7f6c..5a27a83 100644
--- a/src/vteversion.h.in
+++ b/src/vteversion.h.in
@@ -69,4 +69,10 @@
    (VTE_MAJOR_VERSION == (major) && VTE_MINOR_VERSION > (minor)) || \
    (VTE_MAJOR_VERSION == (major) && VTE_MINOR_VERSION == (minor) && VTE_MICRO_VERSION >= (micro)))
 
+guint vte_get_major_version (void) G_GNUC_CONST;
+
+guint vte_get_minor_version (void) G_GNUC_CONST;
+
+guint vte_get_micro_version (void) G_GNUC_CONST;
+
 #endif /* __VTE_VTE_VERSION_H__ */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]