VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/x11include/7.0/X11/extensions/XShm.h@ 17236

最後變更 在這個檔案從17236是 17236,由 vboxsync 提交於 16 年 前

Additions/x11/x11include: blast! Reverted r43555 and r43556

  • 屬性 svn:eol-style 設為 native
檔案大小: 4.2 KB
 
1/* $XFree86: xc/include/extensions/XShm.h,v 1.11 2003/04/03 15:11:07 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 Display* /* dpy */
76);
77
78int XShmGetEventBase(
79 Display* /* dpy */
80);
81
82Bool XShmQueryVersion(
83 Display* /* dpy */,
84 int* /* majorVersion */,
85 int* /* minorVersion */,
86 Bool* /* sharedPixmaps */
87);
88
89int XShmPixmapFormat(
90 Display* /* dpy */
91);
92
93Status XShmAttach(
94 Display* /* dpy */,
95 XShmSegmentInfo* /* shminfo */
96);
97
98Status XShmDetach(
99 Display* /* dpy */,
100 XShmSegmentInfo* /* shminfo */
101);
102
103Status XShmPutImage(
104 Display* /* dpy */,
105 Drawable /* d */,
106 GC /* gc */,
107 XImage* /* image */,
108 int /* src_x */,
109 int /* src_y */,
110 int /* dst_x */,
111 int /* dst_y */,
112 unsigned int /* src_width */,
113 unsigned int /* src_height */,
114 Bool /* send_event */
115);
116
117Status XShmGetImage(
118 Display* /* dpy */,
119 Drawable /* d */,
120 XImage* /* image */,
121 int /* x */,
122 int /* y */,
123 unsigned long /* plane_mask */
124);
125
126XImage *XShmCreateImage(
127 Display* /* dpy */,
128 Visual* /* visual */,
129 unsigned int /* depth */,
130 int /* format */,
131 char* /* data */,
132 XShmSegmentInfo* /* shminfo */,
133 unsigned int /* width */,
134 unsigned int /* height */
135);
136
137Pixmap XShmCreatePixmap(
138 Display* /* dpy */,
139 Drawable /* d */,
140 char* /* data */,
141 XShmSegmentInfo* /* shminfo */,
142 unsigned int /* width */,
143 unsigned int /* height */,
144 unsigned int /* depth */
145);
146
147_XFUNCPROTOEND
148
149#else /* _XSHM_SERVER_ */
150
151#include "screenint.h"
152#include "pixmap.h"
153#include "gc.h"
154
155extern void ShmRegisterFbFuncs(
156 ScreenPtr /* pScreen */
157);
158
159#endif
160
161#endif
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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