xref: /csrg-svn/sys/sparc/include/fbvar.h (revision 63320)
155119Storek /*
2*63320Sbostic  * Copyright (c) 1992, 1993
3*63320Sbostic  *	The Regents of the University of California.  All rights reserved.
455119Storek  *
555119Storek  * This software was developed by the Computer Systems Engineering group
655119Storek  * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
755119Storek  * contributed to Berkeley.
855119Storek  *
955501Sbostic  * All advertising materials mentioning features or use of this software
1055501Sbostic  * must display the following acknowledgement:
1155501Sbostic  *	This product includes software developed by the University of
1259209Storek  *	California, Lawrence Berkeley Laboratory.
1355501Sbostic  *
1455119Storek  * %sccs.include.redist.c%
1555119Storek  *
16*63320Sbostic  *	@(#)fbvar.h	8.1 (Berkeley) 06/11/93
1755119Storek  *
1859209Storek  * from: $Header: fbvar.h,v 1.15 92/11/26 02:04:34 torek Exp $
1955119Storek  */
2055119Storek 
2155119Storek /*
2255119Storek  * Frame buffer variables.  All frame buffer drivers must provide the
2355119Storek  * following in order to participate.
2455119Storek  */
2555119Storek struct fbdriver {
2655119Storek 	/* device unblank function (force kernel output to display) */
2755119Storek 	void	(*fbd_unblank)(struct device *);
2855119Storek #ifdef notyet
2955119Storek 	void	(*fbd_wrrop)();		/* `write region' rasterop */
3055119Storek 	void	(*fbd_cprop)();		/* `copy region' rasterop */
3155119Storek 	void	(*fbd_clrop)();		/* `clear region' rasterop */
3255119Storek #endif
3355119Storek };
3455119Storek 
3555119Storek struct fbdevice {
3655119Storek 	int	fb_major;		/* XXX */
3755119Storek 	struct	fbtype fb_type;		/* what it says */
3855119Storek 	caddr_t	fb_pixels;		/* display RAM */
3955119Storek 	int	fb_linebytes;		/* bytes per display line */
4055119Storek 
4155119Storek 	struct	fbdriver *fb_driver;	/* pointer to driver */
4255119Storek 	struct	device *fb_device;	/* parameter for fbd_unblank */
4355119Storek 
4455119Storek 	/* Raster console emulator state */
4555119Storek 	u_int	fb_bits;		/* see defines below */
4655119Storek 	int	fb_ringing;		/* bell currently ringing */
4755119Storek 	int	fb_belldepth;		/* audible bell depth */
4855119Storek 	int	fb_scroll;		/* stupid sun scroll mode */
4955119Storek 
5055119Storek 	int	fb_p0;			/* escape sequence parameter 0 */
5155119Storek 	int	fb_p1;			/* escape sequence parameter 1 */
5255119Storek 
5355119Storek 	int	*fb_row;		/* emulator row */
5455119Storek 	int	*fb_col;		/* emulator column */
5555119Storek 
5655119Storek 	int	fb_maxrow;		/* emulator height of screen */
5755119Storek 	int	fb_maxcol;		/* emulator width of screen */
5855119Storek 
5955119Storek 	int	fb_emuwidth;		/* emulator screen width  */
6055119Storek 	int	fb_emuheight;		/* emulator screen height */
6155119Storek 
6255119Storek 	int	fb_xorigin;		/* x origin for first column */
6355119Storek 	int	fb_yorigin;		/* y origin for first row */
6455119Storek 
6555119Storek 	struct	raster *fb_sp;		/* frame buffer raster */
6655119Storek 	struct	raster *fb_cursor;	/* optional cursor */
6755119Storek 	int	fb_ras_blank;		/* current screen blank raster op */
6855119Storek 
6955119Storek 	struct	raster_font *fb_font;	/* font and related info */
7055119Storek 	int	fb_font_ascent;		/* distance from font to char origin */
7155119Storek };
7255119Storek 
7355119Storek #define FB_INESC	0x001		/* processing an escape sequence */
7455119Storek #define FB_STANDOUT	0x002		/* standout mode */
7555119Storek /* #define FB_BOLD	0x?		/* boldface mode */
7655119Storek #define FB_INVERT	0x008		/* white on black mode */
7755119Storek #define FB_VISBELL	0x010		/* visual bell */
7855119Storek #define FB_CURSOR	0x020		/* cursor is visible */
7955119Storek #define FB_P0_DEFAULT	0x100		/* param 0 is defaulted */
8055119Storek #define FB_P1_DEFAULT	0x200		/* param 1 is defaulted */
8155119Storek #define FB_P0		0x400		/* working on param 0 */
8255119Storek #define FB_P1		0x800		/* working on param 1 */
8355119Storek 
8455119Storek void	fbattach __P((struct fbdevice *));
85