#include <CXWindowsScreen.h>
Inherits CPlatformScreen.
Inheritance diagram for CXWindowsScreen:
Public Member Functions | |
CXWindowsScreen (const char *displayName, bool isPrimary, int mouseScrollDelta=0) | |
virtual void * | getEventTarget () const |
Get event target. | |
virtual bool | getClipboard (ClipboardID id, IClipboard *) const |
Get clipboard. | |
virtual void | getShape (SInt32 &x, SInt32 &y, SInt32 &width, SInt32 &height) const |
Get screen shape. | |
virtual void | getCursorPos (SInt32 &x, SInt32 &y) const |
Get cursor position. | |
virtual void | reconfigure (UInt32 activeSides) |
Update configuration. | |
virtual void | warpCursor (SInt32 x, SInt32 y) |
Warp cursor. | |
virtual UInt32 | registerHotKey (KeyID key, KeyModifierMask mask) |
Register a system hotkey. | |
virtual void | unregisterHotKey (UInt32 id) |
Unregister a system hotkey. | |
virtual void | fakeInputBegin () |
Prepare to synthesize input on primary screen. | |
virtual void | fakeInputEnd () |
Done synthesizing input on primary screen. | |
virtual SInt32 | getJumpZoneSize () const |
Get jump zone size. | |
virtual bool | isAnyMouseButtonDown () const |
Test if mouse is pressed. | |
virtual void | getCursorCenter (SInt32 &x, SInt32 &y) const |
Get cursor center position. | |
virtual void | fakeMouseButton (ButtonID id, bool press) const |
Fake mouse press/release. | |
virtual void | fakeMouseMove (SInt32 x, SInt32 y) const |
Fake mouse move. | |
virtual void | fakeMouseRelativeMove (SInt32 dx, SInt32 dy) const |
Fake mouse move. | |
virtual void | fakeMouseWheel (SInt32 xDelta, SInt32 yDelta) const |
Fake mouse wheel. | |
virtual void | enable () |
Enable screen. | |
virtual void | disable () |
Disable screen. | |
virtual void | enter () |
Enter screen. | |
virtual bool | leave () |
Leave screen. | |
virtual bool | setClipboard (ClipboardID, const IClipboard *) |
Set clipboard. | |
virtual void | checkClipboards () |
Check clipboard owner. | |
virtual void | openScreensaver (bool notify) |
Open screen saver. | |
virtual void | closeScreensaver () |
Close screen saver. | |
virtual void | screensaver (bool activate) |
Activate/deactivate screen saver. | |
virtual void | resetOptions () |
Notify of options changes. | |
virtual void | setOptions (const COptionsList &options) |
Notify of options changes. | |
virtual void | setSequenceNumber (UInt32) |
Set clipboard sequence number. | |
virtual bool | isPrimary () const |
Test if is primary screen. | |
Protected Member Functions | |
virtual void | handleSystemEvent (const CEvent &, void *) |
Handle system event. | |
virtual void | updateButtons () |
Update mouse buttons. | |
virtual IKeyState * | getKeyState () const |
Get the key state. |
Definition at line 32 of file CXWindowsScreen.h.
|
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. Implements CPlatformScreen. Definition at line 374 of file CXWindowsScreen.cpp. |
|
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. Implements CPlatformScreen. Definition at line 389 of file CXWindowsScreen.cpp. References CXWindowsScreenSaver::enable(). |
|
Disable screen. Undoes the operations in enable() and events should no longer be reported. Implements CPlatformScreen. Definition at line 215 of file CXWindowsScreen.cpp. |
|
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. Implements CPlatformScreen. Definition at line 193 of file CXWindowsScreen.cpp. References fakeMouseMove(), and CXWindowsKeyState::setAutoRepeat(). |
|
Enter screen. Called when the user navigates to this screen. Implements CPlatformScreen. Definition at line 233 of file CXWindowsScreen.cpp. References screensaver(), and CXWindowsKeyState::setAutoRepeat(). |
|
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 Implements CPlatformScreen. Definition at line 746 of file CXWindowsScreen.cpp. |
|
Done synthesizing input on primary screen.
Undoes whatever Implements CPlatformScreen. Definition at line 752 of file CXWindowsScreen.cpp. |
|
Fake mouse press/release.
Synthesize a press or release of mouse button Implements CPlatformScreen. Definition at line 787 of file CXWindowsScreen.cpp. |
|
Fake mouse move.
Synthesize a mouse move to the absolute coordinates Implements CPlatformScreen. Definition at line 798 of file CXWindowsScreen.cpp. |
|
Fake mouse move.
Synthesize a mouse move to the relative coordinates Implements CPlatformScreen. Definition at line 811 of file CXWindowsScreen.cpp. |
|
Fake mouse wheel.
Synthesize a mouse wheel event of amount Implements CPlatformScreen. Definition at line 824 of file CXWindowsScreen.cpp. |
|
Get clipboard.
Save the contents of the clipboard indicated by Implements CPlatformScreen. Definition at line 448 of file CXWindowsScreen.cpp. References IClipboard::copy(), and CXWindowsUtil::getCurrentTime(). |
|
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. Implements CPlatformScreen. Definition at line 780 of file CXWindowsScreen.cpp. |
|
Get cursor position.
Return the current position of the cursor in Implements CPlatformScreen. Definition at line 475 of file CXWindowsScreen.cpp. |
|
Get event target. Returns the target used for events created by this object. Implements CPlatformScreen. Definition at line 442 of file CXWindowsScreen.cpp. |
|
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. Implements CPlatformScreen. Definition at line 758 of file CXWindowsScreen.cpp. |
|
Get the key state. Subclasses must implement this method to return the platform specific key state object that each subclass must have. Implements CPlatformScreen. Definition at line 1097 of file CXWindowsScreen.cpp. |
|
Get screen shape.
Return the position of the upper-left corner of the screen in Implements CPlatformScreen. Definition at line 466 of file CXWindowsScreen.cpp. |
|
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)); 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
The target of all events should be the value returned by Implements CPlatformScreen. Definition at line 1113 of file CXWindowsScreen.cpp. References CXWindowsClipboard::addRequest(), IScreen::getClipboardGrabbedEvent(), CEvent::getData(), CXWindowsScreenSaver::handleXEvent(), CXWindowsClipboard::lost(), CXWindowsKeyState::mapModifiersFromX(), CKeyState::onKey(), and CXWindowsKeyState::setActiveGroup(). |
|
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. Implements CPlatformScreen. Definition at line 764 of file CXWindowsScreen.cpp. |
|
Test if is primary screen. Return true iff this screen is a primary screen. Implements CPlatformScreen. Definition at line 436 of file CXWindowsScreen.cpp. |
|
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. Implements CPlatformScreen. Definition at line 290 of file CXWindowsScreen.cpp. References fakeMouseMove(), and warpCursor(). |
|
Open screen saver.
Open the screen saver. If Implements CPlatformScreen. Definition at line 380 of file CXWindowsScreen.cpp. References CXWindowsScreenSaver::disable(). |
|
Update configuration.
This is called when the configuration has changed. Implements CPlatformScreen. Definition at line 492 of file CXWindowsScreen.cpp. |
|
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 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. Implements CPlatformScreen. Definition at line 519 of file CXWindowsScreen.cpp. References CXWindowsKeyState::mapKeyToKeycodes(), and CXWindowsKeyState::mapModifiersToX(). |
|
Notify of options changes. Reset all options to their default values. Implements CPlatformScreen. Definition at line 408 of file CXWindowsScreen.cpp. |
|
Activate/deactivate screen saver.
Forcibly activate the screen saver if Implements CPlatformScreen. Definition at line 397 of file CXWindowsScreen.cpp. References CXWindowsScreenSaver::activate(), and CXWindowsScreenSaver::deactivate(). Referenced by enter(). |
|
Set clipboard.
Set the contents of the system clipboard indicated by Implements CPlatformScreen. Definition at line 347 of file CXWindowsScreen.cpp. References CXWindowsClipboard::close(), IClipboard::copy(), CXWindowsClipboard::empty(), CXWindowsUtil::getCurrentTime(), and CXWindowsClipboard::open(). |
|
Notify of options changes.
Set options to given values. Ignore unknown options and don't modify options that aren't given in Implements CPlatformScreen. Definition at line 415 of file CXWindowsScreen.cpp. |
|
Set clipboard sequence number. Sets the sequence number to use in subsequent clipboard events. Implements CPlatformScreen. Definition at line 430 of file CXWindowsScreen.cpp. |
|
Unregister a system hotkey. Unregisters a previously registered hot key. Implements CPlatformScreen. Definition at line 714 of file CXWindowsScreen.cpp. |
|
Update mouse buttons. Subclasses must implement this method to update their internal mouse button mapping and, if desired, state tracking. Implements CPlatformScreen. Definition at line 1819 of file CXWindowsScreen.cpp. |
|
Warp cursor.
Warp the cursor to the absolute coordinates Implements CPlatformScreen. Definition at line 498 of file CXWindowsScreen.cpp. Referenced by leave(). |