~ubuntu-branches/ubuntu/gutsy/vnc4/gutsy

« back to all changes in this revision

Viewing changes to unix/xc/include/extensions/renderproto.h

  • Committer: Bazaar Package Importer
  • Author(s): Ola Lundqvist
  • Date: 2006-05-15 20:35:17 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20060515203517-l4lre1ku942mn26k
Tags: 4.1.1+X4.3.0-10
* Correction of critical security issue. Thanks to Martin Kogler
  <e9925248@student.tuwien.ac.at> that informed me about the issue,
  and provided the patch.
  This flaw was originally found by Steve Wiseman of intelliadmin.com.
* Applied patch from Javier Kohen <jkohen@users.sourceforge.net> that
  inform the user that only 8 first characters of the password will
  actually be used when typing more than 8 characters, closes:
  #355619.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * $XFree86: xc/include/extensions/renderproto.h,v 1.13 2002/11/23 02:34:45 keithp Exp $
 
3
 *
 
4
 * Copyright � 2000 SuSE, Inc.
 
5
 *
 
6
 * Permission to use, copy, modify, distribute, and sell this software and its
 
7
 * documentation for any purpose is hereby granted without fee, provided that
 
8
 * the above copyright notice appear in all copies and that both that
 
9
 * copyright notice and this permission notice appear in supporting
 
10
 * documentation, and that the name of SuSE not be used in advertising or
 
11
 * publicity pertaining to distribution of the software without specific,
 
12
 * written prior permission.  SuSE makes no representations about the
 
13
 * suitability of this software for any purpose.  It is provided "as is"
 
14
 * without express or implied warranty.
 
15
 *
 
16
 * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
 
17
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
 
18
 * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
 
19
 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
 
20
 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 
 
21
 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
22
 *
 
23
 * Author:  Keith Packard, SuSE, Inc.
 
24
 */
 
25
 
 
26
#ifndef _XRENDERP_H_
 
27
#define _XRENDERP_H_
 
28
 
 
29
#include <X11/Xmd.h>
 
30
#include <X11/extensions/render.h>
 
31
 
 
32
#define Window CARD32
 
33
#define Drawable CARD32
 
34
#define Font CARD32
 
35
#define Pixmap CARD32
 
36
#define Cursor CARD32
 
37
#define Colormap CARD32
 
38
#define GContext CARD32
 
39
#define Atom CARD32
 
40
#define VisualID CARD32
 
41
#define Time CARD32
 
42
#define KeyCode CARD8
 
43
#define KeySym CARD32
 
44
 
 
45
#define Picture     CARD32
 
46
#define PictFormat  CARD32
 
47
#define Fixed       INT32
 
48
#define Glyphset    CARD32
 
49
#define Glyph       CARD32
 
50
 
 
51
/*
 
52
 * data structures
 
53
 */
 
54
 
 
55
typedef struct {
 
56
    CARD16  red B16;
 
57
    CARD16  redMask B16;
 
58
    CARD16  green B16;
 
59
    CARD16  greenMask B16;
 
60
    CARD16  blue B16;
 
61
    CARD16  blueMask B16;
 
62
    CARD16  alpha B16;
 
63
    CARD16  alphaMask B16;
 
64
} xDirectFormat;
 
65
 
 
66
#define sz_xDirectFormat    16
 
67
 
 
68
typedef struct {
 
69
    PictFormat  id B32;
 
70
    CARD8       type;
 
71
    CARD8       depth;
 
72
    CARD16      pad1 B16;
 
73
    xDirectFormat   direct;
 
74
    Colormap    colormap;
 
75
} xPictFormInfo;
 
76
 
 
77
#define sz_xPictFormInfo    28
 
78
 
 
79
typedef struct {
 
80
    VisualID    visual;
 
81
    PictFormat  format;
 
82
} xPictVisual;
 
83
 
 
84
#define sz_xPictVisual      8
 
85
 
 
86
typedef struct {
 
87
    CARD8       depth;
 
88
    CARD8       pad1;
 
89
    CARD16      nPictVisuals B16;
 
90
    CARD32      pad2 B32;
 
91
} xPictDepth;
 
92
 
 
93
#define sz_xPictDepth   8
 
94
 
 
95
typedef struct {
 
96
    CARD32      nDepth B32;
 
97
    PictFormat  fallback B32;
 
98
} xPictScreen;
 
99
 
 
100
#define sz_xPictScreen  8
 
101
 
 
102
typedef struct {
 
103
    CARD32      pixel B32;
 
104
    CARD16      red B16;
 
105
    CARD16      green B16;
 
106
    CARD16      blue B16;
 
107
    CARD16      alpha B16;
 
108
} xIndexValue;
 
109
 
 
110
#define sz_xIndexValue  12
 
111
 
 
112
typedef struct {
 
113
    CARD16      red B16;
 
114
    CARD16      green B16;
 
115
    CARD16      blue B16;
 
116
    CARD16      alpha B16;
 
117
} xRenderColor;
 
118
 
 
119
#define sz_xRenderColor 8
 
120
 
 
121
typedef struct {
 
122
    Fixed       x B32;
 
123
    Fixed       y B32;
 
124
} xPointFixed;
 
125
 
 
126
#define sz_xPointFixed  8
 
127
 
 
128
typedef struct {
 
129
    xPointFixed p1;
 
130
    xPointFixed p2;
 
131
} xLineFixed;
 
132
 
 
133
#define sz_xLineFixed   16
 
134
 
 
135
typedef struct {
 
136
    xPointFixed p1, p2, p3;
 
137
} xTriangle;
 
138
 
 
139
#define sz_xTriangle    24
 
140
 
 
141
typedef struct {
 
142
    Fixed       top B32;
 
143
    Fixed       bottom B32;
 
144
    xLineFixed  left;
 
145
    xLineFixed  right;
 
146
} xTrapezoid;
 
147
 
 
148
#define sz_xTrapezoid   40
 
149
 
 
150
typedef struct {
 
151
    CARD16  width B16;
 
152
    CARD16  height B16;
 
153
    INT16   x B16;
 
154
    INT16   y B16;
 
155
    INT16   xOff B16;
 
156
    INT16   yOff B16;
 
157
} xGlyphInfo;
 
158
 
 
159
#define sz_xGlyphInfo   12
 
160
 
 
161
typedef struct {
 
162
    CARD8   len;
 
163
    CARD8   pad1;
 
164
    CARD16  pad2;
 
165
    INT16   deltax;
 
166
    INT16   deltay;
 
167
} xGlyphElt;
 
168
 
 
169
#define sz_xGlyphElt    8
 
170
 
 
171
/* 
 
172
 * requests and replies
 
173
 */
 
174
typedef struct {
 
175
    CARD8   reqType;
 
176
    CARD8   renderReqType;
 
177
    CARD16  length B16;
 
178
    CARD32  majorVersion B32;
 
179
    CARD32  minorVersion B32;
 
180
} xRenderQueryVersionReq;
 
181
 
 
182
#define sz_xRenderQueryVersionReq   12
 
183
 
 
184
typedef struct {
 
185
    BYTE    type;   /* X_Reply */
 
186
    BYTE    pad1;
 
187
    CARD16  sequenceNumber B16;
 
188
    CARD32  length B32;
 
189
    CARD32  majorVersion B32;
 
190
    CARD32  minorVersion B32;
 
191
    CARD32  pad2 B32;
 
192
    CARD32  pad3 B32;
 
193
    CARD32  pad4 B32;
 
194
    CARD32  pad5 B32;
 
195
} xRenderQueryVersionReply;
 
196
 
 
197
#define sz_xRenderQueryVersionReply     32
 
198
 
 
199
typedef struct {
 
200
    CARD8   reqType;
 
201
    CARD8   renderReqType;
 
202
    CARD16  length B16;
 
203
} xRenderQueryPictFormatsReq;
 
204
 
 
205
#define sz_xRenderQueryPictFormatsReq   4
 
206
 
 
207
typedef struct {
 
208
    BYTE    type;   /* X_Reply */
 
209
    BYTE    pad1;
 
210
    CARD16  sequenceNumber B16;
 
211
    CARD32  length B32;
 
212
    CARD32  numFormats B32;
 
213
    CARD32  numScreens B32;
 
214
    CARD32  numDepths B32;
 
215
    CARD32  numVisuals B32;
 
216
    CARD32  numSubpixel B32;        /* Version 0.6 */
 
217
    CARD32  pad5 B32;
 
218
} xRenderQueryPictFormatsReply;
 
219
 
 
220
#define sz_xRenderQueryPictFormatsReply 32
 
221
 
 
222
typedef struct {
 
223
    CARD8   reqType;
 
224
    CARD8   renderReqType;
 
225
    CARD16  length B16;
 
226
    PictFormat  format B32;
 
227
} xRenderQueryPictIndexValuesReq;
 
228
 
 
229
#define sz_xRenderQueryPictIndexValuesReq   8
 
230
 
 
231
typedef struct {
 
232
    BYTE    type;   /* X_Reply */
 
233
    BYTE    pad1;
 
234
    CARD16  sequenceNumber B16;
 
235
    CARD32  length B32;
 
236
    CARD32  numIndexValues;
 
237
    CARD32  pad2 B32;
 
238
    CARD32  pad3 B32;
 
239
    CARD32  pad4 B32;
 
240
    CARD32  pad5 B32;
 
241
    CARD32  pad6 B32;
 
242
} xRenderQueryPictIndexValuesReply;
 
243
 
 
244
#define sz_xRenderQueryPictIndexValuesReply 32
 
245
 
 
246
typedef struct {
 
247
    CARD8       reqType;
 
248
    CARD8       renderReqType;
 
249
    CARD16      length B16;
 
250
    Picture     pid B32;
 
251
    Drawable    drawable B32;
 
252
    PictFormat  format B32;
 
253
    CARD32      mask B32;
 
254
} xRenderCreatePictureReq;
 
255
 
 
256
#define sz_xRenderCreatePictureReq          20
 
257
 
 
258
typedef struct {
 
259
    CARD8       reqType;
 
260
    CARD8       renderReqType;
 
261
    CARD16      length B16;
 
262
    Picture     picture B32;
 
263
    CARD32      mask B32;
 
264
} xRenderChangePictureReq;
 
265
 
 
266
#define sz_xRenderChangePictureReq          12
 
267
 
 
268
typedef struct {
 
269
    CARD8       reqType;
 
270
    CARD8       renderReqType;
 
271
    CARD16      length B16;
 
272
    Picture     picture B32;
 
273
    INT16       xOrigin B16;
 
274
    INT16       yOrigin B16;
 
275
} xRenderSetPictureClipRectanglesReq;
 
276
 
 
277
#define sz_xRenderSetPictureClipRectanglesReq       12
 
278
 
 
279
typedef struct {
 
280
    CARD8       reqType;
 
281
    CARD8       renderReqType;
 
282
    CARD16      length B16;
 
283
    Picture     picture B32;
 
284
} xRenderFreePictureReq;
 
285
 
 
286
#define sz_xRenderFreePictureReq            8
 
287
 
 
288
typedef struct {
 
289
    CARD8       reqType;
 
290
    CARD8       renderReqType;
 
291
    CARD16      length B16;
 
292
    CARD8       op;
 
293
    CARD8       pad1;
 
294
    CARD16      pad2 B16;
 
295
    Picture     src B32;
 
296
    Picture     mask B32;
 
297
    Picture     dst B32;
 
298
    INT16       xSrc B16;
 
299
    INT16       ySrc B16;
 
300
    INT16       xMask B16;
 
301
    INT16       yMask B16;
 
302
    INT16       xDst B16;
 
303
    INT16       yDst B16;
 
304
    CARD16      width B16;
 
305
    CARD16      height B16;
 
306
} xRenderCompositeReq;
 
307
 
 
308
#define sz_xRenderCompositeReq              36
 
309
 
 
310
typedef struct {
 
311
    CARD8       reqType;
 
312
    CARD8       renderReqType;
 
313
    CARD16      length B16;
 
314
    Picture     src B32;
 
315
    Picture     dst B32;
 
316
    CARD32      colorScale B32;
 
317
    CARD32      alphaScale B32;
 
318
    INT16       xSrc B16;
 
319
    INT16       ySrc B16;
 
320
    INT16       xDst B16;
 
321
    INT16       yDst B16;
 
322
    CARD16      width B16;
 
323
    CARD16      height B16;
 
324
} xRenderScaleReq;
 
325
 
 
326
#define sz_xRenderScaleReq                          32
 
327
 
 
328
typedef struct {
 
329
    CARD8       reqType;
 
330
    CARD8       renderReqType;
 
331
    CARD16      length B16;
 
332
    CARD8       op;
 
333
    CARD8       pad1;
 
334
    CARD16      pad2 B16;
 
335
    Picture     src B32;
 
336
    Picture     dst B32;
 
337
    PictFormat  maskFormat B32;
 
338
    INT16       xSrc B16;
 
339
    INT16       ySrc B16;
 
340
} xRenderTrapezoidsReq;
 
341
 
 
342
#define sz_xRenderTrapezoidsReq                     24
 
343
 
 
344
typedef struct {
 
345
    CARD8       reqType;
 
346
    CARD8       renderReqType;
 
347
    CARD16      length B16;
 
348
    CARD8       op;
 
349
    CARD8       pad1;
 
350
    CARD16      pad2 B16;
 
351
    Picture     src B32;
 
352
    Picture     dst B32;
 
353
    PictFormat  maskFormat B32;
 
354
    INT16       xSrc B16;
 
355
    INT16       ySrc B16;
 
356
} xRenderTrianglesReq;
 
357
 
 
358
#define sz_xRenderTrianglesReq                      24
 
359
 
 
360
typedef struct {
 
361
    CARD8       reqType;
 
362
    CARD8       renderReqType;
 
363
    CARD16      length B16;
 
364
    CARD8       op;
 
365
    CARD8       pad1;
 
366
    CARD16      pad2 B16;
 
367
    Picture     src B32;
 
368
    Picture     dst B32;
 
369
    PictFormat  maskFormat B32;
 
370
    INT16       xSrc B16;
 
371
    INT16       ySrc B16;
 
372
} xRenderTriStripReq;
 
373
 
 
374
#define sz_xRenderTriStripReq                       24
 
375
 
 
376
typedef struct {
 
377
    CARD8       reqType;
 
378
    CARD8       renderReqType;
 
379
    CARD16      length B16;
 
380
    CARD8       op;
 
381
    CARD8       pad1;
 
382
    CARD16      pad2 B16;
 
383
    Picture     src B32;
 
384
    Picture     dst B32;
 
385
    PictFormat  maskFormat B32;
 
386
    INT16       xSrc B16;
 
387
    INT16       ySrc B16;
 
388
} xRenderTriFanReq;
 
389
 
 
390
#define sz_xRenderTriFanReq                         24
 
391
 
 
392
typedef struct {
 
393
    CARD8       reqType;
 
394
    CARD8       renderReqType;
 
395
    CARD16      length B16;
 
396
    Glyphset    gsid B32;
 
397
    PictFormat  format B32;
 
398
} xRenderCreateGlyphSetReq;
 
399
 
 
400
#define sz_xRenderCreateGlyphSetReq                 12
 
401
 
 
402
typedef struct {
 
403
    CARD8       reqType;
 
404
    CARD8       renderReqType;
 
405
    CARD16      length B16;
 
406
    Glyphset    gsid B32;
 
407
    Glyphset    existing B32;
 
408
} xRenderReferenceGlyphSetReq;
 
409
 
 
410
#define sz_xRenderReferenceGlyphSetReq              24
 
411
 
 
412
typedef struct {
 
413
    CARD8       reqType;
 
414
    CARD8       renderReqType;
 
415
    CARD16      length B16;
 
416
    Glyphset    glyphset B32;
 
417
} xRenderFreeGlyphSetReq;
 
418
 
 
419
#define sz_xRenderFreeGlyphSetReq                   8
 
420
 
 
421
typedef struct {
 
422
    CARD8       reqType;
 
423
    CARD8       renderReqType;
 
424
    CARD16      length B16;
 
425
    Glyphset    glyphset B32;
 
426
    CARD32      nglyphs;
 
427
} xRenderAddGlyphsReq;
 
428
 
 
429
#define sz_xRenderAddGlyphsReq                      12
 
430
 
 
431
typedef struct {
 
432
    CARD8       reqType;
 
433
    CARD8       renderReqType;
 
434
    CARD16      length B16;
 
435
    Glyphset    glyphset B32;
 
436
} xRenderFreeGlyphsReq;
 
437
 
 
438
#define sz_xRenderFreeGlyphsReq                     8
 
439
 
 
440
typedef struct {
 
441
    CARD8       reqType;
 
442
    CARD8       renderReqType;
 
443
    CARD16      length B16;
 
444
    CARD8       op;
 
445
    CARD8       pad1;
 
446
    CARD16      pad2 B16;
 
447
    Picture     src B32;
 
448
    Picture     dst B32;
 
449
    PictFormat  maskFormat B32;
 
450
    Glyphset    glyphset B32;
 
451
    INT16       xSrc B16;
 
452
    INT16       ySrc B16;
 
453
} xRenderCompositeGlyphsReq, xRenderCompositeGlyphs8Req, 
 
454
xRenderCompositeGlyphs16Req, xRenderCompositeGlyphs32Req;
 
455
 
 
456
#define sz_xRenderCompositeGlyphs8Req               28
 
457
#define sz_xRenderCompositeGlyphs16Req              28
 
458
#define sz_xRenderCompositeGlyphs32Req              28
 
459
 
 
460
/* 0.1 and higher */
 
461
 
 
462
typedef struct {
 
463
    CARD8       reqType;
 
464
    CARD8       renderReqType;
 
465
    CARD16      length B16;
 
466
    CARD8       op;
 
467
    CARD8       pad1;
 
468
    CARD16      pad2 B16;
 
469
    Picture     dst B32;
 
470
    xRenderColor    color;
 
471
} xRenderFillRectanglesReq;
 
472
 
 
473
#define sz_xRenderFillRectanglesReq                 20
 
474
 
 
475
/* 0.5 and higher */
 
476
 
 
477
typedef struct {
 
478
    CARD8       reqType;
 
479
    CARD8       renderReqType;
 
480
    CARD16      length B16;
 
481
    Cursor      cid B32;
 
482
    Picture     src B32;
 
483
    CARD16      x B16;
 
484
    CARD16      y B16;
 
485
} xRenderCreateCursorReq;
 
486
 
 
487
#define sz_xRenderCreateCursorReq                   16
 
488
 
 
489
/* 0.6 and higher */
 
490
 
 
491
/*
 
492
 * This can't use an array because 32-bit values may be in bitfields
 
493
 */
 
494
typedef struct {
 
495
    Fixed       matrix11 B32;
 
496
    Fixed       matrix12 B32;
 
497
    Fixed       matrix13 B32;
 
498
    Fixed       matrix21 B32;
 
499
    Fixed       matrix22 B32;
 
500
    Fixed       matrix23 B32;
 
501
    Fixed       matrix31 B32;
 
502
    Fixed       matrix32 B32;
 
503
    Fixed       matrix33 B32;
 
504
} xRenderTransform;
 
505
 
 
506
#define sz_xRenderTransform 36
 
507
 
 
508
typedef struct {
 
509
    CARD8               reqType;
 
510
    CARD8               renderReqType;
 
511
    CARD16              length B16;
 
512
    Picture             picture B32;
 
513
    xRenderTransform    transform;
 
514
} xRenderSetPictureTransformReq;
 
515
 
 
516
#define sz_xRenderSetPictureTransformReq            44
 
517
 
 
518
typedef struct {
 
519
    CARD8               reqType;
 
520
    CARD8               renderReqType;
 
521
    CARD16              length B16;
 
522
    Drawable            drawable B32;
 
523
} xRenderQueryFiltersReq;
 
524
 
 
525
#define sz_xRenderQueryFiltersReq                   8
 
526
 
 
527
typedef struct {
 
528
    BYTE    type;   /* X_Reply */
 
529
    BYTE    pad1;
 
530
    CARD16  sequenceNumber B16;
 
531
    CARD32  length B32;
 
532
    CARD32  numAliases B32;     /* LISTofCARD16 */
 
533
    CARD32  numFilters B32;     /* LISTofSTRING8 */
 
534
    CARD32  pad2 B32;
 
535
    CARD32  pad3 B32;
 
536
    CARD32  pad4 B32;
 
537
    CARD32  pad5 B32;
 
538
} xRenderQueryFiltersReply;
 
539
 
 
540
#define sz_xRenderQueryFiltersReply                 32
 
541
 
 
542
typedef struct {
 
543
    CARD8               reqType;
 
544
    CARD8               renderReqType;
 
545
    CARD16              length B16;
 
546
    Picture             picture B32;
 
547
    CARD16              nbytes B16; /* number of bytes in name */
 
548
    CARD16              pad B16;
 
549
} xRenderSetPictureFilterReq;
 
550
 
 
551
#define sz_xRenderSetPictureFilterReq               12
 
552
    
 
553
/* 0.8 and higher */
 
554
 
 
555
typedef struct {
 
556
    Cursor              cursor B32;
 
557
    CARD32              delay B32;
 
558
} xAnimCursorElt;
 
559
 
 
560
#define sz_xAnimCursorElt                           8
 
561
 
 
562
typedef struct {
 
563
    CARD8               reqType;
 
564
    CARD8               renderReqType;
 
565
    CARD16              length B16;
 
566
    Cursor              cid B32;
 
567
} xRenderCreateAnimCursorReq;
 
568
 
 
569
#define sz_xRenderCreateAnimCursorReq               8
 
570
 
 
571
#undef Window
 
572
#undef Drawable
 
573
#undef Font
 
574
#undef Pixmap
 
575
#undef Cursor
 
576
#undef Colormap
 
577
#undef GContext
 
578
#undef Atom
 
579
#undef VisualID
 
580
#undef Time
 
581
#undef KeyCode
 
582
#undef KeySym
 
583
 
 
584
#undef Picture
 
585
#undef PictFormat
 
586
#undef Fixed
 
587
#undef Glyphset
 
588
#undef Glyph
 
589
 
 
590
#endif /* _XRENDERP_H_ */