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 6
33#define TGUI_VERSION_PATCH 1
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_RENDERER 1
89#define TGUI_HAS_RENDERER_BACKEND_OPENGL3 1
90#define TGUI_HAS_RENDERER_BACKEND_GLES2 1
91#define TGUI_HAS_RENDERER_BACKEND_RAYLIB 1
93#define TGUI_HAS_FONT_BACKEND_SFML_GRAPHICS 1
94#define TGUI_HAS_FONT_BACKEND_SDL_TTF 1
95#define TGUI_HAS_FONT_BACKEND_FREETYPE 1
96#define TGUI_HAS_FONT_BACKEND_RAYLIB 1
98#define TGUI_HAS_BACKEND_SFML_GRAPHICS 1
99#define TGUI_HAS_BACKEND_SFML_OPENGL3 1
100#define TGUI_HAS_BACKEND_SDL_RENDERER 1
101#define TGUI_HAS_BACKEND_SDL_OPENGL3 1
102#define TGUI_HAS_BACKEND_SDL_GLES2 1
103#define TGUI_HAS_BACKEND_SDL_TTF_OPENGL3 1
104#define TGUI_HAS_BACKEND_SDL_TTF_GLES2 1
105#define TGUI_HAS_BACKEND_GLFW_OPENGL3 1
106#define TGUI_HAS_BACKEND_GLFW_GLES2 1
107#define TGUI_HAS_BACKEND_RAYLIB 1
109#define TGUI_USE_SDL3 1
113#define TGUI_USE_X11 0
117#define TGUI_USE_SYSTEM_STB 0
118#define TGUI_USE_SYSTEM_GLAD 0
119#define TGUI_USE_SYSTEM_NANOSVG 0
120#define TGUI_USE_SYSTEM_AURORA 0
125#define TGUI_COMPILED_WITH_CPP_VER 14
127#define TGUI_BUILD_AS_CXX_MODULE 0
129#if TGUI_EXPERIMENTAL_USE_STD_MODULE
135#ifndef TGUI_MODULE_EXPORT
136 #define TGUI_MODULE_EXPORT
140#if TGUI_COMPILED_WITH_CPP_VER >= 20
142#elif defined(__has_include)
144 #if __has_include(<version>)
154#if TGUI_COMPILED_WITH_CPP_VER >= 17
155 #if (defined(__apple_build_version__) && defined(__clang_major__) && (__clang_major__ >= 12)) \
156 || (!defined(__apple_build_version__) && defined(__clang_major__) && (__clang_major__ >= 9)) \
157 || (defined(__GNUC__) && (__GNUC__ >= 9)) \
158 || (defined(_MSC_VER) && (_MSC_VER >= 1914))
159 #define TGUI_USE_STD_FILESYSTEM
162 #if __cpp_lib_chrono >= 201907L
163 #define TGUI_USE_STD_FILESYSTEM_FILE_TIME
168#if __cplusplus >= 201703L
169 #define TGUI_EMPLACE_BACK(object, vector) auto& object = vector.emplace_back();
171 #define TGUI_EMPLACE_BACK(object, vector) vector.emplace_back(); auto& object = vector.back();
174#ifndef TGUI_NO_DEPRECATED_WARNINGS
175 #define TGUI_DEPRECATED(msg) [[deprecated(msg)]]
177 #define TGUI_DEPRECATED(msg)
180#if defined(__has_cpp_attribute) && (__cplusplus >= 201703L)
181# if __has_cpp_attribute(nodiscard)
182# define TGUI_NODISCARD [[nodiscard]]
184# define TGUI_NODISCARD
187# define TGUI_NODISCARD
191 #define TGUI_IGNORE_DEPRECATED_WARNINGS_START \
192 _Pragma("GCC diagnostic push") \
193 _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"")
195 #define TGUI_IGNORE_DEPRECATED_WARNINGS_END _Pragma("GCC diagnostic pop")
196#elif defined (_MSC_VER) && (_MSC_VER >= 1927)
197 #define TGUI_IGNORE_DEPRECATED_WARNINGS_START \
198 _Pragma("warning(push)") \
199 _Pragma("warning(disable: 4996)")
201 #define TGUI_IGNORE_DEPRECATED_WARNINGS_END _Pragma("warning(pop)")
202#elif defined (_MSC_VER)
203 #define TGUI_IGNORE_DEPRECATED_WARNINGS_START \
204 __pragma(warning(push)) \
205 __pragma(warning(disable: 4996))
207 #define TGUI_IGNORE_DEPRECATED_WARNINGS_END __pragma(warning(pop))
210#if !defined(NDEBUG) && !defined(TGUI_NO_RUNTIME_WARNINGS)
211 #if !TGUI_EXPERIMENTAL_USE_STD_MODULE
214 #define TGUI_PRINT_WARNING(msg) { std::cerr << "TGUI warning: " << msg << "\n"; }
216 #define TGUI_PRINT_WARNING(msg)
219#if !defined(NDEBUG) && !defined(TGUI_DISABLE_ASSERTS)
221 #if !TGUI_EXPERIMENTAL_USE_STD_MODULE
225 #define TGUI_ASSERT(condition, msg) { \
226 if (!(condition)) { \
227 std::cerr << "TGUI assertion: " << msg << "\n"; \
233 #define TGUI_ASSERT(condition, msg)
237#if __cplusplus > 201703L
238 #define TGUI_LAMBDA_CAPTURE_EQ_THIS [=,this]
240 #define TGUI_LAMBDA_CAPTURE_EQ_THIS [=]
243#if defined(__cpp_if_constexpr) && (__cpp_if_constexpr >= 201606L)
244 #define TGUI_IF_CONSTEXPR if constexpr
246 #define TGUI_IF_CONSTEXPR if
250 #if defined TGUI_SYSTEM_WINDOWS && defined _MSC_VER
251 #pragma warning(disable:4127)