27#include <freerdp/settings_types.h>
32 [[nodiscard]]
static SdlWindow create(SDL_DisplayID
id,
const std::string& title, Uint32 flags,
33 Uint32 width = 0, Uint32 height = 0);
34 [[nodiscard]]
static rdpMonitor query(SDL_DisplayID
id,
bool forceAsPrimary =
false);
43 [[nodiscard]] SDL_WindowID id()
const;
44 [[nodiscard]] SDL_DisplayID displayIndex()
const;
45 [[nodiscard]] SDL_Rect rect()
const;
46 [[nodiscard]] SDL_Rect bounds()
const;
47 [[nodiscard]] SDL_Window* window()
const;
49 [[nodiscard]] Sint32 offsetX()
const;
50 void setOffsetX(Sint32 x);
52 void setOffsetY(Sint32 y);
53 [[nodiscard]] Sint32 offsetY()
const;
55 [[nodiscard]]
rdpMonitor monitor(
bool isPrimary)
const;
58 [[nodiscard]]
float scale()
const;
59 [[nodiscard]] SDL_DisplayOrientation orientation()
const;
61 [[nodiscard]]
bool grabKeyboard(
bool enable);
62 [[nodiscard]]
bool grabMouse(
bool enable);
63 void setBordered(
bool bordered);
65 void resizeable(
bool use);
66 void fullscreen(
bool enter,
bool forceOriginalDisplay);
69 [[nodiscard]]
bool resize(
const SDL_Point& size);
71 [[nodiscard]]
bool drawRect(SDL_Surface* surface, SDL_Point offset,
const SDL_Rect& srcRect);
72 [[nodiscard]]
bool drawRects(SDL_Surface* surface, SDL_Point offset,
73 const std::vector<SDL_Rect>& rects = {});
74 [[nodiscard]]
bool drawScaledRect(SDL_Surface* surface,
const SDL_FPoint& scale,
75 const SDL_Rect& srcRect);
77 [[nodiscard]]
bool drawScaledRects(SDL_Surface* surface,
const SDL_FPoint& scale,
78 const std::vector<SDL_Rect>& rects = {});
80 [[nodiscard]]
bool fill(Uint8 r = 0x00, Uint8 g = 0x00, Uint8 b = 0x00, Uint8 a = 0xff);
81 [[nodiscard]]
bool blit(SDL_Surface* surface,
const SDL_Rect& src, SDL_Rect& dst);
85 SdlWindow(SDL_DisplayID
id,
const std::string& title,
const SDL_Rect& rect, Uint32 flags);
87 [[nodiscard]]
static bool fill(SDL_Window* window, Uint8 r = 0x00, Uint8 g = 0x00,
88 Uint8 b = 0x00, Uint8 a = 0xff);
89 [[nodiscard]]
static rdpMonitor query(SDL_Window* window, SDL_DisplayID
id,
90 bool forceAsPrimary =
false);
91 [[nodiscard]]
static SDL_Rect rect(SDL_Window* window,
bool forceAsPrimary =
false);
92 [[nodiscard]]
static SDL_Rect rect(SDL_DisplayID
id,
bool forceAsPrimary =
false);
102 [[nodiscard]]
static enum HighDPIMode isHighDPIWindowsMode(SDL_Window* window);
105 SDL_Window* _window =
nullptr;
106 SDL_DisplayID _displayID = 0;
107 Sint32 _offset_x = 0;
108 Sint32 _offset_y = 0;