if not defined (__GDK_H_INSIDE__) and not defined (__GTK_CSS_H_INSIDE__) and not defined (GTK_COMPILATION) and not defined (GTK_CSS_COMPILATION)
.err <"Only gdk/gdk.h can be included directly.">
endif

ifndef __GDK_VERSION_MACROS_H__
define __GDK_VERSION_MACROS_H__

include glib.inc

define GDK_MAJOR_VERSION (4)
define GDK_MINOR_VERSION (6)
define GDK_MICRO_VERSION (3)

define GDK_VERSION_4_0        G_ENCODE_VERSION (4, 0)
define GDK_VERSION_4_2        G_ENCODE_VERSION (4, 2)
define GDK_VERSION_4_4        G_ENCODE_VERSION (4, 4)
define GDK_VERSION_4_6        G_ENCODE_VERSION (4, 6)

if GDK_MAJOR_VERSION ge 4 and (GDK_MINOR_VERSION mod 2)
define GDK_VERSION_CUR_STABLE         G_ENCODE_VERSION (GDK_MAJOR_VERSION, GDK_MINOR_VERSION + 1)
elseif G_ENCODE_VERSION (GDK_MAJOR_VERSION, GDK_MINOR_VERSION) gt GDK_VERSION_4_0
define GDK_VERSION_CUR_STABLE         G_ENCODE_VERSION (GDK_MAJOR_VERSION, GDK_MINOR_VERSION)
else
define GDK_VERSION_CUR_STABLE         GDK_VERSION_4_0
endif

if GDK_MAJOR_VERSION ge 4 and (GDK_MINOR_VERSION mod 2)
define GDK_VERSION_PREV_STABLE        G_ENCODE_VERSION (GDK_MAJOR_VERSION, GDK_MINOR_VERSION - 1)
elseif GDK_MAJOR_VERSION ge 4 and GDK_MINOR_VERSION gt 2
define GDK_VERSION_PREV_STABLE        G_ENCODE_VERSION (GDK_MAJOR_VERSION, GDK_MINOR_VERSION - 2)
else
define GDK_VERSION_PREV_STABLE        GDK_VERSION_4_0
endif

ifndef GDK_VERSION_MIN_REQUIRED
define GDK_VERSION_MIN_REQUIRED      GDK_VERSION_CUR_STABLE
endif

ifndef GDK_VERSION_MAX_ALLOWED
if GDK_VERSION_MIN_REQUIRED gt GDK_VERSION_PREV_STABLE
define GDK_VERSION_MAX_ALLOWED      GDK_VERSION_MIN_REQUIRED
else
define GDK_VERSION_MAX_ALLOWED      GDK_VERSION_CUR_STABLE
endif
endif

if GDK_VERSION_MAX_ALLOWED lt GDK_VERSION_MIN_REQUIRED
.err <"GDK_VERSION_MAX_ALLOWED must be >= GDK_VERSION_MIN_REQUIRED">
endif
if GDK_VERSION_MIN_REQUIRED lt GDK_VERSION_4_0
.err <"GDK_VERSION_MIN_REQUIRED must be >= GDK_VERSION_4_0">
endif

if GDK_VERSION_MAX_ALLOWED lt GDK_VERSION_4_0
define GDK_AVAILABLE_IN_4_0                   GDK_UNAVAILABLE(4, 0)
endif

endif
