]> git.karo-electronics.de Git - karo-tx-redboot.git/blob - packages/services/gfx/mw/v2_0/src/nanox/nxproto.h
Initial revision
[karo-tx-redboot.git] / packages / services / gfx / mw / v2_0 / src / nanox / nxproto.h
1 /*
2  * Copyright (c) 1999 Greg Haerr <greg@censoft.com>
3  * Copyright (c) 2000 Alex Holden <alex@linuxhacker.org>
4  *
5  * Nano-X Core Protocol Header
6  * 
7  * These structures define the Nano-X client/server protocol.
8  * Much of this has been modeled after the X11 implementation.
9  * Note that all NX Protocol requests should have all data quantities
10  * properly aligned. This is assured by hand-coding each NX request
11  * structure.  Unlike Xlib, fixed size request structs don't have to
12  * be a multiple of 4 bytes, since the length field is a byte count
13  * and GetReq() automatically pads all requests to 4-byte boundaries.
14  * Request structs for variable size data, however, must be hand-padded
15  * to 4-byte alignment, as variable data starts after sizeof(structure).
16  * Also, the hilength/length fields store the unaligned byte count, so
17  * that extra code isn't required to de-crypt extra data size or
18  * big packets.
19  */
20
21 /*
22  * The following is provided to allow limiting the maximum
23  * request size that will be sent (not received) using this protocol.
24  * The protocol allows for 2^24 byte maximum, but the
25  * server currently allocates the MAXREQUESTSZ in a stack buffer.
26  * Also, the client realloc's the request queue to 
27  * the largest size asked for, and currently never reduces it.
28  *
29  * Routines like GrArea will split packets to be <= MAXREQUESTSZ
30  * automatically.
31  *
32  * NOTE: MAXREQUESTSZ must be an _aligned_ multiple of 4, meaning
33  * that MAXREQUESTSZ = (MAXREQUESTSZ + 3) & ~3.
34  */
35 #define MAXREQUESTSZ    30000           /* max request size (65532)*/
36
37 typedef unsigned char   BYTE8;          /* 1 byte*/
38 typedef unsigned short  UINT16;         /* 2 bytes*/
39 typedef short           INT16;          /* 2 bytes*/
40 typedef unsigned long   UINT32;         /* 4 bytes*/
41
42 #if ELKS
43 typedef UINT16          IDTYPE;
44 #define ALIGNSZ         2       /* 2 byte packet alignment*/
45 #else
46 typedef UINT32          IDTYPE;
47 #define ALIGNSZ         4       /* 4 byte packet alignment*/
48 #endif
49
50 /* all requests share this header*/
51 typedef struct {
52         BYTE8   reqType;        /* request code*/
53         BYTE8   hilength;       /* upper 24 bits of unaligned length*/
54         UINT16  length;         /* lower 16 bits of unaligned length*/
55 } nxReq;
56
57 /* Allocate a fixed size request from request buffer*/
58 #define AllocReq(name) \
59         ((nx##name##Req *)nxAllocReq(GrNum##name,sizeof(nx##name##Req), 0))
60
61 /* Allocate a request, but allocate n extra bytes*/
62 #define AllocReqExtra(name,n) \
63         ((nx##name##Req *)nxAllocReq(GrNum##name,sizeof(nx##name##Req), n))
64
65 /* return pointer to variable length data*/
66 #define GetReqData(req)         ((void *)((char *)req + sizeof(* (req))))
67
68 /* FIXME fails when sizeof(int) == 2*/
69 /* get request total valid data length, including header*/
70 #define GetReqLen(req)          (((req)->hilength << 16) | (req)->length)
71
72 /* get request variable data length, not including fixed size structure*/
73 #define GetReqVarLen(req)       (GetReqLen(req) - sizeof(* (req)))
74
75 /* get request total aligned length*/
76 #define GetReqAlignedLen(req)   ((GetReqLen(req) + (ALIGNSZ-1)) & ~(ALIGNSZ-1))
77
78 void *  nxAllocReq(int type, long size, long extra);
79 void    nxFlushReq(long newsize, int reply_needed);
80 void    nxAssignReqbuffer(char *buffer, long size);
81 void    nxWriteSocket(char *buf, int todo);
82 int     nxCalcStringBytes(void *str, int count, int flags);
83
84 #if notyet
85 /* all replies share this header*/
86 typedef struct {
87         BYTE8   repType;        /* reply code*/
88         BYTE8   hilength;       /* upper 24 bits of unaligned length*/
89         UINT16  length;         /* lower 16 bits of unaligned length*/
90 } nxReply;
91
92 /* reply types if not equal to request type*/
93 #define GrNumErrorReply         255
94 #define GrNumEventReply         254
95 #endif /* notyet*/
96
97 #define GrNumOpen               0
98 typedef struct {
99         BYTE8   reqType;
100         BYTE8   hilength;
101         UINT16  length;
102         UINT32  pid;
103 } nxOpenReq;
104
105 #define GrNumClose              1
106 typedef struct {
107         BYTE8   reqType;
108         BYTE8   hilength;
109         UINT16  length;
110 } nxCloseReq;
111
112 #define GrNumGetScreenInfo      2
113 typedef struct {
114         BYTE8   reqType;
115         BYTE8   hilength;
116         UINT16  length;
117 } nxGetScreenInfoReq;
118
119 #define GrNumNewWindow          3
120 typedef struct {
121         BYTE8   reqType;
122         BYTE8   hilength;
123         UINT16  length;
124         IDTYPE  parentid;
125         INT16   x;
126         INT16   y;
127         INT16   width;
128         INT16   height;
129         UINT32  backgroundcolor;
130         UINT32  bordercolor;
131         INT16   bordersize;
132 } nxNewWindowReq;
133
134 #define GrNumNewInputWindow     4
135 typedef struct {
136         BYTE8   reqType;
137         BYTE8   hilength;
138         UINT16  length;
139         IDTYPE  parentid;
140         INT16   x;
141         INT16   y;
142         INT16   width;
143         INT16   height;
144 } nxNewInputWindowReq;
145
146 #define GrNumDestroyWindow      5
147 typedef struct {
148         BYTE8   reqType;
149         BYTE8   hilength;
150         UINT16  length;
151         IDTYPE  windowid;
152 } nxDestroyWindowReq;
153
154 #define GrNumNewGC              6
155 typedef struct {
156         BYTE8   reqType;
157         BYTE8   hilength;
158         UINT16  length;
159 } nxNewGCReq;
160
161 #define GrNumCopyGC             7
162 typedef struct {
163         BYTE8   reqType;
164         BYTE8   hilength;
165         UINT16  length;
166         IDTYPE  gcid;
167 } nxCopyGCReq;
168
169 #define GrNumGetGCInfo          8
170 typedef struct {
171         BYTE8   reqType;
172         BYTE8   hilength;
173         UINT16  length;
174         IDTYPE  gcid;
175 } nxGetGCInfoReq;
176
177 #define GrNumDestroyGC          9
178 typedef struct {
179         BYTE8   reqType;
180         BYTE8   hilength;
181         UINT16  length;
182         IDTYPE  gcid;
183 } nxDestroyGCReq;
184
185 #define GrNumMapWindow          10
186 typedef struct {
187         BYTE8   reqType;
188         BYTE8   hilength;
189         UINT16  length;
190         IDTYPE  windowid;
191 } nxMapWindowReq;
192
193 #define GrNumUnmapWindow        11
194 typedef struct {
195         BYTE8   reqType;
196         BYTE8   hilength;
197         UINT16  length;
198         IDTYPE  windowid;
199 } nxUnmapWindowReq;
200
201 #define GrNumRaiseWindow        12
202 typedef struct {
203         BYTE8   reqType;
204         BYTE8   hilength;
205         UINT16  length;
206         IDTYPE  windowid;
207 } nxRaiseWindowReq;
208
209 #define GrNumLowerWindow        13
210 typedef struct {
211         BYTE8   reqType;
212         BYTE8   hilength;
213         UINT16  length;
214         IDTYPE  windowid;
215 } nxLowerWindowReq;
216
217 #define GrNumMoveWindow         14
218 typedef struct {
219         BYTE8   reqType;
220         BYTE8   hilength;
221         UINT16  length;
222         IDTYPE  windowid;
223         INT16   x;
224         INT16   y;
225 } nxMoveWindowReq;
226
227 #define GrNumResizeWindow       15
228 typedef struct {
229         BYTE8   reqType;
230         BYTE8   hilength;
231         UINT16  length;
232         IDTYPE  windowid;
233         INT16   width;
234         INT16   height;
235 } nxResizeWindowReq;
236
237 #define GrNumGetWindowInfo      16
238 typedef struct {
239         BYTE8   reqType;
240         BYTE8   hilength;
241         UINT16  length;
242         IDTYPE  windowid;
243 } nxGetWindowInfoReq;
244
245 #define GrNumGetFontInfo        17
246 typedef struct {
247         BYTE8   reqType;
248         BYTE8   hilength;
249         UINT16  length;
250         IDTYPE  fontid;
251 } nxGetFontInfoReq;
252
253 #define GrNumSetFocus           18
254 typedef struct {
255         BYTE8   reqType;
256         BYTE8   hilength;
257         UINT16  length;
258         IDTYPE  windowid;
259 } nxSetFocusReq;
260
261 #define GrNumSetWindowCursor    19
262 typedef struct {
263         BYTE8   reqType;
264         BYTE8   hilength;
265         UINT16  length;
266         IDTYPE  windowid;
267         IDTYPE  cursorid;
268 } nxSetWindowCursorReq;
269
270 #define GrNumClearArea          20
271 typedef struct {
272         BYTE8   reqType;
273         BYTE8   hilength;
274         UINT16  length;
275         IDTYPE  windowid;
276         UINT16  x;
277         UINT16  y;
278         UINT16  width;
279         UINT16  height;
280         UINT16  exposeflag;
281 } nxClearAreaReq;
282
283 #define GrNumSelectEvents       21
284 typedef struct {
285         BYTE8   reqType;
286         BYTE8   hilength;
287         UINT16  length;
288         IDTYPE  windowid;
289         UINT32  eventmask;
290 } nxSelectEventsReq;
291
292 #define GrNumGetNextEvent       22
293 typedef struct {
294         BYTE8   reqType;
295         BYTE8   hilength;
296         UINT16  length;
297 } nxGetNextEventReq;
298
299 #define GrNumCheckNextEvent     23
300 typedef struct {
301         BYTE8   reqType;
302         BYTE8   hilength;
303         UINT16  length;
304 } nxCheckNextEventReq;
305
306 #define GrNumPeekEvent          24
307 typedef struct {
308         BYTE8   reqType;
309         BYTE8   hilength;
310         UINT16  length;
311 } nxPeekEventReq;
312
313 #define GrNumLine               25
314 typedef struct {
315         BYTE8   reqType;
316         BYTE8   hilength;
317         UINT16  length;
318         IDTYPE  drawid;
319         IDTYPE  gcid;
320         INT16   x1;
321         INT16   y1;
322         INT16   x2;
323         INT16   y2;
324 } nxLineReq;
325
326 #define GrNumPoint              26
327 typedef struct {
328         BYTE8   reqType;
329         BYTE8   hilength;
330         UINT16  length;
331         IDTYPE  drawid;
332         IDTYPE  gcid;
333         INT16   x;
334         INT16   y;
335 } nxPointReq;
336
337 #define GrNumRect               27
338 typedef struct {
339         BYTE8   reqType;
340         BYTE8   hilength;
341         UINT16  length;
342         IDTYPE  drawid;
343         IDTYPE  gcid;
344         INT16   x;
345         INT16   y;
346         INT16   width;
347         INT16   height;
348 } nxRectReq;
349
350 #define GrNumFillRect           28
351 typedef struct {
352         BYTE8   reqType;
353         BYTE8   hilength;
354         UINT16  length;
355         IDTYPE  drawid;
356         IDTYPE  gcid;
357         INT16   x;
358         INT16   y;
359         INT16   width;
360         INT16   height;
361 } nxFillRectReq;
362
363 #define GrNumPoly               29
364 typedef struct {
365         BYTE8   reqType;
366         BYTE8   hilength;
367         UINT16  length;
368         IDTYPE  drawid;
369         IDTYPE  gcid;
370         /*INT16 pointtable[];*/
371 } nxPolyReq;
372
373 #define GrNumFillPoly           30
374 typedef struct {
375         BYTE8   reqType;
376         BYTE8   hilength;
377         UINT16  length;
378         IDTYPE  drawid;
379         IDTYPE  gcid;
380         /*INT16 pointtable[];*/
381 } nxFillPolyReq;
382
383 #define GrNumEllipse            31
384 typedef struct {
385         BYTE8   reqType;
386         BYTE8   hilength;
387         UINT16  length;
388         IDTYPE  drawid;
389         IDTYPE  gcid;
390         INT16   x;
391         INT16   y;
392         INT16   rx;
393         INT16   ry;
394 } nxEllipseReq;
395
396 #define GrNumFillEllipse        32
397 typedef struct {
398         BYTE8   reqType;
399         BYTE8   hilength;
400         UINT16  length;
401         IDTYPE  drawid;
402         IDTYPE  gcid;
403         INT16   x;
404         INT16   y;
405         INT16   rx;
406         INT16   ry;
407 } nxFillEllipseReq;
408
409 #define GrNumSetGCForeground    33
410 typedef struct {
411         BYTE8   reqType;
412         BYTE8   hilength;
413         UINT16  length;
414         IDTYPE  gcid;
415         UINT32  color;
416 } nxSetGCForegroundReq;
417
418 #define GrNumSetGCBackground    34
419 typedef struct {
420         BYTE8   reqType;
421         BYTE8   hilength;
422         UINT16  length;
423         IDTYPE  gcid;
424         UINT32  color;
425 } nxSetGCBackgroundReq;
426
427 #define GrNumSetGCUseBackground 35
428 typedef struct {
429         BYTE8   reqType;
430         BYTE8   hilength;
431         UINT16  length;
432         IDTYPE  gcid;
433         UINT16  flag;
434 } nxSetGCUseBackgroundReq;
435
436 #define GrNumSetGCMode          36
437 typedef struct {
438         BYTE8   reqType;
439         BYTE8   hilength;
440         UINT16  length;
441         IDTYPE  gcid;
442         UINT16  mode;
443 } nxSetGCModeReq;
444
445 #define GrNumSetGCFont          37
446 typedef struct {
447         BYTE8   reqType;
448         BYTE8   hilength;
449         UINT16  length;
450         IDTYPE  gcid;
451         IDTYPE  fontid;
452 } nxSetGCFontReq;
453
454 #define GrNumGetGCTextSize      38
455 typedef struct {
456         BYTE8   reqType;
457         BYTE8   hilength;
458         UINT16  length;
459         IDTYPE  gcid;
460         UINT16  flags;
461         UINT16  pad;
462         /*BYTE8 text[];*/
463 } nxGetGCTextSizeReq;
464
465 #define GrNumReadArea           39
466 typedef struct {
467         BYTE8   reqType;
468         BYTE8   hilength;
469         UINT16  length;
470         IDTYPE  drawid;
471         INT16   x;
472         INT16   y;
473         INT16   width;
474         INT16   height;
475 } nxReadAreaReq;
476
477 #define GrNumArea               40
478 typedef struct {
479         BYTE8   reqType;
480         BYTE8   hilength;
481         UINT16  length;
482         IDTYPE  drawid;
483         IDTYPE  gcid;
484         INT16   x;
485         INT16   y;
486         INT16   width;
487         INT16   height;
488         INT16   pixtype;
489         INT16   pad;
490         /*UINT32 pixels[];*/
491 } nxAreaReq;
492
493 #define GrNumBitmap             41
494 typedef struct {
495         BYTE8   reqType;
496         BYTE8   hilength;
497         UINT16  length;
498         IDTYPE  drawid;
499         IDTYPE  gcid;
500         INT16   x;
501         INT16   y;
502         INT16   width;
503         INT16   height;
504         /*UINT16 bitmaptable[];*/
505 } nxBitmapReq;
506
507 #define GrNumText               42
508 typedef struct {
509         BYTE8   reqType;
510         BYTE8   hilength;
511         UINT16  length;
512         IDTYPE  drawid;
513         IDTYPE  gcid;
514         INT16   x;
515         INT16   y;
516         INT16   count;
517         INT16   flags;
518         /*BYTE8 text[];*/
519 } nxTextReq;
520
521 #define GrNumNewCursor          43
522 typedef struct {
523         BYTE8   reqType;
524         BYTE8   hilength;
525         UINT16  length;
526         INT16   width;
527         INT16   height;
528         INT16   hotx;
529         INT16   hoty;
530         UINT32  fgcolor;
531         UINT32  bgcolor;
532         /*UINT16 fgbitmap[];*/
533         /*UINT16 bgbitmap[];*/
534 } nxNewCursorReq;
535
536 #define GrNumMoveCursor         44
537 typedef struct {
538         BYTE8   reqType;
539         BYTE8   hilength;
540         UINT16  length;
541         INT16   x;
542         INT16   y;
543 } nxMoveCursorReq;
544
545 #define GrNumGetSystemPalette      45
546 typedef struct {
547         BYTE8   reqType;
548         BYTE8   hilength;
549         UINT16  length;
550 } nxGetSystemPaletteReq;
551
552 #define GrNumFindColor             46
553 typedef struct {
554         BYTE8   reqType;
555         BYTE8   hilength;
556         UINT16  length;
557         UINT32  color;
558 } nxFindColorReq;
559
560 #define GrNumReparentWindow        47
561 typedef struct {
562         BYTE8   reqType;
563         BYTE8   hilength;
564         UINT16  length;
565         IDTYPE  windowid;
566         IDTYPE  parentid;
567         INT16   x;
568         INT16   y;
569 } nxReparentWindowReq;
570
571 #define GrNumDrawImageFromFile     48
572 typedef struct {
573         BYTE8   reqType;
574         BYTE8   hilength;
575         UINT16  length;
576         IDTYPE  drawid;
577         IDTYPE  gcid;
578         INT16   x;
579         INT16   y;
580         INT16   width;
581         INT16   height;
582         IDTYPE  flags;
583         /*char path[];*/
584 } nxDrawImageFromFileReq;
585
586 #define GrNumLoadImageFromFile     49
587 typedef struct {
588         BYTE8   reqType;
589         BYTE8   hilength;
590         UINT16  length;
591         INT16   flags;
592         INT16   pad;
593 } nxLoadImageFromFileReq;
594
595 #define GrNumNewPixmap          50
596 typedef struct {
597         BYTE8   reqType;
598         BYTE8   hilength;
599         UINT16  length;
600         INT16   width;
601         INT16   height;
602 /* FIXME: Add support for passing shared memory info */
603 } nxNewPixmapReq;
604
605 #define GrNumCopyArea          51
606 typedef struct {
607         BYTE8   reqType;
608         BYTE8   hilength;
609         UINT16  length;
610         IDTYPE  drawid;
611         IDTYPE  gcid;
612         INT16   x;
613         INT16   y;
614         INT16   width;
615         INT16   height;
616         IDTYPE  srcid;
617         INT16   srcx;
618         INT16   srcy;
619         UINT32  op;
620 } nxCopyAreaReq;
621
622 #define GrNumSetFontSize        52
623 typedef struct {
624         BYTE8   reqType;
625         BYTE8   hilength;
626         UINT16  length;
627         IDTYPE  fontid;
628         INT16   fontsize;
629 } nxSetFontSizeReq;
630
631 #define GrNumCreateFont         53
632 typedef struct {
633         BYTE8   reqType;
634         BYTE8   hilength;
635         UINT16  length;
636         INT16   height;
637         INT16   lf_used;
638         MWLOGFONT lf;
639 } nxCreateFontReq;
640
641 #define GrNumDestroyFont        54
642 typedef struct {
643         BYTE8   reqType;
644         BYTE8   hilength;
645         UINT16  length;
646         IDTYPE  fontid;
647 } nxDestroyFontReq;
648
649 #define GrNumReqShmCmds         55
650 typedef struct {
651         BYTE8   reqType;
652         BYTE8   hilength;
653         UINT16  length;
654         UINT32  size;
655 } nxReqShmCmdsReq;
656
657 #define GrNumShmCmdsFlush       56
658 typedef struct {
659         BYTE8   reqType;
660         BYTE8   hilength;
661         UINT16  length;
662         UINT32  size;
663         UINT32  reply;
664 } nxShmCmdsFlushReq;
665
666 #define GrNumSetFontRotation    57
667 typedef struct {
668         BYTE8   reqType;
669         BYTE8   hilength;
670         UINT16  length;
671         IDTYPE  fontid;
672         INT16   tenthdegrees;
673 } nxSetFontRotationReq;
674
675 #define GrNumSetFontAttr        58
676 typedef struct {
677         BYTE8   reqType;
678         BYTE8   hilength;
679         UINT16  length;
680         IDTYPE  fontid;
681         INT16   setflags;
682         INT16   clrflags;
683 } nxSetFontAttrReq;
684
685 #define GrNumSetSystemPalette   59
686 typedef struct {
687         BYTE8   reqType;
688         BYTE8   hilength;
689         UINT16  length;
690         INT16   first;
691         INT16   count;
692         MWPALENTRY palette[256];
693 } nxSetSystemPaletteReq;
694
695 #define GrNumInjectEvent        60
696 #define GR_INJECT_EVENT_POINTER         0
697 #define GR_INJECT_EVENT_KEYBOARD        1
698 typedef struct {
699         BYTE8   reqType;
700         BYTE8   hilength;
701         UINT16  length;
702         union {
703                 struct {
704                         INT16   x;
705                         INT16   y;
706                         UINT16  button;
707                         BYTE8   visible;
708                 } pointer;
709                 struct {
710                         IDTYPE  wid;
711                         UINT16  keyvalue;
712                         UINT16  modifier;
713                         BYTE8   scancode;
714                         BYTE8   pressed;
715                 } keyboard;
716         } event;
717         UINT16  event_type;
718 } nxInjectEventReq;
719
720 #define GrNumNewRegion          61
721 typedef struct {
722         BYTE8   reqType;
723         BYTE8   hilength;
724         UINT16  length;
725 } nxNewRegionReq;
726
727 #define GrNumDestroyRegion      62
728 typedef struct {
729         BYTE8   reqType;
730         BYTE8   hilength;
731         UINT16  length;
732         IDTYPE  regionid;
733 } nxDestroyRegionReq;
734
735 #define GrNumUnionRectWithRegion        63
736 typedef struct {
737         BYTE8   reqType;
738         BYTE8   hilength;
739         UINT16  length;
740         IDTYPE  regionid;
741         GR_RECT rect;
742 } nxUnionRectWithRegionReq;
743
744 #define GrNumUnionRegion        64
745 typedef struct {
746         BYTE8   reqType;
747         BYTE8   hilength;
748         UINT16  length;
749         IDTYPE  regionid;
750         IDTYPE  srcregionid1;
751         IDTYPE  srcregionid2;
752 } nxUnionRegionReq;
753
754 #define GrNumIntersectRegion    65
755 typedef struct {
756         BYTE8   reqType;
757         BYTE8   hilength;
758         UINT16  length;
759         IDTYPE  regionid;
760         IDTYPE  srcregionid1;
761         IDTYPE  srcregionid2;
762 } nxIntersectRegionReq;
763
764 #define GrNumSetGCRegion        66
765 typedef struct {
766         BYTE8   reqType;
767         BYTE8   hilength;
768         UINT16  length;
769         IDTYPE  gcid;
770         IDTYPE  regionid;
771 } nxSetGCRegionReq;
772
773 #define GrNumSubtractRegion     67
774 typedef struct {
775         BYTE8   reqType;
776         BYTE8   hilength;
777         UINT16  length;
778         IDTYPE  regionid;
779         IDTYPE  srcregionid1;
780         IDTYPE  srcregionid2;
781 } nxSubtractRegionReq;
782
783 #define GrNumXorRegion          68
784 typedef struct {
785         BYTE8   reqType;
786         BYTE8   hilength;
787         UINT16  length;
788         IDTYPE  regionid;
789         IDTYPE  srcregionid1;
790         IDTYPE  srcregionid2;
791 } nxXorRegionReq;
792
793 #define GrNumPointInRegion      69
794 typedef struct {
795         BYTE8   reqType;
796         BYTE8   hilength;
797         UINT16  length;
798         IDTYPE  regionid;
799         INT16   x;
800         INT16   y;
801 } nxPointInRegionReq;
802
803 #define GrNumRectInRegion       70
804 typedef struct {
805         BYTE8   reqType;
806         BYTE8   hilength;
807         UINT16  length;
808         IDTYPE  regionid;
809         INT16   x;
810         INT16   y;
811         INT16   w;
812         INT16   h;
813 } nxRectInRegionReq;
814
815 #define GrNumEmptyRegion        71
816 typedef struct {
817         BYTE8   reqType;
818         BYTE8   hilength;
819         UINT16  length;
820         IDTYPE  regionid;
821 } nxEmptyRegionReq;
822
823 #define GrNumEqualRegion        72
824 typedef struct {
825         BYTE8   reqType;
826         BYTE8   hilength;
827         UINT16  length;
828         IDTYPE  region1;
829         IDTYPE  region2;
830 } nxEqualRegionReq;
831
832 #define GrNumOffsetRegion       73
833 typedef struct {
834         BYTE8   reqType;
835         BYTE8   hilength;
836         UINT16  length;
837         IDTYPE  region;
838         INT16   dx;
839         INT16   dy;
840 } nxOffsetRegionReq;
841
842 #define GrNumGetRegionBox       74
843 typedef struct {
844         BYTE8   reqType;
845         BYTE8   hilength;
846         UINT16  length;
847         IDTYPE  regionid;
848 } nxGetRegionBoxReq;
849
850 #define GrNumNewPolygonRegion   75
851 typedef struct {
852         BYTE8   reqType;
853         BYTE8   hilength;
854         UINT16  length;
855         UINT16  mode;
856         UINT16  pad;
857         /*INT16 points[];*/
858 } nxNewPolygonRegionReq;
859
860 #define GrNumArc                76
861 typedef struct {
862         BYTE8   reqType;
863         BYTE8   hilength;
864         UINT16  length;
865         IDTYPE  drawid;
866         IDTYPE  gcid;
867         INT16   x;
868         INT16   y;
869         INT16   rx;
870         INT16   ry;
871         INT16   ax;
872         INT16   ay;
873         INT16   bx;
874         INT16   by;
875         INT16   type;
876 } nxArcReq;
877
878 #define GrNumArcAngle           77
879 typedef struct {
880         BYTE8   reqType;
881         BYTE8   hilength;
882         UINT16  length;
883         IDTYPE  drawid;
884         IDTYPE  gcid;
885         INT16   x;
886         INT16   y;
887         INT16   rx;
888         INT16   ry;
889         INT16   angle1;
890         INT16   angle2;
891         INT16   type;
892 } nxArcAngleReq;
893
894 #define GrNumSetWMProperties    78
895 typedef struct {
896         BYTE8   reqType;
897         BYTE8   hilength;
898         UINT16  length;
899         IDTYPE  windowid;
900         /* GR_WM_PROPERTIES props */
901         /* GR_CHAR *title */
902 } nxSetWMPropertiesReq;
903
904 #define GrNumGetWMProperties    79
905 typedef struct {
906         BYTE8   reqType;
907         BYTE8   hilength;
908         UINT16  length;
909         IDTYPE  windowid;
910 } nxGetWMPropertiesReq;
911
912 #define GrNumCloseWindow        80
913 typedef struct {
914         BYTE8   reqType;
915         BYTE8   hilength;
916         UINT16  length;
917         IDTYPE  windowid;
918 } nxCloseWindowReq;
919
920 #define GrNumKillWindow         81
921 typedef struct {
922         BYTE8   reqType;
923         BYTE8   hilength;
924         UINT16  length;
925         IDTYPE  windowid;
926 } nxKillWindowReq;
927
928 #define GrNumDrawImageToFit     82
929 typedef struct {
930         BYTE8   reqType;
931         BYTE8   hilength;
932         UINT16  length;
933         IDTYPE  drawid;
934         IDTYPE  gcid;
935         INT16   x;
936         INT16   y;
937         INT16   width;
938         INT16   height;
939         IDTYPE  imageid;
940 } nxDrawImageToFitReq;
941
942 #define GrNumFreeImage          83
943 typedef struct {
944         BYTE8   reqType;
945         BYTE8   hilength;
946         UINT16  length;
947         IDTYPE  id;
948 } nxFreeImageReq;
949
950 #define GrNumGetImageInfo       84
951 typedef struct {
952         BYTE8   reqType;
953         BYTE8   hilength;
954         UINT16  length;
955         IDTYPE  id;
956 } nxGetImageInfoReq;
957
958 #define GrNumDrawImageBits      85
959 typedef struct {
960         BYTE8   reqType;
961         BYTE8   hilength;
962         UINT16  length;
963         IDTYPE  drawid;
964         IDTYPE  gcid;
965         INT16   x;
966         INT16   y;
967         INT16   width;          /* MWIMAGEHDR start*/
968         INT16   height;
969         INT16   planes;
970         INT16   bpp;
971         INT16   pitch;
972         INT16   bytesperpixel;
973         INT16   compression;
974         INT16   palsize;
975         UINT32  transcolor;
976         /*MWIMAGEBITS imagebits[];*/
977         /*MWPALENTRY palette[palsize];*/
978 } nxDrawImageBitsReq;
979
980 #define GrNumPoints             86
981 typedef struct {
982         BYTE8   reqType;
983         BYTE8   hilength;
984         UINT16  length;
985         IDTYPE  drawid;
986         IDTYPE  gcid;
987         /*INT16 pointtable[];*/
988 } nxPointsReq;
989
990 #define GrNumGetFocus           87
991 typedef struct {
992         BYTE8   reqType;
993         BYTE8   hilength;
994         UINT16  length;
995 } nxGetFocusReq;
996
997 #define GrNumGetSysColor        88
998 typedef struct {
999         BYTE8   reqType;
1000         BYTE8   hilength;
1001         UINT16  length;
1002         UINT16  index;
1003 } nxGetSysColorReq;
1004
1005 #define GrNumSetScreenSaverTimeout      89
1006 typedef struct {
1007         BYTE8   reqType;
1008         BYTE8   hilength;
1009         UINT16  length;
1010         UINT32  timeout;
1011 } nxSetScreenSaverTimeoutReq;
1012
1013 #define GrNumSetSelectionOwner  90
1014 typedef struct {
1015         BYTE8   reqType;
1016         BYTE8   hilength;
1017         UINT16  length;
1018         IDTYPE  wid;
1019         /* GR_CHAR *typelist */
1020 } nxSetSelectionOwnerReq;
1021
1022 #define GrNumGetSelectionOwner  91
1023 typedef struct {
1024         BYTE8   reqType;
1025         BYTE8   hilength;
1026         UINT16  length;
1027 } nxGetSelectionOwnerReq;
1028
1029 #define GrNumRequestClientData  92
1030 typedef struct {
1031         BYTE8   reqType;
1032         BYTE8   hilength;
1033         UINT16  length;
1034         IDTYPE  wid;
1035         IDTYPE  rid;
1036         UINT32  serial;
1037         UINT16  mimetype;
1038 } nxRequestClientDataReq;
1039
1040 #define GrNumSendClientData     93
1041 typedef struct {
1042         BYTE8   reqType;
1043         BYTE8   hilength;
1044         UINT16  length;
1045         IDTYPE  wid;
1046         IDTYPE  did;
1047         UINT32  serial;
1048         UINT32  len;
1049         /* void *data */
1050 } nxSendClientDataReq;
1051
1052 #define GrNumBell               94
1053 typedef struct {
1054         BYTE8   reqType;
1055         BYTE8   hilength;
1056         UINT16  length;
1057 } nxBellReq;
1058
1059 #define GrNumSetBackgroundPixmap 95
1060 typedef struct {
1061         BYTE8   reqType;
1062         BYTE8   hilength;
1063         UINT16  length;
1064         IDTYPE  wid;
1065         IDTYPE  pixmap;
1066         UINT32  flags;
1067 } nxSetBackgroundPixmapReq;
1068
1069 #define GrNumDestroyCursor      96
1070 typedef struct {
1071         BYTE8   reqType;
1072         BYTE8   hilength;
1073         UINT16  length;
1074         IDTYPE  cursorid;
1075 } nxDestroyCursorReq;
1076
1077 #define GrNumQueryTree          97
1078 typedef struct {
1079         BYTE8   reqType;
1080         BYTE8   hilength;
1081         UINT16  length;
1082         IDTYPE  windowid;
1083 } nxQueryTreeReq;
1084
1085 #define GrNumCreateTimer        98
1086 typedef struct {
1087         BYTE8   reqType;
1088         BYTE8   hilength;
1089         UINT16  length;
1090         IDTYPE  wid;
1091         UINT32  period;
1092 } nxCreateTimerReq;
1093
1094 #define GrNumDestroyTimer       99
1095 typedef struct {
1096         BYTE8   reqType;
1097         BYTE8   hilength;
1098         UINT16  length;
1099         IDTYPE  timerid;
1100 } nxDestroyTimerReq;
1101
1102 #define GrNumSetPortraitMode    100
1103 typedef struct {
1104         BYTE8   reqType;
1105         BYTE8   hilength;
1106         UINT16  length;
1107         UINT32  portraitmode;
1108 } nxSetPortraitModeReq;
1109
1110 #define GrNumImageBufferAlloc   101
1111
1112 typedef struct {
1113         BYTE8   reqType;
1114         BYTE8   hilength;
1115         UINT16  length;
1116         UINT32  size;
1117 } nxImageBufferAllocReq;
1118
1119 #define GrNumImageBufferSend    102
1120
1121 typedef struct {
1122         BYTE8   reqType;
1123         BYTE8   hilength;
1124         UINT16  length;
1125         UINT32  buffer_id;
1126         UINT32  size;
1127 } nxImageBufferSendReq;
1128
1129 #define GrNumLoadImageFromBuffer 103
1130 typedef struct {
1131         BYTE8   reqType;
1132         BYTE8   hilength;
1133         UINT16  length;
1134         UINT32  buffer;
1135         INT16   flags;
1136         INT16   pad;
1137 } nxLoadImageFromBufferReq;
1138
1139 #define GrNumDrawImageFromBuffer 104
1140 typedef struct {
1141         BYTE8   reqType;
1142         BYTE8   hilength;
1143         UINT16  length;
1144         IDTYPE  drawid;
1145         IDTYPE  gcid;
1146         INT16   x;
1147         INT16   y;
1148         INT16   width;
1149         INT16   height;
1150         UINT32  buffer;
1151         IDTYPE  flags;
1152 } nxDrawImageFromBufferReq;
1153
1154 #define GrNumGetFontList        105
1155 typedef struct {
1156         BYTE8   reqType;
1157         BYTE8   hilength;
1158         UINT16  length;
1159 } nxGetFontListReq;
1160
1161 #define GrNumSetGCClipOrigin    106
1162
1163 typedef struct {
1164         BYTE8   reqType;
1165         BYTE8   hilength;
1166         UINT16  length;
1167         IDTYPE  gcid;
1168         UINT32  xoff;
1169         UINT32  yoff;
1170 } nxSetGCClipOriginReq;
1171
1172 #define GrTotalNumCalls         107