|
C-Menu 0.2.9
A User Interface Toolkit
|
Ncurses-based UI implementation. More...
Go to the source code of this file.
Functions | |
| int | ui_bkgrnd (UiSurface *s, const UiStyle *style, const char *c) |
| int | ui_bkgrnd_set (UiSurface *s, const UiStyle *style, const char *c) |
| int | ui_clear_screen (UiRuntime *ui) |
| Clear the entire screen. | |
| int | ui_cursor_enable (UiRuntime *ui, bool visible) |
| Enable or disable the cursor visibility. | |
| int | ui_cursor_move (UiSurface *s, int y, int x) |
| Move the cursor within a UI surface. | |
| void | ui_get_screen_size (UiRuntime *ui, int *rows, int *cols) |
| Get the current screen size. | |
| UiRuntime * | ui_init (const UiConfig *cfg) |
| Initialize NCUrses. | |
| int | ui_render (UiRuntime *ui) |
| Render the UI by updating panels and refreshing the screen. | |
| int | ui_resume (UiRuntime *ui) |
| Resume the UI after being suspended, reinitializing the screen. | |
| void | ui_shutdown (UiRuntime *ui) |
| Shutdown the UI runtime and free its resources. | |
| void | ui_style_destroy (UiStyle *style) |
| UiStyle * | ui_style_from_cch (const cchar_t *cch) |
| UiStyle * | ui_style_new () |
| cchar_t | ui_style_to_cch (const UiStyle *style, const char *c) |
| int | ui_surface_clear (UiSurface *s) |
| Clear the contents of a UI surface. | |
| void | ui_surface_destroy (UiSurface *s) |
| Destroy a UI surface and free its resources. | |
| int | ui_surface_erase (UiSurface *s) |
| Erase the contents of a UI surface. | |
| int | ui_surface_hide (UiSurface *s) |
| Hide a UI surface. | |
| int | ui_surface_move (UiSurface *s, int y, int x) |
| Move a UI surface to a new position. | |
| UiSurface * | ui_surface_new (UiRuntime *ui, UiSurface *parent, UiRect rect) |
| Create a new UI surface. | |
| int | ui_surface_resize (UiSurface *s, int rows, int cols) |
| Resize a UI surface to new dimensions. | |
| int | ui_surface_show (UiSurface *s) |
| Show a UI surface. | |
| int | ui_suspend (UiRuntime *ui) |
| Suspend the UI, restoring the terminal to its normal state. | |
Variables | |
| UiSurface * | ui_surface_box [MAXWIN] |
| UiSurface * | ui_surface_win [MAXWIN] |
| UiSurface * | ui_surface_win2 [MAXWIN] |
Ncurses-based UI implementation.
This file implements the UI runtime and surface management using the ncurses library. It provides functions for creating and managing surfaces, handling input, and rendering the UI. The implementation is designed to be modular and can be extended to support additional features as needed.
Definition in file ui_ncurses.c.
Definition at line 330 of file ui_ncurses.c.
References ui_style_to_cch(), and UiSurface::win.
Definition at line 338 of file ui_ncurses.c.
References ui_style_to_cch(), and UiSurface::win.
| void ui_style_destroy | ( | UiStyle * | style | ) |
Definition at line 387 of file ui_ncurses.c.
| UiStyle * ui_style_from_cch | ( | const cchar_t * | cch | ) |
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 * | style, |
| const char * | c ) |
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().
Definition at line 26 of file ui_ncurses.c.
Definition at line 27 of file ui_ncurses.c.
Definition at line 28 of file ui_ncurses.c.