VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/x11include/xorg-server-1.0.1/xvdix.h@ 69348

Last change on this file since 69348 was 51223, checked in by vboxsync, 11 years ago

Additions/x11/x11include: added header files for X.Org Server 1.0 and 1.1.

  • Property svn:eol-style set to native
File size: 8.5 KB
Line 
1/***********************************************************
2Copyright 1991 by Digital Equipment Corporation, Maynard, Massachusetts,
3and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
4
5 All Rights Reserved
6
7Permission to use, copy, modify, and distribute this software and its
8documentation for any purpose and without fee is hereby granted,
9provided that the above copyright notice appear in all copies and that
10both that copyright notice and this permission notice appear in
11supporting documentation, and that the names of Digital or MIT not be
12used in advertising or publicity pertaining to distribution of the
13software without specific, written prior permission.
14
15DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
16ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
17DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
18ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
19WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
20ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
21SOFTWARE.
22
23******************************************************************/
24/* $XFree86: xc/programs/Xserver/Xext/xvdix.h,v 1.7 2001/05/07 21:37:51 tsi Exp $ */
25
26#ifndef XVDIX_H
27#define XVDIX_H
28/*
29** File:
30**
31** xvdix.h --- Xv device independent header file
32**
33** Author:
34**
35** David Carver (Digital Workstation Engineering/Project Athena)
36**
37** Revisions:
38**
39** 29.08.91 Carver
40** - removed UnrealizeWindow wrapper unrealizing windows no longer
41** preempts video
42**
43** 11.06.91 Carver
44** - changed SetPortControl to SetPortAttribute
45** - changed GetPortControl to GetPortAttribute
46** - changed QueryBestSize
47**
48** 15.05.91 Carver
49** - version 2.0 upgrade
50**
51** 24.01.91 Carver
52** - version 1.4 upgrade
53**
54*/
55
56#include "scrnintstr.h"
57#include <X11/extensions/Xvproto.h>
58
59extern int XvScreenIndex;
60extern unsigned long XvExtensionGeneration;
61extern unsigned long XvScreenGeneration;
62extern unsigned long XvResourceGeneration;
63
64extern int XvReqCode;
65extern int XvEventBase;
66extern int XvErrorBase;
67
68extern unsigned long XvRTPort;
69extern unsigned long XvRTEncoding;
70extern unsigned long XvRTGrab;
71extern unsigned long XvRTVideoNotify;
72extern unsigned long XvRTVideoNotifyList;
73extern unsigned long XvRTPortNotify;
74
75typedef struct {
76 int numerator;
77 int denominator;
78} XvRationalRec, *XvRationalPtr;
79
80typedef struct {
81 char depth;
82 unsigned long visual;
83} XvFormatRec, *XvFormatPtr;
84
85typedef struct {
86 unsigned long id;
87 ClientPtr client;
88} XvGrabRec, *XvGrabPtr;
89
90typedef struct _XvVideoNotifyRec {
91 struct _XvVideoNotifyRec *next;
92 ClientPtr client;
93 unsigned long id;
94 unsigned long mask;
95} XvVideoNotifyRec, *XvVideoNotifyPtr;
96
97typedef struct _XvPortNotifyRec {
98 struct _XvPortNotifyRec *next;
99 ClientPtr client;
100 unsigned long id;
101} XvPortNotifyRec, *XvPortNotifyPtr;
102
103typedef struct {
104 int id;
105 ScreenPtr pScreen;
106 char *name;
107 unsigned short width, height;
108 XvRationalRec rate;
109} XvEncodingRec, *XvEncodingPtr;
110
111typedef struct _XvAttributeRec {
112 int flags;
113 int min_value;
114 int max_value;
115 char *name;
116} XvAttributeRec, *XvAttributePtr;
117
118typedef struct {
119 int id;
120 int type;
121 int byte_order;
122 char guid[16];
123 int bits_per_pixel;
124 int format;
125 int num_planes;
126
127 /* for RGB formats only */
128 int depth;
129 unsigned int red_mask;
130 unsigned int green_mask;
131 unsigned int blue_mask;
132
133 /* for YUV formats only */
134 unsigned int y_sample_bits;
135 unsigned int u_sample_bits;
136 unsigned int v_sample_bits;
137 unsigned int horz_y_period;
138 unsigned int horz_u_period;
139 unsigned int horz_v_period;
140 unsigned int vert_y_period;
141 unsigned int vert_u_period;
142 unsigned int vert_v_period;
143 char component_order[32];
144 int scanline_order;
145} XvImageRec, *XvImagePtr;
146
147typedef struct {
148 unsigned long base_id;
149 unsigned char type;
150 char *name;
151 int nEncodings;
152 XvEncodingPtr pEncodings;
153 int nFormats;
154 XvFormatPtr pFormats;
155 int nAttributes;
156 XvAttributePtr pAttributes;
157 int nImages;
158 XvImagePtr pImages;
159 int nPorts;
160 struct _XvPortRec *pPorts;
161 ScreenPtr pScreen;
162 int (* ddAllocatePort)(unsigned long, struct _XvPortRec*,
163 struct _XvPortRec**);
164 int (* ddFreePort)(struct _XvPortRec*);
165 int (* ddPutVideo)(ClientPtr, DrawablePtr,struct _XvPortRec*, GCPtr,
166 INT16, INT16, CARD16, CARD16,
167 INT16, INT16, CARD16, CARD16);
168 int (* ddPutStill)(ClientPtr, DrawablePtr,struct _XvPortRec*, GCPtr,
169 INT16, INT16, CARD16, CARD16,
170 INT16, INT16, CARD16, CARD16);
171 int (* ddGetVideo)(ClientPtr, DrawablePtr,struct _XvPortRec*, GCPtr,
172 INT16, INT16, CARD16, CARD16,
173 INT16, INT16, CARD16, CARD16);
174 int (* ddGetStill)(ClientPtr, DrawablePtr,struct _XvPortRec*, GCPtr,
175 INT16, INT16, CARD16, CARD16,
176 INT16, INT16, CARD16, CARD16);
177 int (* ddStopVideo)(ClientPtr, struct _XvPortRec*, DrawablePtr);
178 int (* ddSetPortAttribute)(ClientPtr, struct _XvPortRec*, Atom, INT32);
179 int (* ddGetPortAttribute)(ClientPtr, struct _XvPortRec*, Atom, INT32*);
180 int (* ddQueryBestSize)(ClientPtr, struct _XvPortRec*, CARD8,
181 CARD16, CARD16,CARD16, CARD16,
182 unsigned int*, unsigned int*);
183 int (* ddPutImage)(ClientPtr, DrawablePtr, struct _XvPortRec*, GCPtr,
184 INT16, INT16, CARD16, CARD16,
185 INT16, INT16, CARD16, CARD16,
186 XvImagePtr, unsigned char*, Bool,
187 CARD16, CARD16);
188 int (* ddQueryImageAttributes)(ClientPtr, struct _XvPortRec*, XvImagePtr,
189 CARD16*, CARD16*, int*, int*);
190 DevUnion devPriv;
191} XvAdaptorRec, *XvAdaptorPtr;
192
193typedef struct _XvPortRec {
194 unsigned long id;
195 XvAdaptorPtr pAdaptor;
196 XvPortNotifyPtr pNotify;
197 DrawablePtr pDraw;
198 ClientPtr client;
199 XvGrabRec grab;
200 TimeStamp time;
201 DevUnion devPriv;
202} XvPortRec, *XvPortPtr;
203
204#define LOOKUP_PORT(_id, client)\
205 ((XvPortPtr)LookupIDByType(_id, XvRTPort))
206
207#define LOOKUP_ENCODING(_id, client)\
208 ((XvEncodingPtr)LookupIDByType(_id, XvRTEncoding))
209
210#define LOOKUP_VIDEONOTIFY_LIST(_id, client)\
211 ((XvVideoNotifyPtr)LookupIDByType(_id, XvRTVideoNotifyList))
212
213#define LOOKUP_PORTNOTIFY_LIST(_id, client)\
214 ((XvPortNotifyPtr)LookupIDByType(_id, XvRTPortNotifyList))
215
216typedef struct {
217 int version, revision;
218 int nAdaptors;
219 XvAdaptorPtr pAdaptors;
220 DestroyWindowProcPtr DestroyWindow;
221 DestroyPixmapProcPtr DestroyPixmap;
222 CloseScreenProcPtr CloseScreen;
223 Bool (* ddCloseScreen)(int, ScreenPtr);
224 int (* ddQueryAdaptors)(ScreenPtr, XvAdaptorPtr*, int*);
225 DevUnion devPriv;
226} XvScreenRec, *XvScreenPtr;
227
228#define SCREEN_PROLOGUE(pScreen, field)\
229 ((pScreen)->field = \
230 ((XvScreenPtr) \
231 (pScreen)->devPrivates[XvScreenIndex].ptr)->field)
232
233#define SCREEN_EPILOGUE(pScreen, field, wrapper)\
234 ((pScreen)->field = wrapper)
235
236/* Errors */
237
238#define _XvBadPort (XvBadPort+XvErrorBase)
239#define _XvBadEncoding (XvBadEncoding+XvErrorBase)
240
241extern int ProcXvDispatch(ClientPtr);
242extern int SProcXvDispatch(ClientPtr);
243
244extern void XvExtensionInit(void);
245extern int XvScreenInit(ScreenPtr);
246extern int XvGetScreenIndex(void);
247extern unsigned long XvGetRTPort(void);
248extern int XvdiSendPortNotify(XvPortPtr, Atom, INT32);
249extern int XvdiVideoStopped(XvPortPtr, int);
250
251extern int XvdiPutVideo(ClientPtr, DrawablePtr, XvPortPtr, GCPtr,
252 INT16, INT16, CARD16, CARD16,
253 INT16, INT16, CARD16, CARD16);
254extern int XvdiPutStill(ClientPtr, DrawablePtr, XvPortPtr, GCPtr,
255 INT16, INT16, CARD16, CARD16,
256 INT16, INT16, CARD16, CARD16);
257extern int XvdiGetVideo(ClientPtr, DrawablePtr, XvPortPtr, GCPtr,
258 INT16, INT16, CARD16, CARD16,
259 INT16, INT16, CARD16, CARD16);
260extern int XvdiGetStill(ClientPtr, DrawablePtr, XvPortPtr, GCPtr,
261 INT16, INT16, CARD16, CARD16,
262 INT16, INT16, CARD16, CARD16);
263extern int XvdiPutImage(ClientPtr, DrawablePtr, XvPortPtr, GCPtr,
264 INT16, INT16, CARD16, CARD16,
265 INT16, INT16, CARD16, CARD16,
266 XvImagePtr, unsigned char*, Bool,
267 CARD16, CARD16);
268extern int XvdiSelectVideoNotify(ClientPtr, DrawablePtr, BOOL);
269extern int XvdiSelectPortNotify(ClientPtr, XvPortPtr, BOOL);
270extern int XvdiSetPortAttribute(ClientPtr, XvPortPtr, Atom, INT32);
271extern int XvdiGetPortAttribute(ClientPtr, XvPortPtr, Atom, INT32*);
272extern int XvdiStopVideo(ClientPtr, XvPortPtr, DrawablePtr);
273extern int XvdiPreemptVideo(ClientPtr, XvPortPtr, DrawablePtr);
274extern int XvdiMatchPort(XvPortPtr, DrawablePtr);
275extern int XvdiGrabPort(ClientPtr, XvPortPtr, Time, int *);
276extern int XvdiUngrabPort( ClientPtr, XvPortPtr, Time);
277
278
279#if !defined(UNIXCPP)
280
281#define XVCALL(name) Xv##name
282
283#else
284
285#define XVCALL(name) Xv/**/name
286
287#endif
288
289
290#endif /* XVDIX_H */
291
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