CPrimaryClient Class Reference

Primary screen as pseudo-client. More...

#include <CPrimaryClient.h>

Inherits CBaseClientProxy.

Collaboration diagram for CPrimaryClient:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 CPrimaryClient (const CString &name, CScreen *screen)
virtual void enable ()
virtual void disable ()
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 enter (SInt32 xAbs, SInt32 yAbs, UInt32 seqNum, KeyModifierMask mask, bool forScreensaver)
 Enter screen.
virtual bool leave ()
 Leave screen.
virtual void setClipboard (ClipboardID, const IClipboard *)
 Set clipboard.
virtual void grabClipboard (ClipboardID)
 Grab clipboard.
virtual void setClipboardDirty (ClipboardID, bool)
 Mark clipboard dirty.
virtual void keyDown (KeyID, KeyModifierMask, KeyButton)
 Notify of key press.
virtual void keyRepeat (KeyID, KeyModifierMask, SInt32 count, KeyButton)
 Notify of key repeat.
virtual void keyUp (KeyID, KeyModifierMask, KeyButton)
 Notify of key release.
virtual void mouseDown (ButtonID)
 Notify of mouse press.
virtual void mouseUp (ButtonID)
 Notify of mouse release.
virtual void mouseMove (SInt32 xAbs, SInt32 yAbs)
 Notify of mouse motion.
virtual void mouseRelativeMove (SInt32 xRel, SInt32 yRel)
 Notify of mouse motion.
virtual void mouseWheel (SInt32 xDelta, SInt32 yDelta)
 Notify of mouse wheel motion.
virtual void screensaver (bool activate)
 Notify of screen saver change.
virtual void resetOptions ()
 Notify of options changes.
virtual void setOptions (const COptionsList &options)
 Notify of options changes.
manipulators



void reconfigure (UInt32 activeSides)
 Update configuration.
UInt32 registerHotKey (KeyID key, KeyModifierMask mask)
 Register a system hotkey.
void unregisterHotKey (UInt32 id)
 Unregister a system hotkey.
void fakeInputBegin ()
 Prepare to synthesize input on primary screen.
void fakeInputEnd ()
 Done synthesizing input on primary screen.
accessors



SInt32 getJumpZoneSize () const
 Get jump zone size.
void getCursorCenter (SInt32 &x, SInt32 &y) const
 Get cursor center position.
KeyModifierMask getToggleMask () const
 Get toggle key state.
bool isLockedToScreen () const
 Get screen lock state.

Detailed Description

Primary screen as pseudo-client.

The primary screen does not have a client associated with it. This class provides a pseudo-client to allow the primary screen to be treated as if it was a client.

Definition at line 29 of file CPrimaryClient.h.


Constructor & Destructor Documentation

CPrimaryClient::CPrimaryClient ( const CString &  name,
CScreen screen 
)

name is the name of the server and screen is primary screen.

Definition at line 24 of file CPrimaryClient.cpp.


Member Function Documentation

void CPrimaryClient::enter ( SInt32  xAbs,
SInt32  yAbs,
UInt32  seqNum,
KeyModifierMask  mask,
bool  forScreensaver 
) [virtual]

Enter screen.

Enter the screen. The cursor should be warped to xAbs,yAbs. mask is the expected toggle button state and the client should update its state to match. forScreensaver is true iff the screen is being entered because the screen saver is starting. Subsequent clipboard events should report seqNum.

Implements CBaseClientProxy.

Definition at line 136 of file CPrimaryClient.cpp.

References CScreen::enter(), CScreen::setSequenceNumber(), and CScreen::warpCursor().

void CPrimaryClient::fakeInputBegin (  ) 

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() and fakeInputEnd() may be nested; only the outermost have an effect.

Definition at line 59 of file CPrimaryClient.cpp.

References CScreen::fakeInputBegin().

void CPrimaryClient::fakeInputEnd (  ) 

Done synthesizing input on primary screen.

Undoes whatever fakeInputBegin() did.

Definition at line 67 of file CPrimaryClient.cpp.

References CScreen::fakeInputEnd().

bool CPrimaryClient::getClipboard ( ClipboardID  id,
IClipboard  
) const [virtual]

Get clipboard.

Save the contents of the clipboard indicated by id and return true iff successful.

Implements CBaseClientProxy.

Definition at line 105 of file CPrimaryClient.cpp.

References CScreen::getClipboard().

void CPrimaryClient::getCursorCenter ( SInt32 &  x,
SInt32 &  y 
) const

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.

Definition at line 81 of file CPrimaryClient.cpp.

References CScreen::getCursorCenter().

void CPrimaryClient::getCursorPos ( SInt32 &  x,
SInt32 &  y 
) const [virtual]

Get cursor position.

Return the current position of the cursor in x and y.

Implements CBaseClientProxy.

Definition at line 118 of file CPrimaryClient.cpp.

References CScreen::getCursorPos().

void * CPrimaryClient::getEventTarget (  )  const [virtual]

Get event target.

Returns the target used for events created by this object.

Implements CBaseClientProxy.

Definition at line 99 of file CPrimaryClient.cpp.

References CScreen::getEventTarget().

Referenced by CServer::adoptClient(), and CServer::CServer().

SInt32 CPrimaryClient::getJumpZoneSize (  )  const

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.

Definition at line 75 of file CPrimaryClient.cpp.

References CScreen::getJumpZoneSize().

void CPrimaryClient::getShape ( SInt32 &  x,
SInt32 &  y,
SInt32 &  width,
SInt32 &  height 
) const [virtual]

Get screen shape.

Return the position of the upper-left corner of the screen in x and y and the size of the screen in width and height.

Implements CBaseClientProxy.

Definition at line 111 of file CPrimaryClient.cpp.

References CScreen::getShape().

KeyModifierMask CPrimaryClient::getToggleMask (  )  const

Get toggle key state.

Returns the primary screen's current toggle modifier key state.

Definition at line 87 of file CPrimaryClient.cpp.

References CScreen::pollActiveModifiers().

void CPrimaryClient::grabClipboard ( ClipboardID   )  [virtual]

Grab clipboard.

Grab (i.e. take ownership of) the client's clipboard. Since this is called when another client takes ownership of the clipboard it implies that the client's clipboard is out of date.

Implements CBaseClientProxy.

Definition at line 166 of file CPrimaryClient.cpp.

References CScreen::grabClipboard().

bool CPrimaryClient::isLockedToScreen (  )  const

Get screen lock state.

Returns true if the user is locked to the screen.

Definition at line 93 of file CPrimaryClient.cpp.

References CScreen::isLockedToScreen().

void CPrimaryClient::keyDown ( KeyID  id,
KeyModifierMask  ,
KeyButton   
) [virtual]

Notify of key press.

Synthesize key events to generate a press of key id. If possible match the given modifier mask. The KeyButton identifies the physical key on the server that generated this key down. The client must ensure that a key up or key repeat that uses the same KeyButton will synthesize an up or repeat for the same client key synthesized by keyDown().

Implements CBaseClientProxy.

Definition at line 182 of file CPrimaryClient.cpp.

void CPrimaryClient::keyRepeat ( KeyID  id,
KeyModifierMask  ,
SInt32  count,
KeyButton   
) [virtual]

Notify of key repeat.

Synthesize key events to generate a press and release of key id count times. If possible match the given modifier mask.

Implements CBaseClientProxy.

Definition at line 194 of file CPrimaryClient.cpp.

void CPrimaryClient::keyUp ( KeyID  id,
KeyModifierMask  ,
KeyButton   
) [virtual]

Notify of key release.

Synthesize key events to generate a release of key id. If possible match the given modifier mask.

Implements CBaseClientProxy.

Definition at line 200 of file CPrimaryClient.cpp.

bool CPrimaryClient::leave (  )  [virtual]

Leave screen.

Leave the screen. Return false iff the user may not leave the client's screen (because, for example, a button is down).

Implements CBaseClientProxy.

Definition at line 147 of file CPrimaryClient.cpp.

References CScreen::leave().

void CPrimaryClient::mouseDown ( ButtonID  id  )  [virtual]

Notify of mouse press.

Synthesize mouse events to generate a press of mouse button id.

Implements CBaseClientProxy.

Definition at line 212 of file CPrimaryClient.cpp.

void CPrimaryClient::mouseMove ( SInt32  xAbs,
SInt32  yAbs 
) [virtual]

Notify of mouse motion.

Synthesize mouse events to generate mouse motion to the absolute screen position xAbs,yAbs.

Implements CBaseClientProxy.

Definition at line 224 of file CPrimaryClient.cpp.

References CScreen::warpCursor().

void CPrimaryClient::mouseRelativeMove ( SInt32  xRel,
SInt32  yRel 
) [virtual]

Notify of mouse motion.

Synthesize mouse events to generate mouse motion by the relative amount xRel,yRel.

Implements CBaseClientProxy.

Definition at line 230 of file CPrimaryClient.cpp.

void CPrimaryClient::mouseUp ( ButtonID  id  )  [virtual]

Notify of mouse release.

Synthesize mouse events to generate a release of mouse button id.

Implements CBaseClientProxy.

Definition at line 218 of file CPrimaryClient.cpp.

void CPrimaryClient::mouseWheel ( SInt32  xDelta,
SInt32  yDelta 
) [virtual]

Notify of mouse wheel motion.

Synthesize mouse events to generate mouse wheel motion of xDelta and yDelta. Deltas are positive for motion away from the user or to the right and negative for motion towards the user or to the left. Each wheel click should generate a delta of +/-120.

Implements CBaseClientProxy.

Definition at line 236 of file CPrimaryClient.cpp.

void CPrimaryClient::reconfigure ( UInt32  activeSides  ) 

Update configuration.

Handles reconfiguration of jump zones.

Definition at line 41 of file CPrimaryClient.cpp.

References CScreen::reconfigure().

Referenced by CServer::setConfig().

UInt32 CPrimaryClient::registerHotKey ( KeyID  key,
KeyModifierMask  mask 
)

Register a system hotkey.

Registers a system-wide hotkey for key key with modifiers mask. Returns an id used to unregister the hotkey.

Definition at line 47 of file CPrimaryClient.cpp.

References CScreen::registerHotKey().

void CPrimaryClient::resetOptions (  )  [virtual]

Notify of options changes.

Reset all options to their default values.

Implements CBaseClientProxy.

Definition at line 248 of file CPrimaryClient.cpp.

References CScreen::resetOptions().

void CPrimaryClient::setClipboard ( ClipboardID  ,
const IClipboard  
) [virtual]

Set clipboard.

Update the client's clipboard. This implies that the client's clipboard is now up to date. If the client's clipboard was already known to be up to date then this may do nothing. data has marshalled clipboard data.

Implements CBaseClientProxy.

Definition at line 153 of file CPrimaryClient.cpp.

References CScreen::setClipboard().

void CPrimaryClient::setClipboardDirty ( ClipboardID  ,
bool  dirty 
) [virtual]

Mark clipboard dirty.

Mark the client's clipboard as dirty (out of date) or clean (up to date).

Implements CBaseClientProxy.

Definition at line 176 of file CPrimaryClient.cpp.

void CPrimaryClient::setOptions ( const COptionsList &  options  )  [virtual]

Notify of options changes.

Set options to given values. Ignore unknown options and don't modify our options that aren't given in options.

Implements CBaseClientProxy.

Definition at line 254 of file CPrimaryClient.cpp.

References CScreen::setOptions().

void CPrimaryClient::unregisterHotKey ( UInt32  id  ) 

Unregister a system hotkey.

Unregisters a previously registered hot key.

Definition at line 53 of file CPrimaryClient.cpp.

References CScreen::unregisterHotKey().


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

Generated on 12 Nov 2010 for synergy-plus by  doxygen 1.6.1