2
* drivers/char/sparc/rconsole.h
4
#ifndef _SPARC_RCONSOLE_H
5
#define _SPARC_RCONSOLE_H
7
typedef unsigned RC_color; /* For arguments */
11
* Our fonts are laid out effectively for the main purpose (virtual consoles).
12
* Niceties are cut off.
15
#define RF_MAXWIDTH 16
16
typedef unsigned short Rf_scan; /* __w16 to be used */
20
int nchars_; /* 128 for ASCII ... 65536 for Unicode */
21
int width_; /* [Pixels]. Maximum size is 16. */
22
int height_; /* [Pixels == scan lines]. */
25
void font_cons_1(struct rfont *p, const char *name); /* for debugging */
26
void font_cons_7(struct rfont *p);
27
/* Fonts are permanent so we do not need a destructor yet. */
30
* Abstraction of a hardware or a software raster.
32
* Inversion on color displays is of two kinds: "display" and "color".
33
* Color inversion is an operation on a pixel value. [Note1: The operation
34
* must be mirroring: op(op(x)) == x. Example: op(x){return x^(-1)} ]
35
* Color inversion belongs to class raster. Display inversion is a
36
* swapping of foreground and background colors of an image. It belongs
37
* to class screen in our case. [Note2: It's one of the rare cases when OO
38
* model can be useful. ] In present we do not need a color inversion
39
* and it is omitted from the class raster.
42
int depth_, width_, height_; /* [planes], [pixels], [pixels] */
43
void *base_; /* Address of the first line. */
44
int loff_; /* Offset of the raster on the line [pixels] */
45
int lsize_; /* Line size [pixels] */
47
unsigned *outp_; /* __w32; output pointer. */
48
long ol_; /* __w32; output buffer. In theory */
49
/* belongs to raster1 ... raster24. */
50
int sx_; /* output index */
52
/* void (*invert_)(struct raster *, int, int, int, int); */
53
void (*clear_)( struct raster *, int y, int x, int h, int w, RC_color);
54
void (*yscroll_)(struct raster *, int y, int x, int h, int w, int dy);
55
void (*xscroll_)(struct raster *, int y, int x, int h, int w, int dx);
56
void (*render_)( struct raster *, int y, int x, const char*, int len,
57
RC_color bg, RC_color fg, const struct rfont *);
60
#define raster_qdepth(r) ((r)->depth_)
61
#define raster_qwidth(r) ((r)->width_)
62
#define raster_qheight(r) ((r)->height_)
63
#define raster_qbase(r) ((r)->base_)
64
void raster1_cons_a(struct raster *, int h, int w, char *base);
65
void raster8_cons_a(struct raster *, int h, int w, char *base);
66
void raster_cons_2(struct raster *, const struct raster *parent,
67
int y, int x, int h, int w);
68
void raster24_cons(struct raster *, int h, int w);
69
void raster_dest(struct raster *);
70
void raster8_render(struct raster *, int y, int x, const char*, int len,
71
RC_color bg, RC_color fg, const struct rfont *);
72
void raster1_render(struct raster *, int y, int x, const char*, int len,
73
RC_color bg, RC_color fg, const struct rfont *);
74
void raster1_clear(struct raster *, int, int, int, int, RC_color);
75
void raster8_clear(struct raster *, int, int, int, int, RC_color);
76
void raster1_yscroll(struct raster *, int, int, int, int, int);
77
void raster8_yscroll(struct raster *, int, int, int, int, int);
78
void raster8_xscroll(struct raster *, int, int, int, int, int);
81
#endif /* _SPARC_RCONSOLE_H */