blob: ccdc70355caf9e05327e3fb4c39c8d70a0dedcf0 [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
32void init_gfx_op(struct gfx_op *op, struct vgamode_s *vmode_g);
33void handle_gfx_op(struct gfx_op *op);
34void *text_address(struct cursorpos cp);
35void vgafb_scroll(struct cursorpos win, struct cursorpos winsize
36 , int lines, struct carattr ca);
37void vgafb_write_char(struct cursorpos cp, struct carattr ca);
38struct carattr vgafb_read_char(struct cursorpos cp);
39void vgafb_write_pixel(u8 color, u16 x, u16 y);
40u8 vgafb_read_pixel(u16 x, u16 y);
41
42#endif // vgafb.h