2002-07-10 21:22:28 +00:00
|
|
|
#ifndef IPRIMARYSCREENRECEIVER_H
|
|
|
|
#define IPRIMARYSCREENRECEIVER_H
|
|
|
|
|
|
|
|
#include "IInterface.h"
|
|
|
|
#include "KeyTypes.h"
|
|
|
|
#include "MouseTypes.h"
|
|
|
|
|
2002-07-13 22:00:38 +00:00
|
|
|
// the interface for receiving notification of events on the primary
|
|
|
|
// screen. the server implements this interface to handle user input.
|
|
|
|
// platform dependent primary screen implementation will need to take
|
|
|
|
// an IPrimaryScreenReceiver* and notify it of events.
|
2002-07-10 21:22:28 +00:00
|
|
|
class IPrimaryScreenReceiver : public IInterface {
|
|
|
|
public:
|
2002-07-13 22:00:38 +00:00
|
|
|
// called if the display is unexpectedly closing.
|
|
|
|
|
|
|
|
// called if the screen is unexpectedly closing. this implies that
|
|
|
|
// the screen is no longer usable and that the program should
|
|
|
|
// close the screen and possibly terminate.
|
2002-07-10 21:22:28 +00:00
|
|
|
virtual void onError() = 0;
|
|
|
|
|
2002-07-13 22:00:38 +00:00
|
|
|
// called when the screensaver is activated or deactivated
|
|
|
|
virtual void onScreensaver(bool activated) = 0;
|
|
|
|
|
2002-07-10 21:22:28 +00:00
|
|
|
// call to notify of events. onMouseMovePrimary() returns
|
|
|
|
// true iff the mouse enters a jump zone and jumps.
|
|
|
|
virtual void onKeyDown(KeyID, KeyModifierMask) = 0;
|
|
|
|
virtual void onKeyUp(KeyID, KeyModifierMask) = 0;
|
|
|
|
virtual void onKeyRepeat(KeyID, KeyModifierMask, SInt32 count) = 0;
|
|
|
|
virtual void onMouseDown(ButtonID) = 0;
|
|
|
|
virtual void onMouseUp(ButtonID) = 0;
|
|
|
|
virtual bool onMouseMovePrimary(SInt32 x, SInt32 y) = 0;
|
|
|
|
virtual void onMouseMoveSecondary(SInt32 dx, SInt32 dy) = 0;
|
|
|
|
virtual void onMouseWheel(SInt32 delta) = 0;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|