VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/x11include/7.0/xorg/xf86fbman.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: 5.5 KB
Line 
1/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86fbman.h,v 1.14 2003/10/09 12:40:54 alanh Exp $ */
2
3/*
4 * Copyright (c) 1998-2001 by The XFree86 Project, Inc.
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the "Software"),
8 * to deal in the Software without restriction, including without limitation
9 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 * and/or sell copies of the Software, and to permit persons to whom the
11 * Software is furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be included in
14 * all copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
20 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22 * OTHER DEALINGS IN THE SOFTWARE.
23 *
24 * Except as contained in this notice, the name of the copyright holder(s)
25 * and author(s) shall not be used in advertising or otherwise to promote
26 * the sale, use or other dealings in this Software without prior written
27 * authorization from the copyright holder(s) and author(s).
28 */
29
30#ifndef _XF86FBMAN_H
31#define _XF86FBMAN_H
32
33
34#include "scrnintstr.h"
35#include "regionstr.h"
36
37
38#define FAVOR_AREA_THEN_WIDTH 0
39#define FAVOR_AREA_THEN_HEIGHT 1
40#define FAVOR_WIDTH_THEN_AREA 2
41#define FAVOR_HEIGHT_THEN_AREA 3
42
43#define PRIORITY_LOW 0
44#define PRIORITY_NORMAL 1
45#define PRIORITY_EXTREME 2
46
47
48typedef struct _FBArea {
49 ScreenPtr pScreen;
50 BoxRec box;
51 int granularity;
52 void (*MoveAreaCallback)(struct _FBArea*, struct _FBArea*);
53 void (*RemoveAreaCallback)(struct _FBArea*);
54 DevUnion devPrivate;
55} FBArea, *FBAreaPtr;
56
57typedef struct _FBLinear {
58 ScreenPtr pScreen;
59 int size;
60 int offset;
61 int granularity;
62 void (*MoveLinearCallback)(struct _FBLinear*, struct _FBLinear*);
63 void (*RemoveLinearCallback)(struct _FBLinear*);
64 DevUnion devPrivate;
65} FBLinear, *FBLinearPtr;
66
67typedef void (*FreeBoxCallbackProcPtr)(ScreenPtr, RegionPtr, pointer);
68typedef void (*MoveAreaCallbackProcPtr)(FBAreaPtr, FBAreaPtr);
69typedef void (*RemoveAreaCallbackProcPtr)(FBAreaPtr);
70
71typedef void (*MoveLinearCallbackProcPtr)(FBLinearPtr, FBLinearPtr);
72typedef void (*RemoveLinearCallbackProcPtr)(FBLinearPtr);
73
74
75typedef struct {
76 FBAreaPtr (*AllocateOffscreenArea)(
77 ScreenPtr pScreen,
78 int w, int h,
79 int granularity,
80 MoveAreaCallbackProcPtr moveCB,
81 RemoveAreaCallbackProcPtr removeCB,
82 pointer privData);
83 void (*FreeOffscreenArea)(FBAreaPtr area);
84 Bool (*ResizeOffscreenArea)(FBAreaPtr area, int w, int h);
85 Bool (*QueryLargestOffscreenArea)(
86 ScreenPtr pScreen,
87 int *width, int *height,
88 int granularity,
89 int preferences,
90 int priority);
91 Bool (*RegisterFreeBoxCallback)(
92 ScreenPtr pScreen,
93 FreeBoxCallbackProcPtr FreeBoxCallback,
94 pointer devPriv);
95/* linear functions */
96 FBLinearPtr (*AllocateOffscreenLinear)(
97 ScreenPtr pScreen,
98 int size,
99 int granularity,
100 MoveLinearCallbackProcPtr moveCB,
101 RemoveLinearCallbackProcPtr removeCB,
102 pointer privData);
103 void (*FreeOffscreenLinear)(FBLinearPtr area);
104 Bool (*ResizeOffscreenLinear)(FBLinearPtr area, int size);
105 Bool (*QueryLargestOffscreenLinear)(
106 ScreenPtr pScreen,
107 int *size,
108 int granularity,
109 int priority);
110 Bool (*PurgeOffscreenAreas) (ScreenPtr);
111} FBManagerFuncs, *FBManagerFuncsPtr;
112
113
114Bool xf86RegisterOffscreenManager(
115 ScreenPtr pScreen,
116 FBManagerFuncsPtr funcs
117);
118
119Bool
120xf86InitFBManagerRegion(
121 ScreenPtr pScreen,
122 RegionPtr ScreenRegion
123);
124
125Bool
126xf86InitFBManagerArea(
127 ScreenPtr pScreen,
128 int PixalArea,
129 int Verbosity
130);
131
132Bool
133xf86InitFBManager(
134 ScreenPtr pScreen,
135 BoxPtr FullBox
136);
137
138Bool
139xf86InitFBManagerLinear(
140 ScreenPtr pScreen,
141 int offset,
142 int size
143);
144
145Bool
146xf86FBManagerRunning(
147 ScreenPtr pScreen
148);
149
150FBAreaPtr
151xf86AllocateOffscreenArea (
152 ScreenPtr pScreen,
153 int w, int h,
154 int granularity,
155 MoveAreaCallbackProcPtr moveCB,
156 RemoveAreaCallbackProcPtr removeCB,
157 pointer privData
158);
159
160FBAreaPtr
161xf86AllocateLinearOffscreenArea (
162 ScreenPtr pScreen,
163 int length,
164 int granularity,
165 MoveAreaCallbackProcPtr moveCB,
166 RemoveAreaCallbackProcPtr removeCB,
167 pointer privData
168);
169
170FBLinearPtr
171xf86AllocateOffscreenLinear (
172 ScreenPtr pScreen,
173 int length,
174 int granularity,
175 MoveLinearCallbackProcPtr moveCB,
176 RemoveLinearCallbackProcPtr removeCB,
177 pointer privData
178);
179
180void xf86FreeOffscreenArea(FBAreaPtr area);
181void xf86FreeOffscreenLinear(FBLinearPtr area);
182
183Bool
184xf86ResizeOffscreenArea(
185 FBAreaPtr resize,
186 int w, int h
187);
188
189Bool
190xf86ResizeOffscreenLinear(
191 FBLinearPtr resize,
192 int size
193);
194
195
196Bool
197xf86RegisterFreeBoxCallback(
198 ScreenPtr pScreen,
199 FreeBoxCallbackProcPtr FreeBoxCallback,
200 pointer devPriv
201);
202
203Bool
204xf86PurgeUnlockedOffscreenAreas(
205 ScreenPtr pScreen
206);
207
208
209Bool
210xf86QueryLargestOffscreenArea(
211 ScreenPtr pScreen,
212 int *width, int *height,
213 int granularity,
214 int preferences,
215 int priority
216);
217
218Bool
219xf86QueryLargestOffscreenLinear(
220 ScreenPtr pScreen,
221 int *size,
222 int granularity,
223 int priority
224);
225
226
227#endif /* _XF86FBMAN_H */
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