rust/cargo-c: update to 0.10.7+cargo-0.84.0
[oi-userland.git] / components / x11 / libdga / src / dga_Xrequests.h
blobf65d0457168ddf394b3db0db925688ebadf975a4
1 /* Copyright (c) 1993, 1999, Oracle and/or its affiliates. All rights reserved.
3 * Permission is hereby granted, free of charge, to any person obtaining a
4 * copy of this software and associated documentation files (the "Software"),
5 * to deal in the Software without restriction, including without limitation
6 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
7 * and/or sell copies of the Software, and to permit persons to whom the
8 * Software is furnished to do so, subject to the following conditions:
10 * The above copyright notice and this permission notice (including the next
11 * paragraph) shall be included in all copies or substantial portions of the
12 * Software.
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
25 * dga_Xrequests.h - DGA X11 protocol extension definitions
28 #ifndef _DGA_XREQUESTS_H
29 #define _DGA_XREQUESTS_H
33 *-----------------------------------------------------------------------
34 * DGA minor op codes
35 *-----------------------------------------------------------------------
38 #define SUN_DGA_MAJOR_VERSION 3 /* current version numbers */
39 #define SUN_DGA_MINOR_VERSION 2
41 /* protocol requests in Protocol Version 1 - OpenWindows 2.0 FCS */
42 #define X_DgaGrabWindow_Old 1
43 #define X_DgaUnGrabWindow_Old 2
44 #define X_DgaGrabColormap_Old 3
45 #define X_DgaUnGrabColormap_Old 4
48 /* additional protocol requests in Protocol Version 2 - OpenWindows 3.0 Beta */
49 #define X_DgaGrabWids 5
50 #define X_DgaGrabBuffers 6
51 #define X_DgaUnGrabBuffers 7
52 #define X_DgaGrabFCS 8
53 #define X_DgaGrabZbuf 9
54 #define X_DgaGrabStereo 10
55 #define X_DgaGrabWindow 11
56 #define X_DgaUnGrabWindow 12
59 /* additional protocol requests in Protocol Version 3 - OpenWindows 3.0 FCS */
60 #define X_DgaGrabColormap 13
61 #define X_DgaUnGrabColormap 14
62 #define X_DgaGrabRetained 15
63 #define X_DgaUnGrabRetained 16
64 #define X_DgaGetRetainedPath 17
65 #define X_DgaQueryVersion 18
67 /* additional protocol requests in Protocol Version 3 - OpenWindows 3.0.1 FCS*/
68 #define X_DgaGrabPixmap 19
69 #define X_DgaUnGrabPixmap 20
71 /* additional protocol requests in Protocol Version 3 - OpenWindows 3.4 FCS*/
72 #define X_DgaGrabDrawable 21
73 #define X_DgaUnGrabDrawable 22
75 /* additional protocol requests in Protocol Version 4 - OpenWindows 3.6 FCS*/
76 #define X_DgaGrabABuffers 23
77 #define X_DgaUnGrabABuffers 24
79 #define X_DgaXineramaInfo 25
82 ** Types of grabbable drawables
85 #define DGA_PROTO_WINDOW 0
86 #define DGA_PROTO_PIXMAP 1
87 #define DGA_PROTO_OVERLAY 2
90 * DGA request structure
93 #define sz_xDGAReq 12
95 typedef struct {
96 CARD8 reqType;
97 BYTE pad;
98 CARD16 length B16;
99 CARD32 id B32; /* a Window, Drawable, Font, GContext, Pixmap, etc. */
100 CARD32 number_objects B32;
101 } xDGAReq;
103 /* DGA Ancillary Buffer request structure */
104 typedef struct {
105 CARD8 reqType;
106 BYTE pad;
107 CARD16 length B16;
108 CARD32 id B32; /* a Window, Drawable, Font, GContext, Pixmap, etc. */
109 CARD32 type B32;
110 CARD32 buffer_site B32;
111 } xDgaGrabABuffersReq;
113 #define sz_xDgaGrabABuffersReq (sizeof(xDgaGrabABuffersReq))
116 * DGA shared retained path request structure
119 #define xDGARtndPathLength 200
120 #define sz_xDGARtndPathReply (sizeof(xDGARtndPathReply))
122 typedef struct {
123 BYTE type; /* X_Reply */
124 CARD8 pad;
125 CARD16 sequenceNumber B16;
126 CARD32 length B32;
127 INT8 path[xDGARtndPathLength];
128 } xDGARtndPathReply;
133 * DgaQueryVersion request and reply structures
136 typedef struct {
137 CARD8 reqType; /* always SUN_DGA major opcode */
138 CARD8 dgaReqType; /* always X_DgaQueryVersion */
139 CARD16 length B16;
140 } xDgaQueryVersionReq;
141 #define sz_xDgaQueryVersionReq 4
143 typedef struct {
144 BYTE type; /* X_Reply */
145 CARD8 unused;
146 CARD16 sequenceNumber B16;
147 CARD32 length B32;
148 CARD16 majorVersion B16;
149 CARD16 minorVersion B16;
150 CARD32 pad0 B32;
151 CARD32 pad1 B32;
152 CARD32 pad2 B32;
153 CARD32 pad3 B32;
154 CARD32 pad4 B32;
155 } xDgaQueryVersionReply;
156 #define sz_xDgaQueryVersionReply 32
159 struct dga_extinfo {
160 int protocol_major_version; /* major version num of DGA protocol */
161 int protocol_minor_version; /* minor version num of DGA protocol */
162 int extension; /* extension number */
163 int major_opcode; /* major op-code assigned by server */
167 struct dga_xwinrec {
168 struct dga_xwinrec *next;
169 Dga_token token;
170 Display *dpy;
171 Window win;
172 int refcnt;
175 struct dga_xpixrec {
176 struct dga_xpixrec *next;
177 Dga_token token;
178 Display *dpy;
179 Pixmap pix;
180 int refcnt;
185 #endif /* _DGA_XREQUESTS_H */