29#include <freerdp/freerdp.h>
30#include <freerdp/client/rdpei.h>
31#include <freerdp/client/rail.h>
32#include <freerdp/client/cliprdr.h>
33#include <freerdp/client/rdpgfx.h>
36#include <SDL3/SDL_video.h>
38#include "sdl_types.hpp"
39#include "sdl_disp.hpp"
41#include "sdl_clip.hpp"
42#include "sdl_utils.hpp"
43#include "sdl_window.hpp"
44#include "dialogs/sdl_connection_dialog_wrapper.hpp"
46using SDLSurfacePtr = std::unique_ptr<SDL_Surface,
decltype(&SDL_DestroySurface)>;
59 [[nodiscard]]
bool redraw(
bool suppress =
false)
const;
61 void setConnected(
bool val);
62 [[nodiscard]]
bool isConnected()
const;
64 [[nodiscard]]
bool update_resizeable(
bool enable);
65 [[nodiscard]]
bool update_fullscreen(
bool enter);
66 [[nodiscard]]
bool update_minimize();
68 [[nodiscard]] rdpContext* context()
const;
69 [[nodiscard]] rdpClientContext* common()
const;
71 void setCursor(rdpPointer* cursor);
72 [[nodiscard]] rdpPointer* cursor()
const;
74 void setMonitorIds(
const std::vector<SDL_DisplayID>& ids);
75 const std::vector<SDL_DisplayID>& monitorIds()
const;
76 int64_t monitorId(uint32_t index)
const;
78 void push(std::vector<SDL_Rect>&& rects);
79 std::vector<SDL_Rect> pop();
81 void setHasCursor(
bool val);
82 [[nodiscard]]
bool hasCursor()
const;
86 std::atomic<bool> _connected =
false;
87 bool _cursor_visible =
true;
88 rdpPointer* _cursor =
nullptr;
89 std::vector<SDL_DisplayID> _monitorIds;
90 std::mutex _queue_mux;
91 std::queue<std::vector<SDL_Rect>> _queue;
97 bool fullscreen =
false;
98 bool resizeable =
false;
99 bool grab_mouse =
false;
100 bool grab_kbd =
false;
102 std::map<Uint32, SdlWindow> windows;
115 SDLSurfacePtr primary;
117 SDL_PixelFormat sdl_pixel_format = SDL_PIXELFORMAT_UNKNOWN;
119 std::atomic<bool> rdp_thread_running;
object that handles clipboard context for the SDL3 client