aboutsummaryrefslogtreecommitdiff
path: root/lib/fb/fb.h
blob: a11f29ff44ec9216816b393bdde41d4a0f5660e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#ifndef FB_H
#define FB_H

#include "../sys/types.h"

typedef struct {
	u8 b;
	u8 g;
	u8 r;
	u8 a;
} canvas_pixel_t;

typedef struct {
	u32 width;
	u32 height;
	canvas_pixel_t *data;
	u32 line_length;
	u32 bits_per_pixel;
} canvas_t;

canvas_t open_framebuffer();
void close_framebuffer(canvas_t);

void put_pixel(canvas_t canvas, u64 x, u64 y, canvas_pixel_t p);

#endif