
#ifndef KWINDOWSYSTEM_EXPORT_H
#define KWINDOWSYSTEM_EXPORT_H

#ifdef KWINDOWSYSTEM_STATIC_DEFINE
#  define KWINDOWSYSTEM_EXPORT
#  define KWINDOWSYSTEM_NO_EXPORT
#else
#  ifndef KWINDOWSYSTEM_EXPORT
#    ifdef KF6WindowSystem_EXPORTS
        /* We are building this library */
#      define KWINDOWSYSTEM_EXPORT __attribute__((visibility("default")))
#    else
        /* We are using this library */
#      define KWINDOWSYSTEM_EXPORT __attribute__((visibility("default")))
#    endif
#  endif

#  ifndef KWINDOWSYSTEM_NO_EXPORT
#    define KWINDOWSYSTEM_NO_EXPORT __attribute__((visibility("hidden")))
#  endif
#endif

#ifndef KWINDOWSYSTEM_DECL_DEPRECATED
#  define KWINDOWSYSTEM_DECL_DEPRECATED __attribute__ ((__deprecated__))
#endif

#ifndef KWINDOWSYSTEM_DECL_DEPRECATED_EXPORT
#  define KWINDOWSYSTEM_DECL_DEPRECATED_EXPORT KWINDOWSYSTEM_EXPORT KWINDOWSYSTEM_DECL_DEPRECATED
#endif

#ifndef KWINDOWSYSTEM_DECL_DEPRECATED_NO_EXPORT
#  define KWINDOWSYSTEM_DECL_DEPRECATED_NO_EXPORT KWINDOWSYSTEM_NO_EXPORT KWINDOWSYSTEM_DECL_DEPRECATED
#endif

/* NOLINTNEXTLINE(readability-avoid-unconditional-preprocessor-if) */
#if 0 /* DEFINE_NO_DEPRECATED */
#  ifndef KWINDOWSYSTEM_NO_DEPRECATED
#    define KWINDOWSYSTEM_NO_DEPRECATED
#  endif
#endif
#include <kwindowsystem_version.h>

#undef KWINDOWSYSTEM_DECL_DEPRECATED
#define KWINDOWSYSTEM_DECL_DEPRECATED [[deprecated]]

#undef KWINDOWSYSTEM_DECL_DEPRECATED_EXPORT
#define KWINDOWSYSTEM_DECL_DEPRECATED_EXPORT KWINDOWSYSTEM_EXPORT KWINDOWSYSTEM_DECL_DEPRECATED

#undef KWINDOWSYSTEM_DECL_DEPRECATED_NO_EXPORT
#define KWINDOWSYSTEM_DECL_DEPRECATED_NO_EXPORT KWINDOWSYSTEM_NO_EXPORT KWINDOWSYSTEM_DECL_DEPRECATED

#define KWINDOWSYSTEM_DECL_DEPRECATED_TEXT(text) [[deprecated(text)]]

/* Take any defaults from group settings */
#if !defined(KWINDOWSYSTEM_NO_DEPRECATED) && !defined(KWINDOWSYSTEM_DISABLE_DEPRECATED_BEFORE_AND_AT)
#  ifdef KF_NO_DEPRECATED
#    define KWINDOWSYSTEM_NO_DEPRECATED
#  elif defined(KF_DISABLE_DEPRECATED_BEFORE_AND_AT)
#    define KWINDOWSYSTEM_DISABLE_DEPRECATED_BEFORE_AND_AT KF_DISABLE_DEPRECATED_BEFORE_AND_AT
#  endif
#endif
#if !defined(KWINDOWSYSTEM_DISABLE_DEPRECATED_BEFORE_AND_AT) && defined(KF_DISABLE_DEPRECATED_BEFORE_AND_AT)
#  define KWINDOWSYSTEM_DISABLE_DEPRECATED_BEFORE_AND_AT KF_DISABLE_DEPRECATED_BEFORE_AND_AT
#endif

#if !defined(KWINDOWSYSTEM_NO_DEPRECATED_WARNINGS) && !defined(KWINDOWSYSTEM_DEPRECATED_WARNINGS_SINCE)
#  ifdef KF_NO_DEPRECATED_WARNINGS
#    define KWINDOWSYSTEM_NO_DEPRECATED_WARNINGS
#  elif defined(KF_DEPRECATED_WARNINGS_SINCE)
#    define KWINDOWSYSTEM_DEPRECATED_WARNINGS_SINCE KF_DEPRECATED_WARNINGS_SINCE
#  endif
#endif
#if !defined(KWINDOWSYSTEM_DEPRECATED_WARNINGS_SINCE) && defined(KF_DEPRECATED_WARNINGS_SINCE)
#  define KWINDOWSYSTEM_DEPRECATED_WARNINGS_SINCE KF_DEPRECATED_WARNINGS_SINCE
#endif

#if defined(KWINDOWSYSTEM_NO_DEPRECATED)
#  undef KWINDOWSYSTEM_DEPRECATED
#  define KWINDOWSYSTEM_DEPRECATED_EXPORT KWINDOWSYSTEM_EXPORT
#  define KWINDOWSYSTEM_DEPRECATED_NO_EXPORT KWINDOWSYSTEM_NO_EXPORT
#elif defined(KWINDOWSYSTEM_NO_DEPRECATED_WARNINGS)
#  define KWINDOWSYSTEM_DEPRECATED
#  define KWINDOWSYSTEM_DEPRECATED_EXPORT KWINDOWSYSTEM_EXPORT
#  define KWINDOWSYSTEM_DEPRECATED_NO_EXPORT KWINDOWSYSTEM_NO_EXPORT
#else
#  define KWINDOWSYSTEM_DEPRECATED KWINDOWSYSTEM_DECL_DEPRECATED
#  define KWINDOWSYSTEM_DEPRECATED_EXPORT KWINDOWSYSTEM_DECL_DEPRECATED_EXPORT
#  define KWINDOWSYSTEM_DEPRECATED_NO_EXPORT KWINDOWSYSTEM_DECL_DEPRECATED_NO_EXPORT
#endif

/* No deprecated API had been removed from build */
#define KWINDOWSYSTEM_EXCLUDE_DEPRECATED_BEFORE_AND_AT 0

#define KWINDOWSYSTEM_BUILD_DEPRECATED_SINCE(major, minor) 1

#ifdef KWINDOWSYSTEM_NO_DEPRECATED
#  define KWINDOWSYSTEM_DISABLE_DEPRECATED_BEFORE_AND_AT KWINDOWSYSTEM_VERSION
#endif
#ifdef KWINDOWSYSTEM_NO_DEPRECATED_WARNINGS
#  define KWINDOWSYSTEM_DEPRECATED_WARNINGS_SINCE 0
#endif

#ifndef KWINDOWSYSTEM_DEPRECATED_WARNINGS_SINCE
#  ifdef KWINDOWSYSTEM_DISABLE_DEPRECATED_BEFORE_AND_AT
#    define KWINDOWSYSTEM_DEPRECATED_WARNINGS_SINCE KWINDOWSYSTEM_DISABLE_DEPRECATED_BEFORE_AND_AT
#  else
#    define KWINDOWSYSTEM_DEPRECATED_WARNINGS_SINCE KWINDOWSYSTEM_VERSION
#  endif
#endif

#ifndef KWINDOWSYSTEM_DISABLE_DEPRECATED_BEFORE_AND_AT
#  define KWINDOWSYSTEM_DISABLE_DEPRECATED_BEFORE_AND_AT 0
#endif

#ifdef KWINDOWSYSTEM_DEPRECATED
#  define KWINDOWSYSTEM_ENABLE_DEPRECATED_SINCE(major, minor) (((major<<16)|(minor<<8)) > KWINDOWSYSTEM_DISABLE_DEPRECATED_BEFORE_AND_AT)
#else
#  define KWINDOWSYSTEM_ENABLE_DEPRECATED_SINCE(major, minor) 0
#endif

#if KWINDOWSYSTEM_DEPRECATED_WARNINGS_SINCE >= 0x60000
#  define KWINDOWSYSTEM_DEPRECATED_VERSION_6_0(text) KWINDOWSYSTEM_DECL_DEPRECATED_TEXT(text)
#else
#  define KWINDOWSYSTEM_DEPRECATED_VERSION_6_0(text)
#endif

#if KWINDOWSYSTEM_DEPRECATED_WARNINGS_SINCE >= 0x61300
#  define KWINDOWSYSTEM_DEPRECATED_VERSION_6_19(text) KWINDOWSYSTEM_DECL_DEPRECATED_TEXT(text)
#else
#  define KWINDOWSYSTEM_DEPRECATED_VERSION_6_19(text)
#endif

#if KWINDOWSYSTEM_DEPRECATED_WARNINGS_SINCE >= 0x61c00
#  define KWINDOWSYSTEM_DEPRECATED_VERSION_6_28(text) KWINDOWSYSTEM_DECL_DEPRECATED_TEXT(text)
#else
#  define KWINDOWSYSTEM_DEPRECATED_VERSION_6_28(text)
#endif
#define KWINDOWSYSTEM_DEPRECATED_VERSION_6(minor, text)      KWINDOWSYSTEM_DEPRECATED_VERSION_6_##minor(text)
#define KWINDOWSYSTEM_DEPRECATED_VERSION(major, minor, text) KWINDOWSYSTEM_DEPRECATED_VERSION_##major(minor, "Since "#major"."#minor". " text)
#define KWINDOWSYSTEM_DEPRECATED_VERSION_BELATED(major, minor, textmajor, textminor, text) KWINDOWSYSTEM_DEPRECATED_VERSION_##major(minor, "Since "#textmajor"."#textminor". " text)

#endif /* KWINDOWSYSTEM_EXPORT_H */
