29#include "sdl_buttons.hpp"
30#include "sdl_connection_dialog_wrapper.hpp"
31#include "sdl_widget.hpp"
32#include "sdl_widget_list.hpp"
37 explicit SDLConnectionDialog(rdpContext* context);
38 SDLConnectionDialog(
const SDLConnectionDialog& other) =
delete;
39 SDLConnectionDialog(
const SDLConnectionDialog&& other) =
delete;
40 ~SDLConnectionDialog()
override;
42 SDLConnectionDialog& operator=(
const SDLConnectionDialog& other) =
delete;
43 SDLConnectionDialog& operator=(SDLConnectionDialog&& other) =
delete;
45 WINPR_ATTR_FORMAT_ARG(2, 3)
46 [[nodiscard]]
bool setTitle(WINPR_FORMAT_ARG
const char* fmt, ...);
47 WINPR_ATTR_FORMAT_ARG(2, 3)
48 [[nodiscard]]
bool showInfo(WINPR_FORMAT_ARG
const char* fmt, ...);
49 WINPR_ATTR_FORMAT_ARG(2, 3)
50 [[nodiscard]]
bool showWarn(WINPR_FORMAT_ARG
const char* fmt, ...);
51 WINPR_ATTR_FORMAT_ARG(2, 3)
52 [[nodiscard]]
bool showError(WINPR_FORMAT_ARG
const char* fmt, ...);
54 [[nodiscard]]
bool show();
55 [[nodiscard]]
bool hide();
57 [[nodiscard]]
bool running()
const;
58 [[nodiscard]]
bool wait(
bool ignoreRdpContextQuit =
false);
60 [[nodiscard]]
bool handle(
const SDL_Event& event);
62 [[nodiscard]]
bool visible()
const override;
65 [[nodiscard]]
bool updateInternal()
override;
68 [[nodiscard]]
bool createWindow();
71 [[nodiscard]]
bool updateMsg(SdlConnectionDialogWrapper::MsgType type);
73 [[nodiscard]]
bool setModal();
75 [[nodiscard]]
bool show(SdlConnectionDialogWrapper::MsgType type,
const char* fmt, va_list ap);
76 [[nodiscard]]
bool show(SdlConnectionDialogWrapper::MsgType type);
78 [[nodiscard]]
static std::string print(
const char* fmt, va_list ap);
79 [[nodiscard]]
bool setTimer(Uint32 timeoutMS = 15000);
82 [[nodiscard]]
static Uint32 timeout(
void* pvthis, SDL_TimerID timerID, Uint32 intervalMS);
86 SDL_Color fgcolor = {};
87 SDL_Color bgcolor = {};
91 rdpContext* _context =
nullptr;
92 mutable std::mutex _mux;
95 SdlConnectionDialogWrapper::MsgType _type_active = SdlConnectionDialogWrapper::MSG_NONE;
96 SDL_TimerID _timer = 0;
97 bool _running =
false;
98 std::vector<widget_cfg_t> _list;