summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Beier <cb@shoutrlabs.com>2015-12-03 19:20:02 +0100
committerChristian Beier <cb@shoutrlabs.com>2015-12-03 19:20:02 +0100
commit4665af4950023c194453fe7517dbe06ee811ea15 (patch)
tree5ebf24148c9a5cedada57e993b4029f52c5e00b7
parent228a75fe3a61794d5a153598c6046a57f52fc22d (diff)
downloadlibtdevnc-4665af4950023c194453fe7517dbe06ee811ea15.tar.gz
libtdevnc-4665af4950023c194453fe7517dbe06ee811ea15.zip
Properly document HandleCursorShape and GotCursorShapeProc.
-rw-r--r--libvncclient/cursor.c6
-rw-r--r--rfb/rfbclient.h13
2 files changed, 11 insertions, 8 deletions
diff --git a/libvncclient/cursor.c b/libvncclient/cursor.c
index a48d7c5..67f4572 100644
--- a/libvncclient/cursor.c
+++ b/libvncclient/cursor.c
@@ -37,12 +37,6 @@
<< client->format.blueShift)
-/*********************************************************************
- * HandleCursorShape(). Support for XCursor and RichCursor shape
- * updates. We emulate cursor operating on the frame buffer (that is
- * why we call it "software cursor").
- ********************************************************************/
-
rfbBool HandleCursorShape(rfbClient* client,int xhot, int yhot, int width, int height, uint32_t enc)
{
int bytesPerPixel;
diff --git a/rfb/rfbclient.h b/rfb/rfbclient.h
index aedb4f4..0ae001a 100644
--- a/rfb/rfbclient.h
+++ b/rfb/rfbclient.h
@@ -173,7 +173,10 @@ typedef rfbCredential* (*GetCredentialProc)(struct _rfbClient* client, int crede
typedef rfbBool (*MallocFrameBufferProc)(struct _rfbClient* client);
typedef void (*GotXCutTextProc)(struct _rfbClient* client, const char *text, int textlen);
typedef void (*BellProc)(struct _rfbClient* client);
-
+/**
+ Called when a cursor shape update was received from the server. The decoded cursor shape
+ will be in client->rcSource.
+*/
typedef void (*GotCursorShapeProc)(struct _rfbClient* client, int xhot, int yhot, int width, int height, int bytesPerPixel);
typedef void (*GotCopyRectProc)(struct _rfbClient* client, int src_x, int src_y, int w, int h, int dest_x, int dest_y);
@@ -270,6 +273,7 @@ typedef struct _rfbClient {
/* cursor.c */
+ /** Holds cursor shape data when received from server. */
uint8_t *rcSource, *rcMask;
/** private data pointer */
@@ -357,7 +361,12 @@ typedef struct _rfbClient {
} rfbClient;
/* cursor.c */
-
+/**
+ * Handles XCursor and RichCursor shape updates from the server.
+ * We emulate cursor operating on the frame buffer (that is
+ * why we call it "software cursor"). This decodes the received cursor
+ * shape and hands it over to GotCursorShapeProc, if set.
+ */
extern rfbBool HandleCursorShape(rfbClient* client,int xhot, int yhot, int width, int height, uint32_t enc);
/* listen.c */