2021-05-02 19:23:50 +00:00
|
|
|
#pragma once
|
|
|
|
#include <stdint.h>
|
2021-05-02 17:38:18 +00:00
|
|
|
#include <stddef.h>
|
2021-05-02 19:23:50 +00:00
|
|
|
#include <stdbool.h>
|
2021-05-10 20:33:25 +00:00
|
|
|
|
2022-09-01 18:16:16 +00:00
|
|
|
#include "../drivers/vga/colors.h"
|
2021-11-16 12:57:15 +00:00
|
|
|
#include "../io.h"
|
2021-11-02 20:03:11 +00:00
|
|
|
|
2022-09-02 19:09:51 +00:00
|
|
|
#include "../lib/string.h"
|
|
|
|
|
2021-11-02 20:03:11 +00:00
|
|
|
|
2021-05-02 17:38:18 +00:00
|
|
|
void kterm_init();
|
|
|
|
|
2021-07-22 21:14:58 +00:00
|
|
|
/* Kernel terminal - Colour functions*/
|
2021-05-02 17:38:18 +00:00
|
|
|
void kterm_resetcolor();
|
|
|
|
void kterm_setcolor(uint8_t);
|
|
|
|
|
2021-07-22 21:14:58 +00:00
|
|
|
/* Kernel terminal - Printing function */
|
2021-05-02 17:38:18 +00:00
|
|
|
void kterm_putat(char, uint8_t, size_t, size_t);
|
|
|
|
void kterm_put(char);
|
|
|
|
void kterm_write(const char*, size_t);
|
|
|
|
void kterm_writestring(const char*);
|
|
|
|
void kterm_scrollup();
|
|
|
|
|
2021-05-18 20:11:48 +00:00
|
|
|
|
2021-07-22 21:14:58 +00:00
|
|
|
/* Kernel terminal - Cursor functions */
|
|
|
|
void enable_cursor (uint8_t start_cursor , uint8_t end_cursor );
|
|
|
|
void disable_cursor();
|
|
|
|
void update_cursor(int x, int y);
|
|
|
|
uint16_t get_cursor_position();
|
|
|
|
int get_cursor_x (uint16_t cursor_pos);
|
|
|
|
int get_cursor_y (uint16_t cursor_pos);
|
|
|
|
|
|
|
|
|
2021-05-18 20:11:48 +00:00
|
|
|
void printf ( const char *format, ...);
|
|
|
|
|