summaryrefslogtreecommitdiffstats
path: root/rfb
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 /rfb
parent5920dc18d75a53690ed8690867f501c51595daf1 (diff)
downloadlibvncserver-1602b345f3e7e508b043133d5c289d9984e39f18.zip
libvncserver-1602b345f3e7e508b043133d5c289d9984e39f18.tar.gz
add KeyboardLedState extension
Diffstat (limited to 'rfb')
-rw-r--r--rfb/rfb.h9
-rw-r--r--rfb/rfbclient.h6
-rw-r--r--rfb/rfbproto.h1
3 files changed, 15 insertions, 1 deletions
diff --git a/rfb/rfb.h b/rfb/rfb.h
index cf4665b..ffba2cd 100644
--- a/rfb/rfb.h
+++ b/rfb/rfb.h
@@ -135,6 +135,9 @@ typedef rfbBool (*rfbSetTranslateFunctionProcPtr)(struct _rfbClientRec* cl);
typedef rfbBool (*rfbPasswordCheckProcPtr)(struct _rfbClientRec* cl,const char* encryptedPassWord,int len);
typedef enum rfbNewClientAction (*rfbNewClientHookPtr)(struct _rfbClientRec* cl);
typedef void (*rfbDisplayHookPtr)(struct _rfbClientRec* cl);
+/* support the capability to view the caps/num/scroll states of the X server */
+typedef int (*rfbGetKeyboardLedStateHookPtr)(struct _rfbScreenInfo* screen);
+
typedef struct {
uint32_t count;
@@ -295,6 +298,9 @@ typedef struct _rfbScreenInfo
/* displayHook is called just before a frame buffer update */
rfbDisplayHookPtr displayHook;
+ /* These hooks are called to pass keyboard state back to the client */
+ rfbGetKeyboardLedStateHookPtr getKeyboardLedStateHook;
+
#ifdef LIBVNCSERVER_HAVE_LIBPTHREAD
MUTEX(cursorMutex);
rfbBool backgroundLoop;
@@ -478,7 +484,8 @@ typedef struct _rfbClientRec {
int tightQualityLevel;
#endif
#endif
-
+ int lastKeyboardLedState; /* keep track of last value so we can send *change* events */
+ rfbBool enableKeyboardLedState; /* client supports KeyboardState encoding */
rfbBool enableLastRectEncoding; /* client supports LastRect encoding */
rfbBool enableCursorShapeUpdates; /* client supports cursor shape updates */
rfbBool enableCursorPosUpdates; /* client supports cursor position updates */
diff --git a/rfb/rfbclient.h b/rfb/rfbclient.h
index a7d77bb..1dfd56a 100644
--- a/rfb/rfbclient.h
+++ b/rfb/rfbclient.h
@@ -94,6 +94,7 @@ typedef struct {
struct _rfbClient;
+typedef void (*HandleKeyboardLedStateProc)(struct _rfbClient* client, int value, int pad);
typedef rfbBool (*HandleCursorPosProc)(struct _rfbClient* client, int x, int y);
typedef void (*SoftCursorLockAreaProc)(struct _rfbClient* client, int x, int y, int w, int h);
typedef void (*SoftCursorUnlockScreenProc)(struct _rfbClient* client);
@@ -196,7 +197,12 @@ typedef struct _rfbClient {
rfbVNCRec* vncRec;
+ /* Keyboard State support (is 'Caps Lock' set on the remote display???) */
+ int KeyboardLedStateEnabled;
+ int CurrentKeyboardLedState;
+
/* hooks */
+ HandleKeyboardLedStateProc HandleKeyboardLedState;
HandleCursorPosProc HandleCursorPos;
SoftCursorLockAreaProc SoftCursorLockArea;
SoftCursorUnlockScreenProc SoftCursorUnlockScreen;
diff --git a/rfb/rfbproto.h b/rfb/rfbproto.h
index cadbce4..5cd103a 100644
--- a/rfb/rfbproto.h
+++ b/rfb/rfbproto.h
@@ -445,6 +445,7 @@ typedef struct {
#define rfbEncodingXCursor 0xFFFFFF10
#define rfbEncodingRichCursor 0xFFFFFF11
#define rfbEncodingPointerPos 0xFFFFFF18
+#define rfbEncodingKeyboardLedState 0xFFFFFF19
#define rfbEncodingLastRect 0xFFFFFF20
#define rfbEncodingNewFBSize 0xFFFFFF21
OpenPOWER on IntegriCloud