26#ifndef TGUI_BACKEND_SDL_HPP
27#define TGUI_BACKEND_SDL_HPP
29#include <TGUI/extlibs/IncludeSDL.hpp>
30#include <TGUI/Backend/Window/SDL/BackendGuiSDL.hpp>
32#if TGUI_BUILD_AS_CXX_MODULE
35 #include <TGUI/Backend/Window/Backend.hpp>
38#if !TGUI_EXPERIMENTAL_USE_STD_MODULE
39 #include <unordered_map>
45TGUI_IGNORE_DEPRECATED_WARNINGS_START
47TGUI_MODULE_EXPORT
namespace tgui
104#ifndef TGUI_REMOVE_DEPRECATED_CODE
109 TGUI_DEPRECATED(
"Use BackendGui::startTextInput instead") void openVirtualKeyboard(const
FloatRect& inputRect) override;
115 TGUI_DEPRECATED("Use
BackendGui::stopTextInput instead")
void closeVirtualKeyboard() override;
143#ifdef TGUI_SYSTEM_ANDROID
152 TGUI_NODISCARD std::unique_ptr<std::uint8_t[]> readFileFromAndroidAssets(
const String& filename, std::size_t& fileSize)
const override;
161 TGUI_NODISCARD SDL_Cursor* createSystemCursor(
Cursor::Type type);
167 void updateMouseCursorStyle(
Cursor::Type type, SDL_Cursor* cursor);
173 void updateShownMouseCursor(SDL_Window* window,
Cursor::Type type);
181 SDL_Window* window =
nullptr;
185 std::unordered_map<BackendGui*, GuiResources> m_guiResources;
186 std::unordered_map<Cursor::Type, SDL_Cursor*> m_mouseCursors;
192TGUI_IGNORE_DEPRECATED_WARNINGS_END
Base class for the Gui.
Definition BackendGui.hpp:48
Definition BackendSDL.hpp:50
void resetMouseCursorStyle(Cursor::Type type) override
Changes the look of a certain mouse cursor back to the system theme.
TGUI_NODISCARD bool isKeyboardModifierPressed(Event::KeyModifier modifierKey) override
Checks the state for one of the modifier keys.
void detatchGui(BackendGui *gui) override
Informs the backend that a gui object is being destroyed.
void setClipboard(const String &contents) override
Changes the contents of the clipboard.
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.
TGUI_NODISCARD String getClipboard() const override
Returns the contents of the clipboard.
~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:91
Type
List of available cursors.
Definition Cursor.hpp:51
Wrapper class to store strings.
Definition String.hpp:101
Namespace that contains all TGUI functions and classes.
Definition AbsoluteOrRelativeValue.hpp:39
KeyModifier
Modifiers keys.
Definition Event.hpp:158