summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Dorokhine <arrenlex@gmail.com>2009-10-30 12:29:02 +0100
committerJohannes Schindelin <johannes.schindelin@gmx.de>2009-10-30 12:36:52 +0100
commit62ae6bb7bef5a2f2a20cd2e39521e58e9874f189 (patch)
tree337b234a0e6961751a1456a3e8227d65b3e05676
parentb02849ab807bf756a748ce7e174d85a745c49b1e (diff)
downloadlibtdevnc-62ae6bb7bef5a2f2a20cd2e39521e58e9874f189.tar.gz
libtdevnc-62ae6bb7bef5a2f2a20cd2e39521e58e9874f189.zip
libvncclient: Add FinishedFrameBufferUpdate callback
When working on a program which searches the display for some image, one does not want to search again without getting an FB update. Add a callback to make this possible.
-rw-r--r--libvncclient/rfbproto.c3
-rw-r--r--libvncclient/vncviewer.c1
-rw-r--r--rfb/rfbclient.h2
3 files changed, 6 insertions, 0 deletions
diff --git a/libvncclient/rfbproto.c b/libvncclient/rfbproto.c
index 21e5088..3b5c9c2 100644
--- a/libvncclient/rfbproto.c
+++ b/libvncclient/rfbproto.c
@@ -1553,6 +1553,9 @@ HandleRFBServerMessage(rfbClient* client)
if (!SendIncrementalFramebufferUpdateRequest(client))
return FALSE;
+ if (client->FinishedFrameBufferUpdate)
+ client->FinishedFrameBufferUpdate(client);
+
break;
}
diff --git a/libvncclient/vncviewer.c b/libvncclient/vncviewer.c
index a5f2f89..7e678fb 100644
--- a/libvncclient/vncviewer.c
+++ b/libvncclient/vncviewer.c
@@ -173,6 +173,7 @@ rfbClient* rfbGetClient(int bitsPerSample,int samplesPerPixel,
client->SoftCursorLockArea = DummyRect;
client->SoftCursorUnlockScreen = Dummy;
client->GotFrameBufferUpdate = DummyRect;
+ client->FinishedFrameBufferUpdate = NULL;
client->GetPassword = ReadPassword;
client->MallocFrameBuffer = MallocFrameBuffer;
client->Bell = Dummy;
diff --git a/rfb/rfbclient.h b/rfb/rfbclient.h
index 07da7df..40c1775 100644
--- a/rfb/rfbclient.h
+++ b/rfb/rfbclient.h
@@ -107,6 +107,7 @@ 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);
typedef void (*GotFrameBufferUpdateProc)(struct _rfbClient* client, int x, int y, int w, int h);
+typedef void (*FinishedFrameBufferUpdateProc)(struct _rfbClient* client);
typedef char* (*GetPasswordProc)(struct _rfbClient* client);
typedef rfbBool (*MallocFrameBufferProc)(struct _rfbClient* client);
typedef void (*GotXCutTextProc)(struct _rfbClient* client, const char *text, int textlen);
@@ -228,6 +229,7 @@ typedef struct _rfbClient {
SoftCursorLockAreaProc SoftCursorLockArea;
SoftCursorUnlockScreenProc SoftCursorUnlockScreen;
GotFrameBufferUpdateProc GotFrameBufferUpdate;
+ FinishedFrameBufferUpdateProc FinishedFrameBufferUpdate;
/* the pointer returned by GetPassword will be freed after use! */
GetPasswordProc GetPassword;
MallocFrameBufferProc MallocFrameBuffer;