Classes | Public Member Functions | Protected Member Functions

CXWindowsScreen Class Reference

Implementation of IPlatformScreen for X11. More...

#include <CXWindowsScreen.h>

Inherits CPlatformScreen.

List of all members.

Classes

struct  CHotKeyItem
class  CKeyEventFilter

Public Member Functions

 CXWindowsScreen (const char *displayName, bool isPrimary, bool disableXInitThreads, int mouseScrollDelta, IEventQueue &eventQueue)
virtual void * getEventTarget () const
virtual bool getClipboard (ClipboardID id, IClipboard *) const
virtual void getShape (SInt32 &x, SInt32 &y, SInt32 &width, SInt32 &height) const
virtual void getCursorPos (SInt32 &x, SInt32 &y) const
virtual void reconfigure (UInt32 activeSides)
virtual void warpCursor (SInt32 x, SInt32 y)
virtual UInt32 registerHotKey (KeyID key, KeyModifierMask mask)
virtual void unregisterHotKey (UInt32 id)
virtual void fakeInputBegin ()
virtual void fakeInputEnd ()
virtual SInt32 getJumpZoneSize () const
virtual bool isAnyMouseButtonDown () const
virtual void getCursorCenter (SInt32 &x, SInt32 &y) const
virtual void gameDeviceTimingResp (UInt16 freq)
virtual void fakeMouseButton (ButtonID id, bool press)
virtual void fakeMouseMove (SInt32 x, SInt32 y) const
virtual void fakeMouseRelativeMove (SInt32 dx, SInt32 dy) const
virtual void fakeMouseWheel (SInt32 xDelta, SInt32 yDelta) const
virtual void fakeGameDeviceButtons (GameDeviceID id, GameDeviceButton buttons) const
virtual void fakeGameDeviceSticks (GameDeviceID id, SInt16 x1, SInt16 y1, SInt16 x2, SInt16 y2) const
virtual void fakeGameDeviceTriggers (GameDeviceID id, UInt8 t1, UInt8 t2) const
virtual void queueGameDeviceTimingReq () const
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.
virtual void gameDeviceFeedback (GameDeviceID id, UInt16 m1, UInt16 m2)

Protected Member Functions

virtual void handleSystemEvent (const CEvent &, void *)
 Handle system event.
virtual void updateButtons ()
 Update mouse buttons.
virtual IKeyStategetKeyState () const
 Get the key state.

Detailed Description

Implementation of IPlatformScreen for X11.

Definition at line 37 of file CXWindowsScreen.h.


Member Function Documentation

void CXWindowsScreen::checkClipboards (  )  [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.

Implements CPlatformScreen.

Definition at line 405 of file CXWindowsScreen.cpp.

void CXWindowsScreen::closeScreensaver (  )  [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.

Implements CPlatformScreen.

Definition at line 420 of file CXWindowsScreen.cpp.

References CXWindowsScreenSaver::enable().

void CXWindowsScreen::disable (  )  [virtual]

Disable screen.

Undoes the operations in enable() and events should no longer be reported.

Implements CPlatformScreen.

Definition at line 244 of file CXWindowsScreen.cpp.

void CXWindowsScreen::enable (  )  [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.

Implements CPlatformScreen.

Definition at line 222 of file CXWindowsScreen.cpp.

References CXWindowsKeyState::setAutoRepeat().

void CXWindowsScreen::enter (  )  [virtual]

Enter screen.

Called when the user navigates to this screen.

Implements CPlatformScreen.

Definition at line 262 of file CXWindowsScreen.cpp.

References screensaver(), and CXWindowsKeyState::setAutoRepeat().

IKeyState * CXWindowsScreen::getKeyState (  )  const [protected, virtual]

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 1155 of file CXWindowsScreen.cpp.

void CXWindowsScreen::handleSystemEvent ( const CEvent event,
void *   
) [protected, 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().

Implements CPlatformScreen.

Definition at line 1171 of file CXWindowsScreen.cpp.

References CXWindowsClipboard::addRequest(), IScreen::getClipboardGrabbedEvent(), CXWindowsScreenSaver::handleXEvent(), CXWindowsClipboard::lost(), CXWindowsKeyState::mapModifiersFromX(), CKeyState::onKey(), and CXWindowsKeyState::setActiveGroup().

bool CXWindowsScreen::isPrimary (  )  const [virtual]

Test if is primary screen.

Return true iff this screen is a primary screen.

Implements CPlatformScreen.

Definition at line 467 of file CXWindowsScreen.cpp.

bool CXWindowsScreen::leave (  )  [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.

Implements CPlatformScreen.

Definition at line 321 of file CXWindowsScreen.cpp.

void CXWindowsScreen::openScreensaver ( bool  notify  )  [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().

Implements CPlatformScreen.

Definition at line 411 of file CXWindowsScreen.cpp.

References CXWindowsScreenSaver::disable().

void CXWindowsScreen::resetOptions (  )  [virtual]

Notify of options changes.

Reset all options to their default values.

Implements CPlatformScreen.

Definition at line 439 of file CXWindowsScreen.cpp.

void CXWindowsScreen::screensaver ( bool  activate  )  [virtual]

Activate/deactivate screen saver.

Forcibly activate the screen saver if activate is true otherwise forcibly deactivate it.

Implements CPlatformScreen.

Definition at line 428 of file CXWindowsScreen.cpp.

References CXWindowsScreenSaver::activate(), and CXWindowsScreenSaver::deactivate().

Referenced by enter().

bool CXWindowsScreen::setClipboard ( ClipboardID  id,
const IClipboard  
) [virtual]

Set clipboard.

Set the contents of the system clipboard indicated by id.

Implements CPlatformScreen.

Definition at line 378 of file CXWindowsScreen.cpp.

References CXWindowsClipboard::close(), IClipboard::copy(), CXWindowsClipboard::empty(), and CXWindowsUtil::getCurrentTime().

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

Notify of options changes.

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

Implements CPlatformScreen.

Definition at line 446 of file CXWindowsScreen.cpp.

void CXWindowsScreen::setSequenceNumber ( UInt32   )  [virtual]

Set clipboard sequence number.

Sets the sequence number to use in subsequent clipboard events.

Implements CPlatformScreen.

Definition at line 461 of file CXWindowsScreen.cpp.

void CXWindowsScreen::updateButtons (  )  [protected, virtual]

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 1941 of file CXWindowsScreen.cpp.


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