20#define WIN32_LEAN_AND_MEAN
89 void leave(HKL keyLayout);
115 void setShape(int32_t
x, int32_t
y, int32_t width, int32_t height, int32_t xCenter, int32_t yCenter,
bool isMultimon);
189 HWND m_foregroundWindow;
192 using Desks = std::map<std::string, Desk *>;
195 HCURSOR createBlankCursor()
const;
196 void destroyCursor(HCURSOR cursor)
const;
197 ATOM createDeskWindowClass(
bool isPrimary)
const;
198 void destroyClass(ATOM windowClass)
const;
199 HWND createWindow(ATOM windowClass,
const char *
name)
const;
200 void destroyWindow(HWND)
const;
203 void deskMouseMove(int32_t
x, int32_t
y)
const;
204 void deskMouseRelativeMove(int32_t dx, int32_t dy)
const;
205 void deskEnter(Desk *desk);
206 void deskLeave(Desk *desk, HKL keyLayout);
207 void deskThread(
void *vdesk);
210 Desk *addDesk(
const std::string &
name, HDESK hdesk);
213 bool isDeskAccessible(
const Desk *desk)
const;
214 void handleCheckDesk();
217 void waitForDesk()
const;
218 void sendMessage(UINT, WPARAM, LPARAM)
const;
221 HWND getForegroundWindow()
const;
224 HDESK openInputDesktop();
225 void closeDesktop(HDESK);
226 std::string getDesktopName(HDESK);
229 static LRESULT CALLBACK primaryDeskProc(HWND, UINT, WPARAM, LPARAM);
230 static LRESULT CALLBACK secondaryDeskProc(HWND, UINT, WPARAM, LPARAM);
251 int32_t m_xCenter = 0;
252 int32_t m_yCenter = 0;
255 bool m_multimon =
false;
263 bool m_screensaverNotify =
false;
266 Desk *m_activeDesk =
nullptr;
267 std::string m_activeDeskName;
279 bool m_leaveForegroundOption;
static const struct sockaddr FAR * name
Definition ArchNetworkWinsock.cpp:27
static const WSAEVENT FAR DWORD
Definition ArchNetworkWinsock.cpp:54
static void FAR int int flags
Definition ArchNetworkWinsock.cpp:37
uint8_t ButtonID
Mouse button ID.
Definition MouseTypes.h:16
std::vector< uint32_t > OptionsList
Definition OptionTypes.h:27
int y
Definition ServerConfig.cpp:27
int x
Definition ServerConfig.cpp:26
Condition variable.
Definition CondVar.h:122
Definition SimpleEventQueueBuffer.cpp:13
Event.
Definition Event.h:27
Event queue interface.
Definition IEventQueue.h:32
Job interface.
Definition IJob.h:17
Screen saver interface.
Definition IScreenSaver.h:18
MSWindowsDesks(bool isPrimary, bool noHooks, const IScreenSaver *screensaver, IEventQueue *events, IJob *updateKeys)
Constructor.
Definition MSWindowsDesks.cpp:109
void enter()
Notify of entering a desk.
Definition MSWindowsDesks.cpp:167
void fakeInputEnd()
Stop ignoring user input.
Definition MSWindowsDesks.cpp:223
void fakeMouseWheel(int32_t xDelta, int32_t yDelta) const
Fake mouse wheel.
Definition MSWindowsDesks.cpp:303
void leave(HKL keyLayout)
Notify of leaving a desk.
Definition MSWindowsDesks.cpp:172
void disable()
Disable desk tracking.
Definition MSWindowsDesks.cpp:152
void fakeMouseButton(ButtonID id, bool press)
Fake mouse press/release.
Definition MSWindowsDesks.cpp:241
void fakeInputBegin()
Start ignoring user input.
Definition MSWindowsDesks.cpp:218
void setOptions(const OptionsList &options)
Notify of options changes.
Definition MSWindowsDesks.cpp:182
void enable()
Enable desk tracking.
Definition MSWindowsDesks.cpp:135
void updateKeys()
Update the key state.
Definition MSWindowsDesks.cpp:192
void resetOptions()
Notify of options changes.
Definition MSWindowsDesks.cpp:177
void fakeMouseRelativeMove(int32_t dx, int32_t dy) const
Fake mouse move.
Definition MSWindowsDesks.cpp:298
void fakeMouseMove(int32_t x, int32_t y) const
Fake mouse move.
Definition MSWindowsDesks.cpp:293
void fakeKeyEvent(WORD virtualKey, WORD scanCode, DWORD flags, bool isAutoRepeat) const
Fake key press/release.
Definition MSWindowsDesks.cpp:236
void installScreensaverHooks(bool install)
Install/uninstall screensaver hooks.
Definition MSWindowsDesks.cpp:210
~MSWindowsDesks()
Definition MSWindowsDesks.cpp:127
void setShape(int32_t x, int32_t y, int32_t width, int32_t height, int32_t xCenter, int32_t yCenter, bool isMultimon)
Tell desk about new size.
Definition MSWindowsDesks.cpp:197
void getCursorPos(int32_t &x, int32_t &y) const
Get cursor position.
Definition MSWindowsDesks.cpp:228
Mutual exclusion.
Definition Mutex.h:22
Thread handle.
Definition Thread.h:33