zsm/include/zen/ui.h
night0721 312f0b8727
Change layout to have status bar instead of textbox, remove defines to enums
Add more colors for status bar

Add modes

Make slash commands to chat to user
2024-09-26 11:36:37 +01:00

52 lines
762 B
C

#ifndef UI_H_
#define UI_H_
#include <ncurses.h>
enum modes {
NORMAL,
INSERT,
COMMAND
};
enum windows {
USERS_WINDOW,
CHAT_WINDOW
};
enum colors {
BLUE = 9,
GREEN,
PEACH,
YELLOW,
LAVENDER,
PINK,
MAUVE,
RED,
SURFACE1
};
/* Key code */
#define CTRLA 0x01
#define CTRLD 0x04
#define CTRLE 0x05
#define CTRLX 0x18
#define DOWN 0x102
#define UP 0x103
#define LEFT 0x104
#define RIGHT 0x105
#define ENTER 0xA
#define ESC 0x1B
#define MAX_ARGS 10
void ncurses_init();
void windows_init();
void draw_border(WINDOW *window, bool active);
void add_message(uint8_t *author, uint8_t *recipient, uint8_t *content, uint32_t length, time_t creation);
void show_chat(uint8_t *recipient);
void add_username(char *username);
void deinit();
void ui();
#endif