VirtualBox

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

Last change on this file was 69098, checked in by vboxsync, 7 years ago

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.

  • Property svn:eol-style set to native
File size: 3.7 KB
Line 
1/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86xvmc.h,v 1.5 2001/11/14 21:54:39 mvojkovi Exp $ */
2
3#ifndef _XF86XVMC_H
4#define _XF86XVMC_H
5
6#include "xvmcext.h"
7#include "xf86xv.h"
8
9typedef struct {
10 int num_xvimages;
11 int *xvimage_ids; /* reference the subpictures in the XF86MCAdaptorRec */
12} XF86MCImageIDList;
13
14typedef struct {
15 int surface_type_id; /* Driver generated. Must be unique on the port */
16 int chroma_format;
17 int color_description; /* no longer used */
18 unsigned short max_width;
19 unsigned short max_height;
20 unsigned short subpicture_max_width;
21 unsigned short subpicture_max_height;
22 int mc_type;
23 int flags;
24 XF86MCImageIDList *compatible_subpictures; /* can be null, if none */
25} XF86MCSurfaceInfoRec, *XF86MCSurfaceInfoPtr;
26
27
28/*
29 xf86XvMCCreateContextProc
30
31 DIX will fill everything out in the context except the driver_priv.
32 The port_priv holds the private data specified for the port when
33 Xv was initialized by the driver.
34 The driver may store whatever it wants in driver_priv and edit
35 the width, height and flags. If the driver wants to return something
36 to the client it can allocate space in priv and specify the number
37 of 32 bit words in num_priv. This must be dynamically allocated
38 space because DIX will free it after it passes it to the client.
39*/
40
41
42typedef int (*xf86XvMCCreateContextProcPtr) (
43 ScrnInfoPtr pScrn,
44 XvMCContextPtr context,
45 int *num_priv,
46 CARD32 **priv
47);
48
49typedef void (*xf86XvMCDestroyContextProcPtr) (
50 ScrnInfoPtr pScrn,
51 XvMCContextPtr context
52);
53
54/*
55 xf86XvMCCreateSurfaceProc
56
57 DIX will fill everything out in the surface except the driver_priv.
58 The driver may store whatever it wants in driver_priv. The driver
59 may pass data back to the client in the same manner as the
60 xf86XvMCCreateContextProc.
61*/
62
63
64typedef int (*xf86XvMCCreateSurfaceProcPtr) (
65 ScrnInfoPtr pScrn,
66 XvMCSurfacePtr surface,
67 int *num_priv,
68 CARD32 **priv
69);
70
71typedef void (*xf86XvMCDestroySurfaceProcPtr) (
72 ScrnInfoPtr pScrn,
73 XvMCSurfacePtr surface
74);
75
76/*
77 xf86XvMCCreateSubpictureProc
78
79 DIX will fill everything out in the subpicture except the driver_priv,
80 num_palette_entries, entry_bytes and component_order. The driver may
81 store whatever it wants in driver_priv and edit the width and height.
82 If it is a paletted subpicture the driver needs to fill out the
83 num_palette_entries, entry_bytes and component_order. These are
84 not communicated to the client until the time the surface is
85 created.
86
87 The driver may pass data back to the client in the same manner as the
88 xf86XvMCCreateContextProc.
89*/
90
91
92typedef int (*xf86XvMCCreateSubpictureProcPtr) (
93 ScrnInfoPtr pScrn,
94 XvMCSubpicturePtr subpicture,
95 int *num_priv,
96 CARD32 **priv
97);
98
99typedef void (*xf86XvMCDestroySubpictureProcPtr) (
100 ScrnInfoPtr pScrn,
101 XvMCSubpicturePtr subpicture
102);
103
104
105typedef struct {
106 char *name;
107 int num_surfaces;
108 XF86MCSurfaceInfoPtr *surfaces;
109 int num_subpictures;
110 XF86ImagePtr *subpictures;
111 xf86XvMCCreateContextProcPtr CreateContext;
112 xf86XvMCDestroyContextProcPtr DestroyContext;
113 xf86XvMCCreateSurfaceProcPtr CreateSurface;
114 xf86XvMCDestroySurfaceProcPtr DestroySurface;
115 xf86XvMCCreateSubpictureProcPtr CreateSubpicture;
116 xf86XvMCDestroySubpictureProcPtr DestroySubpicture;
117} XF86MCAdaptorRec, *XF86MCAdaptorPtr;
118
119/*
120 xf86XvMCScreenInit
121
122 Unlike Xv, the adaptor data is not copied from this structure.
123 This structure's data is used so it must stick around for the
124 life of the server. Note that it's an array of pointers not
125 an array of structures.
126*/
127
128Bool xf86XvMCScreenInit(
129 ScreenPtr pScreen,
130 int num_adaptors,
131 XF86MCAdaptorPtr *adaptors
132);
133
134#endif /* _XF86XVMC_H */
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