FreeRDP
Loading...
Searching...
No Matches
sdl_common_utils.hpp
1
20#pragma once
21
22#include <memory>
23
24#include <freerdp/settings_types.h>
25
26using CStringPtr = std::unique_ptr<char, decltype(std::free)*>;
27
28bool operator==(const MONITOR_ATTRIBUTES& l, const MONITOR_ATTRIBUTES& r);
29bool operator==(const rdpMonitor& l, const rdpMonitor& r);
30
32{
33 public:
34 explicit WinPREvent(bool initial = false);
35 WinPREvent(const WinPREvent& other) = delete;
36 WinPREvent(WinPREvent&& other) = delete;
37
38 WinPREvent& operator=(const WinPREvent& other) = delete;
39 WinPREvent& operator=(WinPREvent&& other) = delete;
40
42
43 void set();
44 void clear();
45 [[nodiscard]] bool isSet() const;
46
47 [[nodiscard]] HANDLE handle() const;
48
49 private:
50 HANDLE _handle;
51};
52
54{
55 public:
57 CriticalSection(const CriticalSection& other) = delete;
58 CriticalSection(CriticalSection&& other) = delete;
60
61 CriticalSection& operator=(const CriticalSection& other) = delete;
62 CriticalSection& operator=(const CriticalSection&& other) = delete;
63
64 void lock();
65 void unlock();
66
67 private:
68 CRITICAL_SECTION _section{};
69};