1 | /*
|
---|
2 | * $XFree86: xc/programs/Xserver/fb/fboverlay.h,v 1.4tsi Exp $
|
---|
3 | *
|
---|
4 | * Copyright © 2000 SuSE, 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 SuSE not be used in advertising or
|
---|
11 | * publicity pertaining to distribution of the software without specific,
|
---|
12 | * written prior permission. SuSE makes no representations about the
|
---|
13 | * suitability of this software for any purpose. It is provided "as is"
|
---|
14 | * without express or implied warranty.
|
---|
15 | *
|
---|
16 | * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
|
---|
17 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
|
---|
18 | * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
---|
19 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
|
---|
20 | * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
|
---|
21 | * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
---|
22 | *
|
---|
23 | * Author: Keith Packard, SuSE, Inc.
|
---|
24 | */
|
---|
25 |
|
---|
26 | #ifndef _FBOVERLAY_H_
|
---|
27 | #define _FBOVERLAY_H_
|
---|
28 |
|
---|
29 | extern int fbOverlayGeneration;
|
---|
30 | extern int fbOverlayScreenPrivateIndex; /* XXX should be static */
|
---|
31 | extern int fbOverlayGetScreenPrivateIndex(void);
|
---|
32 |
|
---|
33 | #ifndef FB_OVERLAY_MAX
|
---|
34 | #define FB_OVERLAY_MAX 2
|
---|
35 | #endif
|
---|
36 |
|
---|
37 | typedef void (*fbOverlayPaintKeyProc) (DrawablePtr, RegionPtr, CARD32, int);
|
---|
38 |
|
---|
39 | typedef struct _fbOverlayLayer {
|
---|
40 | union {
|
---|
41 | struct {
|
---|
42 | pointer pbits;
|
---|
43 | int width;
|
---|
44 | int depth;
|
---|
45 | } init;
|
---|
46 | struct {
|
---|
47 | PixmapPtr pixmap;
|
---|
48 | RegionRec region;
|
---|
49 | } run;
|
---|
50 | } u;
|
---|
51 | CARD32 key; /* special pixel value */
|
---|
52 | } FbOverlayLayer;
|
---|
53 |
|
---|
54 | typedef struct _fbOverlayScrPriv {
|
---|
55 | int nlayers;
|
---|
56 | fbOverlayPaintKeyProc PaintKey;
|
---|
57 | fbCopyProc CopyWindow;
|
---|
58 | FbOverlayLayer layer[FB_OVERLAY_MAX];
|
---|
59 | } FbOverlayScrPrivRec, *FbOverlayScrPrivPtr;
|
---|
60 |
|
---|
61 | #define fbOverlayGetScrPriv(s) \
|
---|
62 | ((fbOverlayGetScreenPrivateIndex() != -1) ? \
|
---|
63 | (s)->devPrivates[fbOverlayGetScreenPrivateIndex()].ptr : NULL)
|
---|
64 | Bool
|
---|
65 | fbOverlayCreateWindow(WindowPtr pWin);
|
---|
66 |
|
---|
67 | Bool
|
---|
68 | fbOverlayCloseScreen (int iScreen, ScreenPtr pScreen);
|
---|
69 |
|
---|
70 | int
|
---|
71 | fbOverlayWindowLayer(WindowPtr pWin);
|
---|
72 |
|
---|
73 | Bool
|
---|
74 | fbOverlayCreateScreenResources(ScreenPtr pScreen);
|
---|
75 |
|
---|
76 | void
|
---|
77 | fbOverlayPaintKey (DrawablePtr pDrawable,
|
---|
78 | RegionPtr pRegion,
|
---|
79 | CARD32 pixel,
|
---|
80 | int layer);
|
---|
81 | void
|
---|
82 | fbOverlayUpdateLayerRegion (ScreenPtr pScreen,
|
---|
83 | int layer,
|
---|
84 | RegionPtr prgn);
|
---|
85 |
|
---|
86 |
|
---|
87 | void
|
---|
88 | fbOverlayCopyWindow(WindowPtr pWin,
|
---|
89 | DDXPointRec ptOldOrg,
|
---|
90 | RegionPtr prgnSrc);
|
---|
91 |
|
---|
92 | void
|
---|
93 | fbOverlayWindowExposures (WindowPtr pWin,
|
---|
94 | RegionPtr prgn,
|
---|
95 | RegionPtr other_exposed);
|
---|
96 |
|
---|
97 | void
|
---|
98 | fbOverlayPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what);
|
---|
99 |
|
---|
100 |
|
---|
101 | Bool
|
---|
102 | fbOverlaySetupScreen(ScreenPtr pScreen,
|
---|
103 | pointer pbits1,
|
---|
104 | pointer pbits2,
|
---|
105 | int xsize,
|
---|
106 | int ysize,
|
---|
107 | int dpix,
|
---|
108 | int dpiy,
|
---|
109 | int width1,
|
---|
110 | int width2,
|
---|
111 | int bpp1,
|
---|
112 | int bpp2);
|
---|
113 |
|
---|
114 | Bool
|
---|
115 | fbOverlayFinishScreenInit(ScreenPtr pScreen,
|
---|
116 | pointer pbits1,
|
---|
117 | pointer pbits2,
|
---|
118 | int xsize,
|
---|
119 | int ysize,
|
---|
120 | int dpix,
|
---|
121 | int dpiy,
|
---|
122 | int width1,
|
---|
123 | int width2,
|
---|
124 | int bpp1,
|
---|
125 | int bpp2,
|
---|
126 | int depth1,
|
---|
127 | int depth2);
|
---|
128 |
|
---|
129 | #endif /* _FBOVERLAY_H_ */
|
---|