29#include <freerdp/freerdp.h>
31#include "sdl_widget.hpp"
32#include "sdl_buttons.hpp"
33#include "sdl_connection_dialog_wrapper.hpp"
48 bool setTitle(
const char* fmt, ...);
49 bool showInfo(
const char* fmt, ...);
50 bool showWarn(
const char* fmt, ...);
51 bool showError(
const char* fmt, ...);
57 bool wait(
bool ignoreRdpContextQuit =
false);
59 bool handle(
const SDL_Event& event);
69 static bool clearWindow(SDL_Renderer* renderer);
71 bool update(SDL_Renderer* renderer);
73 bool show(SdlConnectionDialogWrapper::MsgType type,
const char* fmt, va_list ap);
74 bool show(SdlConnectionDialogWrapper::MsgType type);
76 static std::string print(
const char* fmt, va_list ap);
77 bool setTimer(Uint32 timeoutMS = 15000);
80 static Uint32 timeout(
void* pvthis, SDL_TimerID timerID, Uint32 intervalMS);
84 SDL_Color fgcolor = {};
85 SDL_Color bgcolor = {};
89 rdpContext* _context =
nullptr;
90 SDL_Window* _window =
nullptr;
91 SDL_Renderer* _renderer =
nullptr;
92 mutable std::mutex _mux;
95 SdlConnectionDialogWrapper::MsgType _type = SdlConnectionDialogWrapper::MSG_NONE;
96 SdlConnectionDialogWrapper::MsgType _type_active = SdlConnectionDialogWrapper::MSG_NONE;
97 SDL_TimerID _timer = 0;
98 bool _running =
false;
99 std::vector<widget_cfg_t> _list;
117 rdpContext* _context =
nullptr;
118 bool _visible =
false;