Deskflow 1.24.0.365
Keyboard and mouse sharing utility
Loading...
Searching...
No Matches
IPrimaryScreen Class Referenceabstract

Primary screen interface. More...

#include <IPrimaryScreen.h>

Inheritance diagram for IPrimaryScreen:

Classes

class  ButtonInfo
 Button event data. More...
class  MotionInfo
 Motion event data. More...
class  WheelInfo
 Wheel motion event data. More...
class  HotKeyInfo
 Hot key event data. More...
class  EiConnectInfo

Public Member Functions

virtual ~IPrimaryScreen ()=default
manipulators
virtual void reconfigure (uint32_t activeSides)=0
 Update configuration.
virtual uint32_t activeSides ()=0
 activeSides
virtual void warpCursor (int32_t x, int32_t y)=0
 Warp cursor.
virtual uint32_t registerHotKey (KeyID key, KeyModifierMask mask)=0
 Register a system hotkey.
virtual void unregisterHotKey (uint32_t 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 int32_t getJumpZoneSize () const =0
 Get jump zone size.
virtual bool isAnyMouseButtonDown (uint32_t &buttonID) const =0
 Test if mouse is pressed.
virtual void getCursorCenter (int32_t &x, int32_t &y) const =0
 Get cursor center position.

Detailed Description

Primary screen interface.

This interface defines the methods common to all platform dependent primary screen implementations.

Constructor & Destructor Documentation

◆ ~IPrimaryScreen()

virtual IPrimaryScreen::~IPrimaryScreen ( )
virtualdefault

Member Function Documentation

◆ activeSides()

virtual uint32_t IPrimaryScreen::activeSides ( )
pure virtual

activeSides

Returns
a bitmask of DirectionMask indicating which sides of the primary screen are linked to clients

Implemented in deskflow::EiScreen, MSWindowsScreen, OSXScreen, PlatformScreen, and XWindowsScreen.

◆ fakeInputBegin()

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.

Implemented in deskflow::EiScreen, MSWindowsScreen, OSXScreen, PlatformScreen, and XWindowsScreen.

◆ fakeInputEnd()

virtual void IPrimaryScreen::fakeInputEnd ( )
pure virtual

Done synthesizing input on primary screen.

Undoes whatever fakeInputBegin() did.

Implemented in deskflow::EiScreen, MSWindowsScreen, OSXScreen, PlatformScreen, and XWindowsScreen.

◆ getCursorCenter()

virtual void IPrimaryScreen::getCursorCenter ( int32_t & x,
int32_t & 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.

Implemented in MSWindowsScreen, OSXScreen, PlatformScreen, and XWindowsScreen.

◆ getJumpZoneSize()

virtual int32_t 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.

Implemented in deskflow::EiScreen, MSWindowsScreen, OSXScreen, PlatformScreen, and XWindowsScreen.

◆ isAnyMouseButtonDown()

virtual bool IPrimaryScreen::isAnyMouseButtonDown ( uint32_t & buttonID) 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.

Implemented in MSWindowsScreen, OSXScreen, PlatformScreen, and XWindowsScreen.

◆ reconfigure()

virtual void IPrimaryScreen::reconfigure ( uint32_t activeSides)
pure virtual

Update configuration.

This is called when the configuration has changed. activeSides is a bitmask of DirectionMask indicating which sides of the primary screen are linked to clients. Override to handle the possible change in jump zones.

Implemented in MSWindowsScreen, OSXScreen, PlatformScreen, and XWindowsScreen.

◆ registerHotKey()

virtual uint32_t 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.

Implemented in deskflow::EiScreen, MSWindowsScreen, OSXScreen, PlatformScreen, and XWindowsScreen.

◆ unregisterHotKey()

virtual void IPrimaryScreen::unregisterHotKey ( uint32_t id)
pure virtual

Unregister a system hotkey.

Unregisters a previously registered hot key.

Implemented in MSWindowsScreen, OSXScreen, PlatformScreen, and XWindowsScreen.

◆ warpCursor()

virtual void IPrimaryScreen::warpCursor ( int32_t x,
int32_t 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.

Implemented in MSWindowsScreen, OSXScreen, PlatformScreen, and XWindowsScreen.


The documentation for this class was generated from the following file: