CPrimaryClient.h

00001 /*
00002  * synergy -- mouse and keyboard sharing utility
00003  * Copyright (C) 2002 Chris Schoeneman
00004  * 
00005  * This package is free software; you can redistribute it and/or
00006  * modify it under the terms of the GNU General Public License
00007  * found in the file COPYING that should have accompanied this file.
00008  * 
00009  * This package is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  * GNU General Public License for more details.
00013  */
00014 
00015 #ifndef CPRIMARYCLIENT_H
00016 #define CPRIMARYCLIENT_H
00017 
00018 #include "CBaseClientProxy.h"
00019 #include "ProtocolTypes.h"
00020 
00021 class CScreen;
00022 
00024 
00029 class CPrimaryClient : public CBaseClientProxy {
00030 public:
00034     CPrimaryClient(const CString& name, CScreen* screen);
00035     ~CPrimaryClient();
00036 
00038 
00039 
00041 
00044     void                reconfigure(UInt32 activeSides);
00045 
00047 
00051     UInt32              registerHotKey(KeyID key, KeyModifierMask mask);
00052 
00054 
00057     void                unregisterHotKey(UInt32 id);
00058 
00060 
00066     void                fakeInputBegin();
00067 
00069 
00072     void                fakeInputEnd();
00073 
00075 
00076 
00077 
00079 
00083     SInt32              getJumpZoneSize() const;
00084 
00086 
00091     void                getCursorCenter(SInt32& x, SInt32& y) const;
00092     
00094 
00097     KeyModifierMask     getToggleMask() const;
00098 
00100 
00103     bool                isLockedToScreen() const;
00104 
00106 
00107     // FIXME -- these probably belong on IScreen
00108     virtual void        enable();
00109     virtual void        disable();
00110 
00111     // IScreen overrides
00112     virtual void*       getEventTarget() const;
00113     virtual bool        getClipboard(ClipboardID id, IClipboard*) const;
00114     virtual void        getShape(SInt32& x, SInt32& y,
00115                             SInt32& width, SInt32& height) const;
00116     virtual void        getCursorPos(SInt32& x, SInt32& y) const;
00117 
00118     // IClient overrides
00119     virtual void        enter(SInt32 xAbs, SInt32 yAbs,
00120                             UInt32 seqNum, KeyModifierMask mask,
00121                             bool forScreensaver);
00122     virtual bool        leave();
00123     virtual void        setClipboard(ClipboardID, const IClipboard*);
00124     virtual void        grabClipboard(ClipboardID);
00125     virtual void        setClipboardDirty(ClipboardID, bool);
00126     virtual void        keyDown(KeyID, KeyModifierMask, KeyButton);
00127     virtual void        keyRepeat(KeyID, KeyModifierMask,
00128                             SInt32 count, KeyButton);
00129     virtual void        keyUp(KeyID, KeyModifierMask, KeyButton);
00130     virtual void        mouseDown(ButtonID);
00131     virtual void        mouseUp(ButtonID);
00132     virtual void        mouseMove(SInt32 xAbs, SInt32 yAbs);
00133     virtual void        mouseRelativeMove(SInt32 xRel, SInt32 yRel);
00134     virtual void        mouseWheel(SInt32 xDelta, SInt32 yDelta);
00135     virtual void        screensaver(bool activate);
00136     virtual void        resetOptions();
00137     virtual void        setOptions(const COptionsList& options);
00138 
00139 private:
00140     CScreen*            m_screen;
00141     bool                m_clipboardDirty[kClipboardEnd];
00142     SInt32              m_fakeInputCount;
00143 };
00144 
00145 #endif

Generated on Fri Nov 6 00:18:45 2009 for synergy-plus by  doxygen 1.4.7