VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/x11include/XFree86-4.3/Xserver/xf86xv.h@ 97956

最後變更 在這個檔案從97956是 69098,由 vboxsync 提交於 7 年 前

Clean up XFree86 driver header files.
bugref:3810: X11 Guest Additions maintenance
Over the years we have cleaned up the layout in the tree of the X.Org
header files we use to build drivers. The XFree86 ones were still in their
original, rather sub-optimal layout. This change fixes that.

  • 屬性 svn:eol-style 設為 native
檔案大小: 7.3 KB
 
1/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86xv.h,v 1.23 2002/11/09 01:18:33 keithp Exp $ */
2
3#ifndef _XF86XV_H_
4#define _XF86XV_H_
5
6#include "xvdix.h"
7#include "xf86str.h"
8
9#define VIDEO_NO_CLIPPING 0x00000001
10#define VIDEO_INVERT_CLIPLIST 0x00000002
11#define VIDEO_OVERLAID_IMAGES 0x00000004
12#define VIDEO_OVERLAID_STILLS 0x00000008
13#define VIDEO_CLIP_TO_VIEWPORT 0x00000010
14
15typedef struct {
16 int id;
17 int type;
18 int byte_order;
19 unsigned char guid[16];
20 int bits_per_pixel;
21 int format;
22 int num_planes;
23
24 /* for RGB formats only */
25 int depth;
26 unsigned int red_mask;
27 unsigned int green_mask;
28 unsigned int blue_mask;
29
30 /* for YUV formats only */
31 unsigned int y_sample_bits;
32 unsigned int u_sample_bits;
33 unsigned int v_sample_bits;
34 unsigned int horz_y_period;
35 unsigned int horz_u_period;
36 unsigned int horz_v_period;
37 unsigned int vert_y_period;
38 unsigned int vert_u_period;
39 unsigned int vert_v_period;
40 char component_order[32];
41 int scanline_order;
42} XF86ImageRec, *XF86ImagePtr;
43
44
45typedef struct {
46 ScrnInfoPtr pScrn;
47 int id;
48 unsigned short width, height;
49 int *pitches; /* bytes */
50 int *offsets; /* in bytes from start of framebuffer */
51 DevUnion devPrivate;
52} XF86SurfaceRec, *XF86SurfacePtr;
53
54
55typedef int (* PutVideoFuncPtr)( ScrnInfoPtr pScrn,
56 short vid_x, short vid_y, short drw_x, short drw_y,
57 short vid_w, short vid_h, short drw_w, short drw_h,
58 RegionPtr clipBoxes, pointer data );
59typedef int (* PutStillFuncPtr)( ScrnInfoPtr pScrn,
60 short vid_x, short vid_y, short drw_x, short drw_y,
61 short vid_w, short vid_h, short drw_w, short drw_h,
62 RegionPtr clipBoxes, pointer data );
63typedef int (* GetVideoFuncPtr)( ScrnInfoPtr pScrn,
64 short vid_x, short vid_y, short drw_x, short drw_y,
65 short vid_w, short vid_h, short drw_w, short drw_h,
66 RegionPtr clipBoxes, pointer data );
67typedef int (* GetStillFuncPtr)( ScrnInfoPtr pScrn,
68 short vid_x, short vid_y, short drw_x, short drw_y,
69 short vid_w, short vid_h, short drw_w, short drw_h,
70 RegionPtr clipBoxes, pointer data );
71typedef void (* StopVideoFuncPtr)(ScrnInfoPtr pScrn, pointer data, Bool Exit);
72typedef int (* SetPortAttributeFuncPtr)(ScrnInfoPtr pScrn, Atom attribute,
73 INT32 value, pointer data);
74typedef int (* GetPortAttributeFuncPtr)(ScrnInfoPtr pScrn, Atom attribute,
75 INT32 *value, pointer data);
76typedef void (* QueryBestSizeFuncPtr)(ScrnInfoPtr pScrn, Bool motion,
77 short vid_w, short vid_h, short drw_w, short drw_h,
78 unsigned int *p_w, unsigned int *p_h, pointer data);
79typedef int (* PutImageFuncPtr)( ScrnInfoPtr pScrn,
80 short src_x, short src_y, short drw_x, short drw_y,
81 short src_w, short src_h, short drw_w, short drw_h,
82 int image, unsigned char* buf, short width, short height, Bool Sync,
83 RegionPtr clipBoxes, pointer data );
84typedef int (* ReputImageFuncPtr)( ScrnInfoPtr pScrn, short drw_x, short drw_y,
85 RegionPtr clipBoxes, pointer data );
86typedef int (*QueryImageAttributesFuncPtr)(ScrnInfoPtr pScrn,
87 int image, unsigned short *width, unsigned short *height,
88 int *pitches, int *offsets);
89
90typedef enum {
91 XV_OFF,
92 XV_PENDING,
93 XV_ON
94} XvStatus;
95
96/*** this is what the driver needs to fill out ***/
97
98typedef struct {
99 int id;
100 char *name;
101 unsigned short width, height;
102 XvRationalRec rate;
103} XF86VideoEncodingRec, *XF86VideoEncodingPtr;
104
105typedef struct {
106 char depth;
107 short class;
108} XF86VideoFormatRec, *XF86VideoFormatPtr;
109
110typedef struct {
111 int flags;
112 int min_value;
113 int max_value;
114 char *name;
115} XF86AttributeRec, *XF86AttributePtr;
116
117typedef struct {
118 unsigned int type;
119 int flags;
120 char *name;
121 int nEncodings;
122 XF86VideoEncodingPtr pEncodings;
123 int nFormats;
124 XF86VideoFormatPtr pFormats;
125 int nPorts;
126 DevUnion *pPortPrivates;
127 int nAttributes;
128 XF86AttributePtr pAttributes;
129 int nImages;
130 XF86ImagePtr pImages;
131 PutVideoFuncPtr PutVideo;
132 PutStillFuncPtr PutStill;
133 GetVideoFuncPtr GetVideo;
134 GetStillFuncPtr GetStill;
135 StopVideoFuncPtr StopVideo;
136 SetPortAttributeFuncPtr SetPortAttribute;
137 GetPortAttributeFuncPtr GetPortAttribute;
138 QueryBestSizeFuncPtr QueryBestSize;
139 PutImageFuncPtr PutImage;
140 ReputImageFuncPtr ReputImage;
141 QueryImageAttributesFuncPtr QueryImageAttributes;
142} XF86VideoAdaptorRec, *XF86VideoAdaptorPtr;
143
144typedef struct {
145 XF86ImagePtr image;
146 int flags;
147 int (*alloc_surface)(ScrnInfoPtr pScrn,
148 int id,
149 unsigned short width,
150 unsigned short height,
151 XF86SurfacePtr surface);
152 int (*free_surface)(XF86SurfacePtr surface);
153 int (*display) (XF86SurfacePtr surface,
154 short vid_x, short vid_y,
155 short drw_x, short drw_y,
156 short vid_w, short vid_h,
157 short drw_w, short drw_h,
158 RegionPtr clipBoxes);
159 int (*stop) (XF86SurfacePtr surface);
160 int (*getAttribute) (ScrnInfoPtr pScrn, Atom attr, INT32 *value);
161 int (*setAttribute) (ScrnInfoPtr pScrn, Atom attr, INT32 value);
162 int max_width;
163 int max_height;
164 int num_attributes;
165 XF86AttributePtr attributes;
166} XF86OffscreenImageRec, *XF86OffscreenImagePtr;
167
168Bool
169xf86XVScreenInit(
170 ScreenPtr pScreen,
171 XF86VideoAdaptorPtr *Adaptors,
172 int num
173);
174
175typedef int (* xf86XVInitGenericAdaptorPtr)(ScrnInfoPtr pScrn,
176 XF86VideoAdaptorPtr **Adaptors);
177
178int
179xf86XVRegisterGenericAdaptorDriver(
180 xf86XVInitGenericAdaptorPtr InitFunc
181);
182
183int
184xf86XVListGenericAdaptors(
185 ScrnInfoPtr pScrn,
186 XF86VideoAdaptorPtr **Adaptors
187);
188
189Bool
190xf86XVRegisterOffscreenImages(
191 ScreenPtr pScreen,
192 XF86OffscreenImagePtr images,
193 int num
194);
195
196XF86OffscreenImagePtr
197xf86XVQueryOffscreenImages(
198 ScreenPtr pScreen,
199 int *num
200);
201
202XF86VideoAdaptorPtr xf86XVAllocateVideoAdaptorRec(ScrnInfoPtr pScrn);
203
204void xf86XVFreeVideoAdaptorRec(XF86VideoAdaptorPtr ptr);
205
206void
207xf86XVFillKeyHelper (ScreenPtr pScreen, CARD32 key, RegionPtr clipboxes);
208
209Bool
210xf86XVClipVideoHelper(
211 BoxPtr dst,
212 INT32 *xa,
213 INT32 *xb,
214 INT32 *ya,
215 INT32 *yb,
216 RegionPtr reg,
217 INT32 width,
218 INT32 height
219);
220
221/*** These are DDX layer privates ***/
222
223extern int XF86XvScreenIndex;
224
225typedef struct {
226 DestroyWindowProcPtr DestroyWindow;
227 ClipNotifyProcPtr ClipNotify;
228 WindowExposuresProcPtr WindowExposures;
229 void (*AdjustFrame)(int, int, int, int);
230 Bool (*EnterVT)(int, int);
231 void (*LeaveVT)(int, int);
232 GCPtr videoGC;
233} XF86XVScreenRec, *XF86XVScreenPtr;
234
235typedef struct {
236 int flags;
237 PutVideoFuncPtr PutVideo;
238 PutStillFuncPtr PutStill;
239 GetVideoFuncPtr GetVideo;
240 GetStillFuncPtr GetStill;
241 StopVideoFuncPtr StopVideo;
242 SetPortAttributeFuncPtr SetPortAttribute;
243 GetPortAttributeFuncPtr GetPortAttribute;
244 QueryBestSizeFuncPtr QueryBestSize;
245 PutImageFuncPtr PutImage;
246 ReputImageFuncPtr ReputImage;
247 QueryImageAttributesFuncPtr QueryImageAttributes;
248} XvAdaptorRecPrivate, *XvAdaptorRecPrivatePtr;
249
250typedef struct {
251 ScrnInfoPtr pScrn;
252 DrawablePtr pDraw;
253 unsigned char type;
254 unsigned int subWindowMode;
255 DDXPointRec clipOrg;
256 RegionPtr clientClip;
257 RegionPtr pCompositeClip;
258 Bool FreeCompositeClip;
259 XvAdaptorRecPrivatePtr AdaptorRec;
260 XvStatus isOn;
261 Bool moved;
262 int vid_x, vid_y, vid_w, vid_h;
263 int drw_x, drw_y, drw_w, drw_h;
264 DevUnion DevPriv;
265} XvPortRecPrivate, *XvPortRecPrivatePtr;
266
267typedef struct _XF86XVWindowRec{
268 XvPortRecPrivatePtr PortRec;
269 struct _XF86XVWindowRec *next;
270} XF86XVWindowRec, *XF86XVWindowPtr;
271
272#endif /* _XF86XV_H_ */
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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