summaryrefslogtreecommitdiff
path: root/client/ui.h
blob: a4c4ed127faa78c8b5d77d916223693eb0b35744 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#pragma once

#include <ncurses.h>
#include <stdint.h>

#define W2_UI_UPDATE_FPS (60)

extern WINDOW *g_w2_ui_win;
extern WINDOW *g_w2_ui_pad_tabbar;
extern WINDOW *g_w2_ui_pad_body;
extern unsigned int g_w2_ui_width;
extern unsigned int g_w2_ui_height;
extern void (*g_w2_ui_current_tab)(bool first);

/** update terminal props */
void w2_ui_update();
/** clear screen */
void w2_ui_clear();
/** draw complete ui */
void w2_ui_paint();
/** update and paint */
void w2_ui_main();

/** draw status bar */
void w2_ui_paint_statusbar();
/** draw tab bar */
void w2_ui_paint_tabbar();

void w2_ui_dirc(bool first);

void w2_wmvaddstr(WINDOW *win, unsigned int y, unsigned int x, char *str);
void w2_wmvaddnstr(WINDOW *win, unsigned int y, unsigned int x, char *str, unsigned int len);