19#define WIN32_LEAN_AND_MEAN
88 void leave(HKL keyLayout);
114 void setShape(int32_t
x, int32_t
y, int32_t width, int32_t height, int32_t xCenter, int32_t yCenter,
bool isMultimon);
188 HWND m_foregroundWindow;
191 using Desks = std::map<std::wstring, Desk *>;
194 HCURSOR createBlankCursor()
const;
195 void destroyCursor(HCURSOR cursor)
const;
196 ATOM createDeskWindowClass(
bool isPrimary)
const;
197 void destroyClass(ATOM windowClass)
const;
198 HWND createWindow(ATOM windowClass,
const wchar_t *
name)
const;
199 void destroyWindow(HWND)
const;
202 void deskMouseMove(int32_t
x, int32_t
y)
const;
203 void deskMouseRelativeMove(int32_t dx, int32_t dy)
const;
204 void deskEnter(Desk *desk);
205 void deskLeave(Desk *desk, HKL keyLayout);
206 void deskThread(
const void *vdesk);
209 Desk *addDesk(
const std::wstring &
name, HDESK hdesk);
212 bool isDeskAccessible(
const Desk *desk)
const;
213 void handleCheckDesk();
216 void waitForDesk()
const;
217 void sendMessage(UINT, WPARAM, LPARAM)
const;
220 HWND getForegroundWindow()
const;
223 HDESK openInputDesktop();
224 void closeDesktop(HDESK);
225 std::wstring getDesktopName(HDESK);
228 static LRESULT CALLBACK primaryDeskProc(HWND, UINT, WPARAM, LPARAM);
229 static LRESULT CALLBACK secondaryDeskProc(HWND, UINT, WPARAM, LPARAM);
250 int32_t m_xCenter = 0;
251 int32_t m_yCenter = 0;
254 bool m_multimon =
false;
262 bool m_screensaverNotify =
false;
265 Desk *m_activeDesk =
nullptr;
266 std::wstring m_activeDeskName;
278 bool m_leaveForegroundOption;
static const struct sockaddr FAR * name
Definition ArchNetworkWinsock.cpp:28
static const WSAEVENT FAR DWORD
Definition ArchNetworkWinsock.cpp:55
static void FAR int int flags
Definition ArchNetworkWinsock.cpp:38
uint8_t ButtonID
Mouse button ID.
Definition MouseTypes.h:16
std::vector< uint32_t > OptionsList
Definition OptionTypes.h:26
int y
Definition ServerConfig.cpp:25
int x
Definition ServerConfig.cpp:24
Condition variable.
Definition CondVar.h:121
Definition EventQueueTimer.h:12
Event.
Definition Event.h:29
Event queue interface.
Definition IEventQueue.h:29
Job interface.
Definition IJob.h:16
Screen saver interface.
Definition IScreenSaver.h:16
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
MSWindowsDesks(bool isPrimary, bool useHooks, const IScreenSaver *screensaver, IEventQueue *events, IJob *updateKeys)
Constructor.
Definition MSWindowsDesks.cpp:109
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