|
C-Menu 0.2.9
A User Interface Toolkit
|
Internal header for ncurses UI backend. This header defines internal structures and functions used by the ncurses implementation of the UI backend. It should not be included directly by external code. More...
#include "../include/ui_backend.h"#include <cm.h>#include <ncursesw/ncurses.h>#include <ncursesw/panel.h>#include <stdbool.h>Go to the source code of this file.
Data Structures | |
| struct | UiRuntime |
| Opaque structure representing the UI runtime environment. More... | |
| struct | UiSurface |
| Opaque structure representing a drawable surface in the UI. More... | |
Macros | |
| #define | XLEN 256 |
Functions | |
| int | ui_bkgrnd (UiSurface *, const UiStyle *, const char *) |
| int | ui_bkgrnd_set (UiSurface *, const UiStyle *, const char *) |
| int | ui_ncurses_color_pair_from_style (const UiStyle *style) |
| Convert an RGB value (0-255) to a 1000-based value for ncurses.Ncurses uses a 1000-based color system, so we need to convert our 0-255 RGB values to that scale. | |
| int | ui_ncurses_style_apply (WINDOW *win, const UiStyle *style) |
| Apply a UiStyle to an ncurses window.This function sets the appropriate attributes (bold, underline, reverse) on the given ncurses window based on the properties of the UiStyle. | |
| void | ui_style_destroy (UiStyle *) |
| UiStyle * | ui_style_from_cch (const cchar_t *) |
| UiStyle * | ui_style_new () |
| cchar_t | ui_style_to_cch (const UiStyle *, const char *) |
Internal header for ncurses UI backend. This header defines internal structures and functions used by the ncurses implementation of the UI backend. It should not be included directly by external code.
Definition in file ui_ncurses_internal.h.
| #define XLEN 256 |
Definition at line 18 of file ui_ncurses_internal.h.
Definition at line 330 of file ui_ncurses.c.
Definition at line 338 of file ui_ncurses.c.
References ui_style_to_cch(), and UiSurface::win.
| void ui_style_destroy | ( | UiStyle * | ) |
Definition at line 387 of file ui_ncurses.c.
| UiStyle * ui_style_from_cch | ( | const cchar_t * | ) |
Definition at line 345 of file ui_ncurses.c.
References RGB::b, UiStyle::bg, UiStyle::blink, UiStyle::bold, UiStyle::dim, UiStyle::fg, RGB::g, UiStyle::invis, UiStyle::italic, RGB::r, UiStyle::reverse, and UiStyle::underline.
| UiStyle * ui_style_new | ( | ) |
Definition at line 374 of file ui_ncurses.c.
References UiStyle::bg, and UiStyle::fg.
| cchar_t ui_style_to_cch | ( | const UiStyle * | , |
| const char * | ) |
Definition at line 393 of file ui_ncurses.c.
References UiStyle::bg, UiStyle::blink, UiStyle::bold, UiStyle::dim, UiStyle::fg, get_clr_pair(), UiStyle::invis, UiStyle::italic, mkcc(), UiStyle::reverse, rgb_to_curses_clr(), and UiStyle::underline.
Referenced by ui_bkgrnd(), and ui_bkgrnd_set().