Screen interface. More...
#include <IPlatformScreen.h>
Inherits IScreen, IPrimaryScreen, ISecondaryScreen, and IKeyState.
Inherited by CPlatformScreen.
Public Member Functions | |
| virtual void * | getEventTarget () const =0 |
| virtual bool | getClipboard (ClipboardID id, IClipboard *) const =0 |
| virtual void | getShape (SInt32 &x, SInt32 &y, SInt32 &width, SInt32 &height) const =0 |
| virtual void | getCursorPos (SInt32 &x, SInt32 &y) const =0 |
| virtual void | reconfigure (UInt32 activeSides)=0 |
| virtual void | warpCursor (SInt32 x, SInt32 y)=0 |
| virtual UInt32 | registerHotKey (KeyID key, KeyModifierMask mask)=0 |
| virtual void | unregisterHotKey (UInt32 id)=0 |
| virtual void | fakeInputBegin ()=0 |
| virtual void | fakeInputEnd ()=0 |
| virtual SInt32 | getJumpZoneSize () const =0 |
| virtual bool | isAnyMouseButtonDown () const =0 |
| virtual void | getCursorCenter (SInt32 &x, SInt32 &y) const =0 |
| virtual void | gameDeviceTimingResp (UInt16 freq)=0 |
| virtual void | gameDeviceFeedback (GameDeviceID id, UInt16 m1, UInt16 m2)=0 |
| virtual void | fakeMouseButton (ButtonID id, bool press)=0 |
| virtual void | fakeMouseMove (SInt32 x, SInt32 y) const =0 |
| virtual void | fakeMouseRelativeMove (SInt32 dx, SInt32 dy) const =0 |
| virtual void | fakeMouseWheel (SInt32 xDelta, SInt32 yDelta) const =0 |
| virtual void | fakeGameDeviceButtons (GameDeviceID id, GameDeviceButton buttons) const =0 |
| virtual void | fakeGameDeviceSticks (GameDeviceID id, SInt16 x1, SInt16 y1, SInt16 x2, SInt16 y2) const =0 |
| virtual void | fakeGameDeviceTriggers (GameDeviceID id, UInt8 t1, UInt8 t2) const =0 |
| virtual void | queueGameDeviceTimingReq () const =0 |
| virtual void | updateKeyMap ()=0 |
| Update the keyboard map. | |
| virtual void | updateKeyState ()=0 |
| Update the key state. | |
| virtual void | setHalfDuplexMask (KeyModifierMask)=0 |
| Set half-duplex mask. | |
| virtual void | fakeKeyDown (KeyID id, KeyModifierMask mask, KeyButton button)=0 |
| Fake a key press. | |
| virtual bool | fakeKeyRepeat (KeyID id, KeyModifierMask mask, SInt32 count, KeyButton button)=0 |
| Fake a key repeat. | |
| virtual bool | fakeKeyUp (KeyButton button)=0 |
| Fake a key release. | |
| virtual void | fakeAllKeysUp ()=0 |
| Fake key releases for all fake pressed keys. | |
| virtual bool | fakeCtrlAltDel ()=0 |
| Fake ctrl+alt+del. | |
| virtual bool | isKeyDown (KeyButton) const =0 |
| Test if key is pressed. | |
| virtual KeyModifierMask | getActiveModifiers () const =0 |
| Get the active modifiers. | |
| virtual KeyModifierMask | pollActiveModifiers () const =0 |
| Get the active modifiers from OS. | |
| virtual SInt32 | pollActiveGroup () const =0 |
| Get the active keyboard layout from OS. | |
| virtual void | pollPressedKeys (KeyButtonSet &pressedKeys) const =0 |
| Get the keys currently pressed from OS. | |
manipulators | |
| IPlatformScreen () | |
| IPlatformScreen (IEventQueue &eventQueue) | |
| virtual void | enable ()=0 |
| Enable screen. | |
| virtual void | disable ()=0 |
| Disable screen. | |
| virtual void | enter ()=0 |
| Enter screen. | |
| virtual bool | leave ()=0 |
| Leave screen. | |
| virtual bool | setClipboard (ClipboardID id, const IClipboard *)=0 |
| Set clipboard. | |
| virtual void | checkClipboards ()=0 |
| Check clipboard owner. | |
| virtual void | openScreensaver (bool notify)=0 |
| Open screen saver. | |
| virtual void | closeScreensaver ()=0 |
| Close screen saver. | |
| virtual void | screensaver (bool activate)=0 |
| Activate/deactivate screen saver. | |
| virtual void | resetOptions ()=0 |
| Notify of options changes. | |
| virtual void | setOptions (const COptionsList &options)=0 |
| Notify of options changes. | |
| virtual void | setSequenceNumber (UInt32)=0 |
| Set clipboard sequence number. | |
accessors | |
| virtual bool | isPrimary () const =0 |
| Test if is primary screen. | |
Protected Member Functions | |
| virtual void | handleSystemEvent (const CEvent &event, void *)=0 |
| Handle system event. | |
Screen interface.
This interface defines the methods common to all platform dependent screen implementations that are used by both primary and secondary screens.
Definition at line 37 of file IPlatformScreen.h.
| virtual void IPlatformScreen::checkClipboards | ( | ) | [pure virtual] |
Check clipboard owner.
Check ownership of all clipboards and post grab events for any that have changed. This is used as a backup in case the system doesn't reliably report clipboard ownership changes.
Implemented in CMSWindowsScreen, COSXScreen, CXWindowsScreen, and CPlatformScreen.
Referenced by CScreen::leave().
| virtual void IPlatformScreen::closeScreensaver | ( | ) | [pure virtual] |
Close screen saver.
Close the screen saver. Stop reporting screen saver activation and deactivation and, if the screen saver was disabled by openScreensaver(), enable the screen saver.
Implemented in CMSWindowsScreen, COSXScreen, CXWindowsScreen, and CPlatformScreen.
Referenced by CScreen::setOptions().
| virtual void IPlatformScreen::disable | ( | ) | [pure virtual] |
Disable screen.
Undoes the operations in enable() and events should no longer be reported.
Implemented in CMSWindowsScreen, COSXScreen, CXWindowsScreen, and CPlatformScreen.
Referenced by CScreen::disable().
| virtual void IPlatformScreen::enable | ( | ) | [pure virtual] |
Enable screen.
Enable the screen, preparing it to report system and user events. For a secondary screen it also means preparing to synthesize events and hiding the cursor.
Implemented in CMSWindowsScreen, COSXScreen, CXWindowsScreen, and CPlatformScreen.
Referenced by CScreen::enable().
| virtual void IPlatformScreen::enter | ( | ) | [pure virtual] |
Enter screen.
Called when the user navigates to this screen.
Implemented in CMSWindowsScreen, COSXScreen, CXWindowsScreen, and CPlatformScreen.
Referenced by CScreen::enter().
| virtual void IPlatformScreen::fakeAllKeysUp | ( | ) | [pure virtual] |
Fake key releases for all fake pressed keys.
Synthesizes a key release event for every key that is synthetically pressed and updates the key state.
Implements IKeyState.
Implemented in CMSWindowsScreen, and CPlatformScreen.
| virtual bool IPlatformScreen::fakeCtrlAltDel | ( | ) | [pure virtual] |
Fake ctrl+alt+del.
Synthesize a press of ctrl+alt+del. Return true if processing is complete and false if normal key processing should continue.
Implements IKeyState.
Implemented in CPlatformScreen.
Referenced by CScreen::keyDown().
| virtual void IPlatformScreen::fakeKeyDown | ( | KeyID | id, | |
| KeyModifierMask | mask, | |||
| KeyButton | button | |||
| ) | [pure virtual] |
Fake a key press.
Synthesizes a key press event and updates the key state.
Implements IKeyState.
Implemented in CMSWindowsScreen, and CPlatformScreen.
Referenced by CScreen::keyDown().
| virtual bool IPlatformScreen::fakeKeyRepeat | ( | KeyID | id, | |
| KeyModifierMask | mask, | |||
| SInt32 | count, | |||
| KeyButton | button | |||
| ) | [pure virtual] |
Fake a key repeat.
Synthesizes a key repeat event and updates the key state.
Implements IKeyState.
Implemented in CMSWindowsScreen, and CPlatformScreen.
Referenced by CScreen::keyRepeat().
| virtual bool IPlatformScreen::fakeKeyUp | ( | KeyButton | button | ) | [pure virtual] |
Fake a key release.
Synthesizes a key release event and updates the key state.
Implements IKeyState.
Implemented in CMSWindowsScreen, and CPlatformScreen.
Referenced by CScreen::keyUp().
| virtual KeyModifierMask IPlatformScreen::getActiveModifiers | ( | ) | const [pure virtual] |
Get the active modifiers.
Returns the modifiers that are currently active according to our shadowed state.
Implements IKeyState.
Implemented in CPlatformScreen.
Referenced by CScreen::getActiveModifiers().
| virtual void IPlatformScreen::handleSystemEvent | ( | const CEvent & | event, | |
| void * | ||||
| ) | [protected, pure virtual] |
Handle system event.
A platform screen is expected to install a handler for system events in its c'tor like so:
EVENTQUEUE->adoptHandler(CEvent::kSystem, IEventQueue::getSystemTarget(), new TMethodEventJob<CXXXPlatformScreen>(this, &CXXXPlatformScreen::handleSystemEvent));
It should remove the handler in its d'tor. Override the handleSystemEvent() method to process system events. It should post the events IScreen as appropriate.
A primary screen has further responsibilities. It should post the events in IPrimaryScreen as appropriate. It should also call onKey() on its CKeyState whenever a key is pressed or released (but not for key repeats). And it should call updateKeyMap() on its CKeyState if necessary when the keyboard mapping changes.
The target of all events should be the value returned by getEventTarget().
Implemented in CMSWindowsScreen, COSXScreen, CXWindowsScreen, and CPlatformScreen.
| virtual bool IPlatformScreen::isKeyDown | ( | KeyButton | ) | const [pure virtual] |
Test if key is pressed.
Returns true iff the given key is down. Half-duplex toggles always return false.
Implements IKeyState.
Implemented in CPlatformScreen.
| virtual bool IPlatformScreen::isPrimary | ( | ) | const [pure virtual] |
Test if is primary screen.
Return true iff this screen is a primary screen.
Implemented in CMSWindowsScreen, COSXScreen, CXWindowsScreen, and CPlatformScreen.
| virtual bool IPlatformScreen::leave | ( | ) | [pure virtual] |
Leave screen.
Called when the user navigates off the screen. Returns true on success, false on failure. A typical reason for failure is being unable to install the keyboard and mouse snoopers on a primary screen. Secondary screens should not fail.
Implemented in CMSWindowsScreen, COSXScreen, CXWindowsScreen, and CPlatformScreen.
Referenced by CScreen::leave().
| virtual void IPlatformScreen::openScreensaver | ( | bool | notify | ) | [pure virtual] |
Open screen saver.
Open the screen saver. If notify is true then this object must send events when the screen saver activates or deactivates until closeScreensaver() is called. If notify is false then the screen saver is disabled and restored on closeScreensaver().
Implemented in CMSWindowsScreen, COSXScreen, CXWindowsScreen, and CPlatformScreen.
Referenced by CScreen::resetOptions(), and CScreen::setOptions().
| virtual SInt32 IPlatformScreen::pollActiveGroup | ( | ) | const [pure virtual] |
Get the active keyboard layout from OS.
Returns the active keyboard layout according to the operating system.
Implements IKeyState.
Implemented in CPlatformScreen.
| virtual KeyModifierMask IPlatformScreen::pollActiveModifiers | ( | ) | const [pure virtual] |
Get the active modifiers from OS.
Returns the modifiers that are currently active according to the operating system.
Implements IKeyState.
Implemented in CPlatformScreen.
Referenced by CScreen::pollActiveModifiers().
| virtual void IPlatformScreen::pollPressedKeys | ( | KeyButtonSet & | pressedKeys | ) | const [pure virtual] |
Get the keys currently pressed from OS.
Adds any keys that are currently pressed according to the operating system to pressedKeys.
Implements IKeyState.
Implemented in CPlatformScreen.
| virtual void IPlatformScreen::resetOptions | ( | ) | [pure virtual] |
Notify of options changes.
Reset all options to their default values.
Implemented in CMSWindowsScreen, COSXScreen, CXWindowsScreen, and CPlatformScreen.
Referenced by CScreen::resetOptions().
| virtual void IPlatformScreen::screensaver | ( | bool | activate | ) | [pure virtual] |
Activate/deactivate screen saver.
Forcibly activate the screen saver if activate is true otherwise forcibly deactivate it.
Implemented in CMSWindowsScreen, COSXScreen, CXWindowsScreen, and CPlatformScreen.
Referenced by CScreen::screensaver().
| virtual bool IPlatformScreen::setClipboard | ( | ClipboardID | id, | |
| const IClipboard * | ||||
| ) | [pure virtual] |
Set clipboard.
Set the contents of the system clipboard indicated by id.
Implemented in CMSWindowsScreen, COSXScreen, CXWindowsScreen, and CPlatformScreen.
Referenced by CScreen::grabClipboard(), and CScreen::setClipboard().
| virtual void IPlatformScreen::setHalfDuplexMask | ( | KeyModifierMask | ) | [pure virtual] |
Set half-duplex mask.
Sets which modifier toggle keys are half-duplex. A half-duplex toggle key doesn't report a key release when toggled on and doesn't report a key press when toggled off.
Implements IKeyState.
Implemented in CPlatformScreen.
Referenced by CScreen::setOptions().
| virtual void IPlatformScreen::setOptions | ( | const COptionsList & | options | ) | [pure virtual] |
Notify of options changes.
Set options to given values. Ignore unknown options and don't modify options that aren't given in options.
Implemented in CMSWindowsScreen, COSXScreen, CXWindowsScreen, and CPlatformScreen.
Referenced by CScreen::setOptions().
| virtual void IPlatformScreen::setSequenceNumber | ( | UInt32 | ) | [pure virtual] |
Set clipboard sequence number.
Sets the sequence number to use in subsequent clipboard events.
Implemented in CMSWindowsScreen, COSXScreen, CXWindowsScreen, and CPlatformScreen.
Referenced by CScreen::setSequenceNumber().
| virtual void IPlatformScreen::updateKeyMap | ( | ) | [pure virtual] |
Update the keyboard map.
Causes the key state to get updated to reflect the current keyboard mapping.
Implements IKeyState.
Implemented in CPlatformScreen.
Referenced by CScreen::enable().
| virtual void IPlatformScreen::updateKeyState | ( | ) | [pure virtual] |
Update the key state.
Causes the key state to get updated to reflect the physical keyboard state.
Implements IKeyState.
Implemented in CPlatformScreen.
Referenced by CScreen::enable().
1.7.1