]> git.sesse.net Git - rdpsrv/blob - Xserver/include/extensions/XShm.h
Support RDP5 logon packets.
[rdpsrv] / Xserver / include / extensions / XShm.h
1 /************************************************************
2
3 Copyright (c) 1989  X Consortium
4
5 Permission is hereby granted, free of charge, to any person obtaining a copy
6 of this software and associated documentation files (the "Software"), to deal
7 in the Software without restriction, including without limitation the rights
8 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 copies of the Software, and to permit persons to whom the Software is
10 furnished to do so, subject to the following conditions:
11
12 The above copyright notice and this permission notice shall be included in
13 all copies or substantial portions of the Software.
14
15 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
18 X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
19 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21
22 Except as contained in this notice, the name of the X Consortium shall not be
23 used in advertising or otherwise to promote the sale, use or other dealings
24 in this Software without prior written authorization from the X Consortium.
25
26 ********************************************************/
27
28 /* THIS IS NOT AN X CONSORTIUM STANDARD */
29
30 /* $XConsortium: XShm.h,v 1.7 94/09/22 21:25:20 dpw Exp $ */
31
32
33
34
35 /* $XFree86: xc/include/extensions/XShm.h,v 1.2.2.1 1997/08/04 02:10:32 dawes Exp $ */
36
37 #ifndef _XSHM_H_
38 #define _XSHM_H_
39
40 #include <X11/Xfuncproto.h>
41
42 #define X_ShmQueryVersion               0
43 #define X_ShmAttach                     1
44 #define X_ShmDetach                     2
45 #define X_ShmPutImage                   3
46 #define X_ShmGetImage                   4
47 #define X_ShmCreatePixmap               5
48
49 #define ShmCompletion                   0
50 #define ShmNumberEvents                 (ShmCompletion + 1)
51
52 #define BadShmSeg                       0
53 #define ShmNumberErrors                 (BadShmSeg + 1)
54
55 typedef unsigned long ShmSeg;
56
57 #ifndef _XSHM_SERVER_
58 typedef struct {
59     int type;               /* of event */
60     unsigned long serial;   /* # of last request processed by server */
61     Bool send_event;        /* true if this came frome a SendEvent request */
62     Display *display;       /* Display the event was read from */
63     Drawable drawable;      /* drawable of request */
64     int major_code;         /* ShmReqCode */
65     int minor_code;         /* X_ShmPutImage */
66     ShmSeg shmseg;          /* the ShmSeg used in the request */
67     unsigned long offset;   /* the offset into ShmSeg used in the request */
68 } XShmCompletionEvent;
69
70 typedef struct {
71     ShmSeg shmseg;      /* resource id */
72     int shmid;          /* kernel id */
73     char *shmaddr;      /* address in client */
74     Bool readOnly;      /* how the server should attach it */
75 } XShmSegmentInfo;
76
77 _XFUNCPROTOBEGIN
78
79 Bool XShmQueryExtension(
80 #if NeedFunctionPrototypes
81     Display*            /* dpy */
82 #endif
83 );
84
85 Bool XShmQueryVersion(
86 #if NeedFunctionPrototypes
87     Display*            /* dpy */,
88     int*                /* majorVersion */,
89     int*                /* minorVersion */,
90     Bool*               /* sharedPixmaps */
91 #endif
92 );
93
94 int XShmPixmapFormat(
95 #if NeedFunctionPrototypes
96     Display*            /* dpy */
97 #endif
98 );
99
100 Status XShmAttach(
101 #if NeedFunctionPrototypes
102     Display*            /* dpy */,
103     XShmSegmentInfo*    /* shminfo */
104 #endif
105 );
106
107 Status XShmDetach(
108 #if NeedFunctionPrototypes
109     Display*            /* dpy */,
110     XShmSegmentInfo*    /* shminfo */
111 #endif
112 );
113
114 Status XShmPutImage(
115 #if NeedFunctionPrototypes
116     Display*            /* dpy */,
117     Drawable            /* d */,
118     GC                  /* gc */,
119     XImage*             /* image */,
120     int                 /* src_x */,
121     int                 /* src_y */,
122     int                 /* dst_x */,
123     int                 /* dst_y */,
124     unsigned int        /* src_width */,
125     unsigned int        /* src_height */,
126     Bool                /* send_event */
127 #endif
128 );
129
130 Status XShmGetImage(
131 #if NeedFunctionPrototypes
132     Display*            /* dpy */,
133     Drawable            /* d */,
134     XImage*             /* image */,
135     int                 /* x */,
136     int                 /* y */,
137     unsigned long       /* plane_mask */
138 #endif
139 );
140
141 XImage *XShmCreateImage(
142 #if NeedFunctionPrototypes
143     Display*            /* dpy */,
144     Visual*             /* visual */,
145     unsigned int        /* depth */,
146     int                 /* format */,
147     char*               /* data */,
148     XShmSegmentInfo*    /* shminfo */,
149     unsigned int        /* width */,
150     unsigned int        /* height */
151 #endif
152 );
153
154 Pixmap XShmCreatePixmap(
155 #if NeedFunctionPrototypes
156     Display*            /* dpy */,
157     Drawable            /* d */,
158     char*               /* data */,
159     XShmSegmentInfo*    /* shminfo */,
160     unsigned int        /* width */,
161     unsigned int        /* height */,
162     unsigned int        /* depth */
163 #endif
164 );
165
166 _XFUNCPROTOEND
167
168 #endif
169
170 #endif