This commit is contained in:
2025-12-12 22:19:44 +00:00
parent 06c7b7dfaa
commit e6ce95a1d4
6 changed files with 484 additions and 465 deletions

13
include/main.h Normal file
View File

@@ -0,0 +1,13 @@
#ifndef MAIN_H
#define MAIN_H
#include <atomic>
#include <vector>
#define NORMAL 0
#define INSERT 1
#define SELECT 2
extern std::atomic<bool> running;
#endif

View File

@@ -54,7 +54,7 @@ enum CellFlags : uint8_t {
};
struct ScreenCell {
std::string utf8 = std::string(""); // empty => no content
std::string utf8 = std::string("");
uint32_t fg = 0;
uint32_t bg = 0;
uint8_t flags = CF_NONE;
@@ -77,10 +77,9 @@ struct KeyEvent {
};
extern uint32_t rows, cols;
extern std::vector<ScreenCell> screen; // size rows*cols
extern std::vector<ScreenCell> screen;
extern std::vector<ScreenCell> old_screen;
extern std::mutex screen_mutex;
extern std::atomic<bool> running;
Coord start_screen();
void end_screen();