2002-07-13 22:00:38 +00:00
|
|
|
#ifndef ISCREENEVENTHANDLER_H
|
|
|
|
#define ISCREENEVENTHANDLER_H
|
|
|
|
|
|
|
|
#include "IInterface.h"
|
|
|
|
|
|
|
|
// the platform screen should define this
|
|
|
|
class CEvent;
|
|
|
|
|
|
|
|
class IScreen;
|
|
|
|
|
2002-07-29 16:07:26 +00:00
|
|
|
//! Screen event handler interface
|
|
|
|
/*!
|
|
|
|
This is the interface through which IScreen sends notification of events.
|
|
|
|
Each platform will derive two types from IScreenEventHandler, one
|
|
|
|
for handling events on the primary screen and one for the
|
|
|
|
secondary screen. The header file with the IScreen subclass for
|
|
|
|
each platform should define the CEvent type, which depends on the
|
|
|
|
type of native events for that platform.
|
|
|
|
*/
|
2002-07-13 22:00:38 +00:00
|
|
|
class IScreenEventHandler : public IInterface {
|
|
|
|
public:
|
2002-07-29 16:07:26 +00:00
|
|
|
//! @name manipulators
|
|
|
|
//@{
|
2002-07-13 22:00:38 +00:00
|
|
|
|
2002-07-29 16:07:26 +00:00
|
|
|
//! Notify of screen saver change
|
|
|
|
/*!
|
|
|
|
Called when the screensaver is activated or deactivated.
|
|
|
|
*/
|
2002-07-13 22:00:38 +00:00
|
|
|
virtual void onScreensaver(bool activated) = 0;
|
|
|
|
|
2002-07-29 16:07:26 +00:00
|
|
|
//! Event filtering
|
|
|
|
/*!
|
|
|
|
Called for each event before event translation and dispatch. Return
|
|
|
|
true to skip translation and dispatch. Subclasses should call the
|
|
|
|
superclass's version first and return true if it returns true.
|
|
|
|
*/
|
2002-07-13 22:00:38 +00:00
|
|
|
virtual bool onPreDispatch(const CEvent* event) = 0;
|
|
|
|
|
2002-07-29 16:07:26 +00:00
|
|
|
//! Event handling
|
|
|
|
/*!
|
|
|
|
Called to handle an event. Iff the event was handled return true and
|
|
|
|
store the result, if any, in event->m_result, which defaults to zero.
|
|
|
|
*/
|
2002-07-13 22:00:38 +00:00
|
|
|
virtual bool onEvent(CEvent* event) = 0;
|
2002-07-15 15:01:36 +00:00
|
|
|
|
2002-07-29 16:07:26 +00:00
|
|
|
//@}
|
|
|
|
//! @name accessors
|
|
|
|
//@{
|
2002-07-15 15:01:36 +00:00
|
|
|
|
2002-07-29 16:07:26 +00:00
|
|
|
//! Get jump zone size
|
|
|
|
/*!
|
|
|
|
Called to get the jump zone size.
|
|
|
|
*/
|
2002-07-15 15:01:36 +00:00
|
|
|
virtual SInt32 getJumpZoneSize() const = 0;
|
2002-07-29 16:07:26 +00:00
|
|
|
|
|
|
|
//@}
|
2002-07-13 22:00:38 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|