|
C-Menu 0.2.9
A User Interface Toolkit
|
NCurses UI backend — drawing functions. More...
#include "cm.h"#include "ui_backend.h"#include "ui_ncurses_internal.h"#include <stdlib.h>#include <string.h>#include <wchar.h>Go to the source code of this file.
Macros | |
| #define | _XOPEN_SOURCE_EXTENDED 1 |
Functions | |
| int | mbstr_to_cc (char *in_str, UiCell *cmplx_buf_s) |
| Convert a multibyte string to a complex character array. | |
| void | parse_ansi (char *ansi_str, attr_t *attr, uint *cpx) |
| Parse an ANSI SGR sequence and update attributes and color pair index. | |
| int | ui_draw_ch_yx (UiSurface *s, uint w, uint y, uint x, const char c) |
| int | ui_draw_text (UiSurface *s, uint w, uint y, uint x, const char *text) |
| int | ui_draw_text_fill (UiSurface *s, uint w, uint y, uint x, const char *text, int n) |
| int | ui_draw_text_n (UiSurface *s, uint w, uint y, uint x, const char *text, int n) |
| int | ui_mvaddstr (UiSurface *s, uint w, uint y, uint x, const char *text) |
| int | ui_mvwadd_wch (UiSurface *s, uint w, uint y, uint x, const UiCell *cell) |
| int | ui_mvwadd_wchnstr (UiSurface *s, uint w, uint y, uint x, const UiCell *cmplx_buf, uint n) |
| int | ui_mvwadd_wchstr (UiSurface *s, uint w, uint y, uint x, const UiCell *cmplx_buf) |
| int | ui_mvwaddch (UiSurface *s, uint w, uint y, uint x, const char c) |
| int | ui_mvwaddnstr (UiSurface *s, uint w, uint y, uint x, const char *text, int m) |
| int | ui_mvwaddnwstr (UiSurface *s, uint w, uint y, uint x, const wchar_t *wstr, int m) |
| int | ui_mvwaddstr (UiSurface *s, uint w, uint y, uint x, const char *text) |
| int | ui_mvwaddstr_fill (UiSurface *s, uint w, uint y, uint x, const char *str, int m) |
| int | ui_mvwaddwstr (UiSurface *s, uint w, uint y, uint x, const wchar_t *wstr) |
| void | ui_restore_wins () |
| int | ui_wadd_wch (UiSurface *s, uint w, const UiCell *cell) |
| int | ui_wadd_wchnstr (UiSurface *s, uint w, const UiCell *cmplx_buf, uint n) |
| int | ui_wadd_wchstr (UiSurface *s, uint w, const UiCell *cmplx_buf) |
| int | ui_waddnwstr (UiSurface *s, uint w, const wchar_t *wstr, int m) |
| int | ui_waddstr (UiSurface *s, uint w, const char *text) |
| int | ui_waddwstr (UiSurface *s, uint w, const wchar_t *wstr) |
| int | ui_wclrtobot (UiSurface *s, uint w) |
| int | ui_wclrtoeol (UiSurface *s, uint w) |
NCurses UI backend — drawing functions.
Implements the drawing operations declared in ui_backend.h using the NCurses wide-character API.
Definition in file ui_ncurses_draw.c.
| #define _XOPEN_SOURCE_EXTENDED 1 |
Definition at line 9 of file ui_ncurses_draw.c.
| int mbstr_to_cc | ( | char * | in_str, |
| UiCell * | cmplx_buf_s ) |
Convert a multibyte string to a complex character array.
Definition at line 224 of file ui_ncurses_draw.c.
References cp_nt, and parse_ansi().
| void parse_ansi | ( | char * | ansi_str, |
| attr_t * | attr, | ||
| uint * | cpx ) |
Parse an ANSI SGR sequence and update attributes and color pair index.
Definition at line 311 of file ui_ncurses_draw.c.
References a_toi(), CLR_NT_BG, CLR_NT_FG, ui_add_color_rgb(), ui_add_pair(), and xterm256_idx_to_rgb().
Referenced by mbstr_to_cc().
| int ui_draw_ch_yx | ( | UiSurface * | s, |
| uint | w, | ||
| uint | y, | ||
| uint | x, | ||
| const char | c ) |
Definition at line 40 of file ui_ncurses_draw.c.
| int ui_draw_text | ( | UiSurface * | s, |
| uint | w, | ||
| uint | y, | ||
| uint | x, | ||
| const char * | text ) |
Definition at line 47 of file ui_ncurses_draw.c.
| int ui_draw_text_fill | ( | UiSurface * | s, |
| uint | w, | ||
| uint | y, | ||
| uint | x, | ||
| const char * | text, | ||
| int | n ) |
Definition at line 61 of file ui_ncurses_draw.c.
| int ui_draw_text_n | ( | UiSurface * | s, |
| uint | w, | ||
| uint | y, | ||
| uint | x, | ||
| const char * | text, | ||
| int | n ) |
Definition at line 54 of file ui_ncurses_draw.c.
| int ui_mvaddstr | ( | UiSurface * | s, |
| uint | w, | ||
| uint | y, | ||
| uint | x, | ||
| const char * | text ) |
Definition at line 118 of file ui_ncurses_draw.c.
Definition at line 175 of file ui_ncurses_draw.c.
Definition at line 201 of file ui_ncurses_draw.c.
Definition at line 188 of file ui_ncurses_draw.c.
| int ui_mvwaddch | ( | UiSurface * | s, |
| uint | w, | ||
| uint | y, | ||
| uint | x, | ||
| const char | c ) |
Definition at line 125 of file ui_ncurses_draw.c.
| int ui_mvwaddnstr | ( | UiSurface * | s, |
| uint | w, | ||
| uint | y, | ||
| uint | x, | ||
| const char * | text, | ||
| int | m ) |
Definition at line 138 of file ui_ncurses_draw.c.
| int ui_mvwaddnwstr | ( | UiSurface * | s, |
| uint | w, | ||
| uint | y, | ||
| uint | x, | ||
| const wchar_t * | wstr, | ||
| int | m ) |
Definition at line 102 of file ui_ncurses_draw.c.
| int ui_mvwaddstr | ( | UiSurface * | s, |
| uint | w, | ||
| uint | y, | ||
| uint | x, | ||
| const char * | text ) |
Definition at line 132 of file ui_ncurses_draw.c.
| int ui_mvwaddstr_fill | ( | UiSurface * | s, |
| uint | w, | ||
| uint | y, | ||
| uint | x, | ||
| const char * | str, | ||
| int | m ) |
Definition at line 145 of file ui_ncurses_draw.c.
| int ui_mvwaddwstr | ( | UiSurface * | s, |
| uint | w, | ||
| uint | y, | ||
| uint | x, | ||
| const wchar_t * | wstr ) |
Definition at line 90 of file ui_ncurses_draw.c.
| void ui_restore_wins | ( | ) |
Definition at line 210 of file ui_ncurses_draw.c.
Definition at line 169 of file ui_ncurses_draw.c.
Definition at line 195 of file ui_ncurses_draw.c.
Definition at line 181 of file ui_ncurses_draw.c.
| int ui_waddnwstr | ( | UiSurface * | s, |
| uint | w, | ||
| const wchar_t * | wstr, | ||
| int | m ) |
Definition at line 96 of file ui_ncurses_draw.c.
| int ui_waddstr | ( | UiSurface * | s, |
| uint | w, | ||
| const char * | text ) |
Definition at line 111 of file ui_ncurses_draw.c.
| int ui_waddwstr | ( | UiSurface * | s, |
| uint | w, | ||
| const wchar_t * | wstr ) |
Definition at line 84 of file ui_ncurses_draw.c.
| int ui_wclrtobot | ( | UiSurface * | s, |
| uint | w ) |
Definition at line 25 of file ui_ncurses_draw.c.
| int ui_wclrtoeol | ( | UiSurface * | s, |
| uint | w ) |
Definition at line 31 of file ui_ncurses_draw.c.