Imported Upstream version 1.15.1
[deb_xorg-server.git] / hw / kdrive / fake / fake.h
CommitLineData
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
33typedef struct _fakePriv {
34 CARD8 *base;
35 int bytes_per_line;
36} FakePriv;
37
38typedef struct _fakeScrPriv {
39 Rotation randr;
40 Bool shadow;
41} FakeScrPriv;
42
43extern KdCardFuncs fakeFuncs;
44
45Bool
46 fakeInitialize(KdCardInfo * card, FakePriv * priv);
47
48Bool
49 fakeCardInit(KdCardInfo * card);
50
51Bool
52 fakeScreenInit(KdScreenInfo * screen);
53
54Bool
55 fakeScreenInitialize(KdScreenInfo * screen, FakeScrPriv * scrpriv);
56
57Bool
58 fakeInitScreen(ScreenPtr pScreen);
59
60Bool
61 fakeFinishInitScreen(ScreenPtr pScreen);
62
63Bool
64 fakeCreateResources(ScreenPtr pScreen);
65
66void
67 fakePreserve(KdCardInfo * card);
68
69Bool
70 fakeEnable(ScreenPtr pScreen);
71
72Bool
73 fakeDPMS(ScreenPtr pScreen, int mode);
74
75void
76 fakeDisable(ScreenPtr pScreen);
77
78void
79 fakeRestore(KdCardInfo * card);
80
81void
82 fakeScreenFini(KdScreenInfo * screen);
83
84void
85 fakeCardFini(KdCardInfo * card);
86
87void
88 fakeGetColors(ScreenPtr pScreen, int n, xColorItem * pdefs);
89
90void
91 fakePutColors(ScreenPtr pScreen, int n, xColorItem * pdefs);
92
93Bool
94 fakeMapFramebuffer(KdScreenInfo * screen);
95
96void *fakeWindowLinear(ScreenPtr pScreen,
97 CARD32 row,
98 CARD32 offset, int mode, CARD32 *size, void *closure);
99
100void
101 fakeSetScreenSizes(ScreenPtr pScreen);
102
103Bool
104 fakeUnmapFramebuffer(KdScreenInfo * screen);
105
106Bool
107 fakeSetShadow(ScreenPtr pScreen);
108
109Bool
110 fakeCreateColormap(ColormapPtr pmap);
111
112#ifdef RANDR
113Bool
114 fakeRandRGetInfo(ScreenPtr pScreen, Rotation * rotations);
115
116Bool
117
118fakeRandRSetConfig(ScreenPtr pScreen,
119 Rotation randr, int rate, RRScreenSizePtr pSize);
120Bool
121 fakeRandRInit(ScreenPtr pScreen);
122
123#endif
124
125extern KdPointerDriver FakePointerDriver;
126
127extern KdKeyboardDriver FakeKeyboardDriver;
128
129extern KdOsFuncs FakeOsFuncs;
130
131#endif /* _FBDEV_H_ */