Commit | Line | Data |
---|---|---|
a09e091a JB |
1 | /* |
2 | * Copyright © 2004 Keith Packard | |
3 | * | |
4 | * Permission to use, copy, modify, distribute, and sell this software and its | |
5 | * documentation for any purpose is hereby granted without fee, provided that | |
6 | * the above copyright notice appear in all copies and that both that | |
7 | * copyright notice and this permission notice appear in supporting | |
8 | * documentation, and that the name of Keith Packard not be used in | |
9 | * advertising or publicity pertaining to distribution of the software without | |
10 | * specific, written prior permission. Keith Packard makes no | |
11 | * representations about the suitability of this software for any purpose. It | |
12 | * is provided "as is" without express or implied warranty. | |
13 | * | |
14 | * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, | |
15 | * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO | |
16 | * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR | |
17 | * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, | |
18 | * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER | |
19 | * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR | |
20 | * PERFORMANCE OF THIS SOFTWARE. | |
21 | */ | |
22 | ||
23 | #ifndef _FBDEV_H_ | |
24 | #define _FBDEV_H_ | |
25 | #include <stdio.h> | |
26 | #include <unistd.h> | |
27 | #include "kdrive.h" | |
28 | ||
29 | #ifdef RANDR | |
30 | #include "randrstr.h" | |
31 | #endif | |
32 | ||
33 | typedef struct _fakePriv { | |
34 | CARD8 *base; | |
35 | int bytes_per_line; | |
36 | } FakePriv; | |
37 | ||
38 | typedef struct _fakeScrPriv { | |
39 | Rotation randr; | |
40 | Bool shadow; | |
41 | } FakeScrPriv; | |
42 | ||
43 | extern KdCardFuncs fakeFuncs; | |
44 | ||
45 | Bool | |
46 | fakeInitialize(KdCardInfo * card, FakePriv * priv); | |
47 | ||
48 | Bool | |
49 | fakeCardInit(KdCardInfo * card); | |
50 | ||
51 | Bool | |
52 | fakeScreenInit(KdScreenInfo * screen); | |
53 | ||
54 | Bool | |
55 | fakeScreenInitialize(KdScreenInfo * screen, FakeScrPriv * scrpriv); | |
56 | ||
57 | Bool | |
58 | fakeInitScreen(ScreenPtr pScreen); | |
59 | ||
60 | Bool | |
61 | fakeFinishInitScreen(ScreenPtr pScreen); | |
62 | ||
63 | Bool | |
64 | fakeCreateResources(ScreenPtr pScreen); | |
65 | ||
66 | void | |
67 | fakePreserve(KdCardInfo * card); | |
68 | ||
69 | Bool | |
70 | fakeEnable(ScreenPtr pScreen); | |
71 | ||
72 | Bool | |
73 | fakeDPMS(ScreenPtr pScreen, int mode); | |
74 | ||
75 | void | |
76 | fakeDisable(ScreenPtr pScreen); | |
77 | ||
78 | void | |
79 | fakeRestore(KdCardInfo * card); | |
80 | ||
81 | void | |
82 | fakeScreenFini(KdScreenInfo * screen); | |
83 | ||
84 | void | |
85 | fakeCardFini(KdCardInfo * card); | |
86 | ||
87 | void | |
88 | fakeGetColors(ScreenPtr pScreen, int n, xColorItem * pdefs); | |
89 | ||
90 | void | |
91 | fakePutColors(ScreenPtr pScreen, int n, xColorItem * pdefs); | |
92 | ||
93 | Bool | |
94 | fakeMapFramebuffer(KdScreenInfo * screen); | |
95 | ||
96 | void *fakeWindowLinear(ScreenPtr pScreen, | |
97 | CARD32 row, | |
98 | CARD32 offset, int mode, CARD32 *size, void *closure); | |
99 | ||
100 | void | |
101 | fakeSetScreenSizes(ScreenPtr pScreen); | |
102 | ||
103 | Bool | |
104 | fakeUnmapFramebuffer(KdScreenInfo * screen); | |
105 | ||
106 | Bool | |
107 | fakeSetShadow(ScreenPtr pScreen); | |
108 | ||
109 | Bool | |
110 | fakeCreateColormap(ColormapPtr pmap); | |
111 | ||
112 | #ifdef RANDR | |
113 | Bool | |
114 | fakeRandRGetInfo(ScreenPtr pScreen, Rotation * rotations); | |
115 | ||
116 | Bool | |
117 | ||
118 | fakeRandRSetConfig(ScreenPtr pScreen, | |
119 | Rotation randr, int rate, RRScreenSizePtr pSize); | |
120 | Bool | |
121 | fakeRandRInit(ScreenPtr pScreen); | |
122 | ||
123 | #endif | |
124 | ||
125 | extern KdPointerDriver FakePointerDriver; | |
126 | ||
127 | extern KdKeyboardDriver FakeKeyboardDriver; | |
128 | ||
129 | extern KdOsFuncs FakeOsFuncs; | |
130 | ||
131 | #endif /* _FBDEV_H_ */ |