1 /************************************************************
3 Copyright (c) 1989 X Consortium
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:
12 The above copyright notice and this permission notice shall be included in
13 all copies or substantial portions of the Software.
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.
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.
26 ********************************************************/
28 /* THIS IS NOT AN X CONSORTIUM STANDARD */
30 /* $XConsortium: XShm.h,v 1.7 94/09/22 21:25:20 dpw Exp $ */
35 /* $XFree86: xc/include/extensions/XShm.h,v 1.2.2.1 1997/08/04 02:10:32 dawes Exp $ */
40 #include <X11/Xfuncproto.h>
42 #define X_ShmQueryVersion 0
45 #define X_ShmPutImage 3
46 #define X_ShmGetImage 4
47 #define X_ShmCreatePixmap 5
49 #define ShmCompletion 0
50 #define ShmNumberEvents (ShmCompletion + 1)
53 #define ShmNumberErrors (BadShmSeg + 1)
55 typedef unsigned long ShmSeg;
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;
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 */
79 Bool XShmQueryExtension(
80 #if NeedFunctionPrototypes
85 Bool XShmQueryVersion(
86 #if NeedFunctionPrototypes
88 int* /* majorVersion */,
89 int* /* minorVersion */,
90 Bool* /* sharedPixmaps */
95 #if NeedFunctionPrototypes
101 #if NeedFunctionPrototypes
103 XShmSegmentInfo* /* shminfo */
108 #if NeedFunctionPrototypes
110 XShmSegmentInfo* /* shminfo */
115 #if NeedFunctionPrototypes
124 unsigned int /* src_width */,
125 unsigned int /* src_height */,
126 Bool /* send_event */
131 #if NeedFunctionPrototypes
137 unsigned long /* plane_mask */
141 XImage *XShmCreateImage(
142 #if NeedFunctionPrototypes
144 Visual* /* visual */,
145 unsigned int /* depth */,
148 XShmSegmentInfo* /* shminfo */,
149 unsigned int /* width */,
150 unsigned int /* height */
154 Pixmap XShmCreatePixmap(
155 #if NeedFunctionPrototypes
159 XShmSegmentInfo* /* shminfo */,
160 unsigned int /* width */,
161 unsigned int /* height */,
162 unsigned int /* depth */