-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCSelfHandler.h
More file actions
executable file
·35 lines (31 loc) · 840 Bytes
/
CSelfHandler.h
File metadata and controls
executable file
·35 lines (31 loc) · 840 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#include "IScreenHandler.h"
#include "CSem.h"
#include "CInputGrabberFactory.h"
#include <thread>
#include "CSocket.h"
#include <atomic>
class CSelfHandler: public IScreenHandlerIn{
public:
void SendRelativeMouseInput(int nDelX, int nDelY, bool bIsWheel);
void SendExactMouseInput(int nX, int nY);
void SendKeyboardInput(unsigned char ucKey, bool bIsPressed);
void getMousePos(int& nX, int& nY);
CSelfHandler(unsigned short port);
private:
void ActiveFunction();
void SocketListener();
CSem sem;
IInputGrabberIn* itsInputGrabber;
std::thread* threadCaller;
std::thread* threadSocketListener;
int nExactPosInputX;
int nExactPosInputY;
int m_wheelDeltaX;
int m_wheelDeltaY;
unsigned char key;
bool isPressed;
std::atomic<bool> mouseCall;
std::atomic<bool> keyCall;
std::atomic<bool> wheelCall;
CSocket* itsSocket;
};