diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 18:24:48 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 18:24:48 +0000 |
commit | cca66b9ec4e494c1d919bff0f71a820d8afab1fa (patch) | |
tree | 146f39ded1c938019e1ed42d30923c2ac9e86789 /src/include/gtkmm_version.h | |
parent | Initial commit. (diff) | |
download | inkscape-cca66b9ec4e494c1d919bff0f71a820d8afab1fa.tar.xz inkscape-cca66b9ec4e494c1d919bff0f71a820d8afab1fa.zip |
Adding upstream version 1.2.2.upstream/1.2.2upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | src/include/gtkmm_version.h | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/src/include/gtkmm_version.h b/src/include/gtkmm_version.h new file mode 100644 index 0000000..a23223c --- /dev/null +++ b/src/include/gtkmm_version.h @@ -0,0 +1,45 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/** @file + * macro for checking gtkmm version + *//* + * Authors: + * Patrick Storz <eduard.braun2@gmx.de> + * + * Copyright (C) 2018 Authors + * Released under GNU GPL v2+, read the file 'COPYING' for more information. + */ + +#ifndef SEEN_GTKMM_VERSION +#define SEEN_GTKMM_VERSION + +#include <gtkmm.h> + +#ifndef GTKMM_CHECK_VERSION + +#if !defined(GTKMM_MAJOR_VERSION) || !defined(GTKMM_MINOR_VERSION) || !defined(GTKMM_MICRO_VERSION) + #error "Missing defines for gtkmm version (GTKMM_MAJOR_VERSION / GTKMM_MINOR_VERSION / GTKMM_MICRO_VERSION)" +#endif + +/** + * Check GtkMM version + * + * This is adapted from the upstream Gtk+ macro for use with GtkMM + * + * @major: major version (e.g. 1 for version 1.2.5) + * @minor: minor version (e.g. 2 for version 1.2.5) + * @micro: micro version (e.g. 5 for version 1.2.5) + * + * Returns %TRUE if the version of the GTK+ header files + * is the same as or newer than the passed-in version. + * + * Returns: %TRUE if GTK+ headers are new enough + */ +#define GTKMM_CHECK_VERSION(major,minor,micro) \ + (GTKMM_MAJOR_VERSION > (major) || \ + (GTKMM_MAJOR_VERSION == (major) && GTKMM_MINOR_VERSION > (minor)) || \ + (GTKMM_MAJOR_VERSION == (major) && GTKMM_MINOR_VERSION == (minor) && \ + GTKMM_MICRO_VERSION >= (micro))) + +#endif // #ifndef GTKMM_CHECK_VERSION + +#endif // SEEN_GTKMM_VERSION |