summaryrefslogtreecommitdiffstats
path: root/rfb
diff options
context:
space:
mode:
authorBalazs Ludmany <ludmany.balazs@cloud.bme.hu>2016-06-21 10:03:52 +0200
committerBalazs Ludmany <ludmany.balazs@cloud.bme.hu>2016-06-29 09:46:10 +0200
commita01a18df1d44ec875708d5fc9d6c4e0934535974 (patch)
tree7bafd41f957a76e6c8b204791d7e7dd39fec0b02 /rfb
parent1f8c443cbc439e79d9e2c8b92643b65b7332db89 (diff)
downloadlibtdevnc-a01a18df1d44ec875708d5fc9d6c4e0934535974.tar.gz
libtdevnc-a01a18df1d44ec875708d5fc9d6c4e0934535974.zip
Add function pointers for every type of rectangle
Diffstat (limited to 'rfb')
-rw-r--r--rfb/rfbclient.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/rfb/rfbclient.h b/rfb/rfbclient.h
index 4f6f4f4..d90342b 100644
--- a/rfb/rfbclient.h
+++ b/rfb/rfbclient.h
@@ -182,6 +182,9 @@ typedef void (*BellProc)(struct _rfbClient* client);
*/
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);
+typedef void (*GotFillRectProc)(struct _rfbClient* client, int x, int y, int w, int h, uint32_t colour);
+typedef void (*GotBitmapProc)(struct _rfbClient* client, const uint8_t* buffer, int x, int y, int w, int h);
+typedef rfbBool (*GotJpegProc)(struct _rfbClient* client, const uint8_t* buffer, int length, int x, int y, int w, int h);
typedef rfbBool (*LockWriteToTLSProc)(struct _rfbClient* client);
typedef rfbBool (*UnlockWriteToTLSProc)(struct _rfbClient* client);
@@ -367,6 +370,18 @@ typedef struct _rfbClient {
LockWriteToTLSProc LockWriteToTLS;
UnlockWriteToTLSProc UnlockWriteToTLS;
+ /** Hooks for custom rendering
+ *
+ * VNC rendering boils down to 3 activities:
+ * - GotCopyRect: copy an area of the framebuffer
+ * - GotFillRect: fill an area of the framebuffer with a solid color
+ * - GotBitmap: copy the bitmap in the buffer into the framebuffer
+ * The client application should either set all three of these or none!
+ */
+ GotFillRectProc GotFillRect;
+ GotBitmapProc GotBitmap;
+ /** Hook for custom JPEG decoding and rendering */
+ GotJpegProc GotJpeg;
} rfbClient;
/* cursor.c */