blob: aae6b9b3a873d3c3d42a9107ae23e9b9ab02ed9b [file] [log] [blame]
Kevin O'Connor0397e802016-08-04 17:53:45 -04001#ifndef __VGAFB_H
2#define __VGAFB_H
3
4// Graphics pixel operations.
5struct gfx_op {
6 struct vgamode_s *vmode_g;
7 u32 linelength;
8 u32 displaystart;
9
10 u8 op;
11 u16 x, y;
12
13 u8 pixels[8];
14 u16 xlen, ylen;
15 u16 srcy;
16};
17
18#define GO_READ8 1
19#define GO_WRITE8 2
20#define GO_MEMSET 3
21#define GO_MEMMOVE 4
22
23struct cursorpos {
24 u8 x, y, page, pad;
25};
26
27struct carattr {
28 u8 car, attr, use_attr, pad;
29};
30
31// vgafb.c
Gerd Hoffmann03f50612019-03-08 12:34:38 +010032void memcpy_high(void *dest, void *src, u32 len);
Kevin O'Connor0397e802016-08-04 17:53:45 -040033void init_gfx_op(struct gfx_op *op, struct vgamode_s *vmode_g);
34void handle_gfx_op(struct gfx_op *op);
35void *text_address(struct cursorpos cp);
36void vgafb_scroll(struct cursorpos win, struct cursorpos winsize
37 , int lines, struct carattr ca);
38void vgafb_write_char(struct cursorpos cp, struct carattr ca);
39struct carattr vgafb_read_char(struct cursorpos cp);
40void vgafb_write_pixel(u8 color, u16 x, u16 y);
41u8 vgafb_read_pixel(u16 x, u16 y);
42
43#endif // vgafb.h