VirtualBox

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

Last change on this file since 17234 was 17234, checked in by vboxsync, 16 years ago

Additions/x11/x11include: blast! Corrected svn:keywords property on all files as per http://linserv.germany/vbox/wiki/SvnKeywords

  • Property svn:eol-style set to native
File size: 4.5 KB
Line 
1/* $XFree86: xc/include/extensions/XShm.h,v 1.8 2001/12/14 19:53:28 dawes 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
86Bool XShmQueryVersion(
87#if NeedFunctionPrototypes
88 Display* /* dpy */,
89 int* /* majorVersion */,
90 int* /* minorVersion */,
91 Bool* /* sharedPixmaps */
92#endif
93);
94
95int XShmPixmapFormat(
96#if NeedFunctionPrototypes
97 Display* /* dpy */
98#endif
99);
100
101Status XShmAttach(
102#if NeedFunctionPrototypes
103 Display* /* dpy */,
104 XShmSegmentInfo* /* shminfo */
105#endif
106);
107
108Status XShmDetach(
109#if NeedFunctionPrototypes
110 Display* /* dpy */,
111 XShmSegmentInfo* /* shminfo */
112#endif
113);
114
115Status XShmPutImage(
116#if NeedFunctionPrototypes
117 Display* /* dpy */,
118 Drawable /* d */,
119 GC /* gc */,
120 XImage* /* image */,
121 int /* src_x */,
122 int /* src_y */,
123 int /* dst_x */,
124 int /* dst_y */,
125 unsigned int /* src_width */,
126 unsigned int /* src_height */,
127 Bool /* send_event */
128#endif
129);
130
131Status XShmGetImage(
132#if NeedFunctionPrototypes
133 Display* /* dpy */,
134 Drawable /* d */,
135 XImage* /* image */,
136 int /* x */,
137 int /* y */,
138 unsigned long /* plane_mask */
139#endif
140);
141
142XImage *XShmCreateImage(
143#if NeedFunctionPrototypes
144 Display* /* dpy */,
145 Visual* /* visual */,
146 unsigned int /* depth */,
147 int /* format */,
148 char* /* data */,
149 XShmSegmentInfo* /* shminfo */,
150 unsigned int /* width */,
151 unsigned int /* height */
152#endif
153);
154
155Pixmap XShmCreatePixmap(
156#if NeedFunctionPrototypes
157 Display* /* dpy */,
158 Drawable /* d */,
159 char* /* data */,
160 XShmSegmentInfo* /* shminfo */,
161 unsigned int /* width */,
162 unsigned int /* height */,
163 unsigned int /* depth */
164#endif
165);
166
167_XFUNCPROTOEND
168
169#else /* _XSHM_SERVER_ */
170
171#include "screenint.h"
172
173extern void ShmRegisterFbFuncs(
174#if NeedFunctionPrototypes
175 ScreenPtr /* pScreen */
176#endif
177);
178
179#endif
180
181#endif
Note: See TracBrowser for help on using the repository browser.

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