summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authordscho <dscho>2003-02-08 14:26:39 +0000
committerdscho <dscho>2003-02-08 14:26:39 +0000
commit9f6a47087b28fc230e804da404798acb9641cb4e (patch)
tree2cd09d3004d7142637efc42f74b6722122f27c1d /include
parent6c78073285536d214d877eae42bf534f79fdd8b2 (diff)
downloadlibtdevnc-9f6a47087b28fc230e804da404798acb9641cb4e.tar.gz
libtdevnc-9f6a47087b28fc230e804da404798acb9641cb4e.zip
autoconf'ed everything
Diffstat (limited to 'include')
-rw-r--r--include/rfb.h33
-rw-r--r--include/rfbproto.h6
2 files changed, 25 insertions, 14 deletions
diff --git a/include/rfb.h b/include/rfb.h
index 965ac71..fcaa995 100644
--- a/include/rfb.h
+++ b/include/rfb.h
@@ -35,14 +35,14 @@ extern "C"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <zlib.h>
+#include "rfbconfig.h"
#include "keysym.h"
+#ifdef HAVE_LIBZ
+#include <zlib.h>
+#endif
+
/* TODO: this stuff has to go into autoconf */
-#define HAVE_PTHREADS
-#define ALLOW24BPP
-#define HAVE_ZRLE
-#define BACKCHANNEL
typedef unsigned char CARD8;
typedef unsigned short CARD16;
typedef unsigned int CARD32;
@@ -120,7 +120,7 @@ typedef int socklen_t;
#define INADDR_NONE ((in_addr_t) 0xffffffff)
#endif
-#ifdef HAVE_PTHREADS
+#ifdef HAVE_LIBPTHREAD
#include <pthread.h>
#if 0 /* debugging */
#define LOCK(mutex) fprintf(stderr,"%s:%d LOCK(%s,0x%x)\n",__FILE__,__LINE__,#mutex,&(mutex))
@@ -163,11 +163,11 @@ typedef int socklen_t;
/* end of stuff for autoconf */
-/* if you use pthreads, but don't define HAVE_PTHREADS, the structs
+/* if you use pthreads, but don't define HAVE_LIBPTHREAD, the structs
get all mixed up. So this gives a linker error reminding you to compile
the library and your application (at least the parts including rfb.h)
with the same support for pthreads. */
-#ifdef HAVE_PTHREADS
+#ifdef HAVE_LIBPTHREAD
#ifdef HAVE_ZRLE
#define rfbInitServer rfbInitServerWithPthreadsAndZRLE
#else
@@ -345,7 +345,7 @@ typedef struct _rfbScreenInfo
/* displayHook is called just before a frame buffer update */
DisplayHookPtr displayHook;
-#ifdef HAVE_PTHREADS
+#ifdef HAVE_LIBPTHREAD
MUTEX(cursorMutex);
Bool backgroundLoop;
#endif
@@ -404,7 +404,7 @@ typedef struct _rfbClientRec {
SOCKET sock;
char *host;
-#ifdef HAVE_PTHREADS
+#ifdef HAVE_LIBPTHREAD
pthread_t client_thread;
#endif
/* Possible client states: */
@@ -501,19 +501,23 @@ typedef struct _rfbClientRec {
int rfbKeyEventsRcvd;
int rfbPointerEventsRcvd;
+#ifdef HAVE_LIBZ
/* zlib encoding -- necessary compression state info per client */
struct z_stream_s compStream;
Bool compStreamInited;
CARD32 zlibCompressLevel;
+#ifdef HAVE_LIBJPEG
/* tight encoding -- preserve zlib streams' state for each client */
-
+ //#ifdef HAVE_LIBJPEG
z_stream zsStruct[4];
Bool zsActive[4];
int zsLevel[4];
int tightCompressLevel;
int tightQualityLevel;
+#endif
+#endif
Bool enableLastRectEncoding; /* client supports LastRect encoding */
Bool enableCursorShapeUpdates; /* client supports cursor shape updates */
@@ -532,7 +536,7 @@ typedef struct _rfbClientRec {
struct _rfbClientRec *prev;
struct _rfbClientRec *next;
-#ifdef HAVE_PTHREADS
+#ifdef HAVE_LIBPTHREAD
/* whenever a client is referenced, the refCount has to be incremented
and afterwards decremented, so that the client is not cleaned up
while being referenced.
@@ -683,6 +687,7 @@ extern Bool rfbSendRectEncodingHextile(rfbClientPtr cl, int x, int y, int w,
int h);
+#ifdef HAVE_LIBZ
/* zlib.c */
/* Minimum zlib rectangle size in bytes. Anything smaller will
@@ -700,7 +705,7 @@ extern Bool rfbSendRectEncodingHextile(rfbClientPtr cl, int x, int y, int w,
extern Bool rfbSendRectEncodingZlib(rfbClientPtr cl, int x, int y, int w,
int h);
-
+#ifdef HAVE_LIBJPEG
/* tight.c */
#define TIGHT_DEFAULT_COMPRESSION 6
@@ -709,6 +714,8 @@ extern Bool rfbTightDisableGradient;
extern int rfbNumCodedRectsTight(rfbClientPtr cl, int x,int y,int w,int h);
extern Bool rfbSendRectEncodingTight(rfbClientPtr cl, int x,int y,int w,int h);
+#endif
+#endif
/* cursor.c */
diff --git a/include/rfbproto.h b/include/rfbproto.h
index 0fb19b3..bdb9670 100644
--- a/include/rfbproto.h
+++ b/include/rfbproto.h
@@ -296,9 +296,11 @@ typedef struct {
#define rfbEncodingRRE 2
#define rfbEncodingCoRRE 4
#define rfbEncodingHextile 5
+#ifdef HAVE_LIBZ
#define rfbEncodingZlib 6
#define rfbEncodingTight 7
#define rfbEncodingZlibHex 8
+#endif
#ifdef BACKCHANNEL
#define rfbEncodingBackChannel 15
#endif
@@ -488,7 +490,7 @@ typedef struct {
#define rfbHextileExtractW(byte) (((byte) >> 4) + 1)
#define rfbHextileExtractH(byte) (((byte) & 0xf) + 1)
-
+#ifdef HAVE_LIBZ
/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
* zlib - zlib compressed Encoding. We have an rfbZlibHeader structure
* giving the number of bytes following. Finally the data follows is
@@ -637,6 +639,8 @@ typedef struct {
#define rfbTightFilterPalette 0x01
#define rfbTightFilterGradient 0x02
+#endif
+
/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
* XCursor encoding. This is a special encoding used to transmit X-style
* cursor shapes from server to clients. Note that for this encoding,