libvncclient: add GotCursorShape() and GotCopyRect(); x11vnc dep on libvncclient

pull/1/head
runge 18 years ago
parent b66c944fe3
commit 1f8da9bde3

@ -1,7 +1,7 @@
CFLAGS=-g -Wall
SUBDIRS=libvncserver examples contrib x11vnc vncterm classes libvncclient client_examples test
DIST_SUBDIRS=libvncserver examples contrib x11vnc vncterm classes libvncclient client_examples test
SUBDIRS=libvncserver examples contrib libvncclient x11vnc vncterm classes client_examples test
DIST_SUBDIRS=libvncserver examples contrib libvncclient x11vnc vncterm classes client_examples test
bin_SCRIPTS = libvncserver-config

@ -167,6 +167,10 @@ rfbBool HandleCursorShape(rfbClient* client,int xhot, int yhot, int width, int h
}
}
if (client->GotCursorShape != NULL) {
client->GotCursorShape(client, xhot, yhot, width, height, bytesPerPixel);
}
free(buf);
return TRUE;

@ -167,10 +167,31 @@ static void CopyRectangleFromRectangle(rfbClient* client, int src_x, int src_y,
#define COPY_RECT_FROM_RECT(BPP) \
{ \
uint##BPP##_t* _buffer=((uint##BPP##_t*)client->frameBuffer)+(src_y-dest_y)*client->width+src_x-dest_x; \
if (dest_y < src_y) { \
for(j = dest_y*client->width; j < (dest_y+h)*client->width; j += client->width) { \
for(i=dest_x;i<dest_x+w;i++) \
if (dest_x < src_x) { \
for(i = dest_x; i < dest_x+w; i++) { \
((uint##BPP##_t*)client->frameBuffer)[j+i]=_buffer[j+i]; \
} \
} else { \
for(i = dest_x+w-1; i >= dest_x; i--) { \
((uint##BPP##_t*)client->frameBuffer)[j+i]=_buffer[j+i]; \
} \
} \
} \
} else { \
for(j = (dest_y+h-1)*client->width; j >= dest_y*client->width; j-=client->width) { \
if (dest_x < src_x) { \
for(i = dest_x; i < dest_x+w; i++) { \
((uint##BPP##_t*)client->frameBuffer)[j+i]=_buffer[j+i]; \
} \
} else { \
for(i = dest_x+w-1; i >= dest_x; i--) { \
((uint##BPP##_t*)client->frameBuffer)[j+i]=_buffer[j+i]; \
} \
} \
} \
} \
}
switch(client->format.bitsPerPixel) {
@ -1262,6 +1283,10 @@ HandleRFBServerMessage(rfbClient* client)
client->SoftCursorLockArea(client,
cr.srcX, cr.srcY, rect.r.w, rect.r.h);
if (client->GotCopyRect != NULL) {
client->GotCopyRect(client, cr.srcX, cr.srcY, rect.r.w, rect.r.h,
rect.r.x, rect.r.y);
}
CopyRectangleFromRectangle(client,
cr.srcX, cr.srcY, rect.r.w, rect.r.h,
rect.r.x, rect.r.y);

@ -87,7 +87,7 @@ static rfbBool MallocFrameBuffer(rfbClient* client) {
static void initAppData(AppData* data) {
data->shareDesktop=TRUE;
data->viewOnly=FALSE;
data->encodingsString="tight zrle ultra hextile zlib corre rre raw";
data->encodingsString="tight zrle ultra copyrect hextile zlib corre rre raw";
data->useBGR233=FALSE;
data->nColours=0;
data->forceOwnCmap=FALSE;

@ -9,7 +9,7 @@ mv configure.ac configure.ac.LibVNCServer
cat configure.ac.LibVNCServer | \
egrep -v 'AC_CONFIG_COMMANDS.*libvncserver-config' | \
sed -e "s/LibVNCServer, [^,)]*\([(,]\)*/x11vnc, $VERSION\1/g" \
-e "s/\(contrib\|examples\|vncterm\|libvncclient\|test\|client_examples\)\/Makefile//g" \
-e "s/\(contrib\|examples\|vncterm\|test\|client_examples\)\/Makefile//g" \
-e "s/LibVNCServer.spec/x11vnc.spec/g" \
-e "s/^.*libvncserver-config//g" \
> configure.ac
@ -18,8 +18,8 @@ mv Makefile.am Makefile.am.LibVNCServer
echo "EXTRA_DIST=tightvnc-1.3dev5-vncviewer-alpha-cursor.patch README.LibVNCServer" > Makefile.am
cat Makefile.am.LibVNCServer | \
sed -e "s/^SUBDIRS.*$/SUBDIRS=libvncserver x11vnc classes/" \
-e "s/^DIST_SUBDIRS.*$/DIST_SUBDIRS=libvncserver x11vnc classes/" \
sed -e "s/^SUBDIRS.*$/SUBDIRS=libvncserver libvncclient x11vnc classes/" \
-e "s/^DIST_SUBDIRS.*$/DIST_SUBDIRS=libvncserver libvncclient x11vnc classes/" \
-e "/all: make_config_executable/,\$d" \
-e "/^.*bin_SCRIPTS.*$/d" \
-e "s/include_/noinst_/" \
@ -76,6 +76,12 @@ cat libvncserver/Makefile.am.LibVNCServer | \
sed -e "s/\(include\|LIB\|lib\)_/noinst_/g" \
> libvncserver/Makefile.am
mv libvncclient/Makefile.am libvncclient/Makefile.am.LibVNCServer
cat libvncclient/Makefile.am.LibVNCServer | \
sed -e "s/\(include\|LIB\|lib\)_/noinst_/g" \
> libvncclient/Makefile.am
cp classes/Makefile.am classes/Makefile.am.LibVNCServer
echo 'pkgdatadir = $(datadir)/@PACKAGE@/classes' >> classes/Makefile.am
echo 'pkgdata_DATA=VncViewer.jar index.vnc' >> classes/Makefile.am
@ -96,7 +102,7 @@ sed -e "s/^\(_PKG.*\)\$PACKAGE\(.*\)$/\1LibVNCServer\2/" \
> acinclude.m4
make x11vnc-${VERSION}.tar.gz
for f in configure.ac Makefile.am libvncserver/Makefile.am classes/Makefile.am classes/ssl/Makefile.am acinclude.m4 README; do
for f in configure.ac Makefile.am libvncserver/Makefile.am libvncclient/Makefile.am classes/Makefile.am classes/ssl/Makefile.am acinclude.m4 README; do
mv -f $f.LibVNCServer $f
done

@ -107,6 +107,9 @@ typedef rfbBool (*MallocFrameBufferProc)(struct _rfbClient* client);
typedef void (*GotXCutTextProc)(struct _rfbClient* client, const char *text, int textlen);
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 struct _rfbClient {
uint8_t* frameBuffer;
int width, height;
@ -222,6 +225,9 @@ typedef struct _rfbClient {
GotXCutTextProc GotXCutText;
BellProc Bell;
GotCursorShapeProc GotCursorShape;
GotCopyRectProc GotCopyRect;
/* Which messages are supported by the server
* This is a *guess* for most servers.
* (If we can even detect the type of server)

Loading…
Cancel
Save