Loading...
Searching...
No Matches
Go to the documentation of this file.
35#ifndef LIBTCOD_CONFIG_H_
36#define LIBTCOD_CONFIG_H_
42#elif defined _WIN32 || defined __CYGWIN__ || defined __MINGW32__
45#define TCODLIB_API __attribute__((dllexport))
47#define TCODLIB_API __declspec(dllexport)
51#define TCODLIB_API __attribute__((dllimport))
53#define TCODLIB_API __declspec(dllimport)
57#define TCODLIB_API __attribute__((visibility("default")))
63#ifndef TCODLIB_API_INLINE_EXPORT
66#define TCODLIB_API_INLINE_EXPORT TCODLIB_API
68#define TCODLIB_API_INLINE_EXPORT
74#define TCODLIB_CAPI extern "C" TCODLIB_API
76#define TCODLIB_CAPI TCODLIB_API
81#define TCOD_PUBLIC TCODLIB_API
85#define TCOD_PRIVATE __attribute__((visibility("hidden")))
91#ifdef TCOD_IGNORE_DEPRECATED
92#define TCOD_DEPRECATED(msg)
93#define TCOD_DEPRECATED_NOMESSAGE
94#define TCOD_DEPRECATED_ENUM
95#elif defined(__cplusplus) && __cplusplus >= 201402L && !defined(__clang__)
96#define TCOD_DEPRECATED(msg) [[deprecated(msg)]]
97#define TCOD_DEPRECATED_NOMESSAGE [[deprecated]]
98#define TCOD_DEPRECATED_ENUM [[deprecated]]
99#elif defined(_MSC_VER)
100#define TCOD_DEPRECATED(msg) __declspec(deprecated(msg))
101#define TCOD_DEPRECATED_NOMESSAGE __declspec(deprecated)
102#define TCOD_DEPRECATED_ENUM
103#elif defined(__GNUC__)
104#define TCOD_DEPRECATED(msg) __attribute__((deprecated(msg)))
105#define TCOD_DEPRECATED_NOMESSAGE __attribute__((deprecated))
106#define TCOD_DEPRECATED_ENUM __attribute__((deprecated))
108#define TCOD_DEPRECATED(msg)
109#define TCOD_DEPRECATED_NOMESSAGE
110#define TCOD_DEPRECATED_ENUM
115#define TCODLIB_PRINTF(str_index, first_arg) __attribute__((format(printf, str_index, first_arg)))
117#define TCODLIB_PRINTF(str_index, first_arg)
120#define TCODLIB_FORMAT TCODLIB_PRINTF
122#if defined(__cplusplus) && __cplusplus >= 201703L && !defined(__clang__)
123#define TCOD_NODISCARD [[nodiscard]]
124#elif defined(_MSC_VER)
125#define TCOD_NODISCARD
126#elif defined(__GNUC__)
127#define TCOD_NODISCARD __attribute__((warn_unused_result))
129#define TCOD_NODISCARD
134#define TCODLIB_BEGIN_IGNORE_DEPRECATIONS \
135 _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wdeprecated\"") \
136 _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"")
137#define TCODLIB_END_IGNORE_DEPRECATIONS _Pragma("GCC diagnostic pop")
138#elif defined(_MSC_VER)
139#define TCODLIB_BEGIN_IGNORE_DEPRECATIONS _Pragma("warning(push)") _Pragma("warning(disable : 4996)")
140#define TCODLIB_END_IGNORE_DEPRECATIONS _Pragma("warning(pop)")
142#define TCODLIB_BEGIN_IGNORE_DEPRECATIONS
143#define TCODLIB_END_IGNORE_DEPRECATIONS
146#ifndef TCOD_FALLBACK_FONT_SIZE
148#define TCOD_FALLBACK_FONT_SIZE 16