Loading...
Searching...
No Matches
25#ifndef TGUI_CONFIG_HPP
26#define TGUI_CONFIG_HPP
31#define TGUI_VERSION_MAJOR 1
32#define TGUI_VERSION_MINOR 11
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
85#define TGUI_HAS_WINDOW_BACKEND_RAYLIB 1
87#define TGUI_HAS_RENDERER_BACKEND_SFML_GRAPHICS 1
88#define TGUI_HAS_RENDERER_BACKEND_SDL_GPU 1
89#define TGUI_HAS_RENDERER_BACKEND_SDL_RENDERER 1
90#define TGUI_HAS_RENDERER_BACKEND_OPENGL3 1
91#define TGUI_HAS_RENDERER_BACKEND_GLES2 1
92#define TGUI_HAS_RENDERER_BACKEND_RAYLIB 1
94#define TGUI_HAS_FONT_BACKEND_SFML_GRAPHICS 1
95#define TGUI_HAS_FONT_BACKEND_SDL_TTF 1
96#define TGUI_HAS_FONT_BACKEND_FREETYPE 1
97#define TGUI_HAS_FONT_BACKEND_RAYLIB 1
99#define TGUI_HAS_BACKEND_SFML_GRAPHICS 1
100#define TGUI_HAS_BACKEND_SFML_OPENGL3 1
101#define TGUI_HAS_BACKEND_SDL_GPU 1
102#define TGUI_HAS_BACKEND_SDL_RENDERER 1
103#define TGUI_HAS_BACKEND_SDL_OPENGL3 1
104#define TGUI_HAS_BACKEND_SDL_GLES2 1
105#define TGUI_HAS_BACKEND_SDL_TTF_OPENGL3 1
106#define TGUI_HAS_BACKEND_SDL_TTF_GLES2 1
107#define TGUI_HAS_BACKEND_GLFW_OPENGL3 1
108#define TGUI_HAS_BACKEND_GLFW_GLES2 1
109#define TGUI_HAS_BACKEND_RAYLIB 1
111#define TGUI_USE_SDL3 1
115#define TGUI_USE_X11 0
119#define TGUI_USE_SYSTEM_STB 0
120#define TGUI_USE_SYSTEM_GLAD 0
121#define TGUI_USE_SYSTEM_NANOSVG 0
122#define TGUI_USE_SYSTEM_AURORA 0
127#define TGUI_COMPILED_WITH_CPP_VER 14
130#if TGUI_COMPILED_WITH_CPP_VER >= 20
132#elif defined(__has_include)
134 #if __has_include(<version>)
144#if TGUI_COMPILED_WITH_CPP_VER >= 17
145 #if (defined(__apple_build_version__) && defined(__clang_major__) && (__clang_major__ >= 12)) \
146 || (!defined(__apple_build_version__) && defined(__clang_major__) && (__clang_major__ >= 9)) \
147 || (defined(__GNUC__) && (__GNUC__ >= 9)) \
148 || (defined(_MSC_VER) && (_MSC_VER >= 1914))
149 #define TGUI_USE_STD_FILESYSTEM
152 #if __cpp_lib_chrono >= 201907L
153 #define TGUI_USE_STD_FILESYSTEM_FILE_TIME
158#if __cplusplus >= 201703L
159 #define TGUI_EMPLACE_BACK(object, vector) auto& object = vector.emplace_back();
161 #define TGUI_EMPLACE_BACK(object, vector) vector.emplace_back(); auto& object = vector.back();
164#ifndef TGUI_NO_DEPRECATED_WARNINGS
165 #define TGUI_DEPRECATED(msg) [[deprecated(msg)]]
167 #define TGUI_DEPRECATED(msg)
170#if defined(__has_cpp_attribute) && (__cplusplus >= 201703L)
171# if __has_cpp_attribute(nodiscard)
172# define TGUI_NODISCARD [[nodiscard]]
174# define TGUI_NODISCARD
177# define TGUI_NODISCARD
181 #define TGUI_IGNORE_DEPRECATED_WARNINGS_START \
182 _Pragma("GCC diagnostic push") \
183 _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"")
185 #define TGUI_IGNORE_DEPRECATED_WARNINGS_END _Pragma("GCC diagnostic pop")
186#elif defined (_MSC_VER) && (_MSC_VER >= 1927)
187 #define TGUI_IGNORE_DEPRECATED_WARNINGS_START \
188 _Pragma("warning(push)") \
189 _Pragma("warning(disable: 4996)")
191 #define TGUI_IGNORE_DEPRECATED_WARNINGS_END _Pragma("warning(pop)")
192#elif defined (_MSC_VER)
193 #define TGUI_IGNORE_DEPRECATED_WARNINGS_START \
194 __pragma(warning(push)) \
195 __pragma(warning(disable: 4996))
197 #define TGUI_IGNORE_DEPRECATED_WARNINGS_END __pragma(warning(pop))
200#if !defined(NDEBUG) && !defined(TGUI_NO_RUNTIME_WARNINGS)
202 #define TGUI_PRINT_WARNING(msg) { std::cerr << "TGUI warning: " << msg << "\n"; }
204 #define TGUI_PRINT_WARNING(msg)
208#if !defined(NDEBUG) && !defined(TGUI_DISABLE_ASSERTS)
211 #define TGUI_ASSERT(condition, msg) { \
212 if (!(condition)) { \
213 std::cerr << "TGUI assertion: " << msg << "\n"; \
219 #define TGUI_ASSERT(condition, msg)
223#if __cplusplus > 201703L
224 #define TGUI_LAMBDA_CAPTURE_EQ_THIS [=,this]
226 #define TGUI_LAMBDA_CAPTURE_EQ_THIS [=]
229#if defined(__cpp_if_constexpr) && (__cpp_if_constexpr >= 201606L)
230 #define TGUI_IF_CONSTEXPR if constexpr
232 #define TGUI_IF_CONSTEXPR if
236 #if defined TGUI_SYSTEM_WINDOWS && defined _MSC_VER
237 #pragma warning(disable:4127)