limine/common/lib/fb.h

34 lines
714 B
C
Raw Normal View History

2021-03-02 08:21:05 +03:00
#ifndef __LIB__FB_H__
#define __LIB__FB_H__
#include <stdint.h>
struct resolution {
uint16_t width;
uint16_t height;
uint16_t bpp;
};
2021-03-02 08:21:05 +03:00
struct fb_info {
2021-04-11 03:30:48 +03:00
bool default_res;
2021-03-02 08:21:05 +03:00
uint8_t memory_model;
uint64_t framebuffer_addr;
2021-03-02 08:21:05 +03:00
uint16_t framebuffer_pitch;
uint16_t framebuffer_width;
uint16_t framebuffer_height;
uint16_t framebuffer_bpp;
uint8_t red_mask_size;
uint8_t red_mask_shift;
uint8_t green_mask_size;
uint8_t green_mask_shift;
uint8_t blue_mask_size;
uint8_t blue_mask_shift;
};
bool fb_init(struct fb_info *ret,
uint16_t target_width, uint16_t target_height, uint16_t target_bpp);
2021-04-04 05:02:05 +03:00
void fb_clear(struct fb_info *fb);
2021-03-02 08:21:05 +03:00
#endif