1*55119Storek /* 2*55119Storek * Copyright (c) 1992 The Regents of the University of California. 3*55119Storek * All rights reserved. 4*55119Storek * 5*55119Storek * This software was developed by the Computer Systems Engineering group 6*55119Storek * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and 7*55119Storek * contributed to Berkeley. 8*55119Storek * 9*55119Storek * %sccs.include.redist.c% 10*55119Storek * 11*55119Storek * @(#)fbvar.h 7.1 (Berkeley) 07/13/92 12*55119Storek * 13*55119Storek * from: $Header: fbvar.h,v 1.14 92/06/17 06:10:16 torek Exp $ 14*55119Storek */ 15*55119Storek 16*55119Storek /* 17*55119Storek * Frame buffer variables. All frame buffer drivers must provide the 18*55119Storek * following in order to participate. 19*55119Storek */ 20*55119Storek struct fbdriver { 21*55119Storek /* device unblank function (force kernel output to display) */ 22*55119Storek void (*fbd_unblank)(struct device *); 23*55119Storek #ifdef notyet 24*55119Storek void (*fbd_wrrop)(); /* `write region' rasterop */ 25*55119Storek void (*fbd_cprop)(); /* `copy region' rasterop */ 26*55119Storek void (*fbd_clrop)(); /* `clear region' rasterop */ 27*55119Storek #endif 28*55119Storek }; 29*55119Storek 30*55119Storek struct fbdevice { 31*55119Storek int fb_major; /* XXX */ 32*55119Storek struct fbtype fb_type; /* what it says */ 33*55119Storek caddr_t fb_pixels; /* display RAM */ 34*55119Storek int fb_linebytes; /* bytes per display line */ 35*55119Storek 36*55119Storek struct fbdriver *fb_driver; /* pointer to driver */ 37*55119Storek struct device *fb_device; /* parameter for fbd_unblank */ 38*55119Storek 39*55119Storek /* Raster console emulator state */ 40*55119Storek u_int fb_bits; /* see defines below */ 41*55119Storek int fb_ringing; /* bell currently ringing */ 42*55119Storek int fb_belldepth; /* audible bell depth */ 43*55119Storek int fb_scroll; /* stupid sun scroll mode */ 44*55119Storek 45*55119Storek int fb_p0; /* escape sequence parameter 0 */ 46*55119Storek int fb_p1; /* escape sequence parameter 1 */ 47*55119Storek 48*55119Storek int *fb_row; /* emulator row */ 49*55119Storek int *fb_col; /* emulator column */ 50*55119Storek 51*55119Storek int fb_maxrow; /* emulator height of screen */ 52*55119Storek int fb_maxcol; /* emulator width of screen */ 53*55119Storek 54*55119Storek int fb_emuwidth; /* emulator screen width */ 55*55119Storek int fb_emuheight; /* emulator screen height */ 56*55119Storek 57*55119Storek int fb_xorigin; /* x origin for first column */ 58*55119Storek int fb_yorigin; /* y origin for first row */ 59*55119Storek 60*55119Storek struct raster *fb_sp; /* frame buffer raster */ 61*55119Storek struct raster *fb_cursor; /* optional cursor */ 62*55119Storek int fb_ras_blank; /* current screen blank raster op */ 63*55119Storek 64*55119Storek struct raster_font *fb_font; /* font and related info */ 65*55119Storek int fb_font_ascent; /* distance from font to char origin */ 66*55119Storek }; 67*55119Storek 68*55119Storek #define FB_INESC 0x001 /* processing an escape sequence */ 69*55119Storek #define FB_STANDOUT 0x002 /* standout mode */ 70*55119Storek /* #define FB_BOLD 0x? /* boldface mode */ 71*55119Storek #define FB_INVERT 0x008 /* white on black mode */ 72*55119Storek #define FB_VISBELL 0x010 /* visual bell */ 73*55119Storek #define FB_CURSOR 0x020 /* cursor is visible */ 74*55119Storek #define FB_P0_DEFAULT 0x100 /* param 0 is defaulted */ 75*55119Storek #define FB_P1_DEFAULT 0x200 /* param 1 is defaulted */ 76*55119Storek #define FB_P0 0x400 /* working on param 0 */ 77*55119Storek #define FB_P1 0x800 /* working on param 1 */ 78*55119Storek 79*55119Storek void fbattach __P((struct fbdevice *)); 80