1#ifndef UI_NOTCURSES_COMPAT_H
2#define UI_NOTCURSES_COMPAT_H 1
5
6
7
8
9
10
11
12
14#include "../include/ui_backend.h"
15#include <notcurses/notcurses.h>
18
19
20
24
25
26
#define min(x, y)
min macro evaluates two expressions, returning least result
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)
int ui_mice_enable(int mask)
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)
struct notcurses_options NotCursesOptions
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]
int ui_werase(UiSurface *s, uint w)
void ui_get_screen_size(uint *lines, uint *cols)
RGB ui_hex_to_rgb(char *s)
int ui_wscrl(UiSurface *s, uint w, int rows)
int ui_mousemask(int mask)
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_get_pair(uint16_t pair, uint *fg, uint *bg)
uint ui_init_color_hex(char *s)
struct notcurses * ui_notcurses_get_nc()
Return the raw struct notcurses* for the NotCurses session.
NcPlane * ui_notcurses_surface_get_plane(const UiSurface *s, uint w)
Return the raw struct ncplane* underlying a surface.
uint64_t ui_get_channels_from_pair(uint16_t pair)
int ui_pair_content(uint pair, uint *fg, uint *bg)
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_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)
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 display_error(char *msg0, char *msg1, char *msg2, char *msg3)
Display an error message window or print to stderr.
size_t strnz__cpy(char *, const char *, size_t)
safer alternative to strncpy
size_t ssnprintf(char *, size_t, const char *,...)
ssnprintf was designed to be a safer alternative to snprintf.
struct UiSurface * parent
struct UiRuntime * runtime
struct UiSurfaceMeta meta[SUB_SFC_MAX]