2001-10-06 18:13:28 +04:00
|
|
|
#ifndef CXWINDOWSPRIMARYSCREEN_H
|
|
|
|
#define CXWINDOWSPRIMARYSCREEN_H
|
|
|
|
|
|
|
|
#include "KeyTypes.h"
|
|
|
|
#include "MouseTypes.h"
|
2001-11-12 00:15:30 +03:00
|
|
|
#include "CXWindowsScreen.h"
|
2001-10-06 18:13:28 +04:00
|
|
|
#include "IPrimaryScreen.h"
|
|
|
|
|
2001-11-12 00:15:30 +03:00
|
|
|
class CXWindowsPrimaryScreen : public CXWindowsScreen, public IPrimaryScreen {
|
2002-04-29 18:40:01 +04:00
|
|
|
public:
|
2001-10-06 18:13:28 +04:00
|
|
|
CXWindowsPrimaryScreen();
|
|
|
|
virtual ~CXWindowsPrimaryScreen();
|
|
|
|
|
|
|
|
// IPrimaryScreen overrides
|
2001-11-19 03:33:36 +03:00
|
|
|
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);
|
2002-04-27 18:19:53 +04:00
|
|
|
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;
|
2002-04-27 18:19:53 +04:00
|
|
|
virtual void getClipboard(ClipboardID, IClipboard*) const;
|
2001-10-06 18:13:28 +04:00
|
|
|
|
2002-04-29 18:40:01 +04:00
|
|
|
protected:
|
2001-11-12 00:15:30 +03:00
|
|
|
// CXWindowsScreen overrides
|
|
|
|
virtual void onOpenDisplay();
|
|
|
|
virtual void onCloseDisplay();
|
2002-04-29 18:08:48 +04:00
|
|
|
virtual long getEventMask(Window) const;
|
2001-11-12 00:15:30 +03:00
|
|
|
|
2002-04-29 18:40:01 +04:00
|
|
|
private:
|
2001-11-12 00:15:30 +03:00
|
|
|
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;
|
2002-04-26 21:38:01 +04:00
|
|
|
KeyID mapKey(XKeyEvent*) const;
|
2001-10-06 18:13:28 +04:00
|
|
|
ButtonID mapButton(unsigned int button) const;
|
|
|
|
|
2002-04-29 18:40:01 +04:00
|
|
|
private:
|
2001-10-06 18:13:28 +04:00
|
|
|
CServer* m_server;
|
|
|
|
bool m_active;
|
2001-11-12 00:15:30 +03:00
|
|
|
Window m_window;
|
2002-04-27 00:12:55 +04:00
|
|
|
|
|
|
|
bool m_capsLockHalfDuplex;
|
2001-10-06 18:13:28 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|