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