2001-10-06 14:13:28 +00:00
|
|
|
#ifndef ISECONDARYSCREEN_H
|
|
|
|
#define ISECONDARYSCREEN_H
|
|
|
|
|
|
|
|
#include "IInterface.h"
|
2002-04-27 14:19:53 +00:00
|
|
|
#include "ClipboardTypes.h"
|
2001-10-08 19:24:46 +00:00
|
|
|
#include "KeyTypes.h"
|
|
|
|
#include "MouseTypes.h"
|
2001-10-06 14:13:28 +00:00
|
|
|
|
|
|
|
class CClient;
|
2001-11-25 18:32:41 +00:00
|
|
|
class IClipboard;
|
2001-10-06 14:13:28 +00:00
|
|
|
|
|
|
|
class ISecondaryScreen : public IInterface {
|
2002-04-29 14:40:01 +00:00
|
|
|
public:
|
2001-10-06 14:13:28 +00:00
|
|
|
// manipulators
|
|
|
|
|
2001-11-19 00:33:36 +00:00
|
|
|
// enter the screen's message loop. this returns when it detects
|
|
|
|
// the application should terminate or when stop() is called.
|
|
|
|
// the screen must be open()'d before run() and must not be
|
|
|
|
// close()'d until run() returns.
|
|
|
|
virtual void run() = 0;
|
|
|
|
|
|
|
|
// cause run() to return
|
|
|
|
virtual void stop() = 0;
|
|
|
|
|
2001-10-06 14:13:28 +00:00
|
|
|
// initialize the screen, hide the cursor, and disable the screen
|
|
|
|
// saver. start reporting certain events to the client (clipboard
|
|
|
|
// stolen and screen size changed).
|
|
|
|
virtual void open(CClient*) = 0;
|
|
|
|
|
|
|
|
// close the screen. should restore the screen saver.
|
|
|
|
virtual void close() = 0;
|
|
|
|
|
|
|
|
// called when the user navigates to the secondary screen. warp
|
|
|
|
// the cursor to the given coordinates and unhide it. prepare to
|
|
|
|
// simulate input events.
|
2002-04-30 17:48:11 +00:00
|
|
|
virtual void enter(SInt32 xAbsolute, SInt32 yAbsolute,
|
2002-06-10 22:06:45 +00:00
|
|
|
KeyModifierMask mask) = 0;
|
2001-10-06 14:13:28 +00:00
|
|
|
|
|
|
|
// called when the user navigates off the secondary screen. clean
|
|
|
|
// up input event simulation and hide the cursor.
|
|
|
|
virtual void leave() = 0;
|
|
|
|
|
|
|
|
// keyboard input simulation
|
2001-10-25 21:40:29 +00:00
|
|
|
virtual void keyDown(KeyID, KeyModifierMask) = 0;
|
|
|
|
virtual void keyRepeat(KeyID, KeyModifierMask, SInt32 count) = 0;
|
|
|
|
virtual void keyUp(KeyID, KeyModifierMask) = 0;
|
2001-10-06 14:13:28 +00:00
|
|
|
|
|
|
|
// mouse input simulation
|
2001-10-25 21:40:29 +00:00
|
|
|
virtual void mouseDown(ButtonID) = 0;
|
|
|
|
virtual void mouseUp(ButtonID) = 0;
|
|
|
|
virtual void mouseMove(SInt32 xAbsolute, SInt32 yAbsolute) = 0;
|
|
|
|
virtual void mouseWheel(SInt32 delta) = 0;
|
2001-10-06 14:13:28 +00:00
|
|
|
|
|
|
|
// set the screen's clipboard contents. this is usually called
|
|
|
|
// soon after an enter().
|
2002-04-27 14:19:53 +00:00
|
|
|
virtual void setClipboard(ClipboardID, const IClipboard*) = 0;
|
2001-10-06 14:13:28 +00:00
|
|
|
|
2001-11-25 18:32:41 +00:00
|
|
|
// take ownership of clipboard
|
2002-04-27 14:19:53 +00:00
|
|
|
virtual void grabClipboard(ClipboardID) = 0;
|
2001-11-25 18:32:41 +00:00
|
|
|
|
2002-06-22 19:20:21 +00:00
|
|
|
// activate or deactivate the screen saver
|
|
|
|
virtual void screenSaver(bool activate) = 0;
|
|
|
|
|
2001-10-06 14:13:28 +00:00
|
|
|
// accessors
|
|
|
|
|
2002-05-24 17:54:28 +00:00
|
|
|
// get the position of the mouse on the screen
|
2002-06-19 17:03:29 +00:00
|
|
|
virtual void getMousePos(SInt32& x, SInt32& y) const = 0;
|
2002-05-24 17:54:28 +00:00
|
|
|
|
2001-10-06 14:13:28 +00:00
|
|
|
// get the size of the screen
|
2002-06-19 17:03:29 +00:00
|
|
|
virtual void getShape(SInt32& x, SInt32& y,
|
|
|
|
SInt32& width, SInt32& height) const = 0;
|
2001-10-06 14:13:28 +00:00
|
|
|
|
|
|
|
// get the size of jump zone
|
|
|
|
virtual SInt32 getJumpZoneSize() const = 0;
|
|
|
|
|
|
|
|
// get the screen's clipboard contents
|
2002-04-27 14:19:53 +00:00
|
|
|
virtual void getClipboard(ClipboardID, IClipboard*) const = 0;
|
2001-10-06 14:13:28 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|