
#ifndef KWINDOWSYSTEM_EXPORT_H
#define KWINDOWSYSTEM_EXPORT_H

#ifdef KWINDOWSYSTEM_STATIC_DEFINE
#  define KWINDOWSYSTEM_EXPORT
#  define KWINDOWSYSTEM_NO_EXPORT
#else
#  ifndef KWINDOWSYSTEM_EXPORT
#    ifdef KF5WindowSystem_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

#if 0 /* DEFINE_NO_DEPRECATED */
#  ifndef KWINDOWSYSTEM_NO_DEPRECATED
#    define KWINDOWSYSTEM_NO_DEPRECATED
#  endif
#endif

#define KWINDOWSYSTEM_DECL_DEPRECATED_TEXT(text) __attribute__ ((__deprecated__(text)))

#define ECM_GENERATEEXPORTHEADER_VERSION_VALUE(major, minor, patch) ((major<<16)|(minor<<8)|(patch))

/* 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 0x54100
#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 0x54100
#  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) (ECM_GENERATEEXPORTHEADER_VERSION_VALUE(major, minor, 0) > KWINDOWSYSTEM_DISABLE_DEPRECATED_BEFORE_AND_AT)
#else
#  define KWINDOWSYSTEM_ENABLE_DEPRECATED_SINCE(major, minor) 0
#endif

#if KWINDOWSYSTEM_DEPRECATED_WARNINGS_SINCE >= 0x50000
#  define KWINDOWSYSTEM_DEPRECATED_VERSION_5_0(text) KWINDOWSYSTEM_DECL_DEPRECATED_TEXT(text)
#else
#  define KWINDOWSYSTEM_DEPRECATED_VERSION_5_0(text)
#endif

#if KWINDOWSYSTEM_DEPRECATED_WARNINGS_SINCE >= 0x51200
#  define KWINDOWSYSTEM_DEPRECATED_VERSION_5_18(text) KWINDOWSYSTEM_DECL_DEPRECATED_TEXT(text)
#else
#  define KWINDOWSYSTEM_DEPRECATED_VERSION_5_18(text)
#endif

#if KWINDOWSYSTEM_DEPRECATED_WARNINGS_SINCE >= 0x52600
#  define KWINDOWSYSTEM_DEPRECATED_VERSION_5_38(text) KWINDOWSYSTEM_DECL_DEPRECATED_TEXT(text)
#else
#  define KWINDOWSYSTEM_DEPRECATED_VERSION_5_38(text)
#endif

#if KWINDOWSYSTEM_DEPRECATED_WARNINGS_SINCE >= 0x53e00
#  define KWINDOWSYSTEM_DEPRECATED_VERSION_5_62(text) KWINDOWSYSTEM_DECL_DEPRECATED_TEXT(text)
#else
#  define KWINDOWSYSTEM_DEPRECATED_VERSION_5_62(text)
#endif
#define KWINDOWSYSTEM_DEPRECATED_VERSION_5(minor, text)      KWINDOWSYSTEM_DEPRECATED_VERSION_5_##minor(text)
#define KWINDOWSYSTEM_DEPRECATED_VERSION(major, minor, text) KWINDOWSYSTEM_DEPRECATED_VERSION_##major(minor, "Since "#major"."#minor". " text)

#endif /* KWINDOWSYSTEM_EXPORT_H */
