Basic UI with commands

This commit is contained in:
2020-06-12 11:40:48 -07:00
parent b4d90769ba
commit 78859dc4fa
8 changed files with 236 additions and 27 deletions

21
ui/model.h Normal file
View File

@@ -0,0 +1,21 @@
#ifndef UI_MODEL_H_
#define UI_MODEL_H_
#include <stdlib.h>
enum UI_MODE {
NORMAL,
COMMAND,
};
#define UI_INPUT_BUFFER_SIZE 4096
typedef struct ui_state {
int curs_x;
int curs_y;
enum UI_MODE mode;
size_t buffer_size;
char input_buffer[UI_INPUT_BUFFER_SIZE];
} ui_state;
#endif // UI_MODEL_H_