-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathvncclient.h
More file actions
39 lines (27 loc) · 745 Bytes
/
vncclient.h
File metadata and controls
39 lines (27 loc) · 745 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
36
37
38
39
#ifndef VNCCLIENT_H
#define VNCCLIENT_H
#include <rfb/rfbclient.h>
#include <QImage>
#include <QThread>
class VncClient : public QThread {
Q_OBJECT
public:
explicit VncClient(QString hostName, int port, QString password);
QString hostName;
int port;
QString password;
uint8_t* frameBuffer = NULL;
int colorDepth;
void close();
void sendPointerEvent(int x, int y, int buttonMask);
void sendKeyEvent(int key, bool upOrDown);
private:
rfbClient* cl;
bool running = true;
void run() override;
signals:
void updateImageEvent(QImage image, int x, int y, int w, int h);
void frameUpdateEvent(uint8_t* frameBuffer, int x, int y, int w, int h);
void screenSizeEvent(int w, int h);
};
#endif // VNCCLIENT_H