summaryrefslogtreecommitdiffstats
path: root/client_examples/SDLvncviewer.c
diff options
context:
space:
mode:
authordscho <dscho>2006-03-28 14:49:21 +0000
committerdscho <dscho>2006-03-28 14:49:21 +0000
commit1602b345f3e7e508b043133d5c289d9984e39f18 (patch)
tree0698f886cd49a803dcfbbd08ab5b4cd4c7a9fd73 /client_examples/SDLvncviewer.c
parent5920dc18d75a53690ed8690867f501c51595daf1 (diff)
downloadlibtdevnc-1602b345f3e7e508b043133d5c289d9984e39f18.tar.gz
libtdevnc-1602b345f3e7e508b043133d5c289d9984e39f18.zip
add KeyboardLedState extension
Diffstat (limited to 'client_examples/SDLvncviewer.c')
-rw-r--r--client_examples/SDLvncviewer.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/client_examples/SDLvncviewer.c b/client_examples/SDLvncviewer.c
index b32c49b..2e33b09 100644
--- a/client_examples/SDLvncviewer.c
+++ b/client_examples/SDLvncviewer.c
@@ -143,6 +143,12 @@ static void update(rfbClient* cl,int x,int y,int w,int h) {
SDL_UpdateRect(rfbClientGetClientData(cl, SDL_Init), x, y, w, h);
}
+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);
+}
+
#ifdef __MINGW32__
#define LOG_TO_FILE
#endif
@@ -203,6 +209,8 @@ int main(int argc,char** argv) {
cl=rfbGetClient(8,3,4);
cl->MallocFrameBuffer=resize;
cl->GotFrameBufferUpdate=update;
+ cl->HandleKeyboardLedState=kbd_leds;
+
if(!rfbInitClient(cl,&argc,argv))
return 1;