aboutsummaryrefslogtreecommitdiff
path: root/lib/fb/fb.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/fb/fb.h')
-rw-r--r--lib/fb/fb.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/lib/fb/fb.h b/lib/fb/fb.h
new file mode 100644
index 0000000..a11f29f
--- /dev/null
+++ b/lib/fb/fb.h
@@ -0,0 +1,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