## General General — Library initialization and versioning |

## Types and Values

#define | GDK_WINDOWING_X11
#define | GDK_WINDOWING_WIN32
#define | GDK_WINDOWING_QUARTZ
#define | GDK_WINDOWING_WAYLAND
#define | GDK_VERSION_4_0
#define | GDK_VERSION_MIN_REQUIRED
#define | GDK_VERSION_MAX_ALLOWED
#define | GDK_DISABLE_DEPRECATION_WARNINGS

## Includes

    #include <gdk/gdk.h>

## Description

This section describes miscellaneous macros and utility functions related to library versioning, as well as deprecation facilities.

The GDK and GTK headers annotate deprecated APIs in a way that produces compiler warnings if these deprecated APIs are used. The warnings can be turned off by defining the macro `GDK_DISABLE_DEPRECATION_WARNINGS` before including the glib.h header.

GDK and GTK also provide support for building applications against defined subsets of deprecated or new APIs. Define the macro `GDK_VERSION_MIN_REQUIRED` to specify up to what version you want to receive warnings about deprecated APIs. Define the macro `GDK_VERSION_MAX_ALLOWED` to specify the newest version whose API you want to use.

## Functions

## Types and Values

### GDK_WINDOWING_X11

    #define GDK_WINDOWING_X11

The GDK_WINDOWING_X11 macro is defined if the X11 backend is supported.

Use this macro to guard code that is specific to the X11 backend.

### GDK_WINDOWING_WIN32

    #define GDK_WINDOWING_WIN32

The GDK_WINDOWING_WIN32 macro is defined if the Win32 backend is supported.

Use this macro to guard code that is specific to the Win32 backend.

### GDK_WINDOWING_QUARTZ

    #define GDK_WINDOWING_QUARTZ

The GDK_WINDOWING_QUARTZ macro is defined if the Quartz backend is supported.

Use this macro to guard code that is specific to the Quartz backend.

### GDK_WINDOWING_WAYLAND

    #define GDK_WINDOWING_WAYLAND

The GDK_WINDOWING_WAYLAND macro is defined if the Wayland backend is supported.

Use this macro to guard code that is specific to the Wayland backend.

### GDK_VERSION_4_0

    #define GDK_VERSION_4_0        (G_ENCODE_VERSION (4, 0))

A macro that evaluates to the 4.0 version of GDK, in a format that can be used by the C pre-processor.

### GDK_VERSION_MIN_REQUIRED

    # define GDK_VERSION_MIN_REQUIRED      (GDK_VERSION_CUR_STABLE)

A macro that should be defined by the user prior to including the gdk.h header. The definition should be one of the predefined GDK version macros: `GDK_VERSION_4_0`, `GDK_VERSION_4_2`,...

This macro defines the lower bound for the GDK API to use.

If a function has been deprecated in a newer version of GDK, it is possible to use this symbol to avoid the compiler warnings without disabling warning for every deprecated function.

### GDK_VERSION_MAX_ALLOWED

    #  define GDK_VERSION_MAX_ALLOWED      GDK_VERSION_MIN_REQUIRED

A macro that should be defined by the user prior to including the gdk.h header. The definition should be one of the predefined GDK version macros: `GDK_VERSION_4_0`, `GDK_VERSION_4_2`,...

This macro defines the upper bound for the GDK API to use.

If a function has been introduced in a newer version of GDK, it is possible to use this symbol to get compiler warnings when trying to use that function.

### GDK_DISABLE_DEPRECATION_WARNINGS

    #define GDK_DISABLE_DEPRECATION_WARNINGS

A macro that should be defined before including the gdk.h header. If it is defined, no compiler warnings will be produced for uses of deprecated GDK and GTK APIs.