sun.h revision aa86acb5
1ee7c6486Stsutsui 2ee7c6486Stsutsui/* $Xorg: sun.h,v 1.3 2000/08/17 19:48:29 cpqbld Exp $ */ 3ee7c6486Stsutsui 4ee7c6486Stsutsui/*- 5ee7c6486Stsutsui * Copyright (c) 1987 by the Regents of the University of California 6ee7c6486Stsutsui * 7ee7c6486Stsutsui * Permission to use, copy, modify, and distribute this 8ee7c6486Stsutsui * software and its documentation for any purpose and without 9ee7c6486Stsutsui * fee is hereby granted, provided that the above copyright 10ee7c6486Stsutsui * notice appear in all copies. The University of California 11ee7c6486Stsutsui * makes no representations about the suitability of this 12ee7c6486Stsutsui * software for any purpose. It is provided "as is" without 13ee7c6486Stsutsui * express or implied warranty. 14ee7c6486Stsutsui */ 15ee7c6486Stsutsui 16ee7c6486Stsutsui/* $XFree86: xc/programs/Xserver/hw/sun/sun.h,v 3.13 2003/11/17 22:20:36 dawes Exp $ */ 17ee7c6486Stsutsui 18ee7c6486Stsutsui#ifndef _SUN_H_ 19ee7c6486Stsutsui#define _SUN_H_ 20ee7c6486Stsutsui 21ee7c6486Stsutsui/* X headers */ 22ee7c6486Stsutsui#include <X11/Xos.h> 23ee7c6486Stsutsui#undef index /* don't mangle silly Sun structure member names */ 24ee7c6486Stsutsui#include <X11/X.h> 25ee7c6486Stsutsui#include <X11/Xproto.h> 26ee7c6486Stsutsui 27ee7c6486Stsutsui/* general system headers */ 28ee7c6486Stsutsui#ifndef NOSTDHDRS 29ee7c6486Stsutsui# include <stdlib.h> 30ee7c6486Stsutsui#else 31ee7c6486Stsutsui# include <malloc.h> 32ee7c6486Stsutsuiextern char *getenv(); 33ee7c6486Stsutsui#endif 34ee7c6486Stsutsui 35ee7c6486Stsutsui/* system headers common to both SunOS and Solaris */ 36ee7c6486Stsutsui#include <sys/param.h> 37ee7c6486Stsutsui#include <sys/file.h> 38ee7c6486Stsutsui#include <sys/filio.h> 39ee7c6486Stsutsui#include <sys/ioctl.h> 40ee7c6486Stsutsui#include <sys/resource.h> 41ee7c6486Stsutsui 42ee7c6486Stsutsui#ifdef SVR4 43ee7c6486Stsutsui# ifdef X_POSIX_C_SOURCE 44ee7c6486Stsutsui# define _POSIX_C_SOURCE X_POSIX_C_SOURCE 45ee7c6486Stsutsui# include <signal.h> 46ee7c6486Stsutsui# undef _POSIX_C_SOURCE 47ee7c6486Stsutsui# else 48ee7c6486Stsutsui# define _POSIX_SOURCE 49ee7c6486Stsutsui# include <signal.h> 50ee7c6486Stsutsui# undef _POSIX_SOURCE 51ee7c6486Stsutsui# endif 52ee7c6486Stsutsui#endif 53ee7c6486Stsutsui 54ee7c6486Stsutsui#include <fcntl.h> 55ee7c6486Stsutsui 56ee7c6486Stsutsui#ifndef __bsdi__ 57ee7c6486Stsutsui# ifndef CSRG_BASED 58ee7c6486Stsutsui# ifndef i386 59ee7c6486Stsutsui# include <poll.h> 60ee7c6486Stsutsui# else 61ee7c6486Stsutsui# include <sys/poll.h> 62ee7c6486Stsutsui# endif 63ee7c6486Stsutsui# endif 64ee7c6486Stsutsui#else 65ee7c6486Stsutsui# include <unistd.h> 66ee7c6486Stsutsui#endif 67ee7c6486Stsutsui 68ee7c6486Stsutsui#include <errno.h> 69ee7c6486Stsutsui#include <memory.h> 70ee7c6486Stsutsui#include <signal.h> 71ee7c6486Stsutsui 72ee7c6486Stsutsui 73ee7c6486Stsutsui/* 74ee7c6486Stsutsui * Sun specific headers Sun moved in Solaris, and are different for NetBSD. 75ee7c6486Stsutsui * 76ee7c6486Stsutsui * Even if only needed by one source file, I have put them here 77ee7c6486Stsutsui * to simplify finding them... 78ee7c6486Stsutsui */ 79ee7c6486Stsutsui#ifdef SVR4 80ee7c6486Stsutsui# include <sys/fbio.h> 81ee7c6486Stsutsui# include <sys/kbd.h> 82ee7c6486Stsutsui# include <sys/kbio.h> 83ee7c6486Stsutsui# include <sys/msio.h> 84ee7c6486Stsutsui# include <sys/vuid_event.h> 85ee7c6486Stsutsui# include <sys/memreg.h> 86ee7c6486Stsutsui# include <stropts.h> 87ee7c6486Stsutsui# define usleep(usec) poll((struct pollfd *) 0, (size_t) 0, usec / 1000) 88ee7c6486Stsutsui#else 89ee7c6486Stsutsui# ifndef CSRG_BASED 90ee7c6486Stsutsui# include <sun/fbio.h> 91ee7c6486Stsutsui# include <sundev/kbd.h> 92ee7c6486Stsutsui# include <sundev/kbio.h> 93ee7c6486Stsutsui# include <sundev/msio.h> 94ee7c6486Stsutsui# include <sundev/vuid_event.h> 95ee7c6486Stsutsui# include <pixrect/pixrect.h> 96ee7c6486Stsutsui# include <pixrect/memreg.h> 97ee7c6486Stsutsuiextern int ioctl(); 98ee7c6486Stsutsuiextern int getrlimit(); 99ee7c6486Stsutsuiextern int setrlimit(); 100ee7c6486Stsutsuiextern int getpagesize(); 101ee7c6486Stsutsui# else 102ee7c6486Stsutsui# if defined(CSRG_BASED) && !defined(__bsdi__) && !defined(__NetBSD__) 103ee7c6486Stsutsui# include <machine/fbio.h> 104ee7c6486Stsutsui# include <machine/kbd.h> 105ee7c6486Stsutsui# include <machine/kbio.h> 106ee7c6486Stsutsui# include <machine/vuid_event.h> 107ee7c6486Stsutsui# endif 108ee7c6486Stsutsui# ifdef __bsdi__ 109ee7c6486Stsutsui# include <sys/fbio.h> 110ee7c6486Stsutsui# include </sys/sparc/dev/kbd.h> 111ee7c6486Stsutsui# include </sys/sparc/dev/kbio.h> 112ee7c6486Stsutsui# include </sys/sparc/dev/vuid_event.h> 113ee7c6486Stsutsui# endif 114ee7c6486Stsutsui# ifdef __NetBSD__ 115ee7c6486Stsutsui# include <dev/sun/fbio.h> 116ee7c6486Stsutsui# include <machine/kbd.h> 117ee7c6486Stsutsui# include <dev/sun/kbio.h> /* also <sparc/kbio.h> -wsr */ 118ee7c6486Stsutsui# include <dev/sun/vuid_event.h> /* also <sparc/vud_event.h> -wsr */ 119ee7c6486Stsutsui# endif 120ee7c6486Stsutsui# endif 121ee7c6486Stsutsui#endif 122ee7c6486Stsutsui 123ee7c6486Stsutsui/* 124ee7c6486Stsutsui * Sun doesn't see fit to add the TCX to <sys/fbio.h> 125ee7c6486Stsutsui */ 126ee7c6486Stsutsui#ifndef SVR4 127ee7c6486Stsutsui/* On SunOS 4.1.x the TCX pretends to be a CG3 */ 128ee7c6486Stsutsui#define XFBTYPE_LASTPLUSONE FBTYPE_LASTPLUSONE 129ee7c6486Stsutsui#else 130ee7c6486Stsutsui#define XFBTYPE_TCX 21 131ee7c6486Stsutsui#define XFBTYPE_LASTPLUSONE 22 132ee7c6486Stsutsui#endif 133ee7c6486Stsutsui 134ee7c6486Stsutsui#include <sys/time.h> 135ee7c6486Stsutsui 136ee7c6486Stsutsui/* 137ee7c6486Stsutsui * Server specific headers 138ee7c6486Stsutsui */ 139ee7c6486Stsutsui#include "misc.h" 140ee7c6486Stsutsui#undef abs /* don't munge function prototypes in headers, sigh */ 141ee7c6486Stsutsui#include "scrnintstr.h" 142ee7c6486Stsutsui#ifdef NEED_EVENTS 143ee7c6486Stsutsui# include "inputstr.h" 144ee7c6486Stsutsui#endif 145ee7c6486Stsutsui#include "input.h" 146ee7c6486Stsutsui#include "colormapst.h" 147ee7c6486Stsutsui#include "colormap.h" 148ee7c6486Stsutsui#include "cursorstr.h" 149ee7c6486Stsutsui#include "cursor.h" 150ee7c6486Stsutsui#include "dixstruct.h" 151ee7c6486Stsutsui#include "dix.h" 152ee7c6486Stsutsui#include "opaque.h" 153ee7c6486Stsutsui#include "resource.h" 154ee7c6486Stsutsui#include "servermd.h" 155ee7c6486Stsutsui#include "windowstr.h" 156ee7c6486Stsutsui#include "mipointer.h" 157ee7c6486Stsutsui 158ee7c6486Stsutsui/* 159ee7c6486Stsutsui * ddx specific headers 160ee7c6486Stsutsui */ 161ee7c6486Stsutsui#ifndef PSZ 162ee7c6486Stsutsui#define PSZ 8 163ee7c6486Stsutsui#endif 164ee7c6486Stsutsui 165ee7c6486Stsutsuiextern int monitorResolution; 166ee7c6486Stsutsui 167ee7c6486Stsutsui 168ee7c6486Stsutsui/* Frame buffer devices */ 169ee7c6486Stsutsui#ifdef SVR4 170ee7c6486Stsutsui# define CGTWO0DEV "/dev/fbs/cgtwo0" 171ee7c6486Stsutsui# define CGTWO1DEV "/dev/fbs/cgtwo1" 172ee7c6486Stsutsui# define CGTWO2DEV "/dev/fbs/cgtwo2" 173ee7c6486Stsutsui# define CGTWO3DEV "/dev/fbs/cgtwo3" 174ee7c6486Stsutsui# define CGTHREE0DEV "/dev/fbs/cgthree0" 175ee7c6486Stsutsui# define CGTHREE1DEV "/dev/fbs/cgthree1" 176ee7c6486Stsutsui# define CGTHREE2DEV "/dev/fbs/cgthree2" 177ee7c6486Stsutsui# define CGTHREE3DEV "/dev/fbs/cgthree3" 178ee7c6486Stsutsui# define CGFOUR0DEV "/dev/fbs/cgfour0" 179ee7c6486Stsutsui# define CGSIX0DEV "/dev/fbs/cgsix0" 180ee7c6486Stsutsui# define CGSIX1DEV "/dev/fbs/cgsix1" 181ee7c6486Stsutsui# define CGSIX2DEV "/dev/fbs/cgsix2" 182ee7c6486Stsutsui# define CGSIX3DEV "/dev/fbs/cgsix3" 183ee7c6486Stsutsui# define BWTWO0DEV "/dev/fbs/bwtwo0" 184ee7c6486Stsutsui# define BWTWO1DEV "/dev/fbs/bwtwo1" 185ee7c6486Stsutsui# define BWTWO2DEV "/dev/fbs/bwtwo2" 186ee7c6486Stsutsui# define BWTWO3DEV "/dev/fbs/bwtwo3" 187ee7c6486Stsutsui# define CGEIGHT0DEV "/dev/fbs/cgeight0" 188ee7c6486Stsutsui# define TCX0DEV "/dev/fbs/tcx0" 189ee7c6486Stsutsui#else 190ee7c6486Stsutsui# define CGTWO0DEV "/dev/cgtwo0" 191ee7c6486Stsutsui# define CGTWO1DEV "/dev/cgtwo1" 192ee7c6486Stsutsui# define CGTWO2DEV "/dev/cgtwo2" 193ee7c6486Stsutsui# define CGTWO3DEV "/dev/cgtwo3" 194ee7c6486Stsutsui# define CGTHREE0DEV "/dev/cgthree0" 195ee7c6486Stsutsui# define CGTHREE1DEV "/dev/cgthree1" 196ee7c6486Stsutsui# define CGTHREE2DEV "/dev/cgthree2" 197ee7c6486Stsutsui# define CGTHREE3DEV "/dev/cgthree3" 198ee7c6486Stsutsui# define CGFOUR0DEV "/dev/cgfour0" 199ee7c6486Stsutsui# define CGSIX0DEV "/dev/cgsix0" 200ee7c6486Stsutsui# define CGSIX1DEV "/dev/cgsix1" 201ee7c6486Stsutsui# define CGSIX2DEV "/dev/cgsix2" 202ee7c6486Stsutsui# define CGSIX3DEV "/dev/cgsix3" 203ee7c6486Stsutsui# define BWTWO0DEV "/dev/bwtwo0" 204ee7c6486Stsutsui# define BWTWO1DEV "/dev/bwtwo1" 205ee7c6486Stsutsui# define BWTWO2DEV "/dev/bwtwo2" 206ee7c6486Stsutsui# define BWTWO3DEV "/dev/bwtwo3" 207ee7c6486Stsutsui# define CGEIGHT0DEV "/dev/cgeight0" 208ee7c6486Stsutsui#endif 209ee7c6486Stsutsui 210ee7c6486Stsutsui/* 211ee7c6486Stsutsui * SUN_MAXEVENTS is the maximum number of events the mouse and keyboard 212ee7c6486Stsutsui * functions will read on a given call to their GetEvents vectors. 213ee7c6486Stsutsui */ 214ee7c6486Stsutsui#define SUN_MAXEVENTS 32 215ee7c6486Stsutsui 216ee7c6486Stsutsui/* 217ee7c6486Stsutsui * Data private to any sun keyboard. 218ee7c6486Stsutsui */ 219ee7c6486Stsutsuitypedef struct { 220ee7c6486Stsutsui int fd; 221ee7c6486Stsutsui int type; /* Type of keyboard */ 222ee7c6486Stsutsui int layout; /* The layout of the keyboard */ 223ee7c6486Stsutsui int click; /* kbd click save state */ 224ee7c6486Stsutsui Leds leds; /* last known LED state */ 225ee7c6486Stsutsui} sunKbdPrivRec, *sunKbdPrivPtr; 226ee7c6486Stsutsui 227ee7c6486Stsutsuiextern sunKbdPrivRec sunKbdPriv; 228ee7c6486Stsutsui 229ee7c6486Stsutsui/* 230ee7c6486Stsutsui * Data private to any sun pointer device. 231ee7c6486Stsutsui */ 232ee7c6486Stsutsuitypedef struct { 233ee7c6486Stsutsui int fd; 234ee7c6486Stsutsui int bmask; /* last known button state */ 235ee7c6486Stsutsui} sunPtrPrivRec, *sunPtrPrivPtr; 236ee7c6486Stsutsui 237ee7c6486Stsutsuiextern sunPtrPrivRec sunPtrPriv; 238ee7c6486Stsutsui 239ee7c6486Stsutsuitypedef struct { 240ee7c6486Stsutsui BYTE key; 241ee7c6486Stsutsui CARD8 modifiers; 242ee7c6486Stsutsui} SunModmapRec; 243ee7c6486Stsutsui 244ee7c6486Stsutsuitypedef struct { 245ee7c6486Stsutsui int width, height; 246ee7c6486Stsutsui Bool has_cursor; 247ee7c6486Stsutsui CursorPtr pCursor; /* current cursor */ 248ee7c6486Stsutsui} sunCursorRec, *sunCursorPtr; 249ee7c6486Stsutsui 25097c02368Stsutsui#define NCMAP 256 25197c02368Stsutsuitypedef struct { 25297c02368Stsutsui u_char origRed[NCMAP]; 25397c02368Stsutsui u_char origGreen[NCMAP]; 25497c02368Stsutsui u_char origBlue[NCMAP]; 25597c02368Stsutsui} sunCmapRec, *sunCmapPtr; 25697c02368Stsutsui 257ee7c6486Stsutsuitypedef struct { 258ee7c6486Stsutsui ColormapPtr installedMap; 259ee7c6486Stsutsui CloseScreenProcPtr CloseScreen; 260ee7c6486Stsutsui void (*UpdateColormap)(ScreenPtr, int, int, u_char *, u_char *, u_char *); 261ee7c6486Stsutsui void (*GetColormap)(ScreenPtr, int, int, u_char *, u_char *, u_char *); 26297c02368Stsutsui Bool origColormapValid; 26397c02368Stsutsui sunCmapRec origColormap; 26497c02368Stsutsui void (*RestoreColormap)(ScreenPtr); 265ee7c6486Stsutsui sunCursorRec hardwareCursor; 266ee7c6486Stsutsui Bool hasHardwareCursor; 267ee7c6486Stsutsui} sunScreenRec, *sunScreenPtr; 268ee7c6486Stsutsui 269ee7c6486Stsutsuiextern DevPrivateKeyRec sunScreenPrivateKeyRec; 270ee7c6486Stsutsui#define sunScreenPrivateKey (&sunScreenPrivateKeyRec) 271ee7c6486Stsutsui#define sunSetScreenPrivate(pScreen, v) \ 272ee7c6486Stsutsui dixSetPrivate(&(pScreen)->devPrivates, sunScreenPrivateKey, (v)) 273ee7c6486Stsutsui#define sunGetScreenPrivate(pScreen) ((sunScreenRec *) \ 274ee7c6486Stsutsui dixLookupPrivate(&(pScreen)->devPrivates, sunScreenPrivateKey)) 275ee7c6486Stsutsui 276ee7c6486Stsutsuitypedef struct { 277ee7c6486Stsutsui unsigned char* fb; /* Frame buffer itself */ 278ee7c6486Stsutsui int fd; /* frame buffer for ioctl()s, */ 279ee7c6486Stsutsui struct fbtype info; /* Frame buffer characteristics */ 280ee7c6486Stsutsui void (*EnterLeave)(ScreenPtr, int);/* screen switch */ 281ee7c6486Stsutsui unsigned char* fbPriv; /* fbattr stuff, for the real type */ 282ee7c6486Stsutsui} fbFd; 283ee7c6486Stsutsui 284ee7c6486Stsutsuitypedef Bool (*sunFbInitProc)( 285ee7c6486Stsutsui ScreenPtr /* pScreen */, 286ee7c6486Stsutsui int /* argc */, 287ee7c6486Stsutsui char** /* argv */ 288ee7c6486Stsutsui); 289ee7c6486Stsutsui 290ee7c6486Stsutsuitypedef struct { 291ee7c6486Stsutsui sunFbInitProc init; /* init procedure for this fb */ 292ee7c6486Stsutsui const char *name; /* /usr/include/fbio names */ 293ee7c6486Stsutsui} sunFbDataRec; 294ee7c6486Stsutsui 295ee7c6486Stsutsui/* sunInit.c */ 296ee7c6486Stsutsuiextern sunFbDataRec sunFbData[]; 297ee7c6486Stsutsuiextern fbFd sunFbs[]; 298ee7c6486Stsutsuiextern Bool sunSwapLkeys; 299c46e3e8eStsutsuiextern Bool sunForceMono; 300c46e3e8eStsutsuiextern Bool sunDebug; 301aa86acb5Stsutsuiextern char *sunDeviceList; 302ee7c6486Stsutsuiextern Bool sunFlipPixels; 303ee7c6486Stsutsuiextern Bool sunFbInfo; 304ee7c6486Stsutsuiextern Bool sunCG4Frob; 305ee7c6486Stsutsuiextern Bool sunNoGX; 306ee7c6486Stsutsui 307ee7c6486Stsutsui/* sunKeyMap.c */ 308ee7c6486Stsutsuiextern KeySymsRec sunKeySyms[]; 309ee7c6486Stsutsuiextern const int sunMaxLayout; 310ee7c6486Stsutsuiextern KeySym *sunType4KeyMaps[]; 311ee7c6486Stsutsui 312ee7c6486Stsutsui/* sunKbd.c */ 313ee7c6486Stsutsuiextern long sunAutoRepeatInitiate; 314ee7c6486Stsutsuiextern long sunAutoRepeatDelay; 315ee7c6486Stsutsuiextern DeviceIntPtr sunKeyboardDevice; 316ee7c6486Stsutsui 317ee7c6486Stsutsui/* sunMouse.c */ 318ee7c6486Stsutsuiextern Bool sunActiveZaphod; 319ee7c6486Stsutsuiextern DeviceIntPtr sunPointerDevice; 320ee7c6486Stsutsuiextern miPointerScreenFuncRec sunPointerScreenFuncs; 321ee7c6486Stsutsui 322ee7c6486Stsutsui/* sunFbs.c */ 323ee7c6486Stsutsuiextern int sunScreenIndex; 324ee7c6486Stsutsui 325ee7c6486Stsutsui/* sunCursor.c */ 326ee7c6486Stsutsuiextern Bool sunCursorInitialize(ScreenPtr); 327ee7c6486Stsutsuiextern void sunDisableCursor(ScreenPtr); 328ee7c6486Stsutsui 329ee7c6486Stsutsui/* sunInit.c */ 330ee7c6486Stsutsuiextern void sunNonBlockConsoleOff( 331ee7c6486Stsutsui#if defined(SVR4) || defined(CSRG_BASED) 332ee7c6486Stsutsui void 333ee7c6486Stsutsui#else 334ee7c6486Stsutsui char* /* arg */ 335ee7c6486Stsutsui#endif 336ee7c6486Stsutsui); 337ee7c6486Stsutsui 338ee7c6486Stsutsui/* sunIo.c */ 339ee7c6486Stsutsuiextern void sunEnqueueEvents(void); 340ee7c6486Stsutsui 341ee7c6486Stsutsui/* sunGX.c */ 342ee7c6486Stsutsuiextern int sunGXInit(ScreenPtr, fbFd *); 343ee7c6486Stsutsui 344ee7c6486Stsutsui/* sunFbs.c */ 345ee7c6486Stsutsuiextern Bool sunSaveScreen(ScreenPtr, int); 346ee7c6486Stsutsuiextern Bool sunScreenInit(ScreenPtr); 347ee7c6486Stsutsuiextern void *sunMemoryMap(size_t, off_t, int); 348ee7c6486Stsutsuiextern Bool sunScreenAllocate(ScreenPtr); 349ee7c6486Stsutsuiextern Bool sunInitCommon(int, ScreenPtr, off_t, 350ee7c6486Stsutsui Bool (* /* init1 */)(ScreenPtr, void *, int, int, int, int, int, int), 351ee7c6486Stsutsui void (* /* init2 */)(ScreenPtr), 352ee7c6486Stsutsui Bool (* /* cr_cm */)(ScreenPtr), 353ee7c6486Stsutsui Bool (* /* save */)(ScreenPtr, int), 354ee7c6486Stsutsui int); 355ee7c6486Stsutsui 356ee7c6486Stsutsui/* sunKbd.c */ 357ee7c6486Stsutsuiextern int sunChangeKbdTranslation(int, Bool); 358ee7c6486Stsutsuiextern Firm_event* sunKbdGetEvents(int, Bool, int *, Bool *); 359ee7c6486Stsutsuiextern void sunKbdEnqueueEvent(DeviceIntPtr, Firm_event *); 360ee7c6486Stsutsuiextern int sunKbdProc(DeviceIntPtr, int); 361ee7c6486Stsutsuiextern void sunKbdWait(void); 362ee7c6486Stsutsui 363ee7c6486Stsutsui/* sunMouse.c */ 364ee7c6486Stsutsuiextern Firm_event* sunMouseGetEvents(int, Bool, int *, Bool *); 365ee7c6486Stsutsuiextern void sunMouseEnqueueEvent(DeviceIntPtr, Firm_event *); 366ee7c6486Stsutsuiextern int sunMouseProc(DeviceIntPtr, int); 367ee7c6486Stsutsui 368ee7c6486Stsutsui/* sunCfb.c */ 369ee7c6486StsutsuiBool sunCG3Init(ScreenPtr, int, char **); 370ee7c6486StsutsuiBool sunTCXInit(ScreenPtr, int, char **); 371ee7c6486StsutsuiBool sunCG2Init(ScreenPtr, int, char **); 372ee7c6486StsutsuiBool sunCG4Init(ScreenPtr, int, char **); 373ee7c6486StsutsuiBool sunCG6Init(ScreenPtr, int, char **); 374ee7c6486Stsutsui 375ee7c6486Stsutsui/* sunCfb24.c */ 376ee7c6486StsutsuiBool sunCG8Init(ScreenPtr, int, char **); 377ee7c6486Stsutsui 378ee7c6486Stsutsui/* sunMfb.c */ 379ee7c6486StsutsuiBool sunBW2Init(ScreenPtr, int, char **); 380ee7c6486Stsutsui 381ee7c6486Stsutsui/* XXX */ 382ee7c6486Stsutsuiextern void mfbDoBitblt(DrawablePtr, DrawablePtr, int, RegionPtr, DDXPointPtr); 383ee7c6486Stsutsui 384ee7c6486Stsutsui/*- 385ee7c6486Stsutsui * TVTOMILLI(tv) 386ee7c6486Stsutsui * Given a struct timeval, convert its time into milliseconds... 387ee7c6486Stsutsui */ 388ee7c6486Stsutsui#define TVTOMILLI(tv) (((tv).tv_usec/1000)+((tv).tv_sec*1000)) 389ee7c6486Stsutsui 390ee7c6486Stsutsuiextern Bool sunCfbSetupScreen( 391ee7c6486Stsutsui ScreenPtr /* pScreen */, 392ee7c6486Stsutsui void * /* pbits */, /* pointer to screen bitmap */ 393ee7c6486Stsutsui int /* xsize */, /* in pixels */ 394ee7c6486Stsutsui int /* ysize */, 395ee7c6486Stsutsui int /* dpix */, /* dots per inch */ 396ee7c6486Stsutsui int /* dpiy */, /* dots per inch */ 397ee7c6486Stsutsui int /* width */, /* pixel width of frame buffer */ 398ee7c6486Stsutsui int /* bpp */ /* bits per pixel of root */ 399ee7c6486Stsutsui); 400ee7c6486Stsutsui 401ee7c6486Stsutsuiextern Bool sunCfbFinishScreenInit( 402ee7c6486Stsutsui ScreenPtr /* pScreen */, 403ee7c6486Stsutsui void * /* pbits */, /* pointer to screen bitmap */ 404ee7c6486Stsutsui int /* xsize */, /* in pixels */ 405ee7c6486Stsutsui int /* ysize */, 406ee7c6486Stsutsui int /* dpix */, /* dots per inch */ 407ee7c6486Stsutsui int /* dpiy */, /* dots per inch */ 408ee7c6486Stsutsui int /* width */, /* pixel width of frame buffer */ 409ee7c6486Stsutsui int /* bpp */ /* bits per pixel of root */ 410ee7c6486Stsutsui); 411ee7c6486Stsutsui 412ee7c6486Stsutsuiextern Bool sunCfbScreenInit( 413ee7c6486Stsutsui ScreenPtr /* pScreen */, 414ee7c6486Stsutsui void * /* pbits */, /* pointer to screen bitmap */ 415ee7c6486Stsutsui int /* xsize */, /* in pixels */ 416ee7c6486Stsutsui int /* ysize */, 417ee7c6486Stsutsui int /* dpix */, /* dots per inch */ 418ee7c6486Stsutsui int /* dpiy */, /* dots per inch */ 419ee7c6486Stsutsui int /* width */, /* pixel width of frame buffer */ 420ee7c6486Stsutsui int /* bpp */ /* bits per pixel of root */ 421ee7c6486Stsutsui); 422ee7c6486Stsutsui 423ee7c6486Stsutsuiextern void sunInstallColormap( 424ee7c6486Stsutsui ColormapPtr /* cmap */ 425ee7c6486Stsutsui); 426ee7c6486Stsutsui 427ee7c6486Stsutsuiextern void sunUninstallColormap( 428ee7c6486Stsutsui ColormapPtr /* cmap */ 429ee7c6486Stsutsui); 430ee7c6486Stsutsui 431ee7c6486Stsutsuiextern int sunListInstalledColormaps( 432ee7c6486Stsutsui ScreenPtr /* pScreen */, 433ee7c6486Stsutsui Colormap* /* pCmapList */ 434ee7c6486Stsutsui); 435ee7c6486Stsutsui 436ee7c6486Stsutsui#endif 437