mirror of
https://github.com/debauchee/barrier.git
synced 2024-11-27 00:42:30 +03:00
f15c9df85b
clipboard owner support (MS windows done, X windows partial) added key transfer on ms windows mutex fixes in CClient (had race conditions) faster debug output in ms windows changed temporary screen name to "secondary" network fixes on ms windows (poll returned wrong result) fixed transparent cursor on ms windows
61 lines
1.1 KiB
C++
61 lines
1.1 KiB
C++
#ifndef CCLIENT_H
|
|
#define CCLIENT_H
|
|
|
|
#include "CMutex.h"
|
|
#include "CString.h"
|
|
#include "BasicTypes.h"
|
|
|
|
class CNetworkAddress;
|
|
class IInputStream;
|
|
class IOutputStream;
|
|
class ISecondaryScreen;
|
|
|
|
class CClient {
|
|
public:
|
|
CClient(const CString& clientName);
|
|
~CClient();
|
|
|
|
// manipulators
|
|
|
|
void run(const CNetworkAddress& serverAddress);
|
|
|
|
// handle events on client's screen
|
|
void onClipboardChanged();
|
|
|
|
// accessors
|
|
|
|
|
|
private:
|
|
void runSession(void*);
|
|
|
|
// open/close the primary screen
|
|
void openSecondaryScreen();
|
|
void closeSecondaryScreen();
|
|
|
|
// message handlers
|
|
void onEnter();
|
|
void onLeave();
|
|
void onGrabClipboard();
|
|
void onScreenSaver();
|
|
void onQueryInfo();
|
|
void onQueryClipboard();
|
|
void onSetClipboard();
|
|
void onKeyDown();
|
|
void onKeyRepeat();
|
|
void onKeyUp();
|
|
void onMouseDown();
|
|
void onMouseUp();
|
|
void onMouseMove();
|
|
void onMouseWheel();
|
|
|
|
private:
|
|
CMutex m_mutex;
|
|
CString m_name;
|
|
IInputStream* m_input;
|
|
IOutputStream* m_output;
|
|
ISecondaryScreen* m_screen;
|
|
const CNetworkAddress* m_serverAddress;
|
|
};
|
|
|
|
#endif
|