2021-03-02 08:05:14 +03:00
|
|
|
#ifndef __LIB__GTERM_H__
|
|
|
|
#define __LIB__GTERM_H__
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
#include <stdbool.h>
|
|
|
|
#include <lib/image.h>
|
|
|
|
#include <drivers/vbe.h>
|
|
|
|
|
2021-04-07 03:10:28 +03:00
|
|
|
extern struct fb_info fbinfo;
|
2021-09-26 19:16:55 +03:00
|
|
|
extern bool term_autoflush;
|
2021-04-07 03:10:28 +03:00
|
|
|
|
2021-08-16 19:02:28 +03:00
|
|
|
bool gterm_init(size_t *_rows, size_t *_cols, size_t width, size_t height);
|
2021-03-02 08:05:14 +03:00
|
|
|
|
|
|
|
void gterm_putchar(uint8_t c);
|
|
|
|
void gterm_clear(bool move);
|
|
|
|
void gterm_enable_cursor(void);
|
2021-06-08 01:06:33 +03:00
|
|
|
bool gterm_disable_cursor(void);
|
2021-08-16 19:02:28 +03:00
|
|
|
void gterm_set_cursor_pos(size_t x, size_t y);
|
|
|
|
void gterm_get_cursor_pos(size_t *x, size_t *y);
|
|
|
|
void gterm_set_text_fg(size_t fg);
|
|
|
|
void gterm_set_text_bg(size_t bg);
|
|
|
|
void gterm_set_text_fg_bright(size_t fg);
|
|
|
|
void gterm_set_text_bg_bright(size_t bg);
|
2021-08-01 00:51:48 +03:00
|
|
|
void gterm_set_text_fg_default(void);
|
|
|
|
void gterm_set_text_bg_default(void);
|
2021-07-08 17:33:24 +03:00
|
|
|
bool gterm_scroll_disable(void);
|
|
|
|
void gterm_scroll_enable(void);
|
2021-08-16 19:02:28 +03:00
|
|
|
void gterm_move_character(size_t new_x, size_t new_y, size_t old_x, size_t old_y);
|
|
|
|
void gterm_scroll(void);
|
|
|
|
void gterm_swap_palette(void);
|
2021-03-02 08:05:14 +03:00
|
|
|
|
|
|
|
void gterm_double_buffer_flush(void);
|
|
|
|
|
2021-08-16 21:00:37 +03:00
|
|
|
uint64_t gterm_context_size(void);
|
|
|
|
void gterm_context_save(uint64_t ptr);
|
|
|
|
void gterm_context_restore(uint64_t ptr);
|
2021-08-16 21:56:39 +03:00
|
|
|
void gterm_full_refresh(void);
|
2021-08-16 21:00:37 +03:00
|
|
|
|
2021-03-02 08:05:14 +03:00
|
|
|
#endif
|