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