LibVNCServer/LibVNCClient
SDLvncviewer.c

Once built, you can run it via SDLvncviewer <remote-host>.

#include <SDL.h>
#include <signal.h>
#include <rfb/rfbclient.h>
struct { int sdl; int rfb; } buttonMapping[]={
{0,0}
};
struct { char mask; int bits_stored; } utf8Mapping[]= {
{0b00111111, 6},
{0b01111111, 7},
{0b00011111, 5},
{0b00001111, 4},
{0b00000111, 3},
{0,0}
};
static int enableResizable = 1, viewOnly, listenLoop, buttonMask;
SDL_Texture *sdlTexture;
SDL_Renderer *sdlRenderer;
SDL_Window *sdlWindow;
/* client's pointer position */
int x,y;
static int rightAltKeyDown, leftAltKeyDown;
static rfbBool resize(rfbClient* client) {
if (enableResizable)
sdlFlags |= SDL_WINDOW_RESIZABLE;
/* (re)create the surface used as the client's framebuffer */
SDL_FreeSurface(rfbClientGetClientData(client, SDL_Init));
SDL_Surface* sdl=SDL_CreateRGBSurface(0,
depth,
0,0,0,0);
if(!sdl)
rfbClientErr("resize: error creating surface: %s\n", SDL_GetError());
client->width = sdl->pitch / (depth / 8);
client->format.redShift=sdl->format->Rshift;
client->format.greenShift=sdl->format->Gshift;
client->format.blueShift=sdl->format->Bshift;
/* create or resize the window */
if(!sdlWindow) {
sdlWindow = SDL_CreateWindow(client->desktopName,
SDL_WINDOWPOS_UNDEFINED,
SDL_WINDOWPOS_UNDEFINED,
if(!sdlWindow)
rfbClientErr("resize: error creating window: %s\n", SDL_GetError());
} else {
SDL_SetWindowSize(sdlWindow, width, height);
}
/* create the renderer if it does not already exist */
if(!sdlRenderer) {
sdlRenderer = SDL_CreateRenderer(sdlWindow, -1, 0);
rfbClientErr("resize: error creating renderer: %s\n", SDL_GetError());
SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "linear"); /* make the scaled rendering look smoother. */
}
SDL_RenderSetLogicalSize(sdlRenderer, width, height); /* this is a departure from the SDL1.2-based version, but more in the sense of a VNC viewer in keeeping aspect ratio */
/* (re)create the texture that sits in between the surface->pixels and the renderer */
SDL_DestroyTexture(sdlTexture);
sdlTexture = SDL_CreateTexture(sdlRenderer,
SDL_PIXELFORMAT_ARGB8888,
SDL_TEXTUREACCESS_STREAMING,
rfbClientErr("resize: error creating texture: %s\n", SDL_GetError());
return TRUE;
}
static rfbKeySym SDL_key2rfbKeySym(SDL_KeyboardEvent* e) {
rfbKeySym k = 0;
SDL_Keycode sym = e->keysym.sym;
switch (sym) {
case SDLK_BACKSPACE: k = XK_BackSpace; break;
case SDLK_TAB: k = XK_Tab; break;
case SDLK_CLEAR: k = XK_Clear; break;
case SDLK_RETURN: k = XK_Return; break;
case SDLK_PAUSE: k = XK_Pause; break;
case SDLK_ESCAPE: k = XK_Escape; break;
case SDLK_DELETE: k = XK_Delete; break;
case SDLK_KP_0: k = XK_KP_0; break;
case SDLK_KP_1: k = XK_KP_1; break;
case SDLK_KP_2: k = XK_KP_2; break;
case SDLK_KP_3: k = XK_KP_3; break;
case SDLK_KP_4: k = XK_KP_4; break;
case SDLK_KP_5: k = XK_KP_5; break;
case SDLK_KP_6: k = XK_KP_6; break;
case SDLK_KP_7: k = XK_KP_7; break;
case SDLK_KP_8: k = XK_KP_8; break;
case SDLK_KP_9: k = XK_KP_9; break;
case SDLK_KP_PERIOD: k = XK_KP_Decimal; break;
case SDLK_KP_DIVIDE: k = XK_KP_Divide; break;
case SDLK_KP_MULTIPLY: k = XK_KP_Multiply; break;
case SDLK_KP_MINUS: k = XK_KP_Subtract; break;
case SDLK_KP_PLUS: k = XK_KP_Add; break;
case SDLK_KP_ENTER: k = XK_KP_Enter; break;
case SDLK_KP_EQUALS: k = XK_KP_Equal; break;
case SDLK_UP: k = XK_Up; break;
case SDLK_DOWN: k = XK_Down; break;
case SDLK_RIGHT: k = XK_Right; break;
case SDLK_LEFT: k = XK_Left; break;
case SDLK_INSERT: k = XK_Insert; break;
case SDLK_HOME: k = XK_Home; break;
case SDLK_END: k = XK_End; break;
case SDLK_PAGEUP: k = XK_Page_Up; break;
case SDLK_PAGEDOWN: k = XK_Page_Down; break;
case SDLK_F1: k = XK_F1; break;
case SDLK_F2: k = XK_F2; break;
case SDLK_F3: k = XK_F3; break;
case SDLK_F4: k = XK_F4; break;
case SDLK_F5: k = XK_F5; break;
case SDLK_F6: k = XK_F6; break;
case SDLK_F7: k = XK_F7; break;
case SDLK_F8: k = XK_F8; break;
case SDLK_F9: k = XK_F9; break;
case SDLK_F10: k = XK_F10; break;
case SDLK_F11: k = XK_F11; break;
case SDLK_F12: k = XK_F12; break;
case SDLK_F13: k = XK_F13; break;
case SDLK_F14: k = XK_F14; break;
case SDLK_F15: k = XK_F15; break;
case SDLK_NUMLOCKCLEAR: k = XK_Num_Lock; break;
case SDLK_CAPSLOCK: k = XK_Caps_Lock; break;
case SDLK_SCROLLLOCK: k = XK_Scroll_Lock; break;
case SDLK_RSHIFT: k = XK_Shift_R; break;
case SDLK_LSHIFT: k = XK_Shift_L; break;
case SDLK_RCTRL: k = XK_Control_R; break;
case SDLK_LCTRL: k = XK_Control_L; break;
case SDLK_RALT: k = XK_Alt_R; break;
case SDLK_LALT: k = XK_Alt_L; break;
case SDLK_LGUI: k = XK_Super_L; break;
case SDLK_RGUI: k = XK_Super_R; break;
#if 0
case SDLK_COMPOSE: k = XK_Compose; break;
#endif
case SDLK_MODE: k = XK_Mode_switch; break;
case SDLK_HELP: k = XK_Help; break;
case SDLK_PRINTSCREEN: k = XK_Print; break;
case SDLK_SYSREQ: k = XK_Sys_Req; break;
default: break;
}
/* SDL_TEXTINPUT does not generate characters if ctrl is down, so handle those here */
if (k == 0 && sym > 0x0 && sym < 0x100 && e->keysym.mod & KMOD_CTRL)
k = sym;
return k;
}
/* UTF-8 decoding is from https://rosettacode.org/wiki/UTF-8_encode_and_decode which is under GFDL 1.2 */
static rfbKeySym utf8char2rfbKeySym(const char chr[4]) {
int bytes = strlen(chr);
int shift = utf8Mapping[0].bits_stored * (bytes - 1);
rfbKeySym codep = (*chr++ & utf8Mapping[bytes].mask) << shift;
int i;
for(i = 1; i < bytes; ++i, ++chr) {
shift -= utf8Mapping[0].bits_stored;
codep |= ((char)*chr & utf8Mapping[0].mask) << shift;
}
return codep;
}
static void update(rfbClient* cl,int x,int y,int w,int h) {
SDL_Surface *sdl = rfbClientGetClientData(cl, SDL_Init);
/* update texture from surface->pixels */
SDL_Rect r = {x,y,w,h};
if(SDL_UpdateTexture(sdlTexture, &r, sdl->pixels + y*sdl->pitch + x*4, sdl->pitch) < 0)
rfbClientErr("update: failed to update texture: %s\n", SDL_GetError());
/* copy texture to renderer and show */
if(SDL_RenderClear(sdlRenderer) < 0)
rfbClientErr("update: failed to clear renderer: %s\n", SDL_GetError());
if(SDL_RenderCopy(sdlRenderer, sdlTexture, NULL, NULL) < 0)
rfbClientErr("update: failed to copy texture to renderer: %s\n", SDL_GetError());
SDL_RenderPresent(sdlRenderer);
}
static void kbd_leds(rfbClient* cl, int value, int pad) {
/* note: pad is for future expansion 0=unused */
fprintf(stderr,"Led State= 0x%02X\n", value);
fflush(stderr);
}
/* trivial support for textchat */
static void text_chat(rfbClient* cl, int value, char *text) {
switch(value) {
fprintf(stderr,"TextChat: We should open a textchat window!\n");
break;
fprintf(stderr,"TextChat: We should close our window!\n");
break;
fprintf(stderr,"TextChat: We should close our window!\n");
break;
default:
fprintf(stderr,"TextChat: Received \"%s\"\n", text);
break;
}
fflush(stderr);
}
#ifdef __MINGW32__
#define LOG_TO_FILE
#endif
#ifdef LOG_TO_FILE
#include <stdarg.h>
static void
log_to_file(const char *format, ...)
{
FILE* logfile;
static char* logfile_str=0;
va_list args;
char buf[256];
time_t log_clock;
return;
if(logfile_str==0) {
logfile_str=getenv("VNCLOG");
if(logfile_str==0)
logfile_str="vnc.log";
}
logfile=fopen(logfile_str,"a");
va_start(args, format);
time(&log_clock);
strftime(buf, 255, "%d/%m/%Y %X ", localtime(&log_clock));
fprintf(logfile,buf);
vfprintf(logfile, format, args);
fflush(logfile);
va_end(args);
fclose(logfile);
}
#endif
static void cleanup(rfbClient* cl)
{
/*
just in case we're running in listenLoop:
close viewer window by restarting SDL video subsystem
*/
SDL_QuitSubSystem(SDL_INIT_VIDEO);
SDL_InitSubSystem(SDL_INIT_VIDEO);
if(cl)
}
static rfbBool handleSDLEvent(rfbClient *cl, SDL_Event *e)
{
switch(e->type) {
case SDL_WINDOWEVENT:
switch (e->window.event) {
case SDL_WINDOWEVENT_EXPOSED:
cl->width, cl->height, FALSE);
break;
case SDL_WINDOWEVENT_RESIZED:
SendExtDesktopSize(cl, e->window.data1, e->window.data2);
break;
case SDL_WINDOWEVENT_FOCUS_GAINED:
if (SDL_HasClipboardText()) {
char *text = SDL_GetClipboardText();
if(text) {
rfbClientLog("sending clipboard text '%s'\n", text);
SendClientCutText(cl, text, strlen(text));
}
}
break;
case SDL_WINDOWEVENT_FOCUS_LOST:
if (rightAltKeyDown) {
rightAltKeyDown = FALSE;
rfbClientLog("released right Alt key\n");
}
if (leftAltKeyDown) {
leftAltKeyDown = FALSE;
rfbClientLog("released left Alt key\n");
}
break;
}
break;
case SDL_MOUSEWHEEL:
{
int steps;
if (viewOnly)
break;
if(e->wheel.y > 0)
for(steps = 0; steps < e->wheel.y; ++steps) {
SendPointerEvent(cl, x, y, 0);
}
if(e->wheel.y < 0)
for(steps = 0; steps > e->wheel.y; --steps) {
SendPointerEvent(cl, x, y, 0);
}
if(e->wheel.x > 0)
for(steps = 0; steps < e->wheel.x; ++steps) {
SendPointerEvent(cl, x, y, 0b01000000);
SendPointerEvent(cl, x, y, 0);
}
if(e->wheel.x < 0)
for(steps = 0; steps > e->wheel.x; --steps) {
SendPointerEvent(cl, x, y, 0b00100000);
SendPointerEvent(cl, x, y, 0);
}
break;
}
case SDL_MOUSEBUTTONUP:
case SDL_MOUSEBUTTONDOWN:
case SDL_MOUSEMOTION:
{
int state, i;
if (viewOnly)
break;
if (e->type == SDL_MOUSEMOTION) {
x = e->motion.x;
y = e->motion.y;
state = e->motion.state;
}
else {
x = e->button.x;
y = e->button.y;
state = e->button.button;
for (i = 0; buttonMapping[i].sdl; i++)
if (state == buttonMapping[i].sdl) {
state = buttonMapping[i].rfb;
if (e->type == SDL_MOUSEBUTTONDOWN)
buttonMask |= state;
else
buttonMask &= ~state;
break;
}
}
SendPointerEvent(cl, x, y, buttonMask);
buttonMask &= ~(rfbButton4Mask | rfbButton5Mask);
break;
}
case SDL_KEYUP:
case SDL_KEYDOWN:
if (viewOnly)
break;
SendKeyEvent(cl, SDL_key2rfbKeySym(&e->key),
e->type == SDL_KEYDOWN ? TRUE : FALSE);
if (e->key.keysym.sym == SDLK_RALT)
rightAltKeyDown = e->type == SDL_KEYDOWN;
if (e->key.keysym.sym == SDLK_LALT)
leftAltKeyDown = e->type == SDL_KEYDOWN;
break;
case SDL_TEXTINPUT:
if (viewOnly)
break;
rfbKeySym sym = utf8char2rfbKeySym(e->text.text);
SendKeyEvent(cl, sym, TRUE);
SendKeyEvent(cl, sym, FALSE);
break;
case SDL_QUIT:
if(listenLoop)
{
cleanup(cl);
return FALSE;
}
else
{
exit(0);
}
default:
rfbClientLog("ignore SDL event: 0x%x\n", e->type);
}
return TRUE;
}
static void got_selection(rfbClient *cl, const char *text, int len)
{
rfbClientLog("received clipboard text '%s'\n", text);
if(SDL_SetClipboardText(text) != 0)
rfbClientErr("could not set received clipboard text: %s\n", SDL_GetError());
}
static rfbCredential* get_credential(rfbClient* cl, int credentialType){
rfbCredential *c = malloc(sizeof(rfbCredential));
if(credentialType != rfbCredentialTypeUser) {
rfbClientErr("something else than username and password required for authentication\n");
return NULL;
}
rfbClientLog("username and password required for authentication!\n");
printf("user: ");
printf("pass: ");
/* remove trailing newlines */
c->userCredential.username[strcspn(c->userCredential.username, "\n")] = 0;
c->userCredential.password[strcspn(c->userCredential.password, "\n")] = 0;
return c;
}
#ifdef mac
#define main SDLmain
#endif
int main(int argc,char** argv) {
rfbClient* cl;
int i, j;
SDL_Event e;
#ifdef LOG_TO_FILE
#endif
for (i = 1, j = 1; i < argc; i++)
if (!strcmp(argv[i], "-viewonly"))
viewOnly = 1;
else if (!strcmp(argv[i], "-resizable"))
enableResizable = 1;
else if (!strcmp(argv[i], "-no-resizable"))
enableResizable = 0;
else if (!strcmp(argv[i], "-listen")) {
listenLoop = 1;
argv[i] = "-listennofork";
++j;
}
else {
if (i != j)
argv[j] = argv[i];
j++;
}
argc = j;
SDL_Init(SDL_INIT_VIDEO | SDL_INIT_NOPARACHUTE);
atexit(SDL_Quit);
signal(SIGINT, exit);
do {
/* 16-bit: cl=rfbGetClient(5,3,2); */
cl=rfbGetClient(8,3,4);
cl->MallocFrameBuffer=resize;
cl->HandleKeyboardLedState=kbd_leds;
cl->HandleTextChat=text_chat;
cl->GotXCutText = got_selection;
cl->GetCredential = get_credential;
if(!rfbInitClient(cl,&argc,argv))
{
cl = NULL; /* rfbInitClient has already freed the client struct */
cleanup(cl);
break;
}
while(1) {
if(SDL_PollEvent(&e)) {
/*
handleSDLEvent() return 0 if user requested window close.
In this case, handleSDLEvent() will have called cleanup().
*/
if(!handleSDLEvent(cl, &e))
break;
}
else {
i=WaitForMessage(cl,500);
if(i<0)
{
cleanup(cl);
break;
}
if(i)
{
cleanup(cl);
break;
}
}
}
}
while(listenLoop);
return 0;
}
int y
Definition: SDLvncviewer.c:34
int sdl
Definition: SDLvncviewer.c:10
int rfb
Definition: SDLvncviewer.c:10
int main(int argc, char **argv)
Definition: SDLvncviewer.c:459
SDL_Texture * sdlTexture
Definition: SDLvncviewer.c:30
int bits_stored
Definition: SDLvncviewer.c:19
int x
Definition: SDLvncviewer.c:34
struct @5 buttonMapping[]
SDL_Window * sdlWindow
Definition: SDLvncviewer.c:32
char mask
Definition: SDLvncviewer.c:19
struct @6 utf8Mapping[]
int sdlFlags
Definition: SDLvncviewer.c:29
SDL_Renderer * sdlRenderer
Definition: SDLvncviewer.c:31
rfbBool SendClientCutText(rfbClient *client, char *str, int len)
Places a string on the server's clipboard.
rfbClient * rfbGetClient(int bitsPerSample, int samplesPerPixel, int bytesPerPixel)
Allocates and returns a pointer to an rfbClient structure.
int WaitForMessage(rfbClient *client, unsigned int usecs)
Waits for an RFB message to arrive from the server.
rfbBool TextChatOpen(rfbClient *client)
Opens a text chat window on the server.
rfbClientLogProc rfbClientLog
void rfbClientCleanup(rfbClient *client)
Cleans up the client structure and releases the memory allocated for it.
rfbBool SendExtDesktopSize(rfbClient *client, uint16_t width, uint16_t height)
Sends a SetDesktopSize event to the server.
rfbBool HandleRFBServerMessage(rfbClient *client)
Handles messages from the RFB server.
rfbBool SendPointerEvent(rfbClient *client, int x, int y, int buttonMask)
Sends a pointer event to the server.
rfbBool rfbInitClient(rfbClient *client, int *argc, char **argv)
Initializes the client.
rfbBool SendKeyEvent(rfbClient *client, uint32_t key, rfbBool down)
Sends a key event to the server.
rfbBool SendFramebufferUpdateRequest(rfbClient *client, int x, int y, int w, int h, rfbBool incremental)
Sends a framebuffer update request to the server.
#define rfbCredentialTypeUser
Definition: rfbclient.h:162
#define LISTEN_PORT_OFFSET
Definition: rfbclient.h:84
void * rfbClientGetClientData(rfbClient *client, void *tag)
Returns a pointer to the client data associated with the given tag.
rfbClientLogProc rfbClientErr
Definition: rfbclient.h:500
void rfbClientSetClientData(rfbClient *client, void *tag, void *data)
Associates a client data tag with the given pointer.
rfbBool rfbEnableClientLogging
rfbBool SetFormatAndEncodings(rfbClient *client)
Sends format and encoding parameters to the server.
#define XK_Right
Definition: keysym.h:172
#define XK_F11
Definition: keysym.h:259
#define XK_KP_6
Definition: keysym.h:235
#define XK_Super_R
Definition: keysym.h:324
#define XK_Clear
Definition: keysym.h:126
#define XK_Print
Definition: keysym.h:185
#define XK_KP_Multiply
Definition: keysym.h:222
#define XK_Alt_L
Definition: keysym.h:321
#define XK_KP_3
Definition: keysym.h:232
#define XK_Shift_R
Definition: keysym.h:313
#define XK_KP_1
Definition: keysym.h:230
#define XK_Left
Definition: keysym.h:170
#define XK_F8
Definition: keysym.h:256
#define XK_Scroll_Lock
Definition: keysym.h:129
#define XK_KP_2
Definition: keysym.h:231
#define XK_Home
Definition: keysym.h:169
#define XK_KP_8
Definition: keysym.h:237
#define XK_Page_Down
Definition: keysym.h:177
#define XK_F6
Definition: keysym.h:254
#define XK_KP_4
Definition: keysym.h:233
#define XK_KP_Decimal
Definition: keysym.h:226
#define XK_KP_Subtract
Definition: keysym.h:225
#define XK_Return
Definition: keysym.h:127
#define XK_F2
Definition: keysym.h:250
#define XK_Down
Definition: keysym.h:173
#define XK_F9
Definition: keysym.h:257
#define XK_F12
Definition: keysym.h:261
#define XK_Caps_Lock
Definition: keysym.h:316
#define XK_Tab
Definition: keysym.h:124
#define XK_F1
Definition: keysym.h:249
#define XK_End
Definition: keysym.h:178
#define XK_Mode_switch
Definition: keysym.h:195
#define XK_KP_5
Definition: keysym.h:234
#define XK_Control_L
Definition: keysym.h:314
#define XK_Shift_L
Definition: keysym.h:312
#define XK_Escape
Definition: keysym.h:131
#define XK_Alt_R
Definition: keysym.h:322
#define XK_F7
Definition: keysym.h:255
#define XK_KP_7
Definition: keysym.h:236
#define XK_F4
Definition: keysym.h:252
#define XK_Delete
Definition: keysym.h:132
#define XK_F10
Definition: keysym.h:258
#define XK_KP_9
Definition: keysym.h:238
#define XK_Control_R
Definition: keysym.h:315
#define XK_Sys_Req
Definition: keysym.h:130
#define XK_F5
Definition: keysym.h:253
#define XK_Up
Definition: keysym.h:171
#define XK_Pause
Definition: keysym.h:128
#define XK_Super_L
Definition: keysym.h:323
#define XK_F14
Definition: keysym.h:265
#define XK_F3
Definition: keysym.h:251
#define XK_Help
Definition: keysym.h:193
#define XK_KP_Add
Definition: keysym.h:223
#define XK_KP_Equal
Definition: keysym.h:221
#define XK_F15
Definition: keysym.h:267
#define XK_KP_Enter
Definition: keysym.h:203
#define XK_F13
Definition: keysym.h:263
#define XK_Num_Lock
Definition: keysym.h:197
#define XK_KP_0
Definition: keysym.h:229
#define XK_BackSpace
Definition: keysym.h:123
#define XK_Page_Up
Definition: keysym.h:175
#define XK_KP_Divide
Definition: keysym.h:227
#define XK_Insert
Definition: keysym.h:187
#define RFB_BUF_SIZE
Definition: rfbclient.h:277
#define rfbButton1Mask
Definition: rfbproto.h:1429
int8_t rfbBool
Definition: rfbproto.h:108
#define rfbTextChatFinished
Definition: rfbproto.h:1115
uint32_t rfbKeySym
Definition: rfbproto.h:122
#define rfbTextChatClose
Definition: rfbproto.h:1114
#define rfbButton2Mask
Definition: rfbproto.h:1430
#define rfbButton3Mask
Definition: rfbproto.h:1431
#define rfbTextChatOpen
Definition: rfbproto.h:1113
#define TRUE
Definition: rfbproto.h:112
#define FALSE
Definition: rfbproto.h:110
#define rfbButton5Mask
Definition: rfbproto.h:1433
#define rfbButton4Mask
Definition: rfbproto.h:1432
char * desktopName
Definition: rfbclient.h:272
int width
Definition: rfbclient.h:243
int listen6Port
Definition: rfbclient.h:414
GotFrameBufferUpdateProc GotFrameBufferUpdate
Definition: rfbclient.h:354
GotXCutTextProc GotXCutText
Definition: rfbclient.h:358
HandleTextChatProc HandleTextChat
Definition: rfbclient.h:349
int listenPort
Definition: rfbclient.h:253
uint8_t * frameBuffer
Definition: rfbclient.h:242
GetCredentialProc GetCredential
To support security types that requires user input (except VNC password authentication),...
Definition: rfbclient.h:389
HandleKeyboardLedStateProc HandleKeyboardLedState
Definition: rfbclient.h:350
int canHandleNewFBSize
Definition: rfbclient.h:346
struct rfbClient::@4 updateRect
int height
Definition: rfbclient.h:243
MallocFrameBufferProc MallocFrameBuffer
Definition: rfbclient.h:357
rfbPixelFormat format
Definition: rfbclient.h:273
uint16_t redMax
Definition: rfbproto.h:180
uint16_t greenMax
Definition: rfbproto.h:184
uint16_t blueMax
Definition: rfbproto.h:186
uint8_t greenShift
Definition: rfbproto.h:200
uint8_t bitsPerPixel
Definition: rfbproto.h:163
uint8_t blueShift
Definition: rfbproto.h:202
uint8_t redShift
Definition: rfbproto.h:188
For GetCredentialProc callback function to return.
Definition: rfbclient.h:143
char * password
Definition: rfbclient.h:157
char * username
Definition: rfbclient.h:156
struct rfbCredential::@3 userCredential
Plain (VeNCrypt), MSLogon (UltraVNC)
rfbClient * client
Definition: vnc2mpg.c:358
#define height
Definition: vncev.c:19
#define width
Definition: vncev.c:18