25#ifndef TGUI_BACKEND_SDL_HPP
26#define TGUI_BACKEND_SDL_HPP
28#include <TGUI/extlibs/IncludeSDL.hpp>
29#include <TGUI/Backend/Window/SDL/BackendGuiSDL.hpp>
31#if !TGUI_BUILD_AS_CXX_MODULE
32 #include <TGUI/Backend/Window/Backend.hpp>
35#if !TGUI_EXPERIMENTAL_USE_STD_MODULE
36 #include <unordered_map>
42TGUI_IGNORE_DEPRECATED_WARNINGS_START
44TGUI_MODULE_EXPORT
namespace tgui
96#ifndef TGUI_REMOVE_DEPRECATED_CODE
103 TGUI_DEPRECATED(
"Use BackendGui::startTextInput instead") void openVirtualKeyboard(const
FloatRect& inputRect) override;
110 TGUI_DEPRECATED("Use
BackendGui::stopTextInput instead")
void closeVirtualKeyboard() override;
120 TGUI_DEPRECATED(
"Use gui.isKeyboardModifierPressed(modifierKey) instead") TGUI_NODISCARD
bool isKeyboardModifierPressed(
Event::KeyModifier modifierKey) override;
127 void setClipboard(const
String& contents) override;
134 TGUI_NODISCARD
String getClipboard() const override;
136#ifdef TGUI_SYSTEM_ANDROID
145 TGUI_NODISCARD std::unique_ptr<std::uint8_t[]> readFileFromAndroidAssets(
const String& filename, std::size_t& fileSize)
const override;
154 TGUI_NODISCARD SDL_Cursor* createSystemCursor(
Cursor::Type type);
159 void updateMouseCursorStyle(
Cursor::Type type, SDL_Cursor* cursor);
164 void updateShownMouseCursor(SDL_Window* window,
Cursor::Type type);
171 SDL_Window* window =
nullptr;
175 std::unordered_map<const BackendGui*, GuiResources> m_guiResources;
176 std::unordered_map<Cursor::Type, SDL_Cursor*> m_mouseCursors;
178#if defined(TGUI_SYSTEM_LINUX) && defined(TGUI_USE_X11) && (SDL_MAJOR_VERSION < 3) && defined(SDL_VIDEO_DRIVER_X11)
179 bool m_customCursorX11 =
false;
186TGUI_IGNORE_DEPRECATED_WARNINGS_END
Base class for the Gui.
Definition BackendGui.hpp:47
Definition BackendSDL.hpp:47
void resetMouseCursorStyle(Cursor::Type type) override
Changes the look of a certain mouse cursor back to the system theme.
void detatchGui(BackendGui *gui) override
Informs the backend that a gui object is being destroyed.
void setMouseCursor(BackendGui *gui, Cursor::Type type) override
Changes the mouse cursor when the mouse is on top of the window to which the gui is attached.
void setMouseCursorStyle(Cursor::Type type, const std::uint8_t *pixels, Vector2u size, Vector2u hotspot) override
Changes the look of a certain mouse cursor by using a bitmap.
~BackendSDL() override
Destructor.
void setGuiWindow(BackendGui *gui, SDL_Window *window)
Informs the backend which window belongs to the gui.
Base class for the backend.
Definition Backend.hpp:87
Type
List of available cursors.
Definition Cursor.hpp:50
Wrapper class to store strings.
Definition String.hpp:96
Namespace that contains all TGUI functions and classes.
Definition AbsoluteOrRelativeValue.hpp:38