|
C-Menu 0.2.9
A User Interface Toolkit
|
Backend API for terminal UI library. More...
#include <poll.h>#include <stdbool.h>#include <stddef.h>#include <stdint.h>Go to the source code of this file.
Data Structures | |
| union | border_wide |
| struct | ext_fd_reg_t |
| struct | GCluster |
| struct | RGB |
| struct | SIO |
| struct | STDRGB |
| struct | ui_context_t |
| struct | UiCaps |
| struct | UiCchar64 |
| struct | UiCell |
| union | UiChannels |
| struct | UiConfig |
| struct | UiEvent |
| struct | UiMultiMedia |
| struct | UiRect |
| struct | UiRuntime |
| struct | UiSurface |
| struct | UiSurfaceMeta |
Macros | |
| #define | _GNU_SOURCE |
| #define | _XOPEN_SOURCE_EXTENDED 1 |
| #define | ALLWINS (uint)1000 |
| #define | AS_ENUM(NAME) |
| #define | AS_ENUM(NAME) |
| #define | AS_ENUM(NAME) |
| #define | AS_ENUM(NAME) |
| #define | AS_ENUM(NAME) |
| #define | BG_COLOR 0 |
| #define | BO_COLOR 1 |
| #define | BORDER_STYLE(X) |
| #define | bw_bl bw.bl |
| #define | bw_br bw.br |
| #define | bw_bt bw.bt |
| #define | bw_cr bw.cr |
| #define | bw_ho bw.ho |
| #define | bw_lt bw.lt |
| #define | bw_rt bw.rt |
| #define | bw_tl bw.tl |
| #define | bw_tr bw.tr |
| #define | bw_tt bw.tt |
| #define | bw_ve bw.ve |
| #define | CCHARW_MAX 5 |
| #define | CELL_CHAR_INITIALIZER(c) |
| #define | CELL_INITIALIZER(c, s, chan) |
| #define | CHYRON_KEY_MAXLEN 64 |
| #define | CHYRON_KEYS 20 |
| #define | COLOR_LEN 8 |
| #define | ERR -1 |
| #define | FG_COLOR 2 |
| #define | FILE_TYPE_LIST(X) |
| #define | KEY_ALTDEL 0x20e |
| #define | KEY_ALTDOWN 0x214 |
| #define | KEY_ALTEND 0x219 |
| #define | KEY_ALTHOME 0x21e |
| #define | KEY_ALTINS 0x223 |
| #define | KEY_ALTLEFT 0x228 |
| #define | KEY_ALTPGDN 0x22d |
| #define | KEY_ALTPGUP 0x232 |
| #define | KEY_ALTRIGHT 0x237 |
| #define | KEY_ALTUP 0x23d |
| #define | LN_BG_COLOR 7 |
| #define | LN_COLOR 4 |
| #define | LOG_LEVEL_LIST(X) |
| #define | MAX_EXT_FDS 8 |
| #define | MAXLEN 256 |
| #define | MOUSE_ACTION(X) |
| #define | SFC_MAX 30 |
| #define | SUB_SURFACE_LIST(X) |
| #define | UI_COLORS 512 |
| #define | UI_PAIRS 512 |
| #define | UI_SFC_MAX 30 |
| #define | XTERM_256COLOR 1 |
Typedefs | |
| typedef uint16_t | attr_t |
| typedef union border_wide | BorderWide |
| typedef struct ncinput | NcInput |
| typedef struct ncplane | NcPlane |
| typedef struct ncplane_options | NcPlaneOptions |
| typedef struct ncvisual | NcVisual |
| typedef struct notcurses | NotCurses |
| typedef struct notcurses_options | NotCursesOptions |
| typedef struct SIO | SIO |
| typedef nccell | UiCell |
| typedef union UiChannels | UiChannels |
| typedef struct UiColor | UiColor |
| typedef uint | UiColorIdx |
| typedef uint32_t | UiKey |
| typedef struct UiMB | UiMB |
| typedef struct UiPair | UiPair |
| typedef uint16_t | UiPairIdx |
| typedef struct UiRuntime | UiRuntime |
| typedef struct UiSplitSurface | UiSplitSurface |
| typedef uint16_t | UiStyle |
| typedef struct UiSurface | UiSurface |
Enumerations | |
| enum | ColorsEnum { CLR_BLACK , CLR_RED , CLR_GREEN , CLR_YELLOW , CLR_BLUE , CLR_MAGENTA , CLR_CYAN , CLR_WHITE , CLR_BBLACK , CLR_BRED , CLR_BGREEN , CLR_BYELLOW , CLR_BBLUE , CLR_BMAGENTA , CLR_BCYAN , CLR_BWHITE , CLR_BORANGE , CLR_FG , CLR_BG , CLR_BOX_FG , CLR_BOX_BG , CLR_IND_FG , CLR_IND_BG , CLR_BRACKETS_FG , CLR_BRACKETS_BG , CLR_FILL_CHAR_FG , CLR_FILL_CHAR_BG , CLR_LN_FG , CLR_LN_BG , CLR_CMDLN_FG , CLR_CMDLN_BG , CLR_NT_FG , CLR_NT_BG , CLR_NT_REV_FG , CLR_NT_REV_BG , CLR_NT_HL_FG , CLR_NT_HL_BG , CLR_NT_HL_REV_FG , CLR_NT_HL_REV_BG , CLR_TITLE_FG , CLR_TITLE_BG , CLR_NCOLORS } |
| enum | FileType { FT_MAX } |
| enum | ss_t { SUB_SFC_MAX } |
| enum | UiBackend { UI_BACKEND_NCURSES = 0 , UI_BACKEND_NOTCURSES } |
| enum | UiBorderStyle { BORDER_MAX } |
| enum | UiLogLevel { LOG_LEVEL_COUNT } |
| enum | UiMouseAction { MOUSE_ACTION_MAX } |
Functions | |
| int | ui_bkgd (UiSurface *s, ss_t w, const UiCell *cell) |
| Set the background of a specific window within a UiSurface. | |
| int | ui_bkgdset (UiSurface *s, ss_t w, const UiCell *cell) |
| Set the background for new content to be written to a specific window within a UiSurface. | |
| int | ui_bkgrnd (UiSurface *s, ss_t w, const UiCell *cell) |
| Set the background of a specific window within a UiSurface. | |
| int | ui_bkgrndset (UiSurface *s, ss_t w, const UiCell *cell) |
| Set the background for new content to be written to a specific window within a UiSurface. | |
| int | ui_border_draw (UiSurface *sfc) |
| int | ui_border_title (UiSurface *sfc, const char *title) |
| Draw a box with a title around the specified window. | |
| int | ui_border_ysplit (UiSurface *sfc, uint y) |
| Draw a box with a separator line around the specified window. | |
| int | ui_border_ysplit_text (UiSurface *sfc, char *text, uint separator_line) |
| Draw a box with a separator line and text around the specified window. | |
| int | ui_clear () |
| Clear the entire screen. | |
| int | ui_cm_surface_destroy (UiSurface *sfc) |
| Destroy the most recently created surface. | |
| int | ui_curs_set (int visibility) |
| Set the visibility of the cursor. | |
| int | ui_cursor_enable (UiSurface *s, ss_t w, bool visible) |
| Enable or disable the cursor for a UiSurface. | |
| int | ui_cursor_enable_yx (UiSurface *s, ss_t w, uint y, uint x, bool visible) |
| Enable or disable the cursor at a specific position within a UiSurface. | |
| int | ui_cursor_move (UiSurface *s, ss_t w, uint y, uint x) |
| Move the cursor to a specified position within a UiSurface. | |
| int | ui_doupdate () |
| Refresh the display by updating the screen. | |
| int | ui_draw_ch (UiSurface *s, ss_t w, const char c) |
| Draw a character in a surface window. | |
| int | ui_draw_ch_yx (UiSurface *s, ss_t w, uint y, uint x, const char c) |
| Draw a character at a specific position in a surface window. | |
| int | ui_draw_hline (UiSurface *s, ss_t w, uint y, uint x, uint len, const UiStyle *style) |
| int | ui_draw_text (UiSurface *s, ss_t w, uint y, uint x, const char *text) |
| on specified window, move to y, x, add string | |
| int | ui_draw_text_fill (UiSurface *s, ss_t w, uint y, uint x, const char *text, int m) |
| Draw a text string at a specific position in a surface window, filling the remaining space with spaces if the string is shorter than n. | |
| int | ui_draw_text_n (UiSurface *s, ss_t w, uint y, uint x, const char *text, int m) |
| Draw a text string at a specific position in a surface window. | |
| void | ui_endwin () |
| End the UI application, cleaning up resources and shutting down the UI runtime. | |
| int | ui_erase () |
| Erase the entire screen. | |
| UiBackend | ui_get_backend () |
| Get the UI backend type. | |
| void | ui_get_caps (UiCaps *caps) |
| Get the UI backend capabilities. | |
| int | ui_get_event_no_mouse (UiSurface *surface, ss_t w, UiEvent *ev) |
Wait for an input event on target (or stdscr if NULL) without mouse support. | |
| void | ui_get_screen_size (uint *lines, uint *cols) |
| Get the current screen size (number of lines and columns). | |
| int | ui_getch () |
| Wait for a single input character from the NotCurses context. | |
| int | ui_getmaxx (UiSurface *s, ss_t w) |
| Get the maximum number of columns of a UiSurface. | |
| int | ui_getmaxy (UiSurface *s, ss_t w) |
| Get the maximum number of lines (rows) of a UiSurface. | |
| void | ui_getmaxyx (UiSurface *s, ss_t w, uint *lines, uint *cols) |
| Get the maximum dimensions of a UiSurface. | |
| void | ui_getyx (UiSurface *s, ss_t w, uint *lines, uint *cols) |
| Get the current cursor position within a window of a UI surface. | |
| int | ui_idcok (UiSurface *s, ss_t w, bool enable) |
| Enable or disable the use of the insert/delete character capabilities for a UiSurface. | |
| int | ui_idlok (UiSurface *s, ss_t w, bool enable) |
| Enable or disable the use of the insert/delete line capabilities for a UiSurface. | |
| UiRuntime * | ui_init (const UiConfig *config, SIO *sio) |
| Initialize the UI runtime with the given configuration and SIO. | |
| void | ui_initialize_sio (SIO *sio) |
| int | ui_keypad (UiSurface *s, ss_t w, bool enable) |
| Enable or disable the keypad for a UiSurface. | |
| int | ui_mice_enable (int mask) |
| Enable or disable mouse support. | |
| int | ui_mousemask (int mask) |
| Enable or disable mouse support. | |
| void | ui_render () |
| Render the UI by updating panels and refreshing the display. | |
| void | ui_restore_wins () |
| Restore the state of all windows in the UI. This function refreshes the standard screen and all surface windows, ensuring that their contents are displayed correctly. | |
| int | ui_resume () |
| Resume the UI, restoring the previous program state and updating the display. | |
| int | ui_scrollok (UiSurface *s, ss_t w, bool enable) |
| Enable or disable scrolling for a UiSurface. | |
| int | ui_setscrreg (UiSurface *s, ss_t w, uint top, uint bottom) |
| Set the scrolling region for a UiSurface. | |
| void | ui_shutdown () |
| Shutdown the UI runtime, cleaning up resources and freeing memory. | |
| const char * | ui_sub_surface_str (ss_t w) |
| int | ui_surface_addpad (UiSurface *s, ss_t w, uint view_win, uint lines, uint cols, uint begy, uint begx) |
| Add a new pad to the specified UiSurface. | |
| int | ui_surface_addwin (UiSurface *s, ss_t w, uint p, uint lines, uint cols, uint y, uint x) |
| Add a new window to the specified UiSurface. | |
| UiSurface * | ui_surface_box (UiSurface *parent, uint p, uint lines, uint cols, uint y, uint x, const char *title) |
| Create a new UI surface with a border box and optional title. | |
| void | ui_surface_destroy (UiSurface *s) |
| Destroy a UiSurface, cleaning up its windows and panels. | |
| int | ui_surface_hide (UiSurface *s, ss_t w) |
| Hide a UiSurface, making it invisible on the screen. | |
| int | ui_surface_move (UiSurface *s, ss_t w, uint y, uint x) |
| Move a UiSurface to a new position on the screen. | |
| UiSurface * | ui_surface_new (ss_t w, UiSurface *parent, uint p, uint lines, uint cols, uint y, uint x) |
| Create a new UI surface with the specified parameters. | |
| int | ui_surface_resize (UiSurface *s, ss_t w, uint lines, uint cols) |
| Resize a UiSurface to new dimensions. | |
| int | ui_surface_show (UiSurface *s, ss_t w) |
| Show a UiSurface, making it visible on the screen. | |
| int | ui_suspend () |
| Suspend the UI, saving the current program state and ending the window session. | |
| int | ui_top_surface (UiSurface *s, ss_t w) |
| Hide a UiSurface, making it invisible on the screen. | |
| int | ui_tracked_sfc_box (uint wlines, uint wcols, uint wbegy, uint wbegx, const char *wtitle) |
| Create a new surface with a box window. | |
| int | ui_tracked_sfc_split_box (uint wlines, uint wcols, uint split_y, uint split_x, uint wbegy, uint wbegx, const char *wtitle) |
| Create a new surface with a split box window. | |
| void | ui_update_panels () |
| Update the panels in the UI. | |
| int | ui_wclear (UiSurface *s, ss_t w) |
| Clear the contents of a UiSurface or all surfaces. | |
| int | ui_wclrtobot (UiSurface *s, ss_t w) |
| Set the style of a surface window. | |
| int | ui_wclrtoeol (UiSurface *s, ss_t w) |
| Clear to the end of the line in a surface window. | |
| int | ui_werase (UiSurface *s, ss_t w) |
| Erase the contents of a UiSurface or all surfaces. | |
| int | ui_whide (UiSurface *s, ss_t w) |
| int | ui_wmove (UiSurface *s, ss_t w, uint y, uint x) |
| Move the cursor to a specified position within a UiSurface. | |
| int | ui_wnoutrefresh (UiSurface *s, ss_t w) |
| Refresh a specific window within a UiSurface. | |
| int | ui_wresize (UiSurface *s, ss_t w, uint lines, uint cols) |
| int | ui_wscrl (UiSurface *s, ss_t w, int rows) |
| Scroll the contents of a UiSurface by a specified number of lines. | |
| int | ui_wshow (UiSurface *s, ss_t w) |
Backend API for terminal UI library.
Definition in file ui_backend.h.
| #define _GNU_SOURCE |
Definition at line 13 of file ui_backend.h.
| #define _XOPEN_SOURCE_EXTENDED 1 |
Definition at line 12 of file ui_backend.h.
| #define ALLWINS (uint)1000 |
Definition at line 195 of file ui_backend.h.
| #define AS_ENUM | ( | NAME | ) |
Definition at line 44 of file ui_backend.h.
| #define AS_ENUM | ( | NAME | ) |
Definition at line 44 of file ui_backend.h.
| #define AS_ENUM | ( | NAME | ) |
Definition at line 44 of file ui_backend.h.
| #define AS_ENUM | ( | NAME | ) |
Definition at line 44 of file ui_backend.h.
| #define AS_ENUM | ( | NAME | ) |
Definition at line 44 of file ui_backend.h.
| #define BG_COLOR 0 |
default background color
Definition at line 500 of file ui_backend.h.
| #define BO_COLOR 1 |
default bold foreground color
Definition at line 501 of file ui_backend.h.
| #define BORDER_STYLE | ( | X | ) |
Definition at line 170 of file ui_backend.h.
| #define bw_bl bw.bl |
Definition at line 590 of file ui_backend.h.
| #define bw_br bw.br |
Definition at line 591 of file ui_backend.h.
| #define bw_bt bw.bt |
Definition at line 586 of file ui_backend.h.
| #define bw_cr bw.cr |
Definition at line 587 of file ui_backend.h.
| #define bw_ho bw.ho |
Definition at line 581 of file ui_backend.h.
| #define bw_lt bw.lt |
Definition at line 583 of file ui_backend.h.
| #define bw_rt bw.rt |
Definition at line 584 of file ui_backend.h.
| #define bw_tl bw.tl |
Definition at line 588 of file ui_backend.h.
| #define bw_tr bw.tr |
Definition at line 589 of file ui_backend.h.
| #define bw_tt bw.tt |
Definition at line 585 of file ui_backend.h.
| #define bw_ve bw.ve |
Definition at line 582 of file ui_backend.h.
| #define CCHARW_MAX 5 |
Definition at line 192 of file ui_backend.h.
| #define CELL_CHAR_INITIALIZER | ( | c | ) |
Definition at line 428 of file ui_backend.h.
| #define CELL_INITIALIZER | ( | c, | |
| s, | |||
| chan ) |
Definition at line 434 of file ui_backend.h.
| #define CHYRON_KEY_MAXLEN 64 |
maximum length of the command text
Definition at line 49 of file ui_backend.h.
| #define CHYRON_KEYS 20 |
maximum number of key bindings for the chyron
Definition at line 50 of file ui_backend.h.
| #define COLOR_LEN 8 |
length of color code strings
Definition at line 498 of file ui_backend.h.
| #define ERR -1 |
Definition at line 427 of file ui_backend.h.
| #define FG_COLOR 2 |
default foreground color
Definition at line 499 of file ui_backend.h.
| #define FILE_TYPE_LIST | ( | X | ) |
Definition at line 85 of file ui_backend.h.
| #define KEY_ALTDEL 0x20e |
Definition at line 645 of file ui_backend.h.
| #define KEY_ALTDOWN 0x214 |
Definition at line 650 of file ui_backend.h.
| #define KEY_ALTEND 0x219 |
Definition at line 646 of file ui_backend.h.
| #define KEY_ALTHOME 0x21e |
Definition at line 643 of file ui_backend.h.
| #define KEY_ALTINS 0x223 |
Definition at line 642 of file ui_backend.h.
| #define KEY_ALTLEFT 0x228 |
Definition at line 649 of file ui_backend.h.
| #define KEY_ALTPGDN 0x22d |
Definition at line 647 of file ui_backend.h.
| #define KEY_ALTPGUP 0x232 |
Definition at line 644 of file ui_backend.h.
| #define KEY_ALTRIGHT 0x237 |
Definition at line 651 of file ui_backend.h.
| #define KEY_ALTUP 0x23d |
Definition at line 648 of file ui_backend.h.
| #define LN_BG_COLOR 7 |
default line number background
Definition at line 503 of file ui_backend.h.
| #define LN_COLOR 4 |
default line number color
Definition at line 502 of file ui_backend.h.
| #define LOG_LEVEL_LIST | ( | X | ) |
Definition at line 69 of file ui_backend.h.
| #define MAX_EXT_FDS 8 |
Definition at line 131 of file ui_backend.h.
| #define MAXLEN 256 |
Definition at line 198 of file ui_backend.h.
| #define MOUSE_ACTION | ( | X | ) |
Definition at line 52 of file ui_backend.h.
| #define SFC_MAX 30 |
Definition at line 197 of file ui_backend.h.
| #define SUB_SURFACE_LIST | ( | X | ) |
Definition at line 36 of file ui_backend.h.
| #define UI_COLORS 512 |
Definition at line 193 of file ui_backend.h.
| #define UI_PAIRS 512 |
Definition at line 194 of file ui_backend.h.
| #define UI_SFC_MAX 30 |
Definition at line 196 of file ui_backend.h.
| #define XTERM_256COLOR 1 |
Definition at line 640 of file ui_backend.h.
| typedef uint16_t attr_t |
Definition at line 417 of file ui_backend.h.
| typedef union border_wide BorderWide |
| typedef struct ncinput NcInput |
Definition at line 161 of file ui_backend.h.
| typedef struct ncplane NcPlane |
Definition at line 419 of file ui_backend.h.
| typedef struct ncplane_options NcPlaneOptions |
Definition at line 422 of file ui_backend.h.
| typedef struct ncvisual NcVisual |
Definition at line 162 of file ui_backend.h.
| typedef struct notcurses NotCurses |
Definition at line 420 of file ui_backend.h.
| typedef struct notcurses_options NotCursesOptions |
Definition at line 421 of file ui_backend.h.
| typedef struct SIO SIO |
Definition at line 153 of file ui_backend.h.
| typedef nccell UiCell |
Definition at line 418 of file ui_backend.h.
| typedef union UiChannels UiChannels |
Definition at line 156 of file ui_backend.h.
Definition at line 424 of file ui_backend.h.
| typedef uint UiColorIdx |
Definition at line 160 of file ui_backend.h.
| typedef uint32_t UiKey |
Definition at line 65 of file ui_backend.h.
Definition at line 157 of file ui_backend.h.
Definition at line 423 of file ui_backend.h.
| typedef uint16_t UiPairIdx |
Definition at line 159 of file ui_backend.h.
| typedef struct UiRuntime UiRuntime |
Definition at line 152 of file ui_backend.h.
| typedef struct UiSplitSurface UiSplitSurface |
Definition at line 155 of file ui_backend.h.
| typedef uint16_t UiStyle |
Definition at line 158 of file ui_backend.h.
| typedef struct UiSurface UiSurface |
Definition at line 154 of file ui_backend.h.
| enum ColorsEnum |
Definition at line 505 of file ui_backend.h.
| enum FileType |
| enum ss_t |
| enum UiBackend |
| Enumerator | |
|---|---|
| UI_BACKEND_NCURSES | NCurses / NCursesW backend |
| UI_BACKEND_NOTCURSES | NotCurses backend |
Definition at line 451 of file ui_backend.h.
| enum UiBorderStyle |
| Enumerator | |
|---|---|
| BORDER_MAX | |
Definition at line 177 of file ui_backend.h.
| enum UiLogLevel |
| enum UiMouseAction |
Set the background of a specific window within a UiSurface.
Set the background cell for the specified window within a UI surface.
| s | Pointer to the UiSurface containing the window. |
| w | The index of the window within the surface for which to set the background. |
| cell | Pointer to a UiCell structure representing the desired background attributes. |
| s | Pointer to the UiSurface containing the window. |
| w | The index of the window within the surface. |
| cell | Pointer to the UiCell representing the background cell. |
This function sets the background cell for the specified window within a UI surface. It updates the styles and channels of the ncplane associated with the window and stores the background cell in the metadata. If the surface is not initialized, it returns -1.
Set the background of a specific window within a UiSurface.
| s | Pointer to the UiSurface containing the window. |
| w | The index of the window within the surface. |
| cell | Pointer to the UiCell representing the background cell. |
This function sets the background cell for the specified window within a UI surface. It updates the styles and channels of the ncplane associated with the window and stores the background cell in the metadata. If the surface is not initialized, it returns -1.
Definition at line 927 of file ui_ncurses.c.
Referenced by init_view_boxwin(), init_view_full_screen(), ui_surface_addpad(), and ui_surface_addwin().
Set the background for new content to be written to a specific window within a UiSurface.
Set the background cell for the specified window within a UI surface without changing the base character.
| s | Pointer to the UiSurface containing the window. |
| w | The index of the window within the surface for which to set the background for new content. |
| cell | Pointer to a UiCell structure representing the desired background attributes for new content. |
| s | Pointer to the UiSurface containing the window. |
| w | The index of the window within the surface. |
| cell | Pointer to the UiCell representing the background cell. |
This function sets the background cell for the specified window within a UI surface without changing the base character. It updates the styles and channels of the ncplane associated with the window and stores the background cell in the metadata. If the surface is not initialized, it returns -1.
Set the background for new content to be written to a specific window within a UiSurface.
| s | Pointer to the UiSurface containing the window. |
| w | The index of the window within the surface. |
| cell | Pointer to the UiCell representing the background cell. |
This function sets the background cell for the specified window within a UI surface without changing the base character. It updates the styles and channels of the ncplane associated with the window and stores the background cell in the metadata. If the surface is not initialized, it returns -1.
Definition at line 941 of file ui_ncurses.c.
Referenced by display_pick_page(), display_prompt(), get_cmd_arg(), init_view_boxwin(), init_view_full_screen(), menu_cmd_processor(), menu_engine(), popup_ckeys(), reverse_object(), ui_border_title(), ui_border_ysplit_text(), ui_surface_addpad(), ui_surface_addwin(), and unreverse_object().
Set the background of a specific window within a UiSurface.
Set the background cell for the specified window within a UI surface without changing the base character.
| s | Pointer to the UiSurface containing the window. |
| w | The index of the window within the surface for which to set the background. |
| cell | Pointer to a UiCell structure representing the desired background attributes. |
| s | Pointer to the UiSurface containing the window. |
| w | The index of the window within the surface. |
| cell | Pointer to the UiCell representing the background cell. |
This function sets the background cell for the specified window within a UI surface without changing the base character. It updates the styles and channels of the ncplane associated with the window and stores the background cell in the metadata. If the surface is not initialized, it returns -1.
Set the background of a specific window within a UiSurface.
| s | Pointer to the UiSurface containing the window. |
| w | The index of the window within the surface. |
| cell | Pointer to the UiCell representing the background cell. |
This function sets the background cell for the specified window within a UI surface without changing the base character. It updates the styles and channels of the ncplane associated with the window and stores the background cell in the metadata. If the surface is not initialized, it returns -1.
Definition at line 955 of file ui_ncurses.c.
Set the background for new content to be written to a specific window within a UiSurface.
Set the background cell for the specified window within a UI surface without changing the base character.
| s | Pointer to the UiSurface containing the window. |
| w | The index of the window within the surface for which to set the background for new content. |
| cell | Pointer to a UiCell structure representing the desired background attributes for new content. |
| s | Pointer to the UiSurface containing the window. |
| w | The index of the window within the surface. |
| cell | Pointer to the UiCell representing the background cell. |
This function sets the background cell for the specified window within a UI surface without changing the base character. It updates the styles and channels of the ncplane associated with the window and stores the background cell in the metadata. If the surface is not initialized, it returns -1.
Set the background for new content to be written to a specific window within a UiSurface.
| s | Pointer to the UiSurface containing the window. |
| w | The index of the window within the surface. |
| cell | Pointer to the UiCell representing the background cell. |
This function sets the background cell for the specified window within a UI surface without changing the base character. It updates the styles and channels of the ncplane associated with the window and stores the background cell in the metadata. If the surface is not initialized, it returns -1.
Definition at line 969 of file ui_ncurses.c.
| int ui_border_draw | ( | UiSurface * | sfc | ) |
Definition at line 474 of file ui_common.c.
References cell_bl, cell_br, cell_ho, cell_tl, cell_tr, cell_ve, ui_getmaxx(), ui_getmaxy(), and ui_mvwadd_wchnstr().
Referenced by ui_surface_box(), and ui_surface_box().
| int ui_border_title | ( | UiSurface * | sfc, |
| const char * | title ) |
Draw a box with a title around the specified window.
border_title
| box | Pointer to the window to draw the box around |
| title | Title text to display at the top of the box |
This function draws a box around the specified window, similar to border_draw(), but it also includes a title at the top of the box. The title is displayed in the center of the top edge of the box, and the horizontal line is drawn on either side of the title. Use this function when you want to visually label a window with a title.
Definition at line 563 of file ui_common.c.
References cell_box, cell_ho, cell_lt, cell_rt, cell_sp, cell_title, cell_tl, ui_bkgdset(), ui_getmaxx(), ui_mbstr_to_wcstr(), ui_mvwadd_wchnstr(), and ui_mvwaddnwstr().
Referenced by new_view_file(), ui_surface_box(), ui_surface_box(), view_boxwin_resize(), and view_file().
| int ui_border_ysplit | ( | UiSurface * | sfc, |
| uint | y ) |
Draw a box with a separator line around the specified window.
ui_border-ysplit
| box | Pointer to the window to draw the box around |
| y | Line number where the separator line should be drawn |
This function draws a box around the specified window, similar to border_draw(), but it also includes a horizontal separator line that divides the box into two sections. The separator line is drawn at a fixed position (line 00, page 00) and extends across the width of the box. Use this function when you want to visually separate two sections within a window, such as for a header and content area.
Definition at line 504 of file ui_common.c.
References cell_ho, cell_lt, cell_rt, ui_getmaxx(), and ui_mvwadd_wchnstr().
Referenced by ui_tracked_sfc_split_box().
| int ui_border_ysplit_text | ( | UiSurface * | sfc, |
| char * | text_in, | ||
| uint | separator_line ) |
Draw a box with a separator line and text around the specified window.
ui_border_ysplit_text
| box | Pointer to the window to draw the box around |
| text | Text to display in the middle of the separator line |
| separator_line | Line number where the separator line should be drawn |
This function draws a box around the specified window, similar to border_draw(), but it also includes a horizontal separator line that divides the box into two sections. The separator line is drawn at the specified line number and extends across the width of the box, with the provided text displayed in the middle of the line. Use this function when you want to visually separate two sections within a window and label the separator with descriptive text.
Definition at line 524 of file ui_common.c.
References cell_ho, cell_lt, cell_nt_hl, cell_rt, cell_sp, strnz__cpy(), ui_bkgdset(), ui_getmaxx(), ui_mbstr_to_wcstr(), ui_mvwadd_wchnstr(), and ui_mvwaddnwstr().
Referenced by picker().
| int ui_clear | ( | ) |
Clear the entire screen.
Clear the contents of the standard plane.
This function clears the contents of the standard plane by erasing its contents. If the standard plane is not initialized, it returns -1.
Clear the entire screen.
This function clears the contents of the standard plane by erasing its contents. If the standard plane is not initialized, it returns -1.
Definition at line 599 of file ui_ncurses.c.
| int ui_cm_surface_destroy | ( | UiSurface * | sfc | ) |
Destroy the most recently created surface.
ui_cm_destroy_surface
This function destroys the most recently created surface and decrements the surface pointer. It should be called when a surface is no longer needed to free up resources. If there are no surfaces to destroy, it returns -1.
Definition at line 466 of file ui_common.c.
References sfc_ptr, and ui_surface_destroy().
Referenced by init_form(), init_pick(), menu_engine(), ui_action_disposition(), ui_answer_yn(), ui_display_error(), ui_perror(), and ui_timeout_prompt().
| int ui_curs_set | ( | int | visible | ) |
Set the visibility of the cursor.
Enable or disable the cursor visibility.
| visibility | An integer value indicating the desired cursor visibility: 0 - Invisible 1 - Visible 2 - Very visible (e.g., block cursor) |
| visible | True to enable the cursor, false to disable it. |
This function enables or disables the cursor visibility. If the UI is not initialized, it returns -1. When enabling the cursor, it retrieves the current cursor position and enables the cursor at that position.
Set the visibility of the cursor.
| visible | True to enable the cursor, false to disable it. |
This function enables or disables the cursor visibility. If the UI is not initialized, it returns -1. When enabling the cursor, it retrieves the current cursor position and enables the cursor at that position.
Definition at line 840 of file ui_ncurses.c.
References ui.
Referenced by cf_accept(), field_editor(), fork_exec(), ui_answer_yn(), and ui_tracked_sfc_split_box().
Enable or disable the cursor for a UiSurface.
Enable or disable the cursor at the current position on the surface and plane specified.
| s | Pointer to the UiSurface where the cursor will be enabled or disabled. |
| w | The index of the window within the surface where the cursor will be enabled or disabled. |
| visible | A boolean value indicating whether to make the cursor visible (true) or invisible (false). |
| s | Pointer to the UiSurface containing the window. |
| w | The index of the window within the surface. |
| visible | True to enable the cursor, false to disable it. |
This function enables or disables the cursor at the current position on the surface and plane specified. If the UI is not initialized, it returns -1.
Enable or disable the cursor for a UiSurface.
| s | Pointer to the UiSurface containing the window. |
| w | The index of the window within the surface. |
| visible | True to enable the cursor, false to disable it. |
This function enables or disables the cursor at the current position on the surface and plane specified. If the UI is not initialized, it returns -1.
Definition at line 870 of file ui_ncurses.c.
References ui.
Enable or disable the cursor at a specific position within a UiSurface.
Enable or disable the cursor at a specific position on the surface and plane specified.
| s | Pointer to the UiSurface where the cursor will be enabled or disabled. |
| w | The index of the window within the surface where the cursor will be enabled or disabled. |
| y | The y-coordinate (row) for the cursor's position. |
| x | The x-coordinate (column) for the cursor's position. |
| visible | A boolean value indicating whether to make the cursor visible (true) or invisible (false). |
| s | Pointer to the UiSurface containing the window. |
| w | The index of the window within the surface. |
| y | The y-coordinate for the cursor position. |
| x | The x-coordinate for the cursor position. |
| visible | True to enable the cursor, false to disable it. |
This function enables or disables the cursor at a specific position on the surface and plane specified. If the UI is not initialized, it returns -1.
Enable or disable the cursor at a specific position within a UiSurface.
| s | Pointer to the UiSurface containing the window. |
| w | The index of the window within the surface. |
| y | The y-coordinate for the cursor position. |
| x | The x-coordinate for the cursor position. |
| visible | True to enable the cursor, false to disable it. |
This function enables or disables the cursor at a specific position on the surface and plane specified. If the UI is not initialized, it returns -1.
Definition at line 855 of file ui_ncurses.c.
References ui.
Referenced by field_editor(), get_cmd_arg(), get_cmd_char(), and picker().
Move the cursor to a specified position within a UiSurface.
Move the cursor to the specified position within a window of a UI surface.
| s | Pointer to the UiSurface where the cursor will be moved. |
| w | The index of the window within the surface where the cursor will be moved. |
| y | The new y-coordinate (row) for the cursor's position. |
| x | The new x-coordinate (column) for the cursor's position. |
| s | Pointer to the UiSurface containing the window. |
| w | The index of the window within the surface. |
| y | The y-coordinate for the new cursor position. |
| x | The x-coordinate for the new cursor position. |
This function moves the cursor to the specified position within a window of a UI surface. If the surface or window is not initialized, it returns -1.
Move the cursor to a specified position within a UiSurface.
| s | Pointer to the UiSurface containing the window. |
| w | The index of the window within the surface. |
| y | The y-coordinate for the new cursor position. |
| x | The x-coordinate for the new cursor position. |
This function moves the cursor to the specified position within a window of a UI surface. If the surface or window is not initialized, it returns -1.
Definition at line 666 of file ui_ncurses.c.
Referenced by cf_accept(), display_line(), display_line_eod(), display_prompt(), display_split_line(), form_post(), form_process(), get_cmd_arg(), get_cmd_char(), picker(), remove_right_angle(), scroll_next(), scroll_prev(), search(), unreverse_object(), and view_display_page().
| int ui_doupdate | ( | ) |
Refresh the display by updating the screen.
Definition at line 895 of file ui_ncurses.c.
Draw a character in a surface window.
on specified window, at current location, add character
| s | The surface to modify. |
| w | The window index within the surface. |
| c | The character to draw. |
| s | surface |
| w | window |
| c | character |
Draw a character in a surface window.
| s | surface |
| w | window |
| c | character |
Definition at line 53 of file ui_ncurses_draw.c.
Draw a character at a specific position in a surface window.
on specified window, move to y, x, add character
| s | The surface to modify. |
| w | The window index within the surface. |
| y | The y-coordinate (row) to draw the character. |
| x | The x-coordinate (column) to draw the character. |
| c | The character to draw. |
| s | surface |
| w | window |
| y | row |
| x | column |
| c | character |
Draw a character at a specific position in a surface window.
| s | surface |
| w | window |
| y | row |
| x | column |
| c | character |
Definition at line 67 of file ui_ncurses_draw.c.
Referenced by menu_cmd_processor().
on specified window, move to y, x, add string
| s | surface |
| w | window |
| y | row |
| x | column |
| text | string |
Definition at line 74 of file ui_ncurses_draw.c.
Referenced by ui_action_disposition(), ui_answer_yn(), ui_display_error(), ui_perror(), ui_timeout_prompt(), and ui_update_timeout_prompt().
Draw a text string at a specific position in a surface window, filling the remaining space with spaces if the string is shorter than n.
on specified window, move to y, x, add string, at most m columns, fill with spaces if text is shorter than m
| s | The surface to modify. |
| w | The window index within the surface. |
| y | The y-coordinate (row) to draw the text. |
| x | The x-coordinate (column) to draw the text. |
| text | The text string to draw. |
| n | The number of characters to draw, padding with spaces if necessary. |
| s | surface |
| w | window |
| y | row |
| x | column |
| text | string |
| m | maximum number of columns to write |
Draw a text string at a specific position in a surface window, filling the remaining space with spaces if the string is shorter than n.
| s | surface |
| w | window |
| y | row |
| x | column |
| text | string |
| m | maximum number of columns to write |
Definition at line 103 of file ui_ncurses_draw.c.
References ui_render().
Referenced by menu_cmd_processor(), and menu_engine().
Draw a text string at a specific position in a surface window.
on specified window, move to y, x, add string, at most m columns
| s | The surface to modify. |
| w | The window index within the surface. |
| y | The y-coordinate (row) to draw the text. |
| x | The x-coordinate (column) to draw the text. |
| text | The text string to draw. |
| s | surface |
| w | window |
| y | row |
| x | column |
| text | string |
| m | maximum number of columns to write |
Draw a text string at a specific position in a surface window.
| s | surface |
| w | window |
| y | row |
| x | column |
| text | string |
| m | maximum number of columns to write |
Definition at line 88 of file ui_ncurses_draw.c.
| void ui_endwin | ( | ) |
End the UI application, cleaning up resources and shutting down the UI runtime.
Destroy a UI surface and free its resources.
| s | Pointer to the UiSurface to be destroyed. |
This function destroys a UI surface by freeing its associated ncplanes and metadata. It also frees the memory allocated for the UiSurface structure. If the provided pointer is NULL, the function does nothing.
End the UI application, cleaning up resources and shutting down the UI runtime.
| s | Pointer to the UiSurface to be destroyed. |
This function destroys a UI surface by freeing its associated ncplanes and metadata. It also frees the memory allocated for the UiSurface structure. If the provided pointer is NULL, the function does nothing.
Definition at line 412 of file ui_ncurses.c.
References ui_shutdown().
Referenced by exec_objects(), fork_exec(), and form_exec_receiver().
| int ui_erase | ( | ) |
Erase the entire screen.
Clear the contents of the specified window within a UI surface.
| s | Pointer to the UiSurface containing the window to clear. |
| w | The index of the window to clear. |
This function clears the contents of the specified window within a UI surface by erasing its contents. If the surface or window is not initialized, it returns -1.
Erase the entire screen.
| s | Pointer to the UiSurface containing the window to clear. |
| w | The index of the window to clear. |
This function clears the contents of the specified window within a UI surface by erasing its contents. If the surface or window is not initialized, it returns -1.
Definition at line 591 of file ui_ncurses.c.
Referenced by view_full_screen_resize().
| void ui_get_caps | ( | UiCaps * | caps | ) |
Get the UI backend capabilities.
Get the capabilities of the current UI backend.
| caps | Pointer to a UiCaps struct to be filled with the backend capabilities. |
| caps | Pointer to a UiCaps structure to be filled with the capabilities. |
This function populates the provided UiCaps structure with information about the capabilities of the current UI backend. It sets various fields in the structure, such as truecolor support, palette size, mouse support, Unicode support, and resize capability. If the provided pointer is NULL or if the UI runtime is not initialized, the function does nothing.
Get the UI backend capabilities.
| caps | Pointer to a UiCaps structure to be filled with the capabilities. |
This function populates the provided UiCaps structure with information about the capabilities of the current UI backend. It sets various fields in the structure, such as truecolor support, palette size, mouse support, Unicode support, and resize capability. If the provided pointer is NULL or if the UI runtime is not initialized, the function does nothing.
Definition at line 62 of file ui_ncurses.c.
References UiCaps::color_pairs, UiCaps::mouse, UiCaps::palette256, UiCaps::resize, UiCaps::truecolor, ui, and UiCaps::unicode.
Wait for an input event on target (or stdscr if NULL) without mouse support.
Wait for an input event from the NotCurses context, ignoring mouse events.
| ui | UI runtime context (unused — event comes from the window). |
| target | Surface to read from, or NULL for stdscr. |
| ev | Output UiEvent structure. |
ev is NULL.| target | Unused for NotCurses (events are global to the context). |
| ev | Output UiEvent structure. |
ui or ev is NULL.Wait for an input event on target (or stdscr if NULL) without mouse support.
| target | Unused for NotCurses (events are global to the context). |
| ev | Output UiEvent structure. |
ui or ev is NULL. Definition at line 234 of file ui_ncurses_input.c.
References UiEvent::alt, UiEvent::ch, UiEvent::ctrl, UiEvent::key, UiEvent::shift, ui, and ui_flush_input().
| void ui_get_screen_size | ( | uint * | lines, |
| uint * | cols ) |
Get the current screen size (number of lines and columns).
Get the current screen size in lines and columns.
| lines | Pointer to a uint variable where the number of lines (rows) will be stored. |
| cols | Pointer to a uint variable where the number of columns will be stored. |
| lines | Pointer to an unsigned integer to store the number of lines (rows). |
| cols | Pointer to an unsigned integer to store the number of columns. |
This function retrieves the current screen size in lines and columns.
Get the current screen size (number of lines and columns).
| lines | Pointer to an unsigned integer to store the number of lines (rows). |
| cols | Pointer to an unsigned integer to store the number of columns. |
This function retrieves the current screen size in lines and columns.
Definition at line 722 of file ui_ncurses.c.
References ui.
Referenced by open_pick_win(), popup_ckeys(), ui_action_disposition(), ui_answer_yn(), ui_display_error(), ui_perror(), ui_surface_box(), ui_surface_new(), ui_timeout_prompt(), ui_tracked_sfc_box(), ui_tracked_sfc_split_box(), view_calc_boxwin_dimensions(), view_calc_full_screen_dimensions(), and view_cmd_processor().
| int ui_getch | ( | ) |
Wait for a single input character from the NotCurses context.
ui is NULL. Definition at line 222 of file ui_notcurses_input.c.
References ui.
Get the maximum number of columns of a UiSurface.
Get the maximum number of columns of a window within a UI surface.
| s | Pointer to the UiSurface for which to retrieve the maximum number of columns. |
| w | The index of the window within the surface for which to retrieve the maximum number of columns. |
| s | Pointer to the UiSurface containing the window. |
| w | The index of the window within the surface. |
This function retrieves the maximum number of columns of a window within a UI surface. If the surface or window is not initialized, it returns -1.
Get the maximum number of columns of a UiSurface.
| s | Pointer to the UiSurface containing the window. |
| w | The index of the window within the surface. |
This function retrieves the maximum number of columns of a window within a UI surface. If the surface or window is not initialized, it returns -1.
Definition at line 712 of file ui_ncurses.c.
Referenced by ui_border_draw(), ui_border_title(), ui_border_ysplit(), and ui_border_ysplit_text().
Get the maximum number of lines (rows) of a UiSurface.
Get the maximum number of lines (rows) of a window within a UI surface.
| s | Pointer to the UiSurface for which to retrieve the maximum number of lines. |
| w | The index of the window within the surface for which to retrieve the maximum number of lines. |
| s | Pointer to the UiSurface containing the window. |
| w | The index of the window within the surface. |
This function retrieves the maximum number of lines (rows) of a window within a UI surface. If the surface or window is not initialized, it returns -1.
Get the maximum number of lines (rows) of a UiSurface.
| s | Pointer to the UiSurface containing the window. |
| w | The index of the window within the surface. |
This function retrieves the maximum number of lines (rows) of a window within a UI surface. If the surface or window is not initialized, it returns -1.
Definition at line 701 of file ui_ncurses.c.
Referenced by field_editor(), ui_assign_chyron_win(), and ui_border_draw().
Get the maximum dimensions of a UiSurface.
Get the maximum dimensions of a window within a UI surface.
| s | Pointer to the UiSurface for which to retrieve the maximum dimensions. |
| w | The index of the window within the surface for which to retrieve the maximum dimensions. |
| lines | Pointer to a uint variable where the maximum number of lines (rows) will be stored. |
| cols | Pointer to a uint variable where the maximum number of columns will be stored. |
| s | Pointer to the UiSurface containing the window. |
| w | The index of the window within the surface. |
| y | Pointer to an unsigned integer to store the maximum number of lines (rows). |
| x | Pointer to an unsigned integer to store the maximum number of columns. |
This function retrieves the maximum dimensions of a window within a UI surface. If the surface or window is not initialized, it does nothing.
Get the maximum dimensions of a UiSurface.
| s | Pointer to the UiSurface containing the window. |
| w | The index of the window within the surface. |
| y | Pointer to an unsigned integer to store the maximum number of lines (rows). |
| x | Pointer to an unsigned integer to store the maximum number of columns. |
This function retrieves the maximum dimensions of a window within a UI surface. If the surface or window is not initialized, it does nothing.
Definition at line 690 of file ui_ncurses.c.
Referenced by form_post(), form_process(), and picker().
Get the current cursor position within a window of a UI surface.
| s | Pointer to the UiSurface containing the window. |
| w | The index of the window within the surface. |
| y | Pointer to an unsigned integer to store the y-coordinate of the cursor. |
| x | Pointer to an unsigned integer to store the x-coordinate of the cursor. |
This function retrieves the current cursor position within a window of a UI surface. If the surface or window is not initialized, it does nothing.
Definition at line 675 of file ui_ncurses.c.
Referenced by display_prompt(), and get_cmd_char().
Enable or disable the use of the insert/delete character capabilities for a UiSurface.
Enable or disable the keypad for the specified window within a UI surface.
| s | Pointer to the UiSurface for which to enable or disable the insert/delete character capabilities. |
| w | The index of the window within the surface for which to enable or disable the insert/delete character capabilities. |
| enable | A boolean value indicating whether to enable (true) or disable (false) the insert/delete character capabilities. |
| s | Pointer to the UiSurface containing the window. |
| w | The index of the window within the surface. |
| enable | True to enable the keypad, false to disable the keypad. |
This function does nothing.
Enable or disable the use of the insert/delete character capabilities for a UiSurface.
| s | Pointer to the UiSurface containing the window. |
| w | The index of the window within the surface. |
| enable | True to enable the keypad, false to disable the keypad. |
This function does nothing.
Definition at line 803 of file ui_ncurses.c.
Referenced by init_view_boxwin(), and init_view_full_screen().
Enable or disable the use of the insert/delete line capabilities for a UiSurface.
Enable or disable the use of the keypad for the specified window within a UI surface.
| s | Pointer to the UiSurface for which to enable or disable the insert/delete line capabilities. |
| w | The index of the window within the surface for which to enable or disable the insert/delete line capabilities. |
| enable | A boolean value indicating whether to enable (true) or disable (false) the insert/delete line capabilities. |
| s | Pointer to the UiSurface containing the window. |
| w | The index of the window within the surface. |
| enable | True to enable the use of the keypad, false to disable it. |
This function does nothing.
Enable or disable the use of the insert/delete line capabilities for a UiSurface.
| s | Pointer to the UiSurface containing the window. |
| w | The index of the window within the surface. |
| enable | True to enable the use of the keypad, false to disable it. |
This function does nothing.
Definition at line 787 of file ui_ncurses.c.
Referenced by init_view_boxwin(), and init_view_full_screen().
Initialize the UI runtime with the given configuration and SIO.
Initialize the UI runtime with the specified configuration and SIO.
| cfg | Pointer to a UiConfig structure containing the configuration settings. |
| sio | Pointer to an SIO structure for input/output operations. |
| cfg | Pointer to a UiConfig structure containing configuration options. |
| sio | Pointer to a SIO structure for input/output operations. |
This function initializes the UI runtime using the NotCurses library. It sets up the terminal, creates the standard plane, and initializes various UI components based on the provided configuration. If any step fails, it cleans up and returns NULL.
Initialize the UI runtime with the given configuration and SIO.
| cfg | Pointer to a UiConfig structure containing configuration options. |
| sio | Pointer to a SIO structure for input/output operations. |
This function initializes the UI runtime using the NotCurses library. It sets up the terminal, creates the standard plane, and initializes various UI components based on the provided configuration. If any step fails, it cleans up and returns NULL.
Definition at line 129 of file ui_ncurses.c.
References border_double, border_heavy, border_none, border_rounded, border_single, UiConfig::border_style, bw, f_ncurses_open, f_notcurses_open, UiConfig::log_level, sfc_ptr, stdplane, stdsfc, border_wide::str, SUB_SFC_MAX, ui, ui_color, ui_color_cnt, ui_initialize_sio(), ui_min_log_level, ui_pair, ui_pair_cnt, and ui_shutdown().
Referenced by main().
| void ui_initialize_sio | ( | SIO * | sio | ) |
gamma correction values
These are read from ~/.minitrc
used when initializing colors
Definition at line 182 of file ui_common.c.
References BLUE_GAMMA, SIO::blue_gamma, SIO::box_bg, SIO::box_fg, SIO::brackets, SIO::brackets_bg, SIO::brackets_fg, bw_chk, bw_ran, bw_sp, cell_bl, cell_box, cell_br, cell_brktl, cell_brktr, cell_bt, cell_chk, cell_cmdln, cell_cr, cell_default, cell_fill_char, cell_ho, cell_ind, cell_ln, cell_lt, cell_nt, cell_nt_hl, cell_nt_hl_rev, cell_nt_rev, cell_ran, cell_rt, cell_sp, cell_title, cell_tl, cell_tr, cell_tt, cell_ve, CLR_BG, CLR_BLUE, CLR_BOX_BG, CLR_BOX_FG, CLR_BRACKETS_BG, CLR_BRACKETS_FG, CLR_CMDLN_BG, CLR_CMDLN_FG, CLR_FG, CLR_FILL_CHAR_BG, CLR_FILL_CHAR_FG, CLR_GREEN, CLR_IND_BG, CLR_IND_FG, CLR_LN_BG, CLR_LN_FG, CLR_NT_BG, CLR_NT_FG, CLR_NT_HL_BG, CLR_NT_HL_FG, CLR_NT_HL_REV_BG, CLR_NT_HL_REV_FG, CLR_NT_REV_BG, CLR_NT_REV_FG, CLR_RED, CLR_TITLE_BG, CLR_TITLE_FG, CLR_YELLOW, SIO::cmdln_bg, SIO::cmdln_fg, cp_blue, cp_box, cp_brackets, cp_cmdln, cp_default, cp_fill_char, cp_green, cp_ind, cp_ln, cp_nt, cp_nt_hl, cp_nt_hl_rev, cp_nt_rev, cp_red, cp_title, cp_yellow, SIO::fill_char_bg, SIO::fill_char_fg, GRAY_GAMMA, SIO::gray_gamma, GREEN_GAMMA, SIO::green_gamma, SIO::ind_bg, SIO::ind_fg, SIO::ln_bg, SIO::ln_fg, SIO::nt_bg, SIO::nt_fg, SIO::nt_hl_bg, SIO::nt_hl_fg, SIO::nt_hl_rev_bg, SIO::nt_hl_rev_fg, SIO::nt_rev_bg, SIO::nt_rev_fg, SIO::ran_bg, SIO::ran_fg, RED_GAMMA, SIO::red_gamma, SIO::title_bg, SIO::title_fg, ui, ui_add_pair(), ui_cell_from_ucp(), and ui_init_clr_palette().
Referenced by read_theme(), ui_init(), and ui_init().
Enable or disable the keypad for a UiSurface.
Enable or disable the keypad for the specified window within a UI surface.
| s | Pointer to the UiSurface for which to enable or disable the keypad. |
| w | The index of the window within the surface for which to enable or disable the keypad. |
| enable | A boolean value indicating whether to enable (true) or disable (false) the keypad. |
| s | Pointer to the UiSurface containing the window. |
| w | The index of the window within the surface. |
| enable | True to enable the keypad, false to disable it. |
This function does nothing.
Enable or disable the keypad for a UiSurface.
| s | Pointer to the UiSurface containing the window. |
| w | The index of the window within the surface. |
| enable | True to enable the keypad, false to disable it. |
This function does nothing.
Definition at line 771 of file ui_ncurses.c.
Referenced by fork_exec(), init_view_boxwin(), init_view_full_screen(), menu_cmd_processor(), open_pick_win(), picker(), and popup_ckeys().
| int ui_mice_enable | ( | int | mask | ) |
Enable or disable mouse support.
Enable or disable mouse events for the NotCurses context.
| mask | Mouse event mask (0 to disable, non-zero to enable). |
| mask | The mouse event mask to enable. If 0, all mouse events are enabled. |
ui is NULL.Enable or disable mouse support.
| mask | The mouse event mask to enable. If 0, all mouse events are enabled. |
ui is NULL. Definition at line 274 of file ui_ncurses_input.c.
References ui.
| int ui_mousemask | ( | int | mask | ) |
Enable or disable mouse support.
Set the mouse event mask for the NotCurses context.
| mask | Mouse event mask (0 to disable, non-zero to enable). |
| mask | The mouse event mask to set. If 0, all mouse events are enabled. |
ui is NULL.Enable or disable mouse support.
| mask | The mouse event mask to set. If 0, all mouse events are enabled. |
ui is NULL. Definition at line 261 of file ui_ncurses_input.c.
References ui.
Referenced by menu_cmd_processor(), and picker().
| void ui_render | ( | ) |
Render the UI by updating panels and refreshing the display.
Render the UI.
This function renders the UI.
Render the UI by updating panels and refreshing the display.
This function renders the UI.
Definition at line 884 of file ui_ncurses.c.
References ui.
Referenced by cf_accept(), display_form(), display_line(), display_pick_page(), field_editor(), form_display_accept_field(), form_display_field(), form_display_fields(), get_cmd_arg(), get_cmd_char(), init_pick(), main(), menu_cmd_processor(), menu_engine(), pad_refresh(), picker(), read_theme(), ui_draw_text_fill(), ui_get_event(), ui_restore_wins(), ui_surface_destroy(), ui_timeout_prompt(), ui_tracked_sfc_box(), ui_update_timeout_prompt(), view_boxwin_resize(), view_display_page(), and view_full_screen_resize().
| void ui_restore_wins | ( | ) |
Restore the state of all windows in the UI. This function refreshes the standard screen and all surface windows, ensuring that their contents are displayed correctly.
Definition at line 371 of file ui_ncurses_draw.c.
References sfc_ptr, SUB_SFC_MAX, ui_render(), and ui_surface.
Referenced by enter_file_spec(), exec_objects(), fork_exec(), form_exec_receiver(), full_screen_shell(), menu_cmd_processor(), menu_engine(), view_cmd_processor(), view_init_input(), and write_view_buffer().
| int ui_resume | ( | ) |
Resume the UI, restoring the previous program state and updating the display.
Resume the UI and enter the alternate screen.
This function resumes the UI and enters the alternate screen. It is typically used after a suspension of the UI, allowing the application to return to its previous state and continue rendering the UI.
Resume the UI, restoring the previous program state and updating the display.
This function resumes the UI and enters the alternate screen. It is typically used after a suspension of the UI, allowing the application to return to its previous state and continue rendering the UI.
Definition at line 503 of file ui_ncurses.c.
References ui.
Referenced by fork_exec().
Enable or disable scrolling for a UiSurface.
Enable or disable scrolling for the specified window within a UI surface.
| s | Pointer to the UiSurface for which to enable or disable scrolling. |
| w | The index of the window within the surface for which to enable or disable scrolling. |
| enable | A boolean value indicating whether to enable (true) or disable (false) scrolling. |
| s | Pointer to the UiSurface containing the window. |
| w | The index of the window within the surface. |
| enable | True to enable scrolling, false to disable scrolling. |
This function enables or disables scrolling for the specified window within a UI surface. If the surface or window is not initialized, it returns -1.
Enable or disable scrolling for a UiSurface.
| s | Pointer to the UiSurface containing the window. |
| w | The index of the window within the surface. |
| enable | True to enable scrolling, false to disable scrolling. |
This function enables or disables scrolling for the specified window within a UI surface. If the surface or window is not initialized, it returns -1.
Definition at line 755 of file ui_ncurses.c.
Referenced by init_view_boxwin(), init_view_full_screen(), menu_cmd_processor(), open_pick_win(), ui_surface_addpad(), and ui_surface_box().
Set the scrolling region for a UiSurface.
Set the scrolling region for the specified window within a UI surface.
| s | Pointer to the UiSurface for which to set the scrolling region. |
| w | The index of the window within the surface for which to set the scrolling region. |
| top | The top line of the scrolling region (0-based). |
| bottom | The bottom line of the scrolling region (0-based). |
| s | Pointer to the UiSurface containing the window. |
| w | The index of the window within the surface. |
| top | The top line of the scrolling region. |
| bottom | The bottom line of the scrolling region. |
This function does nothing.
Set the scrolling region for a UiSurface.
| s | Pointer to the UiSurface containing the window. |
| w | The index of the window within the surface. |
| top | The top line of the scrolling region. |
| bottom | The bottom line of the scrolling region. |
This function does nothing.
Definition at line 820 of file ui_ncurses.c.
Referenced by init_view_boxwin(), init_view_full_screen(), and open_pick_win().
| void ui_shutdown | ( | ) |
Shutdown the UI runtime, cleaning up resources and freeing memory.
Shutdown the UI runtime and free all associated resources.
This function shuts down the UI runtime by destroying all surfaces, freeing memory, and stopping the NotCurses library. It also closes the terminal file pointer if it was opened. If the UI runtime is not initialized, the function does nothing.
Shutdown the UI runtime, cleaning up resources and freeing memory.
This function shuts down the UI runtime by destroying all surfaces, freeing memory, and stopping the NotCurses library. It also closes the terminal file pointer if it was opened. If the UI runtime is not initialized, the function does nothing.
Definition at line 418 of file ui_ncurses.c.
References f_ncurses_open, f_notcurses_open, sfc_ptr, stdsfc, ui, ui_color, ui_pair, ui_surface, and ui_surface_destroy().
Referenced by cmenu_shutdown(), main(), ui_abend(), ui_destroy_curses(), ui_endwin(), and ui_init().
| const char * ui_sub_surface_str | ( | ss_t | w | ) |
Add a new pad to the specified UiSurface.
Add padding to an existing UI surface.
| s | Pointer to the UiSurface to which the pad will be added. |
| w | The index of the window within the surface where the pad will be created. |
| view_win | The index of the window that will be used to view the pad. |
| lines | The number of lines (rows) for the new pad. |
| cols | The number of columns for the new pad. |
| begy | The y-coordinate (row) for the new pad's position (ignored in this implementation). |
| begx | The x-coordinate (column) for the new pad's position (ignored in this implementation). |
| s | Pointer to the UiSurface to which padding will be added. |
| w | The index of the new padded surface. |
| p | The index of the parent plane to attach to. |
| lines | The number of lines (rows) for the padded surface. |
| cols | The number of columns for the padded surface. |
| y | The y-coordinate for the padded surface's position. |
| x | The x-coordinate for the padded surface's position. |
This function adds padding to an existing UI surface by creating a new ncplane with the specified dimensions and position. It updates the metadata for the new padded surface and sets its background and scrolling properties. If any step fails, it cleans up and returns -1.
Add a new pad to the specified UiSurface.
| s | Pointer to the UiSurface to which padding will be added. |
| w | The index of the new padded surface. |
| p | The index of the parent plane to attach to. |
| lines | The number of lines (rows) for the padded surface. |
| cols | The number of columns for the padded surface. |
| y | The y-coordinate for the padded surface's position. |
| x | The x-coordinate for the padded surface's position. |
This function adds padding to an existing UI surface by creating a new ncplane with the specified dimensions and position. It updates the metadata for the new padded surface and sets its background and scrolling properties. If any step fails, it cleans up and returns -1.
Definition at line 369 of file ui_ncurses.c.
References cell_nt, f_notcurses_open, ui, ui_bkgd(), ui_bkgdset(), and ui_scrollok().
Referenced by init_view_boxwin(), and init_view_full_screen().
Add a new window to the specified UiSurface.
Add a new window to an existing UI surface.
| s | Pointer to the UiSurface to which the window will be added. |
| w | The index of the window within the surface where the new window will be created. |
| p | The index of the parent window from which the new window will be derived. |
| lines | The number of lines (rows) for the new window. |
| cols | The number of columns for the new window. |
| y | The y-coordinate (row) for the new window's position relative to the parent window. |
| x | The x-coordinate (column) for the new window's position relative to the parent window. |
| s | Pointer to the UiSurface to which the window will be added. |
| w | The index of the new window. |
| p | The index of the parent plane to attach to. |
| lines | The number of lines (rows) for the new window. |
| cols | The number of columns for the new window. |
| y | The y-coordinate for the new window's position. |
| x | The x-coordinate for the new window's position. |
This function adds a new window to an existing UI surface by creating a new ncplane with the specified dimensions and position. It updates the metadata for the new window and sets its background properties. If any step fails, it cleans up and returns -1.
Add a new window to the specified UiSurface.
| s | Pointer to the UiSurface to which the window will be added. |
| w | The index of the new window. |
| p | The index of the parent plane to attach to. |
| lines | The number of lines (rows) for the new window. |
| cols | The number of columns for the new window. |
| y | The y-coordinate for the new window's position. |
| x | The x-coordinate for the new window's position. |
This function adds a new window to an existing UI surface by creating a new ncplane with the specified dimensions and position. It updates the metadata for the new window and sets its background properties. If any step fails, it cleans up and returns -1.
Definition at line 395 of file ui_ncurses.c.
References cell_nt, f_notcurses_open, ui, ui_bkgd(), and ui_bkgdset().
Referenced by init_view_boxwin(), init_view_full_screen(), ui_display_image(), ui_tracked_sfc_box(), and ui_tracked_sfc_split_box().
| UiSurface * ui_surface_box | ( | UiSurface * | parent, |
| uint | p, | ||
| uint | lines, | ||
| uint | cols, | ||
| uint | y, | ||
| uint | x, | ||
| const char * | wtitle ) |
Create a new UI surface with a border box and optional title.
| parent | Pointer to the parent UiSurface, or NULL for a top-level surface. |
| p | The index of the parent window to derive from, if applicable. |
| lines | The number of lines (rows) for the new surface. |
| cols | The number of columns for the new surface. |
| y | The y-coordinate (row) for the new surface's position. |
| x | The x-coordinate (column) for the new surface's position. |
| wtitle | The title string to display in the border box, or NULL for no title. |
| parent | Pointer to the parent UiSurface, or NULL for no parent. |
| p | The index of the parent plane to attach to. |
| lines | The number of lines (rows) for the new surface. |
| cols | The number of columns for the new surface. |
| y | The y-coordinate for the new surface's position. |
| x | The x-coordinate for the new surface's position. |
| wtitle | The title to display on the border box, or NULL for no title. |
This function creates a new UI surface with a border box and an optional title. It allocates memory for the surface, sets up its metadata, and creates a new ncplane for rendering. If any step fails, it cleans up and returns NULL.
Definition at line 288 of file ui_ncurses.c.
References cell_box, em0, em1, em2, ssnprintf(), stdplane, strnz__cpy(), ui, ui_border_draw(), ui_border_title(), ui_display_error(), ui_get_screen_size(), and ui_scrollok().
Referenced by init_view_boxwin(), ui_display_image(), ui_tracked_sfc_box(), and ui_tracked_sfc_split_box().
| void ui_surface_destroy | ( | UiSurface * | s | ) |
Destroy a UiSurface, cleaning up its windows and panels.
Destroy a UI surface and free its resources.
This function destroys a UI surface by freeing its associated ncplanes and metadata. It also frees the memory allocated for the UiSurface structure. If the provided pointer is NULL, the function does nothing.
Destroy a UiSurface, cleaning up its windows and panels.
| s | Pointer to the UiSurface to be destroyed. |
This function destroys a UI surface by freeing its associated ncplanes and metadata. It also frees the memory allocated for the UiSurface structure. If the provided pointer is NULL, the function does nothing.
Definition at line 468 of file ui_ncurses.c.
References SUB_SFC_MAX, and ui_render().
Referenced by destroy_pick_view(), main(), ui_cm_surface_destroy(), ui_framed_surface_destroy(), ui_framed_surface_new(), ui_shutdown(), view_boxwin_resize(), view_file(), and view_full_screen_resize().
Hide a UiSurface, making it invisible on the screen.
Hide the specified window within a UI surface.
| s | Pointer to the UiSurface to be hidden. |
| w | The index of the window within the surface to be hidden. |
| s | Pointer to the UiSurface containing the window to hide. |
| w | The index of the window to hide. |
This function hides the specified window within a UI surface by updating its metadata and moving it far off-screen. If the surface or window is not initialized, it returns -1.
Hide a UiSurface, making it invisible on the screen.
| s | Pointer to the UiSurface containing the window to hide. |
| w | The index of the window to hide. |
This function hides the specified window within a UI surface by updating its metadata and moving it far off-screen. If the surface or window is not initialized, it returns -1.
Definition at line 635 of file ui_ncurses.c.
Move a UiSurface to a new position on the screen.
Move a UI surface to a new position on the screen.
| s | Pointer to the UiSurface to be moved. |
| w | The index of the window within the surface to be moved. |
| y | The new y-coordinate (row) for the surface's position. |
| x | The new x-coordinate (column) for the surface's position. |
| s | Pointer to the UiSurface to be moved. |
| w | The index of the window within the surface to move. |
| y | The new y-coordinate for the surface's position. |
| x | The new x-coordinate for the surface's position. |
This function moves a UI surface to a new position on the screen by updating its metadata and moving the associated ncplane. If the surface is hidden, it only updates the metadata without moving the ncplane. If any step fails, it returns -1.
Move a UiSurface to a new position on the screen.
| s | Pointer to the UiSurface to be moved. |
| w | The index of the window within the surface to move. |
| y | The new y-coordinate for the surface's position. |
| x | The new x-coordinate for the surface's position. |
This function moves a UI surface to a new position on the screen by updating its metadata and moving the associated ncplane. If the surface is hidden, it only updates the metadata without moving the ncplane. If any step fails, it returns -1.
Definition at line 521 of file ui_ncurses.c.
| UiSurface * ui_surface_new | ( | ss_t | w, |
| UiSurface * | parent, | ||
| uint | p, | ||
| uint | lines, | ||
| uint | cols, | ||
| uint | y, | ||
| uint | x ) |
Create a new UI surface with the specified parameters.
| w | The index of the window within the surface. |
| parent | Pointer to the parent UiSurface, or NULL for a top-level surface. |
| p | The index of the parent window to derive from, if applicable. |
| lines | The number of lines (rows) for the new surface. |
| cols | The number of columns for the new surface. |
| y | The y-coordinate (row) for the new surface's position. |
| x | The x-coordinate (column) for the new surface's position. |
| w | The index of the surface to create. |
| parent | Pointer to the parent UiSurface, or NULL for no parent. |
| p | The index of the parent plane to attach to. |
| lines | The number of lines (rows) for the new surface. |
| cols | The number of columns for the new surface. |
| y | The y-coordinate for the new surface's position. |
| x | The x-coordinate for the new surface's position. |
This function creates a new UI surface and initializes its properties based on the provided parameters. It allocates memory for the surface, sets up its metadata, and creates a new ncplane for rendering. If any step fails, it cleans up and returns NULL.
Definition at line 229 of file ui_ncurses.c.
References em0, em1, em2, f_notcurses_open, ssnprintf(), stdplane, SUB_SFC_MAX, ui, ui_display_error(), and ui_get_screen_size().
Referenced by init_view_full_screen(), and ui_framed_surface_new().
Resize a UiSurface to new dimensions.
Resize a UI surface to new dimensions.
| s | Pointer to the UiSurface to be resized. |
| w | The index of the window within the surface to be resized. |
| lines | The new number of lines (rows) for the surface. |
| cols | The new number of columns for the surface. |
| s | Pointer to the UiSurface to be resized. |
| w | The index of the window within the surface to resize. |
| lines | The new number of lines (rows) for the surface. |
| cols | The new number of columns for the surface. |
This function resizes a UI surface to new dimensions by updating its metadata and resizing the associated ncplane. If any step fails, it returns -1.
Resize a UiSurface to new dimensions.
| s | Pointer to the UiSurface to be resized. |
| w | The index of the window within the surface to resize. |
| lines | The new number of lines (rows) for the surface. |
| cols | The new number of columns for the surface. |
This function resizes a UI surface to new dimensions by updating its metadata and resizing the associated ncplane. If any step fails, it returns -1.
Definition at line 536 of file ui_ncurses.c.
Show a UiSurface, making it visible on the screen.
Show the specified window within a UI surface.
| s | Pointer to the UiSurface to be shown. |
| w | The index of the window within the surface to be shown. |
| s | Pointer to the UiSurface containing the window to show. |
| w | The index of the window to show. |
This function shows the specified window within a UI surface by updating its metadata and moving it to its designated position. If the surface or window is not initialized, it returns -1.
Show a UiSurface, making it visible on the screen.
| s | Pointer to the UiSurface containing the window to show. |
| w | The index of the window to show. |
This function shows the specified window within a UI surface by updating its metadata and moving it to its designated position. If the surface or window is not initialized, it returns -1.
Definition at line 609 of file ui_ncurses.c.
| int ui_suspend | ( | ) |
Suspend the UI, saving the current program state and ending the window session.
Suspend the UI and leave the alternate screen.
This function suspends the UI and leaves the alternate screen. It is typically used when the application needs to temporarily exit the UI mode, such as when executing a shell command or displaying a message outside of the UI context.
Suspend the UI, saving the current program state and ending the window session.
This function suspends the UI and leaves the alternate screen. It is typically used when the application needs to temporarily exit the UI mode, such as when executing a shell command or displaying a message outside of the UI context.
Definition at line 494 of file ui_ncurses.c.
References ui.
Hide a UiSurface, making it invisible on the screen.
Move the specified window within a UI surface to the top of the z-order.
| s | Pointer to the UiSurface to be hidden. |
| w | The index of the window within the surface to be hidden. |
| s | Pointer to the UiSurface containing the window to move. |
| w | The index of the window to move to the top. |
This function moves the specified window within a UI surface to the top of the z-order, making it the foremost window. If the surface or window is not initialized, it returns -1.
Hide a UiSurface, making it invisible on the screen.
| s | Pointer to the UiSurface containing the window to move. |
| w | The index of the window to move to the top. |
This function moves the specified window within a UI surface to the top of the z-order, making it the foremost window. If the surface or window is not initialized, it returns -1.
Definition at line 623 of file ui_ncurses.c.
Referenced by get_cmd_char(), and picker().
| int ui_tracked_sfc_box | ( | uint | wlines, |
| uint | wcols, | ||
| uint | wbegy, | ||
| uint | wbegx, | ||
| const char * | wtitle ) |
Create a new surface with a box window.
ui_tracked_sfc_box_com
| wlines | Number of lines for the window |
| wcols | Number of columns for the window |
| wbegy | Starting Y position for the window |
| wbegx | Starting X position for the window |
| wtitle | Title for the window |
This function creates a new surface and adds a box window to it. It checks if the maximum number of surfaces has been exceeded and adjusts the window size based on the screen size. The new surface is stored in the global ui_surface array, and the surface pointer (sfc_ptr) is incremented. The window is then rendered on the screen.
Definition at line 387 of file ui_common.c.
References sfc_ptr, ui_get_screen_size(), ui_render(), ui_surface, ui_surface_addwin(), and ui_surface_box().
Referenced by display_form(), main(), menu_engine(), popup_ckeys(), ui_action_disposition(), ui_answer_yn(), ui_display_error(), ui_perror(), and ui_timeout_prompt().
| int ui_tracked_sfc_split_box | ( | uint | wlines, |
| uint | wcols, | ||
| uint | split_y, | ||
| uint | split_x, | ||
| uint | wbegy, | ||
| uint | wbegx, | ||
| const char * | wtitle ) |
Create a new surface with a split box window.
surface_split_box_win_new
| wlines | Number of lines for the main window |
| wcols | Number of columns for the main window |
| split_y | Y position for the split line |
| split_x | X position for the split line (not implemented yet) |
| wbegy | Starting Y position for the window |
| wbegx | Starting X position for the window |
| wtitle | Title for the window |
This function creates a new surface and adds a split box window to it. It checks if the maximum number of surfaces has been exceeded and adjusts the window size based on the screen size. The new surface is stored in the global ui_surface array, and the surface pointer (sfc_ptr) is incremented. The main window and the split window are then rendered on the screen, with a separator line drawn at the specified Y position.
Definition at line 425 of file ui_common.c.
References sfc_ptr, ui_border_ysplit(), ui_curs_set(), ui_get_screen_size(), ui_surface, ui_surface_addwin(), and ui_surface_box().
Referenced by open_pick_win().
| void ui_update_panels | ( | ) |
Update the panels in the UI.
Update the panels and render the UI.
This function updates the panels and renders the UI.
Update the panels in the UI.
This function updates the panels and renders the UI.
Definition at line 890 of file ui_ncurses.c.
References ui.
Clear the contents of a UiSurface or all surfaces.
Clear the contents of the specified window within a UI surface.
| s | Pointer to the UiSurface to be cleared, or NULL to clear all surfaces. |
| w | The index of the window within the surface to be cleared, or ALLWINS to clear all windows. |
| s | Pointer to the UiSurface containing the window to clear. |
| w | The index of the window to clear. |
This function clears the contents of the specified window within a UI surface by erasing its contents. If the surface or window is not initialized, it returns -1.
Clear the contents of a UiSurface or all surfaces.
| s | Pointer to the UiSurface containing the window to clear. |
| w | The index of the window to clear. |
This function clears the contents of the specified window within a UI surface by erasing its contents. If the surface or window is not initialized, it returns -1.
Definition at line 571 of file ui_ncurses.c.
References SUB_SFC_MAX.
Set the style of a surface window.
clear from current cursor position to bottom of window
| s | The surface to modify. |
| w | The window index within the surface. |
| style | The style to apply (UiStyle). |
| s | surface |
| w | window |
Set the style of a surface window.
| s | surface |
| w | window |
Definition at line 27 of file ui_ncurses_draw.c.
Referenced by display_line_eod(), scroll_next(), scroll_prev(), and search().
Clear to the end of the line in a surface window.
clear the window from the current cursor position to the end of the window
| s | The surface to modify. |
| w | The window index within the surface. |
| s | surface |
| w | window |
Clear to the end of the line in a surface window.
| s | surface |
| w | window |
Definition at line 38 of file ui_ncurses_draw.c.
Referenced by cf_accept(), display_line(), display_prompt(), display_split_line(), form_post(), get_cmd_arg(), get_cmd_char(), pick_engine(), picker(), ui_display_chyron(), and ui_update_timeout_prompt().
Erase the contents of a UiSurface or all surfaces.
Clear the contents of the specified window within a UI surface.
| s | Pointer to the UiSurface to be erased, or NULL to erase all surfaces. |
| w | The index of the window within the surface to be erased, or ALLWINS to erase all windows. |
| s | Pointer to the UiSurface containing the window to clear. |
| w | The index of the window to clear. |
This function clears the contents of the specified window within a UI surface by erasing its contents. If the surface or window is not initialized, it returns -1.
Erase the contents of a UiSurface or all surfaces.
| s | Pointer to the UiSurface containing the window to clear. |
| w | The index of the window to clear. |
This function clears the contents of the specified window within a UI surface by erasing its contents. If the surface or window is not initialized, it returns -1.
Definition at line 551 of file ui_ncurses.c.
References SUB_SFC_MAX.
Referenced by exec_objects(), and full_screen_shell().
Move the cursor to a specified position within a UiSurface.
Move the cursor to the specified position within a window of a UI surface.
| s | Pointer to the UiSurface where the cursor will be moved. |
| w | The index of the window within the surface where the cursor will be moved. |
| y | The new y-coordinate (row) for the cursor's position. |
| x | The new x-coordinate (column) for the cursor's position. |
| s | Pointer to the UiSurface containing the window. |
| w | The index of the window within the surface. |
| y | The y-coordinate for the new cursor position. |
| x | The x-coordinate for the new cursor position. |
This function moves the cursor to the specified position within a window of a UI surface. If the surface or window is not initialized, it returns -1.
Move the cursor to a specified position within a UiSurface.
| s | Pointer to the UiSurface containing the window. |
| w | The index of the window within the surface. |
| y | The y-coordinate for the new cursor position. |
| x | The x-coordinate for the new cursor position. |
This function moves the cursor to the specified position within a window of a UI surface. If the surface or window is not initialized, it returns -1.
Definition at line 653 of file ui_ncurses.c.
Referenced by full_screen_shell(), menu_cmd_processor(), ui_display_chyron(), ui_mvwadd_wchnstr(), and ui_mvwadd_wchstr().
Refresh a specific window within a UiSurface.
| s | Pointer to the UiSurface containing the window to be refreshed. |
| w | The index of the window within the surface to be refreshed. |
| s | Pointer to the UiSurface containing the window to be refreshed. |
| w | The index of the window within the surface to be refreshed. |
| s | Pointer to the UiSurface containing the window to be refreshed. |
| w | The index of the window within the surface to be refreshed. |
Definition at line 908 of file ui_ncurses.c.
Scroll the contents of a UiSurface by a specified number of lines.
Scroll the contents of the specified window up or down by the specified number of lines.
| s | Pointer to the UiSurface to be scrolled. |
| w | The index of the window within the surface to be scrolled. |
| n | The number of lines to scroll. Positive values scroll down, negative values scroll up. |
| s | The surface containing the window to scroll. |
| w | The index of the window to scroll. |
| r | The number of lines to scroll. Positive values scroll up, negative values scroll down. |
If r is positive, the contents of the plane are moved up, leaving blank lines at the bottom. In the view application, the view scope is moved toward end of file (eof). - scope_toward_eof()
Scroll the contents of a UiSurface by a specified number of lines.
| s | The surface containing the window to scroll. |
| w | The index of the window to scroll. |
| r | The number of lines to scroll. Positive values scroll up, negative values scroll down. |
If r is positive, the contents of the plane are moved up, leaving blank lines at the bottom. In the view application, the view scope is moved toward end of file (eof). - scope_toward_eof()
Definition at line 738 of file ui_ncurses.c.
Referenced by display_pick_page(), scroll_next(), and scroll_prev().
|
extern |
Definition at line 69 of file ui_common.c.
|
extern |
Definition at line 71 of file ui_common.c.
|
extern |
Definition at line 72 of file ui_common.c.
|
extern |
Definition at line 70 of file ui_common.c.
|
extern |
BOX WIDE UNICODE CODEPOINTS
Definition at line 68 of file ui_common.c.
|
extern |
Definition at line 27 of file ui_common.c.
|
extern |
|
extern |
large down arrow
Definition at line 83 of file ui_common.c.
|
extern |
horizontal line 9
Definition at line 87 of file ui_common.c.
|
extern |
large left arrow
Definition at line 81 of file ui_common.c.
|
extern |
left_angle
Definition at line 85 of file ui_common.c.
|
extern |
large right arrow
Definition at line 80 of file ui_common.c.
|
extern |
|
extern |
rounded bottom left
Definition at line 77 of file ui_common.c.
|
extern |
rounded bottom right
Definition at line 78 of file ui_common.c.
|
extern |
MISCELANEOUS UNICODE CODEPOINTS rounded top left
Definition at line 75 of file ui_common.c.
|
extern |
rounded top right
Definition at line 76 of file ui_common.c.
|
extern |
|
extern |
large up arrow
Definition at line 82 of file ui_common.c.
|
extern |
Definition at line 125 of file ui_common.c.
Referenced by ui_border_draw(), and ui_initialize_sio().
|
extern |
Definition at line 110 of file ui_common.c.
Referenced by ui_border_title(), ui_initialize_sio(), and ui_surface_box().
|
extern |
Definition at line 126 of file ui_common.c.
Referenced by ui_border_draw(), and ui_initialize_sio().
|
extern |
Definition at line 104 of file ui_common.c.
Referenced by display_form(), and ui_initialize_sio().
|
extern |
Definition at line 105 of file ui_common.c.
Referenced by display_form(), and ui_initialize_sio().
|
extern |
Definition at line 120 of file ui_common.c.
|
extern |
Definition at line 130 of file ui_common.c.
Referenced by ui_initialize_sio().
|
extern |
Definition at line 116 of file ui_common.c.
Referenced by picker(), remove_right_angle(), reverse_object(), toggle_object(), ui_initialize_sio(), and unreverse_object().
|
extern |
Definition at line 112 of file ui_common.c.
Referenced by ui_initialize_sio().
|
extern |
Definition at line 131 of file ui_common.c.
Referenced by ui_initialize_sio().
|
extern |
Definition at line 102 of file ui_common.c.
Referenced by ui_initialize_sio().
|
extern |
Definition at line 103 of file ui_common.c.
Referenced by form_display_fields(), and ui_initialize_sio().
|
extern |
Definition at line 123 of file ui_common.c.
Referenced by ui_border_draw(), ui_border_title(), ui_border_ysplit(), ui_border_ysplit_text(), and ui_initialize_sio().
|
extern |
Definition at line 111 of file ui_common.c.
Referenced by ui_initialize_sio().
|
extern |
Definition at line 114 of file ui_common.c.
Referenced by init_view_boxwin(), init_view_full_screen(), and ui_initialize_sio().
|
extern |
Definition at line 117 of file ui_common.c.
|
extern |
Definition at line 127 of file ui_common.c.
Referenced by ui_border_title(), ui_border_ysplit(), ui_border_ysplit_text(), and ui_initialize_sio().
|
extern |
Definition at line 106 of file ui_common.c.
Referenced by display_pick_page(), display_prompt(), form_display_accept_field(), form_display_field(), form_display_fields(), get_cmd_arg(), init_view_boxwin(), init_view_full_screen(), menu_cmd_processor(), menu_engine(), popup_ckeys(), reverse_object(), ui_initialize_sio(), ui_surface_addpad(), ui_surface_addwin(), and unreverse_object().
|
extern |
Definition at line 108 of file ui_common.c.
Referenced by menu_cmd_processor(), menu_engine(), ui_border_ysplit_text(), and ui_initialize_sio().
|
extern |
Definition at line 109 of file ui_common.c.
Referenced by field_editor(), form_engine(), menu_cmd_processor(), picker(), and ui_initialize_sio().
|
extern |
Definition at line 107 of file ui_common.c.
Referenced by display_prompt(), field_editor(), get_cmd_arg(), menu_cmd_processor(), picker(), popup_ckeys(), reverse_object(), ui_compile_chyron(), ui_initialize_sio(), and ui_set_chyron_key().
|
extern |
Definition at line 115 of file ui_common.c.
Referenced by get_cmd_arg(), get_cmd_char(), picker(), and ui_initialize_sio().
|
extern |
Definition at line 118 of file ui_common.c.
|
extern |
Definition at line 128 of file ui_common.c.
Referenced by ui_border_title(), ui_border_ysplit(), ui_border_ysplit_text(), and ui_initialize_sio().
|
extern |
Definition at line 132 of file ui_common.c.
Referenced by deselect_object(), get_cmd_char(), picker(), remove_right_angle(), reverse_object(), toggle_object(), ui_border_title(), ui_border_ysplit_text(), ui_initialize_sio(), unreverse_object(), and view_cmd_processor().
|
extern |
Definition at line 113 of file ui_common.c.
Referenced by ui_border_title(), and ui_initialize_sio().
|
extern |
Definition at line 121 of file ui_common.c.
Referenced by ui_border_draw(), ui_border_title(), and ui_initialize_sio().
|
extern |
Definition at line 122 of file ui_common.c.
Referenced by ui_border_draw(), and ui_initialize_sio().
|
extern |
Definition at line 119 of file ui_common.c.
|
extern |
Definition at line 129 of file ui_common.c.
Referenced by ui_initialize_sio().
|
extern |
Definition at line 124 of file ui_common.c.
Referenced by ui_border_draw(), and ui_initialize_sio().
|
extern |
the x coordinate of a mouse click
Definition at line 30 of file ui_common.c.
Referenced by cf_accept(), field_editor(), form_post(), and form_process().
|
extern |
the y coordinate of a mouse click
Definition at line 29 of file ui_common.c.
Referenced by cf_accept(), field_editor(), form_post(), and form_process().
|
extern |
number of colors used
|
extern |
current color index
|
extern |
number of color pairs supported by the terminal
|
extern |
current color pair index
|
extern |
Color names for .minitrc overrides.
color codes for the 16 basic colors
colors_text
These names are used in .minitrc to specify color overrides The order of these names corresponds to the ColorsEnum values
Definition at line 93 of file ui_common.c.
| uint COLS |
Definition at line 426 of file ui_backend.h.
|
extern |
blue background color pair index
blue background - for testing
Definition at line 153 of file ui_common.c.
Referenced by ui_initialize_sio().
|
extern |
bold color pair index
|
extern |
box color pair index
border
Definition at line 138 of file ui_common.c.
Referenced by ui_initialize_sio().
|
extern |
color pair index for field brackets
field enclosure brackets
Definition at line 149 of file ui_common.c.
Referenced by ui_initialize_sio().
|
extern |
command line number background color pair index
|
extern |
command line number color pair index
|
extern |
default color pair index
default color pair
Definition at line 147 of file ui_common.c.
Referenced by ui_initialize_sio().
|
extern |
fill character color pair index
field fill characters
Definition at line 148 of file ui_common.c.
Referenced by ui_initialize_sio().
|
extern |
green background color pair index
green background - for testing
Definition at line 151 of file ui_common.c.
Referenced by ui_initialize_sio().
|
extern |
highlight color pair index
|
extern |
indicator color pair index
indicator character
Definition at line 139 of file ui_common.c.
Referenced by ui_initialize_sio().
|
extern |
line number background color pair index
|
extern |
line number color pair index
|
extern |
normal color pair index
normal text
Definition at line 142 of file ui_common.c.
Referenced by fmt_line(), and ui_initialize_sio().
|
extern |
highlight color pair index
normal text highlight
Definition at line 144 of file ui_common.c.
Referenced by ui_initialize_sio().
|
extern |
highlight reverse color pair index
normal text highlight reverse
Definition at line 145 of file ui_common.c.
Referenced by ui_initialize_sio().
|
extern |
reverse color pair index
normal text reverse
Definition at line 143 of file ui_common.c.
Referenced by search(), and ui_initialize_sio().
|
extern |
red background color pair index
red background - for testing
Definition at line 150 of file ui_common.c.
Referenced by ui_initialize_sio().
|
extern |
title color pair index
border title
Definition at line 141 of file ui_common.c.
Referenced by ui_initialize_sio().
|
extern |
yellow background color pair index
yellow background - for testing
Definition at line 152 of file ui_common.c.
Referenced by ui_initialize_sio().
|
extern |
error message string for error messages
Definition at line 46 of file ui_common.c.
Referenced by enter_file_spec(), form_desc_error(), form_parse_desc(), form_process(), form_read_data(), form_write(), handle_signal(), init_view_full_screen(), mk_dir(), new_init(), new_pick(), new_view(), pad_refresh(), parse_menu_description(), ui_action_disposition(), ui_add_pair(), ui_color_from_rgb(), ui_get_event(), ui_open_log(), ui_surface_box(), ui_surface_new(), verify_dir(), verify_file(), view_cmd_processor(), view_init_input(), write_config(), and write_view_buffer().
|
extern |
error message string for error messages
Definition at line 47 of file ui_common.c.
Referenced by enter_file_spec(), form_desc_error(), form_parse_desc(), form_process(), form_read_data(), form_write(), handle_signal(), mk_dir(), new_init(), new_pick(), new_view(), parse_menu_description(), ui_add_pair(), ui_color_from_rgb(), ui_get_event(), ui_open_log(), ui_surface_box(), ui_surface_new(), verify_dir(), verify_file(), view_cmd_processor(), view_init_input(), and write_view_buffer().
|
extern |
error message string for error messages
Definition at line 48 of file ui_common.c.
Referenced by enter_file_spec(), form_desc_error(), form_parse_desc(), form_process(), form_read_data(), form_write(), handle_signal(), mk_dir(), new_init(), new_view(), parse_menu_description(), ui_add_pair(), ui_get_event(), ui_open_log(), ui_surface_box(), ui_surface_new(), verify_dir(), verify_file(), view_cmd_processor(), view_init_input(), and write_view_buffer().
|
extern |
error message string for error messages
Definition at line 49 of file ui_common.c.
Referenced by ui_open_log(), ui_timeout_prompt(), ui_update_timeout_prompt(), verify_dir(), and verify_file().
|
extern |
Definition at line 50 of file ui_common.c.
Referenced by handle_signal(), ui_action_disposition(), ui_answer_yn(), ui_destroy_curses(), ui_display_error(), ui_init(), ui_perror(), ui_shutdown(), ui_timeout_prompt(), and ui_update_timeout_prompt().
|
extern |
Definition at line 51 of file ui_common.c.
Referenced by handle_signal(), ui_action_disposition(), ui_answer_yn(), ui_destroy_curses(), ui_display_error(), ui_init(), ui_perror(), ui_shutdown(), ui_surface_addpad(), ui_surface_addwin(), ui_surface_new(), ui_timeout_prompt(), and ui_update_timeout_prompt().
|
extern |
Definition at line 30 of file ui_notcurses.c.
|
extern |
Definition at line 42 of file ui_ncurses.c.
Referenced by display_field(), display_form(), field_editor(), form_display_accept_field(), form_display_field(), form_display_fields(), form_engine(), form_post(), form_process(), init_form(), main(), menu_cmd_processor(), menu_engine(), open_pick_win(), popup_ckeys(), ui_action_disposition(), ui_answer_yn(), ui_cm_surface_destroy(), ui_display_error(), ui_init(), ui_perror(), ui_restore_wins(), ui_shutdown(), ui_timeout_prompt(), ui_tracked_sfc_box(), and ui_tracked_sfc_split_box().
|
extern |
Definition at line 37 of file ui_notcurses.c.
Referenced by ui_init(), ui_surface_box(), and ui_surface_new().
|
extern |
Definition at line 46 of file ui_ncurses.c.
Referenced by exec_objects(), fork_exec(), full_screen_shell(), ui_display_image(), ui_init(), ui_init(), and ui_shutdown().
|
extern |
Definition at line 59 of file ui_common.c.
Referenced by ui_get_event(), ui_poll_reg_read_fd(), ui_register_read_fd(), and ui_unregister_read_fd().
|
extern |