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 13
33#define TGUI_VERSION_PATCH 0
36#if defined(__EMSCRIPTEN__)
37 #define TGUI_SYSTEM_EMSCRIPTEN
39 #define TGUI_SYSTEM_WINDOWS
40#elif defined(__APPLE__) && defined(__MACH__)
41 #include "TargetConditionals.h"
42 #if TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR
43 #define TGUI_SYSTEM_IOS
45 #define TGUI_SYSTEM_MACOS
47#elif defined(__unix__)
48 #if defined(__ANDROID__)
49 #define TGUI_SYSTEM_ANDROID
51 #define TGUI_SYSTEM_LINUX
56#if !defined(TGUI_DYNAMIC) && !defined(TGUI_STATIC)
63 #ifdef TGUI_SYSTEM_WINDOWS
66 #define TGUI_API __declspec(dllexport)
68 #define TGUI_API __declspec(dllimport)
73 #pragma warning(disable : 4251)
76 #define TGUI_API __attribute__((__visibility__("default")))
84#define TGUI_HAS_WINDOW_BACKEND_SFML 1
85#define TGUI_HAS_WINDOW_BACKEND_SDL 1
86#define TGUI_HAS_WINDOW_BACKEND_GLFW 1
87#define TGUI_HAS_WINDOW_BACKEND_RAYLIB 1
89#define TGUI_HAS_RENDERER_BACKEND_SFML_GRAPHICS 1
90#define TGUI_HAS_RENDERER_BACKEND_SDL_GPU 1
91#define TGUI_HAS_RENDERER_BACKEND_SDL_RENDERER 1
92#define TGUI_HAS_RENDERER_BACKEND_OPENGL3 1
93#define TGUI_HAS_RENDERER_BACKEND_GLES2 1
94#define TGUI_HAS_RENDERER_BACKEND_RAYLIB 1
96#define TGUI_HAS_FONT_BACKEND_SFML_GRAPHICS 1
97#define TGUI_HAS_FONT_BACKEND_SDL_TTF 1
98#define TGUI_HAS_FONT_BACKEND_FREETYPE 1
99#define TGUI_HAS_FONT_BACKEND_RAYLIB 1
101#define TGUI_HAS_BACKEND_SFML_GRAPHICS 1
102#define TGUI_HAS_BACKEND_SFML_OPENGL3 1
103#define TGUI_HAS_BACKEND_SDL_GPU 1
104#define TGUI_HAS_BACKEND_SDL_RENDERER 1
105#define TGUI_HAS_BACKEND_SDL_OPENGL3 1
106#define TGUI_HAS_BACKEND_SDL_GLES2 1
107#define TGUI_HAS_BACKEND_SDL_TTF_OPENGL3 1
108#define TGUI_HAS_BACKEND_SDL_TTF_GLES2 1
109#define TGUI_HAS_BACKEND_GLFW_OPENGL3 1
110#define TGUI_HAS_BACKEND_GLFW_GLES2 1
111#define TGUI_HAS_BACKEND_RAYLIB 1
113#define TGUI_USE_SDL3 1
117#define TGUI_USE_X11 0
121#define TGUI_USE_SYSTEM_STB 0
122#define TGUI_USE_SYSTEM_GLAD 0
123#define TGUI_USE_SYSTEM_NANOSVG 0
124#define TGUI_USE_SYSTEM_AURORA 0
129#define TGUI_COMPILED_WITH_CPP_VER 20
132#if TGUI_COMPILED_WITH_CPP_VER >= 20
136 #if __has_include(<version>)
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)) || (defined(_MSC_VER) && (_MSC_VER >= 1914))
148 #define TGUI_USE_STD_FILESYSTEM
151 #if __cpp_lib_chrono >= 201907L
152 #define TGUI_USE_STD_FILESYSTEM_FILE_TIME
157#define TGUI_EMPLACE_BACK(object, vector) auto&(object) = (vector).emplace_back();
158#define TGUI_IF_CONSTEXPR if constexpr
159#define TGUI_NODISCARD [[nodiscard]]
161#ifndef TGUI_NO_DEPRECATED_WARNINGS
162 #define TGUI_DEPRECATED(msg) [[deprecated(msg)]]
164 #define TGUI_DEPRECATED(msg)
168 #define TGUI_IGNORE_DEPRECATED_WARNINGS_START \
169 _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"")
171 #define TGUI_IGNORE_DEPRECATED_WARNINGS_END _Pragma("GCC diagnostic pop")
172#elif defined(_MSC_VER) && (_MSC_VER >= 1927)
173 #define TGUI_IGNORE_DEPRECATED_WARNINGS_START _Pragma("warning(push)") _Pragma("warning(disable: 4996)")
175 #define TGUI_IGNORE_DEPRECATED_WARNINGS_END _Pragma("warning(pop)")
176#elif defined(_MSC_VER)
177 #define TGUI_IGNORE_DEPRECATED_WARNINGS_START __pragma(warning(push)) __pragma(warning(disable : 4996))
179 #define TGUI_IGNORE_DEPRECATED_WARNINGS_END __pragma(warning(pop))
182#if !defined(NDEBUG) && !defined(TGUI_NO_RUNTIME_WARNINGS)
184 #define TGUI_PRINT_WARNING(msg) \
186 std::cerr << "TGUI warning: " << msg << "\n"; \
189 #define TGUI_PRINT_WARNING(msg)
193#if !defined(NDEBUG) && !defined(TGUI_DISABLE_ASSERTS)
196 #define TGUI_ASSERT(condition, msg) \
200 std::cerr << "TGUI assertion: " << msg << "\n"; \
206 #define TGUI_ASSERT(condition, msg)
210#if __cplusplus > 201703L
211 #define TGUI_LAMBDA_CAPTURE_EQ_THIS [=, this]
213 #define TGUI_LAMBDA_CAPTURE_EQ_THIS [=]