~ubuntu-branches/ubuntu/feisty/rdesktop/feisty-updates

« back to all changes in this revision

Viewing changes to orders.h

  • Committer: Bazaar Package Importer
  • Author(s): Sam Johnston
  • Date: 2004-02-04 17:52:26 UTC
  • Revision ID: james.westby@ubuntu.com-20040204175226-87kz4bzs1nimji68
Tags: upstream-1.3.1
ImportĀ upstreamĀ versionĀ 1.3.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
   rdesktop: A Remote Desktop Protocol client.
 
3
   RDP order processing
 
4
   Copyright (C) Matthew Chapman 1999-2002
 
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
#define RDP_ORDER_STANDARD   0x01
 
22
#define RDP_ORDER_SECONDARY  0x02
 
23
#define RDP_ORDER_BOUNDS     0x04
 
24
#define RDP_ORDER_CHANGE     0x08
 
25
#define RDP_ORDER_DELTA      0x10
 
26
#define RDP_ORDER_LASTBOUNDS 0x20
 
27
#define RDP_ORDER_SMALL      0x40
 
28
#define RDP_ORDER_TINY       0x80
 
29
 
 
30
enum RDP_ORDER_TYPE
 
31
{
 
32
        RDP_ORDER_DESTBLT = 0,
 
33
        RDP_ORDER_PATBLT = 1,
 
34
        RDP_ORDER_SCREENBLT = 2,
 
35
        RDP_ORDER_LINE = 9,
 
36
        RDP_ORDER_RECT = 10,
 
37
        RDP_ORDER_DESKSAVE = 11,
 
38
        RDP_ORDER_MEMBLT = 13,
 
39
        RDP_ORDER_TRIBLT = 14,
 
40
        RDP_ORDER_POLYLINE = 22,
 
41
        RDP_ORDER_TEXT2 = 27
 
42
};
 
43
 
 
44
enum RDP_SECONDARY_ORDER_TYPE
 
45
{
 
46
        RDP_ORDER_RAW_BMPCACHE = 0,
 
47
        RDP_ORDER_COLCACHE = 1,
 
48
        RDP_ORDER_BMPCACHE = 2,
 
49
        RDP_ORDER_FONTCACHE = 3
 
50
};
 
51
 
 
52
typedef struct _DESTBLT_ORDER
 
53
{
 
54
        sint16 x;
 
55
        sint16 y;
 
56
        sint16 cx;
 
57
        sint16 cy;
 
58
        uint8 opcode;
 
59
 
 
60
}
 
61
DESTBLT_ORDER;
 
62
 
 
63
typedef struct _PATBLT_ORDER
 
64
{
 
65
        sint16 x;
 
66
        sint16 y;
 
67
        sint16 cx;
 
68
        sint16 cy;
 
69
        uint8 opcode;
 
70
        uint32 bgcolour;
 
71
        uint32 fgcolour;
 
72
        BRUSH brush;
 
73
 
 
74
}
 
75
PATBLT_ORDER;
 
76
 
 
77
typedef struct _SCREENBLT_ORDER
 
78
{
 
79
        sint16 x;
 
80
        sint16 y;
 
81
        sint16 cx;
 
82
        sint16 cy;
 
83
        uint8 opcode;
 
84
        sint16 srcx;
 
85
        sint16 srcy;
 
86
 
 
87
}
 
88
SCREENBLT_ORDER;
 
89
 
 
90
typedef struct _LINE_ORDER
 
91
{
 
92
        uint16 mixmode;
 
93
        sint16 startx;
 
94
        sint16 starty;
 
95
        sint16 endx;
 
96
        sint16 endy;
 
97
        uint32 bgcolour;
 
98
        uint8 opcode;
 
99
        PEN pen;
 
100
 
 
101
}
 
102
LINE_ORDER;
 
103
 
 
104
typedef struct _RECT_ORDER
 
105
{
 
106
        sint16 x;
 
107
        sint16 y;
 
108
        sint16 cx;
 
109
        sint16 cy;
 
110
        uint32 colour;
 
111
 
 
112
}
 
113
RECT_ORDER;
 
114
 
 
115
typedef struct _DESKSAVE_ORDER
 
116
{
 
117
        uint32 offset;
 
118
        sint16 left;
 
119
        sint16 top;
 
120
        sint16 right;
 
121
        sint16 bottom;
 
122
        uint8 action;
 
123
 
 
124
}
 
125
DESKSAVE_ORDER;
 
126
 
 
127
typedef struct _TRIBLT_ORDER
 
128
{
 
129
        uint8 colour_table;
 
130
        uint8 cache_id;
 
131
        sint16 x;
 
132
        sint16 y;
 
133
        sint16 cx;
 
134
        sint16 cy;
 
135
        uint8 opcode;
 
136
        sint16 srcx;
 
137
        sint16 srcy;
 
138
        uint32 bgcolour;
 
139
        uint32 fgcolour;
 
140
        BRUSH brush;
 
141
        uint16 cache_idx;
 
142
        uint16 unknown;
 
143
 
 
144
}
 
145
TRIBLT_ORDER;
 
146
 
 
147
typedef struct _MEMBLT_ORDER
 
148
{
 
149
        uint8 colour_table;
 
150
        uint8 cache_id;
 
151
        sint16 x;
 
152
        sint16 y;
 
153
        sint16 cx;
 
154
        sint16 cy;
 
155
        uint8 opcode;
 
156
        sint16 srcx;
 
157
        sint16 srcy;
 
158
        uint16 cache_idx;
 
159
 
 
160
}
 
161
MEMBLT_ORDER;
 
162
 
 
163
#define MAX_DATA 256
 
164
 
 
165
typedef struct _POLYLINE_ORDER
 
166
{
 
167
        sint16 x;
 
168
        sint16 y;
 
169
        uint8 opcode;
 
170
        uint32 fgcolour;
 
171
        uint8 lines;
 
172
        uint8 datasize;
 
173
        uint8 data[MAX_DATA];
 
174
 
 
175
}
 
176
POLYLINE_ORDER;
 
177
 
 
178
#define MAX_TEXT 256
 
179
 
 
180
typedef struct _TEXT2_ORDER
 
181
{
 
182
        uint8 font;
 
183
        uint8 flags;
 
184
        uint8 mixmode;
 
185
        uint8 unknown;
 
186
        uint32 fgcolour;
 
187
        uint32 bgcolour;
 
188
        sint16 clipleft;
 
189
        sint16 cliptop;
 
190
        sint16 clipright;
 
191
        sint16 clipbottom;
 
192
        sint16 boxleft;
 
193
        sint16 boxtop;
 
194
        sint16 boxright;
 
195
        sint16 boxbottom;
 
196
        sint16 x;
 
197
        sint16 y;
 
198
        uint8 length;
 
199
        uint8 text[MAX_TEXT];
 
200
 
 
201
}
 
202
TEXT2_ORDER;
 
203
 
 
204
typedef struct _RDP_ORDER_STATE
 
205
{
 
206
        uint8 order_type;
 
207
        BOUNDS bounds;
 
208
 
 
209
        DESTBLT_ORDER destblt;
 
210
        PATBLT_ORDER patblt;
 
211
        SCREENBLT_ORDER screenblt;
 
212
        LINE_ORDER line;
 
213
        RECT_ORDER rect;
 
214
        DESKSAVE_ORDER desksave;
 
215
        MEMBLT_ORDER memblt;
 
216
        TRIBLT_ORDER triblt;
 
217
        POLYLINE_ORDER polyline;
 
218
        TEXT2_ORDER text2;
 
219
 
 
220
}
 
221
RDP_ORDER_STATE;
 
222
 
 
223
typedef struct _RDP_RAW_BMPCACHE_ORDER
 
224
{
 
225
        uint8 cache_id;
 
226
        uint8 pad1;
 
227
        uint8 width;
 
228
        uint8 height;
 
229
        uint8 bpp;
 
230
        uint16 bufsize;
 
231
        uint16 cache_idx;
 
232
        uint8 *data;
 
233
 
 
234
}
 
235
RDP_RAW_BMPCACHE_ORDER;
 
236
 
 
237
typedef struct _RDP_BMPCACHE_ORDER
 
238
{
 
239
        uint8 cache_id;
 
240
        uint8 pad1;
 
241
        uint8 width;
 
242
        uint8 height;
 
243
        uint8 bpp;
 
244
        uint16 bufsize;
 
245
        uint16 cache_idx;
 
246
        uint16 pad2;
 
247
        uint16 size;
 
248
        uint16 row_size;
 
249
        uint16 final_size;
 
250
        uint8 *data;
 
251
 
 
252
}
 
253
RDP_BMPCACHE_ORDER;
 
254
 
 
255
#define MAX_GLYPH 32
 
256
 
 
257
typedef struct _RDP_FONT_GLYPH
 
258
{
 
259
        uint16 character;
 
260
        uint16 unknown;
 
261
        uint16 baseline;
 
262
        uint16 width;
 
263
        uint16 height;
 
264
        uint8 data[MAX_GLYPH];
 
265
 
 
266
}
 
267
RDP_FONT_GLYPH;
 
268
 
 
269
#define MAX_GLYPHS 256
 
270
 
 
271
typedef struct _RDP_FONTCACHE_ORDER
 
272
{
 
273
        uint8 font;
 
274
        uint8 nglyphs;
 
275
        RDP_FONT_GLYPH glyphs[MAX_GLYPHS];
 
276
 
 
277
}
 
278
RDP_FONTCACHE_ORDER;
 
279
 
 
280
typedef struct _RDP_COLCACHE_ORDER
 
281
{
 
282
        uint8 cache_id;
 
283
        COLOURMAP map;
 
284
 
 
285
}
 
286
RDP_COLCACHE_ORDER;