summaryrefslogtreecommitdiffstats
path: root/client_examples/SDLvncviewer.c
diff options
context:
space:
mode:
authorsteven_carr <steven_carr>2006-05-15 05:37:39 +0000
committersteven_carr <steven_carr>2006-05-15 05:37:39 +0000
commitccdbe8f3256c3c776a1cc1a0517a38437b9e2c65 (patch)
tree9853559d1c965946b196cccd03ce0f466d524950 /client_examples/SDLvncviewer.c
parent347c4a98475d1dba8030efe33aa0b35856c4d17f (diff)
downloadlibtdevnc-ccdbe8f3256c3c776a1cc1a0517a38437b9e2c65.tar.gz
libtdevnc-ccdbe8f3256c3c776a1cc1a0517a38437b9e2c65.zip
The great UltraVNC Compatibility Commit
Diffstat (limited to 'client_examples/SDLvncviewer.c')
-rw-r--r--client_examples/SDLvncviewer.c22
1 files changed, 21 insertions, 1 deletions
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;