1#ifndef UI_NCURSES_INTERNAL_H
2#define UI_NCURSES_INTERNAL_H 1
5
6
7
8
9
10
11
13#define _XOPEN_SOURCE_EXTENDED 1
15#define NCURSES_WIDECHAR 1
16#include <ncursesw/ncurses.h>
17#include <ncursesw/panel.h>
25#define KEY_F01 KEY_F
(1
)
26#define KEY_F02 KEY_F
(2
)
27#define KEY_F03 KEY_F
(3
)
28#define KEY_F04 KEY_F
(4
)
29#define KEY_F05 KEY_F
(5
)
30#define KEY_F06 KEY_F
(6
)
31#define KEY_F07 KEY_F
(7
)
32#define KEY_F08 KEY_F
(8
)
33#define KEY_F09 KEY_F
(9
)
34#define KEY_F10 KEY_F
(10
)
35#define KEY_F11 KEY_F
(11
)
36#define KEY_F12 KEY_F
(12
)
39
40
41
42
43
44
45
46
47
96 PANEL *mpan[SUB_SFC_MAX];
111 WINDOW *mwin[SUB_SFC_MAX];
114 struct UiRuntime *runtime;
115 struct UiSurfaceMeta meta[SUB_SFC_MAX];
116 struct UiSurface *parent;
133 uint8_t b_b, b_g, b_r, b_a;
139 uint8_t f_b, f_g, f_r, f_a;
170
171
172
173
174
175
176
177
178
179
180
181
182
183
186
187
188
189
191
192
193
194
195
196
int ui_cursor_move(UiSurface *s, uint w, uint y, uint x)
UiRuntime * ui_init(const UiConfig *config)
void ui_getyx(UiSurface *s, uint w, uint *lines, uint *cols)
int ui_surface_hide(UiSurface *s, uint w)
int ui_bkgdset(UiSurface *s, uint w, const UiCell *cell)
UiSurface * ui_surface_new(uint w, UiSurface *parent, uint p, uint lines, uint cols, uint y, uint x)
int ui_setscrreg(UiSurface *s, uint w, uint top, uint bottom)
int ui_scrollok(UiSurface *s, uint w, bool enable)
int ui_add_color_rgb(RGB *rgb)
int ui_wclear(UiSurface *s, uint w)
int ui_bkgd(UiSurface *s, uint w, const UiCell *cell)
void ui_surface_destroy(UiSurface *s)
int ui_surface_move(UiSurface *s, uint w, uint y, uint x)
int ui_idlok(UiSurface *s, uint w, bool enable)
int ui_wmove(UiSurface *s, uint w, uint y, uint x)
UiSurface * ui_surface[UI_SFC_MAX]
uint32_t ui_get_color(uint16_t color_idx)
int ui_werase(UiSurface *s, uint w)
void ui_get_screen_size(uint *lines, uint *cols)
void fast_exit(UiSurface *s)
RGB ui_hex_to_rgb(char *s)
int ui_wscrl(UiSurface *s, uint w, int rows)
UiCell ui_cell_from_ucp(const wchar_t *ucp, const uint32_t *fg, const uint32_t *bg)
int ui_curs_set(int visibility)
int ui_top_panel(UiSurface *s, uint w)
int ui_wnoutrefresh(UiSurface *s, uint w)
int ui_surface_resize(UiSurface *s, uint w, uint lines, uint cols)
int ui_surface_show(UiSurface *s, uint w)
UiSurface * ui_box_surface_new(UiSurface *parent, uint p, uint lines, uint cols, uint y, uint x, char *title)
int ui_keypad(UiSurface *s, uint w, bool enable)
int ui_cursor_enable(UiSurface *s, uint w, bool visible)
Disable (visible = false) or enable (visibile = true) the cursor at its current position on the surfa...
int ui_idcok(UiSurface *s, uint w, bool enable)
void ui_get_caps(UiCaps *caps)
Query the capabilities of the active backend.
UiBackend ui_get_backend()
Return which backend is powering this runtime.
int ui_surface_addpad(UiSurface *s, uint w, uint view_win, uint lines, uint cols)
void ui_getmaxyx(UiSurface *s, uint w, uint *lines, uint *cols)
int ui_cursor_enable_yx(UiSurface *s, uint w, uint y, uint x, bool visible)
Disable (visible = false) or enable (visibile = true) the cursor at a specified position on the surfa...
int ui_surface_addwin(UiSurface *s, uint w, uint p, uint lines, uint cols, uint y, uint x)
int ui_chg_color(uint16_t color_idx, uint32_t *color)
int ui_mvwadd_cell(struct UiSurface *s, uint w, uint y, uint x, UiCell *cc)
struct UiStyle * ui_style_new(void)
int ui_ncurses_color_pair_from_style(const struct UiStyle *style)
int ui_wadd_cell(struct UiSurface *s, uint w, UiCell *cc)
int ui_mvwadd_cellstr(struct UiSurface *s, uint w, uint y, uint x, UiCell *cmplx_buf)
int ui_ncurses_style_apply(struct UiSurface *s, uint w, const struct UiStyle *style)
UiCell ui_style_to_cch(const struct UiStyle *)
void ui_style_destroy(struct UiStyle *)
struct UiStyle * ui_style_from_cch(const UiCell *)
int ui_wadd_cellstr(struct UiSurface *s, uint w, UiCell *cmplx_buf)
struct UiStyle * ui_style_copy(const struct UiStyle *src)
int ui_mvwadd_cellnstr(struct UiSurface *s, uint w, uint y, uint x, UiCell *cmplx_buf, uint n)
int ui_wadd_cellnstr(struct UiSurface *s, uint w, UiCell *cmplx_buf, uint n)
PANEL * ui_ncurses_surface_get_panel(const UiSurface *s, uint w)
Return the raw NCurses PANEL* underlying a surface.
int ui_chg_pair(uint pair, uint fg, uint bg)
int ui_pair_content(uint pair, uint *fg, uint *bg)
SCREEN * ui_ncurses_get_screen()
int ui_getmaxx(UiSurface *s, uint w)
int ui_bkgrndset(UiSurface *s, uint w, const UiCell *cell)
int ui_init_color(uint color, uint r, uint g, uint b)
int ui_init_pair(uint pair, uint fg, uint bg)
uint ui_add_pair(uint fg, uint bg)
int ui_getcchar(const UiCell *uc, wchar_t *wstr, attr_t *attrs, uint16_t *pair, void *opts)
int ui_color_content(uint color, uint *r, uint *g, uint *b)
int ui_pair_from_hex(const char *fg, const char *bg)
int ui_getmaxy(UiSurface *s, uint w)
int ui_bkgrnd(UiSurface *s, uint w, const UiCell *cell)
int ui_setcchar(cchar_t *wch, const wchar_t *wc, const attr_t attrs, short pair, const void *opts)
WINDOW * ui_ncurses_surface_get_win(const UiSurface *s, uint w)
Return the raw NCurses WINDOW* underlying a surface.
int border_draw(UiSurface *sfc)
void apply_gamma(RGB *rgb)
Apply gamma correction to RGB color.
int border_title(UiSurface *sfc, char *title)
Draw a box with a title around the specified window.
int Perror(char *emsg_str)
Display a simple error message window or print to stderr.
int display_error(char *msg0, char *msg1, char *msg2, char *msg3)
Display an error message window or print to stderr.
size_t ssnprintf(char *, size_t, const char *,...)
ssnprintf was designed to be a safer alternative to snprintf.
Runtime state for the NotCurses backend.
A drawable surface in the NotCurses backend.
struct UiSurface * parent
struct UiRuntime * runtime
struct UiSurfaceMeta meta[SUB_SFC_MAX]