1 | /* $Xorg: lbximage.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */
|
---|
2 |
|
---|
3 | /******************************************************************************
|
---|
4 |
|
---|
5 | Copyright 1994, 1998 The Open Group
|
---|
6 |
|
---|
7 | Permission to use, copy, modify, distribute, and sell this software and its
|
---|
8 | documentation for any purpose is hereby granted without fee, provided that
|
---|
9 | the above copyright notice appear in all copies and that both that
|
---|
10 | copyright notice and this permission notice appear in supporting
|
---|
11 | documentation.
|
---|
12 |
|
---|
13 | The above copyright notice and this permission notice shall be included in
|
---|
14 | all copies or substantial portions of the Software.
|
---|
15 |
|
---|
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
---|
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
---|
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
---|
19 | OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
---|
20 | AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
---|
21 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
---|
22 |
|
---|
23 | Except as contained in this notice, the name of The Open Group shall not be
|
---|
24 | used in advertising or otherwise to promote the sale, use or other dealings
|
---|
25 | in this Software without prior written authorization from The Open Group.
|
---|
26 |
|
---|
27 | ******************************************************************************/
|
---|
28 | /* $XFree86: xc/include/extensions/lbximage.h,v 1.4 2001/12/20 19:28:54 tsi Exp $ */
|
---|
29 |
|
---|
30 | #ifndef _LBX_IMAGE_H_
|
---|
31 | #define _LBX_IMAGE_H_
|
---|
32 |
|
---|
33 | #include <X11/Xfuncproto.h>
|
---|
34 |
|
---|
35 | _XFUNCPROTOBEGIN
|
---|
36 |
|
---|
37 | typedef struct _LbxBitmapCompMethod {
|
---|
38 |
|
---|
39 | char *methodName;
|
---|
40 | int inited;
|
---|
41 | int methodOpCode; /* to be filled on reply from server */
|
---|
42 |
|
---|
43 | int (*compInit)(
|
---|
44 | #if NeedFunctionPrototypes
|
---|
45 | void
|
---|
46 | #endif
|
---|
47 | );
|
---|
48 |
|
---|
49 | int (*compFunc)(
|
---|
50 | #if NeedFunctionPrototypes
|
---|
51 | unsigned char * /* inbuf */,
|
---|
52 | unsigned char * /* outbuf */,
|
---|
53 | int /* outbufSize */,
|
---|
54 | int /* image_bytes */,
|
---|
55 | int /* pixels_per_line */,
|
---|
56 | int /* padded_bytes_per_scanline */,
|
---|
57 | int /* reverse_bits */,
|
---|
58 | int * /* bytesCompressed */
|
---|
59 | #endif
|
---|
60 | );
|
---|
61 |
|
---|
62 | int (*decompFunc)(
|
---|
63 | #if NeedFunctionPrototypes
|
---|
64 | unsigned char * /* inbuf */,
|
---|
65 | unsigned char * /* outbuf */,
|
---|
66 | int /* image_bytes */,
|
---|
67 | int /* pixels_per_line */,
|
---|
68 | int /* padded_bytes_per_scanline */,
|
---|
69 | int /* reverse_bits */
|
---|
70 | #endif
|
---|
71 | );
|
---|
72 |
|
---|
73 | } LbxBitmapCompMethod;
|
---|
74 |
|
---|
75 |
|
---|
76 | #define LBX_MAX_DEPTHS 5
|
---|
77 |
|
---|
78 | typedef struct _LbxPixmapCompMethod {
|
---|
79 |
|
---|
80 | char *methodName;
|
---|
81 | unsigned formatMask;
|
---|
82 | int depthCount;
|
---|
83 | int depths[LBX_MAX_DEPTHS];
|
---|
84 | int inited;
|
---|
85 | int methodOpCode; /* to be filled on reply from server */
|
---|
86 |
|
---|
87 | int (*compInit)(
|
---|
88 | #if NeedFunctionPrototypes
|
---|
89 | void
|
---|
90 | #endif
|
---|
91 | );
|
---|
92 |
|
---|
93 | int (*compFunc)(
|
---|
94 | #if NeedFunctionPrototypes
|
---|
95 | char * /* inbuf */,
|
---|
96 | char * /* outbuf */,
|
---|
97 | int /* outbufSize */,
|
---|
98 | int /* format */,
|
---|
99 | int /* depth */,
|
---|
100 | int /* num_scan_lines */,
|
---|
101 | int /* scan_line_size */,
|
---|
102 | int * /* bytesCompressed */
|
---|
103 | #endif
|
---|
104 | );
|
---|
105 |
|
---|
106 | int (*decompFunc)(
|
---|
107 | #if NeedFunctionPrototypes
|
---|
108 | char * /* inbuf */,
|
---|
109 | char * /* outbuf */,
|
---|
110 | int /* num_scan_lines */,
|
---|
111 | int /* scan_line_size */
|
---|
112 | #endif
|
---|
113 | );
|
---|
114 |
|
---|
115 | } LbxPixmapCompMethod;
|
---|
116 |
|
---|
117 |
|
---|
118 | extern int LbxImageEncodePackBits (
|
---|
119 | #if NeedFunctionPrototypes
|
---|
120 | char * /* inbuf */,
|
---|
121 | char * /* outbuf */,
|
---|
122 | int /* outbufSize */,
|
---|
123 | int /* format */,
|
---|
124 | int /* depth */,
|
---|
125 | int /* num_scan_lines */,
|
---|
126 | int /* scan_line_size */,
|
---|
127 | int * /* bytesCompressed */
|
---|
128 | #endif
|
---|
129 | );
|
---|
130 |
|
---|
131 | extern int LbxImageEncodeFaxG42D (
|
---|
132 | #if NeedFunctionPrototypes
|
---|
133 | unsigned char * /* inbuf */,
|
---|
134 | unsigned char * /* outbuf */,
|
---|
135 | int /* outbufSize */,
|
---|
136 | int /* image_bytes */,
|
---|
137 | int /* pixels_per_line */,
|
---|
138 | int /* padded_bytes_per_scanline */,
|
---|
139 | int /* reverse_bits */,
|
---|
140 | int * /* bytesCompressed */
|
---|
141 | #endif
|
---|
142 | );
|
---|
143 |
|
---|
144 | extern int LbxImageDecodePackBits (
|
---|
145 | #if NeedFunctionPrototypes
|
---|
146 | char * /* inbuf */,
|
---|
147 | char * /* outbuf */,
|
---|
148 | int /* num_scan_lines */,
|
---|
149 | int /* scan_line_size */
|
---|
150 | #endif
|
---|
151 | );
|
---|
152 |
|
---|
153 | extern int LbxImageDecodeFaxG42D (
|
---|
154 | #if NeedFunctionPrototypes
|
---|
155 | unsigned char * /* inbuf */,
|
---|
156 | unsigned char * /* outbuf */,
|
---|
157 | int /* image_bytes */,
|
---|
158 | int /* pixels_per_line */,
|
---|
159 | int /* padded_bytes_per_scanline */,
|
---|
160 | int /* reverse_bits */
|
---|
161 | #endif
|
---|
162 | );
|
---|
163 |
|
---|
164 | _XFUNCPROTOEND
|
---|
165 |
|
---|
166 | #define LBX_IMAGE_COMPRESS_SUCCESS 0
|
---|
167 | #define LBX_IMAGE_COMPRESS_NO_SUPPORT 1
|
---|
168 | #define LBX_IMAGE_COMPRESS_BAD_MALLOC 2
|
---|
169 | #define LBX_IMAGE_COMPRESS_NOT_WORTH_IT 3
|
---|
170 |
|
---|
171 | #endif /* _LBX_IMAGE_H_ */
|
---|