VirtualBox

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

最後變更 在這個檔案是 51223,由 vboxsync 提交於 11 年 前

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

  • 屬性 svn:eol-style 設為 native
檔案大小: 4.2 KB
 
1/*
2 * $XFree86: xc/programs/Xserver/miext/layer/layer.h,v 1.4 2001/08/01 00:44:58 tsi Exp $
3 *
4 * Copyright © 2001 Keith Packard, member of The XFree86 Project, Inc.
5 *
6 * Permission to use, copy, modify, distribute, and sell this software and its
7 * documentation for any purpose is hereby granted without fee, provided that
8 * the above copyright notice appear in all copies and that both that
9 * copyright notice and this permission notice appear in supporting
10 * documentation, and that the name of Keith Packard not be used in
11 * advertising or publicity pertaining to distribution of the software without
12 * specific, written prior permission. Keith Packard makes no
13 * representations about the suitability of this software for any purpose. It
14 * is provided "as is" without express or implied warranty.
15 *
16 * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
17 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
18 * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
19 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
20 * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
21 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
22 * PERFORMANCE OF THIS SOFTWARE.
23 */
24
25#ifdef HAVE_DIX_CONFIG_H
26#include <dix-config.h>
27#endif
28
29#ifndef _LAYER_H_
30#define _LAYER_H_
31
32#include <shadow.h>
33
34#define LAYER_FB 0
35#define LAYER_SHADOW 1
36
37typedef struct _LayerKind *LayerKindPtr;
38typedef struct _LayerWin *LayerWinPtr;
39typedef struct _LayerList *LayerListPtr;
40typedef struct _LayerGC *LayerGCPtr;
41typedef struct _Layer *LayerPtr;
42typedef struct _LayerScreen *LayerScreenPtr;
43
44/*
45 * We'll try to work without a list of windows in each layer
46 * for now, this will make computing bounding boxes for each
47 * layer rather expensive, so that may need to change at some point.
48 */
49
50#define LAYER_SCREEN_PIXMAP ((PixmapPtr) 1)
51
52typedef struct _Layer {
53 LayerPtr pNext; /* a list of all layers for this screen */
54 LayerKindPtr pKind; /* characteristics of this layer */
55 int refcnt; /* reference count, layer is freed when zero */
56 int windows; /* number of windows, free pixmap when zero */
57 int depth; /* window depth in this layer */
58 PixmapPtr pPixmap; /* pixmap for this layer (may be frame buffer) */
59 Bool freePixmap; /* whether to free this pixmap when done */
60 RegionRec region; /* valid set of pPixmap for drawing */
61 ShadowUpdateProc update; /* for shadow layers, update/window/closure values */
62 ShadowWindowProc window;
63 int randr;
64 void *closure;
65} LayerRec;
66
67/*
68 * Call this before wrapping stuff for acceleration, it
69 * gives layer pointers to the raw frame buffer functions
70 */
71
72Bool
73LayerStartInit (ScreenPtr pScreen);
74
75/*
76 * Initialize wrappers for each acceleration type and
77 * call this function, it will move the needed functions
78 * into a new LayerKind and replace them with the generic
79 * functions.
80 */
81
82int
83LayerNewKind (ScreenPtr pScreen);
84
85/*
86 * Finally, call this function and layer
87 * will wrap the screen functions and prepare for execution
88 */
89
90Bool
91LayerFinishInit (ScreenPtr pScreen);
92
93/*
94 * At any point after LayerStartInit, a new layer can be created.
95 */
96LayerPtr
97LayerCreate (ScreenPtr pScreen,
98 int kind,
99 int depth,
100 PixmapPtr pPixmap,
101 ShadowUpdateProc update,
102 ShadowWindowProc window,
103 int randr,
104 void *closure);
105
106/*
107 * Create a layer pixmap
108 */
109Bool
110LayerCreatePixmap (ScreenPtr pScreen, LayerPtr pLayer);
111
112/*
113 * Change a layer pixmap
114 */
115void
116LayerSetPixmap (ScreenPtr pScreen, LayerPtr pLayer, PixmapPtr pPixmap);
117
118/*
119 * Destroy a layer pixmap
120 */
121void
122LayerDestroyPixmap (ScreenPtr pScreen, LayerPtr pLayer);
123
124/*
125 * Change a layer kind
126 */
127void
128LayerSetKind (ScreenPtr pScreen, LayerPtr pLayer, int kind);
129
130/*
131 * Destroy a layer. The layer must not contain any windows.
132 */
133void
134LayerDestroy (ScreenPtr pScreen, LayerPtr layer);
135
136/*
137 * Add a window to a layer
138 */
139Bool
140LayerWindowAdd (ScreenPtr pScreen, LayerPtr pLayer, WindowPtr pWin);
141
142/*
143 * Remove a window from a layer
144 */
145
146void
147LayerWindowRemove (ScreenPtr pScreen, LayerPtr pLayer, WindowPtr pWin);
148
149#endif /* _LAYER_H_ */
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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