From ccdbe8f3256c3c776a1cc1a0517a38437b9e2c65 Mon Sep 17 00:00:00 2001 From: steven_carr Date: Mon, 15 May 2006 05:37:39 +0000 Subject: The great UltraVNC Compatibility Commit --- client_examples/SDLvncviewer.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'client_examples/SDLvncviewer.c') diff --git a/client_examples/SDLvncviewer.c b/client_examples/SDLvncviewer.c index 8bb6efa..99c8e85 100644 --- a/client_examples/SDLvncviewer.c +++ b/client_examples/SDLvncviewer.c @@ -150,6 +150,26 @@ static void kbd_leds(rfbClient* cl, int value, int pad) { fflush(stderr); } +/* trivial support for textchat */ +static void text_chat(rfbClient* cl, int value, char *text) { + switch(value) { + case rfbTextChatOpen: + fprintf(stderr,"TextChat: We should open a textchat window!\n"); + TextChatOpen(cl); + break; + case rfbTextChatClose: + fprintf(stderr,"TextChat: We should close our window!\n"); + break; + case rfbTextChatFinished: + 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 @@ -212,7 +232,7 @@ int main(int argc,char** argv) { cl->canHandleNewFBSize = TRUE; cl->GotFrameBufferUpdate=update; cl->HandleKeyboardLedState=kbd_leds; - + cl->HandleTextChat=text_chat; if(!rfbInitClient(cl,&argc,argv)) return 1; -- cgit v1.1