diff options
author | dzwdz | 2022-08-08 20:18:56 +0200 |
---|---|---|
committer | dzwdz | 2022-08-08 20:18:56 +0200 |
commit | cb04eada02bedc5b748e01b09a899dc139c4970f (patch) | |
tree | 41b679ec42e1d2aa6c4350e4534030419cc33cf6 /src/user/lib/draw/draw.h | |
parent | 06415b58cdba12cd6a1a5b06f567d11d584364cc (diff) |
user/lib: shared libdraw for framebuffer handling
Diffstat (limited to 'src/user/lib/draw/draw.h')
-rw-r--r-- | src/user/lib/draw/draw.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/user/lib/draw/draw.h b/src/user/lib/draw/draw.h new file mode 100644 index 0000000..ba15840 --- /dev/null +++ b/src/user/lib/draw/draw.h @@ -0,0 +1,19 @@ +#pragma once +#include <camellia/types.h> +#include <stddef.h> +#include <stdint.h> + +struct framebuf { + size_t len, width, height, pitch; + uint8_t bpp; + char *b; + + handle_t fd; +}; + +struct rect { uint32_t x1, y1, x2, y2; }; +void dirty_reset(struct rect *d); +void dirty_mark(struct rect *d, uint32_t x, uint32_t y); +void dirty_flush(struct rect *d, struct framebuf *fb); + +int fb_setup(struct framebuf *fb, const char *base); |