mirror of
https://github.com/debauchee/barrier.git
synced 2026-02-08 12:53:53 +08:00
clipboard owner support (MS windows done, X windows partial) added key transfer on ms windows mutex fixes in CClient (had race conditions) faster debug output in ms windows changed temporary screen name to "secondary" network fixes on ms windows (poll returned wrong result) fixed transparent cursor on ms windows
49 lines
1.3 KiB
C++
49 lines
1.3 KiB
C++
#ifndef CXWINDOWSPRIMARYSCREEN_H
|
|
#define CXWINDOWSPRIMARYSCREEN_H
|
|
|
|
#include "KeyTypes.h"
|
|
#include "MouseTypes.h"
|
|
#include "CXWindowsScreen.h"
|
|
#include "IPrimaryScreen.h"
|
|
|
|
class CXWindowsPrimaryScreen : public CXWindowsScreen, public IPrimaryScreen {
|
|
public:
|
|
CXWindowsPrimaryScreen();
|
|
virtual ~CXWindowsPrimaryScreen();
|
|
|
|
// IPrimaryScreen overrides
|
|
virtual void run();
|
|
virtual void stop();
|
|
virtual void open(CServer*);
|
|
virtual void close();
|
|
virtual void enter(SInt32 xAbsolute, SInt32 yAbsolute);
|
|
virtual void leave();
|
|
virtual void warpCursor(SInt32 xAbsolute, SInt32 yAbsolute);
|
|
virtual void setClipboard(const IClipboard*);
|
|
virtual void grabClipboard();
|
|
virtual void getSize(SInt32* width, SInt32* height) const;
|
|
virtual SInt32 getJumpZoneSize() const;
|
|
virtual void getClipboard(IClipboard*) const;
|
|
|
|
protected:
|
|
// CXWindowsScreen overrides
|
|
virtual void onOpenDisplay();
|
|
virtual void onCloseDisplay();
|
|
|
|
private:
|
|
void selectEvents(Display*, Window) const;
|
|
void warpCursorNoLock(Display*,
|
|
SInt32 xAbsolute, SInt32 yAbsolute);
|
|
|
|
KeyModifierMask mapModifier(unsigned int state) const;
|
|
KeyID mapKey(KeyCode, KeyModifierMask) const;
|
|
ButtonID mapButton(unsigned int button) const;
|
|
|
|
private:
|
|
CServer* m_server;
|
|
bool m_active;
|
|
Window m_window;
|
|
};
|
|
|
|
#endif
|