Top |
Types and Values
#define | GDK_WINDOWING_X11 |
#define | GDK_WINDOWING_WIN32 |
#define | GDK_WINDOWING_MACOS |
#define | GDK_WINDOWING_WAYLAND |
#define | GDK_MAJOR_VERSION |
#define | GDK_MICRO_VERSION |
#define | GDK_MINOR_VERSION |
#define | GDK_VERSION_4_0 |
#define | GDK_VERSION_MIN_REQUIRED |
#define | GDK_VERSION_MAX_ALLOWED |
#define | GDK_DISABLE_DEPRECATION_WARNINGS |
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.
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_MACOS
#define GDK_WINDOWING_MACOS
The GDK_WINDOWING_MACOS macro is defined if the MacOS backend is supported.
Use this macro to guard code that is specific to the MacOS 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_MAJOR_VERSION
#define GDK_MAJOR_VERSION (4)
The major version component of the library's version, e.g. "1" for "1.2.3".
GDK_MICRO_VERSION
#define GDK_MICRO_VERSION (3)
The micro version component of the library's version, e.g. "3" for "1.2.3".
GDK_MINOR_VERSION
#define GDK_MINOR_VERSION (0)
The minor version component of the library's version, e.g. "2" for "1.2.3".
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.