-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathvnc.h
23 lines (18 loc) · 770 Bytes
/
vnc.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#ifndef VNC_H
#define VNC_H
#include <stdbool.h>
#include <rfb/rfbclient.h>
#define VNC_POLL_TIMEOUT_USEC 100000 /* A lower value enables faster termination of VNC IO loop */
/* Connect to remote frame-buffer and handle control/image IO. */
struct vnc {
struct _rfbClient *conn;
bool connected, cont_io_loop;
pthread_t io_loop;
};
/* Connect to server and immediately begin message loop in a separate thread. Return false only on failure. */
bool vnc_init(struct vnc *v, int argc, char **argv);
/* Close VNC connection and free all resources, including the VNC client itself. */
void vnc_destroy(struct vnc *v);
/* Translate a key code as read by libcaca to its corresponding VNC key code. Return -1 only if no translation. */
int cacakey2vnc(int keych);
#endif