1 /* $Xorg: lbxopts.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */
3 * Copyright 1994 Network Computing Devices, Inc.
5 * Permission to use, copy, modify, distribute, and sell this software and
6 * its documentation for any purpose is hereby granted without fee, provided
7 * that the above copyright notice appear in all copies and that both that
8 * copyright notice and this permission notice appear in supporting
9 * documentation, and that the name Network Computing Devices, Inc. not be
10 * used in advertising or publicity pertaining to distribution of this
11 * software without specific, written prior permission.
13 * THIS SOFTWARE IS PROVIDED `AS-IS'. NETWORK COMPUTING DEVICES, INC.,
14 * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING WITHOUT
15 * LIMITATION ALL IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
16 * PARTICULAR PURPOSE, OR NONINFRINGEMENT. IN NO EVENT SHALL NETWORK
17 * COMPUTING DEVICES, INC., BE LIABLE FOR ANY DAMAGES WHATSOEVER, INCLUDING
18 * SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES, INCLUDING LOSS OF USE, DATA,
19 * OR PROFITS, EVEN IF ADVISED OF THE POSSIBILITY THEREOF, AND REGARDLESS OF
20 * WHETHER IN AN ACTION IN CONTRACT, TORT OR NEGLIGENCE, ARISING OUT OF OR IN
21 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
24 /* $XFree86: xc/include/extensions/lbxopts.h,v 1.5 2001/01/17 17:53:21 dawes Exp $ */
30 * Negotiable configuration options
32 #define LBX_OPT_DELTA_PROXY 0
33 #define LBX_OPT_DELTA_SERVER 1
34 #define LBX_OPT_STREAM_COMP 2
35 #define LBX_OPT_BITMAP_COMP 3
36 #define LBX_OPT_PIXMAP_COMP 4
37 #define LBX_OPT_MSG_COMP 5 /* aka "squishing" */
38 #define LBX_OPT_USE_TAGS 6
39 #define LBX_OPT_CMAP_ALL 7
40 #define LBX_OPT_EXTENSION 255
43 * Length fields are encoded in 1 or 3 bytes
45 #define LBX_OPT_SMALLLEN_SIZE 1
46 #define LBX_OPT_BIGLEN_SIZE 3
47 #define LBX_OPT_BIGLEN_MIN 256
49 #define LBX_OPT_DECODE_LEN(p, len, size) \
52 (size) = LBX_OPT_SMALLLEN_SIZE; \
55 (len) = ((LBX_OPT_BIGLEN_MIN + (p)[1]) << 8) | (p)[2]; \
56 (size) = LBX_OPT_BIGLEN_SIZE; \
60 * Option header lengths
62 #define LBX_OPT_SMALLHDR_LEN (1 + LBX_OPT_SMALLLEN_SIZE)
63 #define LBX_OPT_BIGHDR_LEN (1 + LBX_OPT_BIGLEN_SIZE)
66 * Delta compression parameters
68 #define LBX_OPT_DELTA_REQLEN 6
69 #define LBX_OPT_DELTA_REPLYLEN 2
70 #define LBX_OPT_DELTA_NCACHE_DFLT 16
71 #define LBX_OPT_DELTA_MSGLEN_MIN 32
72 #define LBX_OPT_DELTA_MSGLEN_DFLT 64
76 * Stream compression opts
79 #include <sys/types.h>
81 #if defined(WIN32) || (defined(USG) && !defined(CRAY) && !defined(umips) && !defined(MOTOROLA) && !defined(uniosu) && !defined(__sxg__))
96 typedef void *LbxStreamCompHandle
;
98 typedef struct _LbxStreamOpts
{
99 LbxStreamCompHandle (*streamCompInit
)(int fd
, pointer arg
);
100 pointer streamCompArg
;
101 int (*streamCompStuffInput
)(
106 int (*streamCompInputAvail
)(
109 int (*streamCompFlush
)(
112 int (*streamCompRead
)(
117 int (*streamCompWriteV
)(
122 void (*streamCompOn
)(
125 void (*streamCompOff
)(
128 void (*streamCompFreeHandle
)(
129 LbxStreamCompHandle handle
133 #endif /* _LBX_OPTS_H_ */