/[rdesktop]/sourceforge.net/trunk/rdesktop/types.h
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /sourceforge.net/trunk/rdesktop/types.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1474 - (show annotations)
Fri Jul 11 03:35:24 2008 UTC (15 years, 9 months ago) by jsorg71
File MIME type: text/plain
File size: 5269 byte(s)
added brush cache

1 /*
2 rdesktop: A Remote Desktop Protocol client.
3 Common data types
4 Copyright (C) Matthew Chapman 1999-2007
5
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 */
20
21 typedef int RD_BOOL;
22
23 #ifndef True
24 #define True (1)
25 #define False (0)
26 #endif
27
28 typedef unsigned char uint8;
29 typedef signed char sint8;
30 typedef unsigned short uint16;
31 typedef signed short sint16;
32 typedef unsigned int uint32;
33 typedef signed int sint32;
34
35 typedef void *RD_HBITMAP;
36 typedef void *RD_HGLYPH;
37 typedef void *RD_HCOLOURMAP;
38 typedef void *RD_HCURSOR;
39
40 typedef struct _RD_POINT
41 {
42 sint16 x, y;
43 }
44 RD_POINT;
45
46 typedef struct _COLOURENTRY
47 {
48 uint8 red;
49 uint8 green;
50 uint8 blue;
51
52 }
53 COLOURENTRY;
54
55 typedef struct _COLOURMAP
56 {
57 uint16 ncolours;
58 COLOURENTRY *colours;
59
60 }
61 COLOURMAP;
62
63 typedef struct _BOUNDS
64 {
65 sint16 left;
66 sint16 top;
67 sint16 right;
68 sint16 bottom;
69
70 }
71 BOUNDS;
72
73 typedef struct _PEN
74 {
75 uint8 style;
76 uint8 width;
77 uint32 colour;
78
79 }
80 PEN;
81
82 /* this is whats in the brush cache */
83 typedef struct _BRUSHDATA
84 {
85 uint8 pattern[8];
86 }
87 BRUSHDATA;
88
89 typedef struct _BRUSH
90 {
91 uint8 xorigin;
92 uint8 yorigin;
93 uint8 style;
94 uint8 pattern[8];
95
96 }
97 BRUSH;
98
99 typedef struct _FONTGLYPH
100 {
101 sint16 offset;
102 sint16 baseline;
103 uint16 width;
104 uint16 height;
105 RD_HBITMAP pixmap;
106
107 }
108 FONTGLYPH;
109
110 typedef struct _DATABLOB
111 {
112 void *data;
113 int size;
114
115 }
116 DATABLOB;
117
118 typedef struct _key_translation
119 {
120 /* For normal scancode translations */
121 uint8 scancode;
122 uint16 modifiers;
123 /* For sequences. If keysym is nonzero, the fields above are not used. */
124 uint32 seq_keysym; /* Really KeySym */
125 struct _key_translation *next;
126 }
127 key_translation;
128
129 typedef struct _VCHANNEL
130 {
131 uint16 mcs_id;
132 char name[8];
133 uint32 flags;
134 struct stream in;
135 void (*process) (STREAM);
136 }
137 VCHANNEL;
138
139 /* PSTCACHE */
140 typedef uint8 HASH_KEY[8];
141
142 /* Header for an entry in the persistent bitmap cache file */
143 typedef struct _PSTCACHE_CELLHEADER
144 {
145 HASH_KEY key;
146 uint8 width, height;
147 uint16 length;
148 uint32 stamp;
149 }
150 CELLHEADER;
151
152 #define MAX_CBSIZE 256
153
154 /* RDPSND */
155 typedef struct _RD_WAVEFORMATEX
156 {
157 uint16 wFormatTag;
158 uint16 nChannels;
159 uint32 nSamplesPerSec;
160 uint32 nAvgBytesPerSec;
161 uint16 nBlockAlign;
162 uint16 wBitsPerSample;
163 uint16 cbSize;
164 uint8 cb[MAX_CBSIZE];
165 } RD_WAVEFORMATEX;
166
167 typedef struct _RDPCOMP
168 {
169 uint32 roff;
170 uint8 hist[RDP_MPPC_DICT_SIZE];
171 struct stream ns;
172 }
173 RDPCOMP;
174
175 /* RDPDR */
176 typedef uint32 RD_NTSTATUS;
177 typedef uint32 RD_NTHANDLE;
178
179 typedef struct _DEVICE_FNS
180 {
181 RD_NTSTATUS(*create) (uint32 device, uint32 desired_access, uint32 share_mode,
182 uint32 create_disposition, uint32 flags_and_attributes,
183 char *filename, RD_NTHANDLE * handle);
184 RD_NTSTATUS(*close) (RD_NTHANDLE handle);
185 RD_NTSTATUS(*read) (RD_NTHANDLE handle, uint8 * data, uint32 length, uint32 offset,
186 uint32 * result);
187 RD_NTSTATUS(*write) (RD_NTHANDLE handle, uint8 * data, uint32 length, uint32 offset,
188 uint32 * result);
189 RD_NTSTATUS(*device_control) (RD_NTHANDLE handle, uint32 request, STREAM in, STREAM out);
190 }
191 DEVICE_FNS;
192
193
194 typedef struct rdpdr_device_info
195 {
196 uint32 device_type;
197 RD_NTHANDLE handle;
198 char name[8];
199 char *local_path;
200 void *pdevice_data;
201 }
202 RDPDR_DEVICE;
203
204 typedef struct rdpdr_serial_device_info
205 {
206 int dtr;
207 int rts;
208 uint32 control, xonoff, onlimit, offlimit;
209 uint32 baud_rate,
210 queue_in_size,
211 queue_out_size,
212 wait_mask,
213 read_interval_timeout,
214 read_total_timeout_multiplier,
215 read_total_timeout_constant,
216 write_total_timeout_multiplier, write_total_timeout_constant, posix_wait_mask;
217 uint8 stop_bits, parity, word_length;
218 uint8 chars[6];
219 struct termios *ptermios, *pold_termios;
220 int event_txempty, event_cts, event_dsr, event_rlsd, event_pending;
221 }
222 SERIAL_DEVICE;
223
224 typedef struct rdpdr_parallel_device_info
225 {
226 char *driver, *printer;
227 uint32 queue_in_size,
228 queue_out_size,
229 wait_mask,
230 read_interval_timeout,
231 read_total_timeout_multiplier,
232 read_total_timeout_constant,
233 write_total_timeout_multiplier,
234 write_total_timeout_constant, posix_wait_mask, bloblen;
235 uint8 *blob;
236 }
237 PARALLEL_DEVICE;
238
239 typedef struct rdpdr_printer_info
240 {
241 FILE *printer_fp;
242 char *driver, *printer;
243 uint32 bloblen;
244 uint8 *blob;
245 RD_BOOL default_printer;
246 }
247 PRINTER;
248
249 typedef struct notify_data
250 {
251 time_t modify_time;
252 time_t status_time;
253 time_t total_time;
254 unsigned int num_entries;
255 }
256 NOTIFY;
257
258 #ifndef PATH_MAX
259 #define PATH_MAX 256
260 #endif
261
262 typedef struct fileinfo
263 {
264 uint32 device_id, flags_and_attributes, accessmask;
265 char path[PATH_MAX];
266 DIR *pdir;
267 struct dirent *pdirent;
268 char pattern[PATH_MAX];
269 RD_BOOL delete_on_close;
270 NOTIFY notify;
271 uint32 info_class;
272 }
273 FILEINFO;
274
275 typedef RD_BOOL(*str_handle_lines_t) (const char *line, void *data);

  ViewVC Help
Powered by ViewVC 1.1.26