Color theming
This commit is contained in:
+31
-6
@@ -20,15 +20,27 @@ typedef struct erow {
|
||||
char *render; /**< The actual line we will print */
|
||||
} erow;
|
||||
|
||||
typedef struct theme {
|
||||
char *BACKGROUND_COLOR;
|
||||
char *COLOR_KEYWORD;
|
||||
char *COLOR_TYPE;
|
||||
char *COLOR_STRING;
|
||||
char *COLOR_COMMENT;
|
||||
char *COLOR_NUMBER;
|
||||
char *COLOR_DEFAULT;
|
||||
|
||||
} theme_t;
|
||||
|
||||
enum editorStatus_e {
|
||||
IDLE,
|
||||
READ_ONLY,
|
||||
READ_AND_WRITE,
|
||||
READ_AND_WRITE,
|
||||
};
|
||||
|
||||
struct const_t {
|
||||
int TAB_LENGTH;
|
||||
int QUIT_TIMES;
|
||||
char *THEME;
|
||||
};
|
||||
|
||||
struct prefix_t {
|
||||
@@ -40,7 +52,16 @@ struct keyBind_t {
|
||||
char *key_sequence;
|
||||
int prefix_id;
|
||||
Lisp command;
|
||||
|
||||
};
|
||||
|
||||
enum buffer_type { FILE_BUFF, TERMINAL_BUFF };
|
||||
|
||||
struct buffer_t {
|
||||
enum buffer_type type;
|
||||
int buffer_id;
|
||||
int width, height;
|
||||
int x, y; /**< Position of the buffer*/
|
||||
char *filename;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -74,12 +95,17 @@ struct editorConfig {
|
||||
Lisp ctx_data; /** Lisp data context */
|
||||
LispError ctx_error; /** Lisp ctx error */
|
||||
|
||||
struct keyBind_t* key_binds;
|
||||
struct keyBind_t *key_binds;
|
||||
int number_of_keybinds;
|
||||
|
||||
struct prefix_t* prefix;
|
||||
|
||||
struct prefix_t *prefix;
|
||||
int number_of_prefix;
|
||||
|
||||
struct buffer_t buffers[64];
|
||||
struct buffer_t ***screen_layout; /**< Which buffer is the current cell*/
|
||||
int number_of_buffer;
|
||||
|
||||
theme_t theme;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -94,5 +120,4 @@ struct abuf {
|
||||
|
||||
extern struct editorConfig E;
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user