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#ifdef HAVE_CONFIG_H 24#include <kdrive-config.h> 25#endif 26#include "fake.h" 27 28void 29InitCard (char *name) 30{ 31 KdCardInfoAdd (&fakeFuncs, 0); 32} 33 34void 35InitOutput (ScreenInfo *pScreenInfo, int argc, char **argv) 36{ 37 KdInitOutput (pScreenInfo, argc, argv); 38} 39 40void 41InitInput (int argc, char **argv) 42{ 43 KdPointerInfo *pi; 44 KdKeyboardInfo *ki; 45 46 pi = KdNewPointer (); 47 if (!pi) 48 return; 49 pi->driver = &FakePointerDriver; 50 KdAddPointer(pi); 51 52 ki = KdNewKeyboard (); 53 if (!ki) 54 return; 55 ki->driver = &FakeKeyboardDriver; 56 KdAddKeyboard(ki); 57 58 KdInitInput (); 59} 60 61void 62CloseInput (void) 63{ 64} 65 66#ifdef DDXBEFORERESET 67void 68ddxBeforeReset (void) 69{ 70} 71#endif 72 73void 74ddxUseMsg (void) 75{ 76 KdUseMsg(); 77} 78 79int 80ddxProcessArgument (int argc, char **argv, int i) 81{ 82 return KdProcessArgument (argc, argv, i); 83} 84 85void 86OsVendorInit (void) 87{ 88 KdOsInit (&FakeOsFuncs); 89} 90 91KdCardFuncs fakeFuncs = { 92 fakeCardInit, /* cardinit */ 93 fakeScreenInit, /* scrinit */ 94 fakeInitScreen, /* initScreen */ 95 fakeFinishInitScreen, /* finishInitScreen */ 96 fakeCreateResources, /* createRes */ 97 fakePreserve, /* preserve */ 98 fakeEnable, /* enable */ 99 fakeDPMS, /* dpms */ 100 fakeDisable, /* disable */ 101 fakeRestore, /* restore */ 102 fakeScreenFini, /* scrfini */ 103 fakeCardFini, /* cardfini */ 104 105 0, /* initCursor */ 106 0, /* enableCursor */ 107 0, /* disableCursor */ 108 0, /* finiCursor */ 109 0, /* recolorCursor */ 110 111 0, /* initAccel */ 112 0, /* enableAccel */ 113 0, /* disableAccel */ 114 0, /* finiAccel */ 115 116 fakeGetColors, /* getColors */ 117 fakePutColors, /* putColors */ 118}; 119