25#ifndef TGUI_CONFIG_HPP
26#define TGUI_CONFIG_HPP
31#define TGUI_VERSION_MAJOR 0
32#define TGUI_VERSION_MINOR 10
33#define TGUI_VERSION_PATCH 0
37 #define TGUI_SYSTEM_WINDOWS
38#elif defined(__APPLE__) && defined(__MACH__)
39 #include "TargetConditionals.h"
40 #if TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR
41 #define TGUI_SYSTEM_IOS
43 #define TGUI_SYSTEM_MACOS
45#elif defined(__unix__)
46 #if defined(__ANDROID__)
47 #define TGUI_SYSTEM_ANDROID
49 #define TGUI_SYSTEM_LINUX
54#if !defined(TGUI_DYNAMIC) && !defined(TGUI_STATIC)
61 #ifdef TGUI_SYSTEM_WINDOWS
64 #define TGUI_API __declspec(dllexport)
66 #define TGUI_API __declspec(dllimport)
71 #pragma warning(disable: 4251)
74 #define TGUI_API __attribute__ ((__visibility__ ("default")))
82#define TGUI_HAS_WINDOW_BACKEND_SFML 1
83#define TGUI_HAS_WINDOW_BACKEND_SDL 1
84#define TGUI_HAS_WINDOW_BACKEND_GLFW 1
86#define TGUI_HAS_RENDERER_BACKEND_SFML_GRAPHICS 1
87#define TGUI_HAS_RENDERER_BACKEND_SDL_RENDERER 1
88#define TGUI_HAS_RENDERER_BACKEND_OPENGL3 1
89#define TGUI_HAS_RENDERER_BACKEND_GLES2 1
91#define TGUI_HAS_FONT_BACKEND_SFML_GRAPHICS 1
92#define TGUI_HAS_FONT_BACKEND_SDL_TTF 1
93#define TGUI_HAS_FONT_BACKEND_FREETYPE 1
95#define TGUI_HAS_BACKEND_SFML_GRAPHICS 1
96#define TGUI_HAS_BACKEND_SFML_OPENGL3 1
97#define TGUI_HAS_BACKEND_SDL_RENDERER 1
98#define TGUI_HAS_BACKEND_SDL_OPENGL3 1
99#define TGUI_HAS_BACKEND_SDL_GLES2 1
100#define TGUI_HAS_BACKEND_SDL_TTF_OPENGL3 1
101#define TGUI_HAS_BACKEND_SDL_TTF_GLES2 1
102#define TGUI_HAS_BACKEND_GLFW_OPENGL3 1
103#define TGUI_HAS_BACKEND_GLFW_GLES2 1
107#define TGUI_USE_X11 1
112#define TGUI_COMPILED_WITH_CPP_VER 14
115#if TGUI_COMPILED_WITH_CPP_VER >= 20
123#if TGUI_COMPILED_WITH_CPP_VER >= 17
124 #if (defined(__clang_major__) && (__clang_major__ >= 9)) \
125 || (defined(__GNUC__) && (__GNUC__ >= 9)) \
126 || (defined(_MSC_VER) && (_MSC_VER >= 1914))
127 #define TGUI_USE_STD_FILESYSTEM
136#if defined(__cpp_constexpr) && (__cpp_constexpr >= 201304L)
137 #define TGUI_CONSTEXPR constexpr
139 #define TGUI_CONSTEXPR inline
142#if __cplusplus >= 201703L
143 #define TGUI_EMPLACE_BACK(object, vector) auto& object = vector.emplace_back();
145 #define TGUI_EMPLACE_BACK(object, vector) vector.emplace_back(); auto& object = vector.back();
148#ifndef TGUI_NO_DEPRECATED_WARNINGS
149 #define TGUI_DEPRECATED(msg) [[deprecated(msg)]]
151 #define TGUI_DEPRECATED(msg)
155 #define TGUI_IGNORE_DEPRECATED_WARNINGS_START \
156 _Pragma("GCC diagnostic push") \
157 _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"")
159 #define TGUI_IGNORE_DEPRECATED_WARNINGS_END _Pragma("GCC diagnostic pop")
160#elif defined (_MSC_VER) && (_MSC_VER >= 1927)
161 #define TGUI_IGNORE_DEPRECATED_WARNINGS_START \
162 _Pragma("warning(push)") \
163 _Pragma("warning(disable: 4996)")
165 #define TGUI_IGNORE_DEPRECATED_WARNINGS_END _Pragma("warning(pop)")
166#elif defined (_MSC_VER)
167 #define TGUI_IGNORE_DEPRECATED_WARNINGS_START \
168 __pragma(warning(push)) \
169 __pragma(warning(disable: 4996))
171 #define TGUI_IGNORE_DEPRECATED_WARNINGS_END __pragma(warning(pop))
174#if !defined(NDEBUG) && !defined(TGUI_NO_RUNTIME_WARNINGS)
176 #define TGUI_PRINT_WARNING(msg) { std::cerr << "TGUI warning: " << msg << "\n"; }
178 #define TGUI_PRINT_WARNING(msg)
181#if !defined(NDEBUG) && !defined(TGUI_DISABLE_ASSERTS)
184 #define TGUI_ASSERT(condition, msg) { if (!(condition)) { std::cerr << "TGUI assertion: " << msg << "\n"; assert(condition); } }
186 #define TGUI_ASSERT(condition, msg)
190#if __cplusplus > 201703L
191 #define TGUI_LAMBDA_CAPTURE_EQ_THIS [=,this]
193 #define TGUI_LAMBDA_CAPTURE_EQ_THIS [=]