Primary screen interface. More...
#include <IPrimaryScreen.h>
Inherits IInterface.
Inherited by IPlatformScreen.
Classes | |
| class | CButtonInfo |
| Button event data. More... | |
| class | CGameDeviceButtonInfo |
| Game device button event data. More... | |
| class | CGameDeviceFeedbackInfo |
| Game device feedback event data. More... | |
| class | CGameDeviceStickInfo |
| Game device sticks event data. More... | |
| class | CGameDeviceTimingRespInfo |
| Game device timing response event data. More... | |
| class | CGameDeviceTriggerInfo |
| Game device triggers event data. More... | |
| class | CHotKeyInfo |
| Hot key event data. More... | |
| class | CMotionInfo |
| Motion event data. More... | |
| class | CWheelInfo |
| Wheel motion event data. More... | |
Public Member Functions | |
manipulators | |
| virtual void | reconfigure (UInt32 activeSides)=0 |
| Update configuration. | |
| virtual void | warpCursor (SInt32 x, SInt32 y)=0 |
| Warp cursor. | |
| virtual UInt32 | registerHotKey (KeyID key, KeyModifierMask mask)=0 |
| Register a system hotkey. | |
| virtual void | unregisterHotKey (UInt32 id)=0 |
| Unregister a system hotkey. | |
| virtual void | fakeInputBegin ()=0 |
| Prepare to synthesize input on primary screen. | |
| virtual void | fakeInputEnd ()=0 |
| Done synthesizing input on primary screen. | |
accessors | |
|
| |
| virtual SInt32 | getJumpZoneSize () const =0 |
| Get jump zone size. | |
| virtual bool | isAnyMouseButtonDown () const =0 |
| Test if mouse is pressed. | |
| virtual void | getCursorCenter (SInt32 &x, SInt32 &y) const =0 |
| Get cursor center position. | |
| virtual void | gameDeviceTimingResp (UInt16 freq)=0 |
| Handle incoming game device timing responses. | |
| virtual void | gameDeviceFeedback (GameDeviceID id, UInt16 m1, UInt16 m2)=0 |
| Handle incoming game device feedback changes. | |
| static CEvent::Type | getButtonDownEvent () |
| Get button down event type. Event data is CButtonInfo*. | |
| static CEvent::Type | getButtonUpEvent () |
| Get button up event type. Event data is CButtonInfo*. | |
| static CEvent::Type | getMotionOnPrimaryEvent () |
| Get mouse motion on the primary screen event type. | |
| static CEvent::Type | getMotionOnSecondaryEvent () |
| Get mouse motion on a secondary screen event type. | |
| static CEvent::Type | getWheelEvent () |
| Get mouse wheel event type. Event data is CWheelInfo*. | |
| static CEvent::Type | getScreensaverActivatedEvent () |
| Get screensaver activated event type. | |
| static CEvent::Type | getScreensaverDeactivatedEvent () |
| Get screensaver deactivated event type. | |
| static CEvent::Type | getHotKeyDownEvent () |
| Get hot key down event type. Event data is CHotKeyInfo*. | |
| static CEvent::Type | getHotKeyUpEvent () |
| Get hot key up event type. Event data is CHotKeyInfo*. | |
| static CEvent::Type | getFakeInputBeginEvent () |
| Get start of fake input event type. | |
| static CEvent::Type | getFakeInputEndEvent () |
| Get end of fake input event type. | |
| static CEvent::Type | getGameDeviceButtonsEvent () |
| Get game device buttons event type. | |
| static CEvent::Type | getGameDeviceSticksEvent () |
| Get game device sticks event type. | |
| static CEvent::Type | getGameDeviceTriggersEvent () |
| Get game device triggers event type. | |
| static CEvent::Type | getGameDeviceTimingReqEvent () |
| Get game device timing request event type. | |
Primary screen interface.
This interface defines the methods common to all platform dependent primary screen implementations.
Definition at line 33 of file IPrimaryScreen.h.
| virtual void IPrimaryScreen::fakeInputBegin | ( | ) | [pure virtual] |
Prepare to synthesize input on primary screen.
Prepares the primary screen to receive synthesized input. We do not want to receive this synthesized input as user input so this method ensures that we ignore it. Calls to fakeInputBegin() may not be nested.
| virtual void IPrimaryScreen::fakeInputEnd | ( | ) | [pure virtual] |
Done synthesizing input on primary screen.
Undoes whatever fakeInputBegin() did.
| virtual void IPrimaryScreen::getCursorCenter | ( | SInt32 & | x, | |
| SInt32 & | y | |||
| ) | const [pure virtual] |
Get cursor center position.
Return the cursor center position which is where we park the cursor to compute cursor motion deltas and should be far from the edges of the screen, typically the center.
| virtual SInt32 IPrimaryScreen::getJumpZoneSize | ( | ) | const [pure virtual] |
Get jump zone size.
Return the jump zone size, the size of the regions on the edges of the screen that cause the cursor to jump to another screen.
| CEvent::Type IPrimaryScreen::getMotionOnPrimaryEvent | ( | ) | [static] |
Get mouse motion on the primary screen event type.
Event data is CMotionInfo* and the values are an absolute position.
Definition at line 58 of file IPrimaryScreen.cpp.
Referenced by CServer::CServer().
| CEvent::Type IPrimaryScreen::getMotionOnSecondaryEvent | ( | ) | [static] |
Get mouse motion on a secondary screen event type.
Event data is CMotionInfo* and the values are motion deltas not absolute coordinates.
Definition at line 65 of file IPrimaryScreen.cpp.
Referenced by CServer::CServer().
| virtual bool IPrimaryScreen::isAnyMouseButtonDown | ( | ) | const [pure virtual] |
Test if mouse is pressed.
Return true if any mouse button is currently pressed. Ideally, "current" means up to the last processed event but it can mean the current physical mouse button state.
| virtual void IPrimaryScreen::reconfigure | ( | UInt32 | activeSides | ) | [pure virtual] |
Update configuration.
This is called when the configuration has changed. activeSides is a bitmask of EDirectionMask indicating which sides of the primary screen are linked to clients. Override to handle the possible change in jump zones.
| virtual UInt32 IPrimaryScreen::registerHotKey | ( | KeyID | key, | |
| KeyModifierMask | mask | |||
| ) | [pure virtual] |
Register a system hotkey.
Registers a system-wide hotkey. The screen should arrange for an event to be delivered to itself when the hot key is pressed or released. When that happens the screen should post a getHotKeyDownEvent() or getHotKeyUpEvent(), respectively. The hot key is key key with exactly the modifiers mask. Returns 0 on failure otherwise an id that can be used to unregister the hotkey.
A hot key is a set of modifiers and a key, which may itself be a modifier. The hot key is pressed when the hot key's modifiers and only those modifiers are logically down (active) and the key is pressed. The hot key is released when the key is released, regardless of the modifiers.
The hot key event should be generated no matter what window or application has the focus. No other window or application should receive the key press or release events (they can and should see the modifier key events). When the key is a modifier, it's acceptable to allow the user to press the modifiers in any order or to require the user to press the given key last.
| virtual void IPrimaryScreen::unregisterHotKey | ( | UInt32 | id | ) | [pure virtual] |
Unregister a system hotkey.
Unregisters a previously registered hot key.
| virtual void IPrimaryScreen::warpCursor | ( | SInt32 | x, | |
| SInt32 | y | |||
| ) | [pure virtual] |
Warp cursor.
Warp the cursor to the absolute coordinates x,y. Also discard input events up to and including the warp before returning.
1.7.1