22#ifndef BACKENDS_PLATFORM_SDL_WINDOW_H
23#define BACKENDS_PLATFORM_SDL_WINDOW_H
25#include "backends/platform/sdl/sdl-sys.h"
27#include "common/rect.h"
28#include "common/str.h"
88#if !SDL_VERSION_ATLEAST(3, 0, 0)
113 float getSdlDpiScalingFactor()
const;
120 bool resizable()
const {
121#if SDL_VERSION_ATLEAST(2, 0, 0)
123 return SDL_GetWindowFlags(_window) & SDL_WINDOW_RESIZABLE;
129 bool mouseIsGrabbed()
const {
130#if SDL_VERSION_ATLEAST(3, 0, 0)
132 return SDL_GetWindowMouseGrab(_window);
134#elif SDL_VERSION_ATLEAST(2, 0, 0)
136 return SDL_GetWindowGrab(_window) == SDL_TRUE;
139 return _inputGrabState;
142 bool mouseIsLocked()
const {
143#if SDL_VERSION_ATLEAST(3, 0, 0)
144 return SDL_GetWindowRelativeMouseMode(_window);
145#elif SDL_VERSION_ATLEAST(2, 0, 0)
146 return SDL_GetRelativeMouseMode() == SDL_TRUE;
148 return _inputLockState;
155 bool _inputGrabState, _inputLockState;
159 void getDisplayDpi(
float *dpi,
float *defaultDpi)
const;
161#if SDL_VERSION_ATLEAST(2, 0, 0)
166 SDL_Window *getSDLWindow()
const {
return _window; }
171 int getDisplayIndex()
const;
181 virtual bool createOrUpdateWindow(
int width,
int height, uint32 flags);
186 void destroyWindow();
191 uint32 getWindowFlags()
const {
return _lastFlags; }
Definition: sdl-window.h:210
void setupIcon() override
Definition: sdl-window.h:212
Definition: sdl-window.h:30
void setMouseRect(const Common::Rect &rect)
virtual float getDpiScalingFactor() const
void setResizable(bool resizable)
void setWindowCaption(const Common::String &caption)
bool warpMouseInWindow(int x, int y)
void grabMouse(bool grab)
bool getSDLWMInformation(SDL_SysWMinfo *info) const
bool hasMouseFocus() const
bool lockMouse(bool lock)