VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/x11include/4.3/include/extensions/XShm.h@ 25452

Last change on this file since 25452 was 25452, checked in by vboxsync, 15 years ago

Additions/x11: added include files needed for building vboxmouse with XFree86 4.3 and equivalent X.Org versions

  • Property svn:eol-style set to native
File size: 4.6 KB
Line 
1/* $XFree86: xc/include/extensions/XShm.h,v 1.10 2002/11/08 00:46:27 alanh Exp $ */
2/************************************************************
3
4Copyright 1989, 1998 The Open Group
5
6Permission to use, copy, modify, distribute, and sell this software and its
7documentation for any purpose is hereby granted without fee, provided that
8the above copyright notice appear in all copies and that both that
9copyright notice and this permission notice appear in supporting
10documentation.
11
12The above copyright notice and this permission notice shall be included in
13all copies or substantial portions of the Software.
14
15THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
19AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21
22Except as contained in this notice, the name of The Open Group shall not be
23used in advertising or otherwise to promote the sale, use or other dealings
24in this Software without prior written authorization from The Open Group.
25
26********************************************************/
27
28/* THIS IS NOT AN X CONSORTIUM STANDARD OR AN X PROJECT TEAM SPECIFICATION */
29
30/* $Xorg: XShm.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */
31
32#ifndef _XSHM_H_
33#define _XSHM_H_
34
35#include <X11/Xfuncproto.h>
36
37#define X_ShmQueryVersion 0
38#define X_ShmAttach 1
39#define X_ShmDetach 2
40#define X_ShmPutImage 3
41#define X_ShmGetImage 4
42#define X_ShmCreatePixmap 5
43
44#define ShmCompletion 0
45#define ShmNumberEvents (ShmCompletion + 1)
46
47#define BadShmSeg 0
48#define ShmNumberErrors (BadShmSeg + 1)
49
50typedef unsigned long ShmSeg;
51
52#ifndef _XSHM_SERVER_
53typedef struct {
54 int type; /* of event */
55 unsigned long serial; /* # of last request processed by server */
56 Bool send_event; /* true if this came frome a SendEvent request */
57 Display *display; /* Display the event was read from */
58 Drawable drawable; /* drawable of request */
59 int major_code; /* ShmReqCode */
60 int minor_code; /* X_ShmPutImage */
61 ShmSeg shmseg; /* the ShmSeg used in the request */
62 unsigned long offset; /* the offset into ShmSeg used in the request */
63} XShmCompletionEvent;
64
65typedef struct {
66 ShmSeg shmseg; /* resource id */
67 int shmid; /* kernel id */
68 char *shmaddr; /* address in client */
69 Bool readOnly; /* how the server should attach it */
70} XShmSegmentInfo;
71
72_XFUNCPROTOBEGIN
73
74Bool XShmQueryExtension(
75#if NeedFunctionPrototypes
76 Display* /* dpy */
77#endif
78);
79
80int XShmGetEventBase(
81#if NeedFunctionPrototypes
82 Display* /* dpy */
83#endif
84);
85
86int XShmGetEventBase(
87#if NeedFunctionPrototypes
88 Display* /* dpy */
89#endif
90);
91
92Bool XShmQueryVersion(
93#if NeedFunctionPrototypes
94 Display* /* dpy */,
95 int* /* majorVersion */,
96 int* /* minorVersion */,
97 Bool* /* sharedPixmaps */
98#endif
99);
100
101int XShmPixmapFormat(
102#if NeedFunctionPrototypes
103 Display* /* dpy */
104#endif
105);
106
107Status XShmAttach(
108#if NeedFunctionPrototypes
109 Display* /* dpy */,
110 XShmSegmentInfo* /* shminfo */
111#endif
112);
113
114Status XShmDetach(
115#if NeedFunctionPrototypes
116 Display* /* dpy */,
117 XShmSegmentInfo* /* shminfo */
118#endif
119);
120
121Status XShmPutImage(
122#if NeedFunctionPrototypes
123 Display* /* dpy */,
124 Drawable /* d */,
125 GC /* gc */,
126 XImage* /* image */,
127 int /* src_x */,
128 int /* src_y */,
129 int /* dst_x */,
130 int /* dst_y */,
131 unsigned int /* src_width */,
132 unsigned int /* src_height */,
133 Bool /* send_event */
134#endif
135);
136
137Status XShmGetImage(
138#if NeedFunctionPrototypes
139 Display* /* dpy */,
140 Drawable /* d */,
141 XImage* /* image */,
142 int /* x */,
143 int /* y */,
144 unsigned long /* plane_mask */
145#endif
146);
147
148XImage *XShmCreateImage(
149#if NeedFunctionPrototypes
150 Display* /* dpy */,
151 Visual* /* visual */,
152 unsigned int /* depth */,
153 int /* format */,
154 char* /* data */,
155 XShmSegmentInfo* /* shminfo */,
156 unsigned int /* width */,
157 unsigned int /* height */
158#endif
159);
160
161Pixmap XShmCreatePixmap(
162#if NeedFunctionPrototypes
163 Display* /* dpy */,
164 Drawable /* d */,
165 char* /* data */,
166 XShmSegmentInfo* /* shminfo */,
167 unsigned int /* width */,
168 unsigned int /* height */,
169 unsigned int /* depth */
170#endif
171);
172
173_XFUNCPROTOEND
174
175#else /* _XSHM_SERVER_ */
176
177#include "screenint.h"
178#include "pixmap.h"
179#include "gc.h"
180
181extern void ShmRegisterFbFuncs(
182#if NeedFunctionPrototypes
183 ScreenPtr /* pScreen */
184#endif
185);
186
187#endif
188
189#endif
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette