21 #include <freerdp/types.h>
22 #include <freerdp/event.h>
23 #include <freerdp/client/disp.h>
25 #include "sdl_types.hpp"
41 BOOL init(DispClientContext* disp);
42 BOOL uninit(DispClientContext* disp);
44 BOOL handle_display_event(
const SDL_DisplayEvent* ev);
46 BOOL handle_window_event(
const SDL_WindowEvent* ev);
49 UINT DisplayControlCaps(UINT32 maxNumMonitors, UINT32 maxMonitorAreaFactorA,
50 UINT32 maxMonitorAreaFactorB);
51 BOOL set_window_resizable();
54 BOOL settings_changed();
55 BOOL update_last_sent();
56 UINT sendLayout(
const rdpMonitor* monitors,
size_t nmonitors);
60 static UINT DisplayControlCaps(DispClientContext* disp, UINT32 maxNumMonitors,
61 UINT32 maxMonitorAreaFactorA, UINT32 maxMonitorAreaFactorB);
62 static void OnActivated(
void* context,
const ActivatedEventArgs* e);
63 static void OnGraphicsReset(
void* context,
const GraphicsResetEventArgs* e);
64 static Uint32 SDLCALL OnTimer(
void* param, SDL_TimerID timerID, Uint32 interval);
67 DispClientContext* _disp =
nullptr;
68 int _lastSentWidth = -1;
69 int _lastSentHeight = -1;
70 UINT64 _lastSentDate = 0;
71 int _targetWidth = -1;
72 int _targetHeight = -1;
73 BOOL _activated = FALSE;
74 BOOL _waitingResize = FALSE;
75 UINT16 _lastSentDesktopOrientation = 0;
76 UINT32 _lastSentDesktopScaleFactor = 0;
77 UINT32 _lastSentDeviceScaleFactor = 0;
78 SDL_TimerID _timer = 0;
79 unsigned _timer_retries = 0;