barrier/server/CXWindowsPrimaryScreen.h

51 lines
1.3 KiB
C
Raw Normal View History

2001-10-06 18:13:28 +04:00
#ifndef CXWINDOWSPRIMARYSCREEN_H
#define CXWINDOWSPRIMARYSCREEN_H
#include "KeyTypes.h"
#include "MouseTypes.h"
#include "CXWindowsScreen.h"
2001-10-06 18:13:28 +04:00
#include "IPrimaryScreen.h"
class CXWindowsPrimaryScreen : public CXWindowsScreen, public IPrimaryScreen {
2001-10-06 18:13:28 +04:00
public:
CXWindowsPrimaryScreen();
virtual ~CXWindowsPrimaryScreen();
// IPrimaryScreen overrides
virtual void run();
virtual void stop();
2001-10-06 18:13:28 +04:00
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(ClipboardID, const IClipboard*);
virtual void grabClipboard(ClipboardID);
2001-10-06 18:13:28 +04:00
virtual void getSize(SInt32* width, SInt32* height) const;
virtual SInt32 getJumpZoneSize() const;
virtual void getClipboard(ClipboardID, IClipboard*) const;
2001-10-06 18:13:28 +04:00
protected:
// CXWindowsScreen overrides
virtual void onOpenDisplay();
virtual void onCloseDisplay();
2001-10-06 18:13:28 +04:00
private:
void selectEvents(Display*, Window) const;
void warpCursorNoLock(Display*,
SInt32 xAbsolute, SInt32 yAbsolute);
2001-10-06 18:13:28 +04:00
KeyModifierMask mapModifier(unsigned int state) const;
KeyID mapKey(XKeyEvent*) const;
2001-10-06 18:13:28 +04:00
ButtonID mapButton(unsigned int button) const;
private:
CServer* m_server;
bool m_active;
Window m_window;
bool m_capsLockHalfDuplex;
2001-10-06 18:13:28 +04:00
};
#endif