mirror of
https://github.com/debauchee/barrier.git
synced 2026-07-09 21:36:27 +08:00
win32 changes. changed names of binaries. added support for
running as (and installing/installing) a service. added support for multiple desktops (NT only, 95 doesn't support multiple desktops).
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
#ifndef CMSWINDOWSPRIMARYSCREEN_H
|
||||
#define CMSWINDOWSPRIMARYSCREEN_H
|
||||
|
||||
#include "KeyTypes.h"
|
||||
#include "MouseTypes.h"
|
||||
#include "CMSWindowsScreen.h"
|
||||
#include "IPrimaryScreen.h"
|
||||
#include "MouseTypes.h"
|
||||
#include "CString.h"
|
||||
#include "CSynergyHook.h"
|
||||
|
||||
class CMSWindowsPrimaryScreen : public CMSWindowsScreen, public IPrimaryScreen {
|
||||
public:
|
||||
@@ -36,12 +37,24 @@ protected:
|
||||
virtual LRESULT onEvent(HWND, UINT, WPARAM, LPARAM);
|
||||
virtual void onOpenDisplay();
|
||||
virtual void onCloseDisplay();
|
||||
virtual CString getCurrentDesktopName() const;
|
||||
|
||||
private:
|
||||
void doEnter();
|
||||
void enterNoWarp();
|
||||
void onEnter();
|
||||
bool onLeave();
|
||||
|
||||
// discard posted messages
|
||||
void nextMark();
|
||||
|
||||
// open/close desktop (for windows 95/98/me)
|
||||
bool openDesktop();
|
||||
void closeDesktop();
|
||||
|
||||
// make desk the thread desktop (for windows NT/2000/XP)
|
||||
bool switchDesktop(HDESK desk);
|
||||
|
||||
// key and button queries
|
||||
KeyID mapKey(WPARAM keycode, LPARAM info,
|
||||
KeyModifierMask* maskOut);
|
||||
ButtonID mapButton(WPARAM button) const;
|
||||
@@ -50,19 +63,51 @@ private:
|
||||
|
||||
private:
|
||||
CServer* m_server;
|
||||
|
||||
// true if windows 95/98/me
|
||||
bool m_is95Family;
|
||||
bool m_active;
|
||||
|
||||
// the main loop's thread id
|
||||
DWORD m_threadID;
|
||||
|
||||
// the current desk and it's name
|
||||
HDESK m_desk;
|
||||
CString m_deskName;
|
||||
|
||||
// our window (for getting clipboard changes)
|
||||
HWND m_window;
|
||||
|
||||
// m_active is true the hooks are relaying events
|
||||
bool m_active;
|
||||
|
||||
// used to discard queued messages that are no longer needed
|
||||
UInt32 m_mark;
|
||||
UInt32 m_markReceived;
|
||||
|
||||
// clipboard stuff
|
||||
HWND m_nextClipboardWindow;
|
||||
HWND m_clipboardOwner;
|
||||
|
||||
// map of key state
|
||||
BYTE m_keys[256];
|
||||
|
||||
// position of center pixel of screen
|
||||
SInt32 m_xCenter, m_yCenter;
|
||||
|
||||
// used to ignore mouse motion
|
||||
SInt32 m_mouseMoveIgnore;
|
||||
|
||||
// hook library stuff
|
||||
HINSTANCE m_hookLibrary;
|
||||
InstallFunc m_install;
|
||||
UninstallFunc m_uninstall;
|
||||
SetZoneFunc m_setZone;
|
||||
SetRelayFunc m_setRelay;
|
||||
|
||||
// stuff for restoring active window
|
||||
HWND m_lastForegroundWindow;
|
||||
HWND m_lastActiveWindow;
|
||||
DWORD m_lastActiveThread;
|
||||
HINSTANCE m_hookLibrary;
|
||||
UInt32 m_mark;
|
||||
UInt32 m_markReceived;
|
||||
BYTE m_keys[256];
|
||||
SInt32 m_xCenter, m_yCenter;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user