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