[gtksourceview] Document MIN_REQUIRED and MAX_ALLOWED



commit 99de914934c07e50c1ebd7becb7ec0ddcc4ef31c
Author: Paolo Borelli <pborelli gnome org>
Date:   Tue Dec 8 14:22:42 2015 +0100

    Document MIN_REQUIRED and MAX_ALLOWED

 docs/reference/gtksourceview-3.0-sections.txt |    2 +
 gtksourceview/gtksourceversion.h.in           |   32 +++++++++++++++++++++++++
 2 files changed, 34 insertions(+), 0 deletions(-)
---
diff --git a/docs/reference/gtksourceview-3.0-sections.txt b/docs/reference/gtksourceview-3.0-sections.txt
index ece5339..d16d369 100644
--- a/docs/reference/gtksourceview-3.0-sections.txt
+++ b/docs/reference/gtksourceview-3.0-sections.txt
@@ -849,6 +849,8 @@ GTK_SOURCE_MINOR_VERSION
 GTK_SOURCE_MICRO_VERSION
 GTK_SOURCE_CHECK_VERSION
 <SUBSECTION>
+GTK_SOURCE_VERSION_MIN_REQUIRED
+GTK_SOURCE_VERSION_MAX_ALLOWED
 </SECTION>
 
 <SECTION>
diff --git a/gtksourceview/gtksourceversion.h.in b/gtksourceview/gtksourceversion.h.in
index 03d72e4..150e0cf 100644
--- a/gtksourceview/gtksourceversion.h.in
+++ b/gtksourceview/gtksourceversion.h.in
@@ -107,10 +107,42 @@ G_BEGIN_DECLS
 #define GTK_SOURCE_VERSION_PREV_STABLE (G_ENCODE_VERSION (GTK_SOURCE_MAJOR_VERSION, GTK_SOURCE_MINOR_VERSION 
- 2))
 #endif
 
+/**
+ * GTK_SOURCE_VERSION_MIN_REQUIRED:
+ *
+ * A macro that should be defined by the user prior to including
+ * the gtksource.h header.
+ * The definition should be one of the predefined GDK version
+ * macros: %GTK_SOURCE_VERSION_3_0, %GTK_SOURCE_VERSION_3_2,...
+ *
+ * This macro defines the lower bound for the GtkSourceView API to use.
+ *
+ * If a function has been deprecated in a newer version of GtkSourceView,
+ * it is possible to use this symbol to avoid the compiler warnings
+ * without disabling warning for every deprecated function.
+ *
+ * Since: 3.20
+ */
 #ifndef GTK_SOURCE_VERSION_MIN_REQUIRED
 #define GTK_SOURCE_VERSION_MIN_REQUIRED (GTK_SOURCE_VERSION_CUR_STABLE)
 #endif
 
+/**
+ * GTK_SOURCE_VERSION_MAX_ALLOWED:
+ *
+ * A macro that should be defined by the user prior to including
+ * the gtksource.h header.
+ * The definition should be one of the predefined GDK version
+ * macros: %GTK_SOURCE_VERSION_3_0, %GTK_SOURCE_VERSION_3_2,...
+ *
+ * This macro defines the upper bound for the GtkSourceView API to use.
+ *
+ * If a function has been introduced in a newer version of GtkSourceView,
+ * it is possible to use this symbol to get compiler warnings when
+ * trying to use that function.
+ *
+ * Since: 3.20
+ */
 #ifndef GTK_SOURCE_VERSION_MAX_ALLOWED
 #if GTK_SOURCE_VERSION_MIN_REQUIRED > GTK_SOURCE_VERSION_PREV_STABLE
 #define GTK_SOURCE_VERSION_MAX_ALLOWED  GTK_SOURCE_VERSION_MIN_REQUIRED


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