[libadwaita/wip/exalm/version-macros: 1/4] version: Add 1.1 version macros




commit a79eb735dd7e2f070b91c616db4e5ab7c1dd8025
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Wed Apr 6 22:03:47 2022 +0400

    version: Add 1.1 version macros

 src/adw-version.h.in | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)
---
diff --git a/src/adw-version.h.in b/src/adw-version.h.in
index cd2d10a2..3c96ba70 100644
--- a/src/adw-version.h.in
+++ b/src/adw-version.h.in
@@ -77,6 +77,16 @@ G_BEGIN_DECLS
          (ADW_MAJOR_VERSION == (major) && ADW_MINOR_VERSION == (minor) && \
           ADW_MICRO_VERSION >= (micro)))
 
+/**
+ * ADW_VERSION_1_1:
+ *
+ * A macro that evaluates to the 1.2 version of Adwaita, in a format
+ * that can be used by the C pre-processor.
+ *
+ * Since: 1.1
+ */
+#define ADW_VERSION_1_1 (ADW_ENCODE_VERSION (1, 1, 0))
+
 #ifndef _ADW_EXTERN
 #define _ADW_EXTERN extern
 #endif
@@ -85,6 +95,28 @@ G_BEGIN_DECLS
 # define ADW_VERSION_MAX_ALLOWED ADW_VERSION_1_1
 #endif
 
+#ifndef ADW_VERSION_MIN_REQUIRED
+# define ADW_VERSION_MIN_REQUIRED ADW_VERSION_1_1
+#endif
+
+#if ADW_VERSION_MAX_ALLOWED < ADW_VERSION_1_1
+# define ADW_AVAILABLE_IN_1_1 ADW_UNAVAILABLE(1, 1)
+#else
+# define ADW_AVAILABLE_IN_1_1 _ADW_EXTERN
+#endif
+
+#if ADW_VERSION_MIN_REQUIRED >= ADW_VERSION_1_1
+# define ADW_DEPRECATED_IN_1_1             _ADW_DEPRECATED
+# define ADW_DEPRECATED_IN_1_1_FOR(f)      _ADW_DEPRECATED_FOR(f)
+# define ADW_DEPRECATED_TYPE_IN_1_1        _ADW_DEPRECATED_TYPE
+# define ADW_DEPRECATED_TYPE_IN_1_1_FOR(f) _ADW_DEPRECATED_TYPE_FOR(f)
+#else
+# define ADW_DEPRECATED_IN_1_1             _ADW_EXTERN
+# define ADW_DEPRECATED_IN_1_1_FOR(f)      _ADW_EXTERN
+# define ADW_DEPRECATED_TYPE_IN_1_1
+# define ADW_DEPRECATED_TYPE_IN_1_1_FOR(f)
+#endif
+
 #define ADW_UNAVAILABLE(major, minor) G_UNAVAILABLE(major, minor) _ADW_EXTERN
 
 #define ADW_AVAILABLE_IN_ALL _ADW_EXTERN


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