[libpanel] build: add 1.2 version macros



commit 180fb2567d9761d1d2722c3e784803aba31d21ae
Author: Christian Hergert <chergert redhat com>
Date:   Mon Sep 26 21:13:45 2022 -0700

    build: add 1.2 version macros

 src/panel-version-macros.h | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)
---
diff --git a/src/panel-version-macros.h b/src/panel-version-macros.h
index d0cde38..1aa5393 100644
--- a/src/panel-version-macros.h
+++ b/src/panel-version-macros.h
@@ -25,7 +25,7 @@
 #include "panel-version.h"
 
 #ifndef _PANEL_EXTERN
-#define _PANEL_EXTERN extern
+# define _PANEL_EXTERN extern
 #endif
 
 #ifdef PANEL_DISABLE_DEPRECATION_WARNINGS
@@ -39,6 +39,7 @@
 #endif
 
 #define PANEL_VERSION_1_0 (G_ENCODE_VERSION (1, 0))
+#define PANEL_VERSION_1_2 (G_ENCODE_VERSION (1, 2))
 
 #if (PANEL_MINOR_VERSION == 99)
 # define PANEL_VERSION_CUR_STABLE (G_ENCODE_VERSION (PANEL_MAJOR_VERSION + 1, 0))
@@ -82,7 +83,7 @@
  * the libpanel.h header.
 
  * The definition should be one of the predefined Drafting version
- * macros: %PANEL_VERSION_1_0, %PANEL_VERSION_4_2,...
+ * macros: %PANEL_VERSION_1_0, %PANEL_VERSION_1_2,...
  *
  * This macro defines the upper bound for the Drafting API to use.
  *
@@ -121,3 +122,16 @@
 # define PANEL_AVAILABLE_IN_1_0                 _PANEL_EXTERN
 #endif
 
+#if PANEL_VERSION_MIN_REQUIRED >= PANEL_VERSION_1_2
+# define PANEL_DEPRECATED_IN_1_2                PANEL_DEPRECATED
+# define PANEL_DEPRECATED_IN_1_2_FOR(f)         PANEL_DEPRECATED_FOR(f)
+#else
+# define PANEL_DEPRECATED_IN_1_2                _PANEL_EXTERN
+# define PANEL_DEPRECATED_IN_1_2_FOR(f)         _PANEL_EXTERN
+#endif
+#if PANEL_VERSION_MAX_ALLOWED < PANEL_VERSION_1_2
+# define PANEL_AVAILABLE_IN_1_2                 PANEL_UNAVAILABLE(1, 2)
+#else
+# define PANEL_AVAILABLE_IN_1_2                 _PANEL_EXTERN
+#endif
+


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