C-Menu 0.2.9
A User Interface Toolkit
Loading...
Searching...
No Matches
ui_backend.h
Go to the documentation of this file.
1#pragma once
2
3#ifdef __cplusplus
4extern "C" {
5#endif
6
7/** @defgroup ui_backend Ui Backend
8 @file ui_backend.h
9 @ingroup ui_backend
10 @brief Backend API for terminal UI library
11*/
12#define _XOPEN_SOURCE_EXTENDED 1
13#define _GNU_SOURCE
14
15#ifdef UAL_UI
16#define NCURSES_WIDECHAR 1
17#include <ncursesw/ncurses.h>
18#include <ncursesw/panel.h>
19// #include "../ui/ui_ncurses_internal.h"
20#endif
21#ifdef NOTCURSES_UI
22#include <notcurses/notcurses.h>
23// #include "../ui/ui_notcurses_internal.h"
24#endif
25#include <fcntl.h>
26#include <poll.h>
27#include <stdbool.h>
28#include <stddef.h>
29#include <stdint.h>
30#include <stdio.h>
31#include <stdlib.h>
32#include <string.h>
33#include <sys/stat.h>
34#include <sys/types.h>
35#include <time.h>
36#include <unistd.h>
37#include <wchar.h>
38
39#if defined(__has_c_attribute)
40#if __has_c_attribute(gnu::format)
41#define ATTR_FORMAT(archetype, fmt_idx, first_arg) [[gnu::format(archetype, fmt_idx, first_arg)]]
42#endif
43#endif
44
45#ifndef ATTR_FORMAT
46#if defined(__GNUC__) || defined(__clang__)
47#define ATTR_FORMAT(archetype, fmt_idx, first_arg) __attribute__((format(archetype, fmt_idx, first_arg)))
48#else
49#define ATTR_FORMAT(archetype, fmt_idx, first_arg) /* Unsupported compiler, strip attribute */
50#endif
51#endif
52
53extern int sfc_ptr;
54extern int win_ptr;
55extern bool f_ncurses_open;
56extern bool f_notcurses_open;
57// ---------------------------------------------------------------
58// Configuration
59// ---------------------------------------------------------------
60#define CCHARW_MAX 5
61#define UI_COLORS 512
62#define UI_PAIRS 512
63#define ALLWINS (uint)1000
64#define UI_SFC_MAX 30
65#define SFC_MAX 30
66#define MAXLEN 256
67extern char em0[MAXLEN]; /**< error message string for error messages */
68extern char em1[MAXLEN]; /**< error message string for error messages */
69extern char em2[MAXLEN]; /**< error message string for error messages */
70extern char em3[MAXLEN]; /**< error message string for error messages */
71// ---------------------------------------------------------------
72// Surface enums
73// ---------------------------------------------------------------
74#define SUB_SURFACE_LIST(X)
75 X(BOX)
76 X(WIN)
77 X(WIN2)
78 X(LNNO)
79 X(CMDLN)
80 X(PAD)
81 X(VIEWPORT)
82 X(WIN3)
83#define AS_ENUM(NAME) NAME,
84typedef enum {
85 SUB_SURFACE_LIST(AS_ENUM)
87} ss_t;
88#define AS_STRINGS(NAME) #NAME,
89static const char *ss_n[] = {
90 SUB_SURFACE_LIST(AS_STRINGS)};
91#define CHYRON_KEY_MAXLEN 64 /**< maximum length of the command text */
92#define CHYRON_KEYS 20 /**< maximum number of key bindings for the chyron */
93
94#define MOUSE_ACTION(X)
95 X(UI_MOUSE_NONE)
96 X(UI_MOUSE_PRESS)
97 X(UI_MOUSE_RELEASE)
98 X(UI_MOUSE_DRAG)
99 X(UI_MOUSE_SCROLL_UP)
100 X(UI_MOUSE_SCROLL_DOWN)
101#define AS_ENUM(NAME) NAME,
102typedef enum {
103 MOUSE_ACTION(AS_ENUM)
105} UiMouseAction;
106
107typedef uint32_t UiKey;
108// ---------------------------------------------------------------
109// File Types
110// ---------------------------------------------------------------
111#define FILE_TYPE_LIST(X)
112 X(FT_TEXT)
113 X(FT_IMAGE)
114 X(FT_VIDEO)
115 X(FT_AUDIO)
116 X(FT_BINARY_GARBAGE)
117 X(FT_EMPTY)
118 X(FT_UNREADABLE)
119#define AS_ENUM(NAME) NAME,
120typedef enum {
121 FILE_TYPE_LIST(AS_ENUM)
123} FileType;
124// ---------------------------------------------------------------
125// Input
126// ---------------------------------------------------------------
127
128typedef struct {
130 uint32_t ch; /* Unicode codepoint when key == UIKEY_CHAR */
131 bool alt;
132 bool ctrl;
133 bool shift;
134 uint y;
135 uint x;
136 bool active;
138 ss_t in_win;
140 UiMouseAction mouse_action;
142 char keybound[16];
143} UiEvent;
144
145typedef struct {
146 union {
147 uint32_t u32;
148 wchar_t w32;
149 char c[4];
150 };
151} GCluster;
152
153// ---------------------------------------------------------------
154// Multiplexed input
155// ---------------------------------------------------------------
156// Number of registry entries for external file descriptors
157#define MAX_EXT_FDS 8
158// #define UIKEY_STREAM_DATA (-2) (octal 740)
159// registry for external file descriptors
160typedef struct {
161 int fd;
163} ext_fd_reg_t;
164
165// UI input context structure
166typedef struct {
169 ext_fd_reg_t ext_fds[MAX_EXT_FDS];
170 nfds_t ext_nfds;
171} ui_context_t;
172
173extern ui_context_t ui_ctx;
174
175// ---------------------------------------------------------------
176
177// Miscelaneous UI Structures
178typedef struct UiRuntime UiRuntime;
179typedef struct SIO SIO;
180typedef struct UiSurface UiSurface;
181typedef struct UiSplitSurface UiSplitSurface;
182typedef union UiChannels UiChannels;
183typedef struct UiMB UiMB;
184typedef uint16_t UiStyle;
185typedef uint16_t UiPairIdx;
186typedef uint UiColorIdx;
187typedef struct ncinput NcInput;
188typedef struct ncvisual NcVisual;
189typedef struct ncplane NcPlane;
190
191typedef struct {
192 wchar_t wc; // Wide character 4-bytes
193 short attrs; // attributes 2-bytes
194 short color_pair; // color pair index 2-bytes
195} UiCchar64; // total 8-bytes
196
197#define BORDER_STYLE(X)
198 X(UI_BORDER_NONE)
199 X(UI_BORDER_SINGLE)
200 X(UI_BORDER_DOUBLE)
201 X(UI_BORDER_ROUNDED)
202 X(UI_BORDER_HEAVY)
203#define AS_ENUM(NAME) NAME,
204typedef enum {
205 BORDER_STYLE(AS_ENUM)
207} UiBorderStyle;
208
209typedef struct {
210 int y;
211 int x;
212 int lines;
213 int cols;
214} UiRect;
215// ---------------------------------------------------------------
216// Logging
217// ---------------------------------------------------------------
218#define ANSI_RESET "\033[0m"
219#define MAX_LOG_SIZE (10 * 1024 * 1024)
220#define MAX_LOG_REC_LEN 4096
221#define LOG_LEVEL_LIST(X)
222 X(FATAL)
223 X(ERROR)
224 X(WARN)
225 X(INFO)
226 X(VERBOSE)
227 X(DEBUG)
228 X(SILENT)
229#define AS_ENUM(NAME) NAME,
230typedef enum {
231 LOG_LEVEL_LIST(AS_ENUM)
233} UiLogLevel;
234typedef struct {
235 int fd;
237 UiLogLevel min_level;
239 char timestamp[32];
242} UiLogContext;
243extern UiLogContext ui_log_ctx;
244
245#ifdef UAL_UI
246// ---------------------------------------------------------------
247// UAL_UI Specific
248// ---------------------------------------------------------------
249extern bool f_curses_open;
250typedef cchar_t UiCell;
251typedef struct {
252 uint r, g, b;
253} STDRGB;
254typedef struct {
255 int r, g, b;
256} RGB;
257struct UiRuntime {
258 SCREEN *screen; /**< NCurses SCREEN created by newterm() */
259 FILE *tty_fp; /**< TTY file handle opened by ui_init() */
260 int tty_fd; /**< TTY file descriptor opened by ui_init() */
261 bool mouse_enabled;
262 bool alt_screen;
263 bool cursor_visible;
264 UiBorderStyle border_style;
265 uint lines;
266 uint cols;
267 PANEL *panel_main;
268 SIO *sio;
269};
270struct UiSurfaceMeta {
271 unsigned int y;
272 unsigned int x;
273 unsigned int lines;
274 unsigned int cols;
275 cchar_t bkgd_cell;
276 bool hidden;
277 char name[MAXLEN];
278 char title[MAXLEN];
279};
280struct UiSurface {
281 union {
282 struct { // DEPRECATED - will be removed
283 PANEL *box_pan;
284 PANEL *win_pan;
285 PANEL *win2_pan;
286 PANEL *lnno_pan;
287 PANEL *cmdln_pan;
288 PANEL *pad_pan;
289 PANEL *viewport_pan;
290 PANEL *plane2_pan;
291 }; // END DEPRECATION
292 struct {
293 PANEL *mpan[SUB_SFC_MAX];
294 };
295 };
296 union {
297 struct { // DEPRECATED - will be removed
298 WINDOW *box;
299 WINDOW *win;
300 WINDOW *win2;
301 WINDOW *lnno;
302 WINDOW *cmdln;
303 WINDOW *pad;
304 WINDOW *viewport;
305 WINDOW *plane2;
306 }; // END DEPRECATION
307 struct {
308 WINDOW *mwin[SUB_SFC_MAX];
309 };
310 };
311 struct UiRuntime *runtime;
312 struct UiSurfaceMeta meta[SUB_SFC_MAX];
313 struct UiSurface *parent;
314 int sfc_idx;
315 int sub_cnt;
316};
317union UiChannels {
318 struct {
319 union {
320 struct {
321 uint8_t b_b, b_g, b_r, b_a;
322 };
323 uint32_t bargb;
324 };
325 union {
326 struct {
327 uint8_t f_b, f_g, f_r, f_a;
328 };
329 uint32_t fargb;
330 };
331 };
332 uint64_t fb;
333};
334struct UiStyle {
335 wchar_t wstr[5];
336 attr_t attrs;
337 short cp;
338};
339#else
340// ---------------------------------------------------------------
341// Notcurses Specific
342// ---------------------------------------------------------------
343typedef struct {
344 uint8_t r, g, b;
345} STDRGB;
346typedef struct {
347 union {
348 struct {
349 uint8_t b, g, r, a;
350 };
351 uint32_t color;
352 };
353} RGB;
354
355struct UiRuntime {
356 struct notcurses *nc;
357 bool mouse_enabled;
358 bool alt_screen;
359 bool cursor_visible;
360 UiBorderStyle border_style;
361 unsigned int lines;
362 unsigned int cols;
363 FILE *tty_fp;
364 int tty_fd;
365 SIO *sio;
366};
367
368struct UiSurfaceMeta {
369 unsigned int y;
370 unsigned int x;
371 unsigned int lines;
372 unsigned int cols;
373 struct nccell bkgd_cell;
374 bool hidden;
375 char name[MAXLEN];
376 char title[MAXLEN];
377};
378
379struct UiSurface {
380 union {
381 struct { // DEPRECATED - will be removed
382 struct ncplane *box;
383 struct ncplane *win;
384 struct ncplane *win2;
385 struct ncplane *lnno;
386 struct ncplane *cmdln;
387 struct ncplane *pad;
388 struct ncplane *viewport;
389 struct ncplane *plane2;
390 }; // END DEPRECATION
391 struct {
392 struct ncplane *mplane[SUB_SFC_MAX];
393 };
394 };
395 struct UiSurfaceMeta meta[SUB_SFC_MAX];
396 struct UiRuntime *runtime;
397 struct UiSurface *parent;
398 int sfc_idx;
399 int sub_cnt;
400};
401
402union UiChannels {
403 struct {
404 union {
405 struct {
406 uint8_t b_b, b_g, b_r, b_a;
407 };
408 uint32_t bargb;
409 };
410 union {
411 struct {
412 uint8_t f_b, f_g, f_r, f_a;
413 };
414 uint32_t fargb;
415 };
416 };
417 uint64_t fb;
418};
419
420struct UiCell {
421 union {
422 uint32_t gcluster;
423 uint32_t u32;
424 // wchar_t u16[2];
425 uint8_t u8[4];
426 char c[4];
427 };
428 char gcluster_backstop;
429 uint8_t width;
430 uint16_t stylemask;
431 uint32_t chhannels;
432 union {
433 struct {
434 union {
435 struct {
436 uint8_t b_b, b_g, b_r, b_a;
437 };
438 uint32_t bargb;
439 };
440 union {
441 struct {
442 uint8_t f_b, f_g, f_r, f_a;
443 };
444 uint32_t fargb;
445 };
446 };
447 uint64_t channels;
448 };
449};
450
451// ---------------------------------------------------------------------------
452// About typedefs
453// ---------------------------------------------------------------------------
454// Linus doesn't consider typedefs for inclusion into the linux kernel because
455// they can obscure the underlying type leading to performance destroying
456// pass-by-value mistakes. We use them to improve code readibility and
457// maintainability while aware of that caveat.
458typedef uint16_t attr_t;
459typedef nccell UiCell;
460typedef struct ncplane NcPlane;
461typedef struct notcurses NotCurses;
462typedef struct notcurses_options NotCursesOptions;
463typedef struct ncplane_options NcPlaneOptions;
464typedef struct UiPair UiPair;
465typedef struct UiColor UiColor;
466extern NcPlane *stdplane;
467extern uint LINES, COLS;
468#define ERR -1
469#define CELL_CHAR_INITIALIZER(c) {
470 .gcluster = (c),
471 .gcluster_backstop = 0,
472 .stylemask = 0,
473 .channels = 0, \
474}
475#define CELL_INITIALIZER(c, s, chan) {
476 .gcluster = (c),
477 .gcluster_backstop = 0,
478 .stylemask = (s),
479 .channels = (chan), \
480}
481#endif
482
483extern UiSurface *stdsfc;
484
485typedef struct {
486 UiBorderStyle border_style;
487 char *log_file; /**< log_file name or NULL for no logging */
488 UiLogLevel log_level; /**< log_level FATAL, ERROR, WARN, INFO, VERBOSE,
489 DEBUG, SILENT */
490} UiConfig;
491
492typedef enum {
493 UI_BACKEND_NCURSES = 0, /**< NCurses / NCursesW backend */
494 UI_BACKEND_NOTCURSES /**< NotCurses backend */
495} UiBackend;
496
497typedef struct {
498 bool truecolor; /**< backend can display 24-bit RGB colors */
499 bool palette256; /**< backend supports at least 256 palette entries */
500 bool mouse; /**< backend can deliver mouse events */
501 bool unicode; /**< backend handles full Unicode / UTF-8 correctly */
502 bool resize; /**< backend emits UIKEY_RESIZE on terminal resize */
503 int color_pairs; /**< max simultaneous color pairs; 0 = unlimited */
504 bool pad_relative_yx; /**< pad coordinates relative to viewport */
505} UiCaps;
506
507extern int click_y; /**< the y coordinate of a mouse click */
508extern int click_x; /**< the x coordinate of a mouse click */
509
510// ---------------------------------------------------------------
511// Colors
512// ---------------------------------------------------------------
513extern ushort cp_default; /**< default color pair index */
514extern ushort cp_box; /**< box color pair index */
515extern ushort cp_ind; /**< indicator color pair index */
516extern ushort cp_bold; /**< bold color pair index */
517extern ushort cp_title; /**< title color pair index */
518extern ushort cp_highlight; /**< highlight color pair index */
519extern ushort cp_fill_char; /**< fill character color pair index */
520extern ushort cp_brackets; /**< color pair index for field brackets */
521extern ushort cp_nt; /**< normal color pair index */
522extern ushort cp_nt_rev; /**< reverse color pair index */
523extern ushort cp_nt_hl; /**< highlight color pair index */
524extern ushort cp_nt_hl_rev; /**< highlight reverse color pair index */
525extern ushort cp_ln_fg; /**< line number color pair index */
526extern ushort cp_ln_bg; /**< line number background color pair index */
527extern ushort cp_cmdln_fg; /**< command line number color pair index */
528extern ushort cp_cmdln_bg; /**< command line number background color pair index */
529extern ushort cp_black; /**< red background color pair index */
530extern ushort cp_red; /**< red background color pair index */
531extern ushort cp_green; /**< greenbackground color pair index */
532extern ushort cp_yellow; /**< yellow background color pair index */
533extern ushort cp_blue; /**< blue background color pair index */
534extern ushort cp_cyan; /**< cyan background color pair index */
535extern ushort cp_magenta; /**< magenta background color pair index */
536extern ushort cp_white; /**< white background color pair index */
537extern uint clr_idx; /**< current color index */
538extern uint clr_cnt; /**< number of colors used */
539extern uint clr_pair_idx; /**< current color pair index */
540extern uint clr_pair_cnt; /**< number of color pairs supported by the terminal */
541
542extern char const colors_text[][10]; /**< color codes for the 16 basic colors */
543
544#define COLOR_LEN 8 /**< length of color code strings */
545#define FG_COLOR 2 /**< default foreground color */
546#define BG_COLOR 0 /**< default background color */
547#define BO_COLOR 1 /**< default bold foreground color */
548#define LN_COLOR 4 /**< default line number color */
549#define LN_BG_COLOR 7 /**< default line number background */
550
551typedef enum {
594} ColorsEnum;
595
596// ---------------------------------------------------------------
597// Borders
598// ---------------------------------------------------------------
599
600/** BOX WIDE UNICODE CODEPOINTS */
601
602extern const wchar_t *border_single;
603extern const wchar_t *border_double;
604extern const wchar_t *border_rounded;
605extern const wchar_t *border_heavy;
606extern const wchar_t *border_none;
607
608typedef union border_wide {
609 wchar_t str[11];
610 struct {
611 wchar_t ho; /**< horizontal line */
612 wchar_t ve; /**< vertical line */
613 wchar_t lt; /**< left tee */
614 wchar_t rt; /**< right tee */
615 wchar_t tt; /**< top tee */
616 wchar_t bt; /**< bottom tee */
617 wchar_t cr; /**< cross */
618 wchar_t tl; /**< top left */
619 wchar_t tr; /**< top right */
620 wchar_t bl; /**< bottom left */
621 wchar_t br; /**< bottom right */
622 };
623} BorderWide;
624
625// Temporary macros to access the border wide characters more easily
626
627#define bw_ho bw.ho
628#define bw_ve bw.ve
629#define bw_lt bw.lt
630#define bw_rt bw.rt
631#define bw_tt bw.tt
632#define bw_bt bw.bt
633#define bw_cr bw.cr
634#define bw_tl bw.tl
635#define bw_tr bw.tr
636#define bw_bl bw.bl
637#define bw_br bw.br
638
639extern BorderWide bw;
640extern const wchar_t *bw_rtl;
641extern const wchar_t *bw_rtr;
642extern const wchar_t *bw_rbl;
643extern const wchar_t *bw_rbr;
644extern const wchar_t *bw_sp;
645extern const wchar_t *bw_ra;
646extern const wchar_t *bw_la;
647extern const wchar_t *bw_ua;
648extern const wchar_t *bw_da;
649extern const wchar_t *bw_ran;
650extern const wchar_t *bw_lan;
651extern const wchar_t *bw_chk;
652extern const wchar_t *bw_h09;
653
654extern UiCell cell_default;
655extern UiCell cell_fill_char;
656extern UiCell cell_brktl;
657extern UiCell cell_brktr;
658extern UiCell cell_nt;
659extern UiCell cell_nt_rev;
660extern UiCell cell_nt_hl;
661extern UiCell cell_nt_hl_rev;
662extern UiCell cell_box;
663extern UiCell cell_ind;
664extern UiCell cell_cmdln;
665extern UiCell cell_title;
666extern UiCell cell_ln;
667extern UiCell cell_ran;
668extern UiCell cell_chk;
669extern UiCell cell_ls;
670extern UiCell cell_rs;
671extern UiCell cell_ts;
672extern UiCell cell_bs;
673extern UiCell cell_tl;
674extern UiCell cell_tr;
675extern UiCell cell_ho;
676extern UiCell cell_ve;
677extern UiCell cell_bl;
678extern UiCell cell_br;
679extern UiCell cell_lt;
680extern UiCell cell_rt;
681extern UiCell cell_tt;
682extern UiCell cell_bt;
683extern UiCell cell_cr;
684extern UiCell cell_sp;
685extern UiCell cell_black_bg;
686extern UiCell cell_red_bg;
687extern UiCell cell_green_bg;
688extern UiCell cell_yellow_bg;
689extern UiCell cell_blue_bg;
690extern UiCell cell_cyan_bg;
691extern UiCell cell_magenta_bg;
692extern UiCell cell_white_bg;
693
694#define XTERM_256COLOR 1
695#if defined(XTERM_256COLOR)
696#define KEY_ALTINS 0x223
697#define KEY_ALTHOME 0x21e
698#define KEY_ALTPGUP 0x232
699#define KEY_ALTDEL 0x20e
700#define KEY_ALTEND 0x219
701#define KEY_ALTPGDN 0x22d
702#define KEY_ALTUP 0x23d
703#define KEY_ALTLEFT 0x228
704#define KEY_ALTDOWN 0x214
705#define KEY_ALTRIGHT 0x237
706#elif defined(XTERM_GHOSTTY)
707#define KEY_ALTINS 0x228
708#define KEY_ALTHOME 0x223
709#define KEY_ALTPGUP 0x237
710#define KEY_ALTDEL 0x213
711#define KEY_ALTEND 0x21e
712#define KEY_ALTPGDN 0x232
713#define KEY_ALTUP 0x242
714#define KEY_ALTLEFT 0x22d
715#define KEY_ALTDOWN 0x219
716#define KEY_ALTRIGHT 0x23c
717#endif
718
719static inline int unicode_to_utf8_gcluster(uint32_t cp, GCluster *g) {
720 if (cp <= 0x7F) {
721 g->c[0] = (char)cp;
722 g->c[1] = '\0';
723 return 1;
724 } else if (cp <= 0x7FF) {
725 g->c[0] = (char)(0xC0 | (cp >> 6));
726 g->c[1] = (char)(0x80 | (cp & 0x3F));
727 g->c[2] = '\0';
728 return 2;
729 } else if (cp <= 0xFFFF) {
730 g->c[0] = (char)(0xE0 | (cp >> 12));
731 g->c[1] = (char)(0x80 | ((cp >> 6) & 0x3F));
732 g->c[2] = (char)(0x80 | (cp & 0x3F));
733 g->c[3] = '\0';
734 return 3;
735 } else if (cp <= 0x10FFFF) {
736 g->c[0] = (char)(0xF0 | (cp >> 18));
737 g->c[1] = (char)(0x80 | ((cp >> 12) & 0x3F));
738 g->c[2] = (char)(0x80 | ((cp >> 6) & 0x3F));
739 g->c[3] = (char)(0x80 | (cp & 0x3F));
740 return 4;
741 }
742 return 0;
743}
744
745struct SIO {
746 double red_gamma; /**< red gamma correction value */
747 double green_gamma; /**< green gamma correction value */
748 double blue_gamma; /**< blue gamma correction value */
749 double gray_gamma; /**< gray gamma correction value */
750 uint32_t black; /**< black */
751 uint32_t red; /**< red */
752 uint32_t green; /**< green */
753 uint32_t yellow; /**< yellow */
754 uint32_t blue; /**< blue */
755 uint32_t magenta; /**< magenta */
756 uint32_t cyan; /**< cyan */
757 uint32_t white; /**< white */
758 uint32_t orange; /**< orange */
759 uint32_t bblack; /**< bold black */
760 uint32_t bred; /**< bold red */
761 uint32_t bgreen; /**< bold green */
762 uint32_t byellow; /**< bold yellow */
763 uint32_t bblue; /**< bold blue */
764 uint32_t bmagenta; /**< bold magenta */
765 uint32_t bcyan; /**< bold cyan */
766 uint32_t bwhite; /**< bold white */
767 uint32_t borange; /**< bold orange */
768 uint32_t abg; /**< background with alpha */
769 uint32_t fg; /**< foreground color */
770 uint32_t bg; /**< background color */
771 uint32_t box_fg; /**< box foreground */
772 uint32_t box_bg; /**< box background */
773 uint32_t ind_fg; /**< indicator foreground */
774 uint32_t ind_bg; /**< indicator background */
775 uint32_t brackets_fg; /**< brackets foreground */
776 uint32_t brackets_bg; /**< brackets background */
777 uint32_t fill_char_fg; /**< fill character foreground */
778 uint32_t fill_char_bg; /**< fill character background */
779 uint32_t ln_fg; /**< line number color index */
780 uint32_t ln_bg; /**< line number background index */
781 uint32_t cmdln_fg; /**< command line color index */
782 uint32_t cmdln_bg; /**< command line background index */
783 uint32_t nt_fg; /**< normal text foreground */
784 uint32_t nt_bg; /**< normal text background */
785 uint32_t nt_rev_fg; /**< normal text reverse foreground */
786 uint32_t nt_rev_bg; /**< normal text reverse background */
787 uint32_t nt_hl_fg; /**< normal text highlight foreground */
788 uint32_t nt_hl_bg; /**< normal text highlight background */
789 uint32_t nt_hl_rev_fg; /**< normal text highlight reverse foreground */
790 uint32_t nt_hl_rev_bg; /**< normal text highlight reverse background */
791 uint32_t title_fg; /**< title foreground */
792 uint32_t title_bg; /**< title background */
793 uint32_t ran_fg; /**< right angle foreground */
794 uint32_t ran_bg; /**< right angle background */
795 FILE *stdin_fp; /**< stdin stream pointer */
796 FILE *stdout_fp; /**< stdout stream pointer */
797 FILE *stderr_fp; /**< stderr stream pointer */
798 FILE *tty_fp; /**< terminal device stream pointer */
799 int stdin_fd; /**< stdin file descriptor */
800 int stdout_fd; /**< stdout file descriptor */
801 int stderr_fd; /**< stderr file descriptor */
802 int tty_fd; /**< terminal device file descriptor */
803 uint clr_cnt; /**< number of colors currently in use */
804 uint clr_pair_cnt; /**< number of color pairs currently in use */
805 uint clr_idx; /**< current color index */
806 uint clr_pair_idx; /**< current color pair index */
807 char brackets[3]; /**< field brackets for Form */
808 char fill_char[2]; /**< fill character for Form fields */
809 char border; /**< Rounded, Single, Double, None */
810 char tty_name[MAXLEN]; /**< name of the terminal device */
811 ushort cp_default; /**< default color pair index */
812 ushort cp_fill_char; /**< fill character color pair index */
813 ushort cp_brackets; /**< brackets color pair index */
814 ushort cp_nt; /**< normal text color pair index */
815 ushort cp_nt_rev; /**< reverse color pair index */
816 ushort cp_nt_hl; /**< highlight color pair index */
817 ushort cp_nt_hl_rev; /**< reverse highlight color pair index */
818 ushort cp_box; /**< box color pair index */
819 ushort cp_ind; /**< indicator color pair index */
820 ushort cp_cmdln; /**< command line color pair index */
821 ushort cp_title; /**< title color pair index */
822 ushort cp_ln; /**< line number color pair index */
823 ushort cp_ran; /**< right angle color pair index */
824 ushort cp_chk; /**< checkmark color pair index */
825 ushort cp_bold; /**< bold color pair index */
826}; /**< Shared Internal Objects */
827/* available to the application and the backend implementation */
828
829typedef struct {
831 UiSurface *sfc;
832} UiMultiMedia;
833
834/* @name UI Backend API
835 @ingroup ui_backend
836 @details The following functions define the API for implementing a backend
837 for the terminal UI library. These functions cover the initialization and
838 shutdown of the UI runtime, management of surfaces, drawing operations,
839 input handling, and cursor control. Each function is designed to be
840 implemented by the backend according to the specifications provided in
841 the function comments. By implementing these functions, you can create a
842 functional backend that allows the terminal UI library to render and
843 interact with users effectively.
844 @note: ui_init should return NULL on failure and set an appropriate error
845 message that can be retrieved by the caller. The error message should provide
846 details about the reason for the failure, such as issues with terminal
847 capabilities, resource allocation failures, or unsupported features. This
848 allows the caller to handle initialization errors gracefully and provide
849 feedback to the user.
850 @see ui_backend.h
851*/
852// -------------------------------------------------------------------------------
853// Lifetime Management
854// -------------------------------------------------------------------------------
855void ui_get_caps(UiCaps *caps);
856UiBackend ui_get_backend();
857void ui_initialize_sio(SIO *sio);
858UiRuntime *ui_init(const UiConfig *config, SIO *sio);
859UiSurface *ui_surface_new(ss_t w, UiSurface *parent, ss_t p, uint lines, uint cols, uint y, uint x);
860UiSurface *ui_surface_box(UiSurface *parent, ss_t p, uint lines, uint cols, uint y, uint x, const char *title);
861int ui_tracked_sfc_box(uint wlines, uint wcols, uint wbegy, uint wbegx, const char *wtitle);
862int ui_tracked_sfc_split_box(uint wlines, uint wcols, uint split_y, uint split_x, uint wbegy, uint wbegx, const char *wtitle);
863int ui_surface_addwin(UiSurface *s, ss_t w, ss_t p, uint lines, uint cols, uint y, uint x);
864int ui_surface_addpad(UiSurface *s, ss_t w, ss_t view_win, uint lines, uint cols, uint y, uint x, bool hidden);
865void ui_surface_destroy(UiSurface *s);
866int ui_cm_surface_destroy(UiSurface *sfc);
867int ui_border_draw(UiSurface *sfc, ss_t w);
868int ui_border_title(UiSurface *sfc, ss_t w, const char *title);
869int ui_border_ysplit(UiSurface *sfc, ss_t w, uint y);
870int ui_border_ysplit_text(UiSurface *sfc, char *text, uint separator_line);
871void ui_shutdown();
872int ui_suspend();
873int ui_resume();
874void ui_endwin();
875void ui_restore_wins();
876int ui_surface_show(UiSurface *s, ss_t w);
877int ui_surface_hide(UiSurface *s, ss_t w);
878int ui_surface_move(UiSurface *s, ss_t w, uint y, uint x);
879int ui_surface_resize(UiSurface *s, ss_t w, uint lines, uint cols);
880int ui_wresize(UiSurface *s, ss_t w, uint lines, uint cols);
881// -------------------------------------------------------------------------------
882// Display Management
883// -------------------------------------------------------------------------------
884int ui_wclrtoeol(UiSurface *s, ss_t w);
885int ui_wclrtobot(UiSurface *s, ss_t w);
886int ui_wclear(UiSurface *s, ss_t w);
887int ui_werase(UiSurface *s, ss_t w);
888int ui_clear();
889int ui_erase();
890int ui_wshow(UiSurface *s, ss_t w);
891int ui_whide(UiSurface *s, ss_t w);
892int ui_top_surface(UiSurface *s, ss_t w);
893int ui_setscrreg(UiSurface *s, ss_t w, uint top, uint bottom);
894int ui_scrollok(UiSurface *s, ss_t w, bool enable);
895int ui_keypad(UiSurface *s, ss_t w, bool enable);
896int ui_idlok(UiSurface *s, ss_t w, bool enable);
897int ui_idcok(UiSurface *s, ss_t w, bool enable);
898int ui_bkgd(UiSurface *s, ss_t w, const UiCell *cell);
899int ui_bkgdset(UiSurface *s, ss_t w, const UiCell *cell);
900int ui_bkgrnd(UiSurface *s, ss_t w, const UiCell *cell);
901int ui_bkgrndset(UiSurface *s, ss_t w, const UiCell *cell);
902void ui_update_panels();
903int ui_doupdate();
904void ui_render();
905int ui_wnoutrefresh(UiSurface *s, ss_t w);
906int ui_mousemask(int mask);
907int ui_mice_enable(int mask);
908int ui_cursor_enable(UiSurface *s, ss_t w, bool visible);
909int ui_cursor_enable_yx(UiSurface *s, ss_t w, uint y, uint x, bool visible);
910int ui_curs_set(int visibility);
911int ui_wmove(UiSurface *s, ss_t w, uint y, uint x);
912int ui_wscrl(UiSurface *s, ss_t w, int rows);
913int ui_cursor_move(UiSurface *s, ss_t w, uint y, uint x);
914int ui_get_event_no_mouse(UiSurface *surface, ss_t w, UiEvent *ev);
915int ui_getch();
916int ui_immedok(UiSurface *s, ss_t w, bool enable);
917int ui_prefresh(UiSurface *s, ss_t w, int pminrow, int pmincol, int sminrow, int smincol, int smaxrow, int smaxcol);
918int ui_plane_cpy(NcPlane *dst, NcPlane *src, int dst_y, int dst_x, int src_y, int src_x, int ylen, int xlen);
919// ---------------------------------------------------------------
920// Screen Navigation
921// ---------------------------------------------------------------
922void ui_get_screen_size(uint *lines, uint *cols);
923void ui_getyx(UiSurface *s, ss_t w, uint *lines, uint *cols);
924void ui_getmaxyx(UiSurface *s, ss_t w, uint *lines, uint *cols);
925int ui_getmaxx(UiSurface *s, ss_t w);
926int ui_getmaxy(UiSurface *s, ss_t w);
927const char *ui_sub_surface_str(ss_t w);
928// -------------------------------------------------------------------------------
929// Drawing
930// -------------------------------------------------------------------------------
931int ui_draw_ch(UiSurface *s, ss_t w, const char c);
932int ui_draw_ch_yx(UiSurface *s, ss_t w, uint y, uint x, const char c);
933int ui_draw_text(UiSurface *s, ss_t w, uint y, uint x, const char *text);
934int ui_draw_text_n(UiSurface *s, ss_t w, uint y, uint x, const char *text, int m);
935int ui_draw_text_fill(UiSurface *s, ss_t w, uint y, uint x, const char *text, int m);
936int ui_draw_hline(UiSurface *s, ss_t w, uint y, uint x, uint len, const UiStyle *style);
937
938/** @brief Legend for drawing functions
939 * @verbatim
940 * mvwaddch()
941 * ch character to add
942 * mvwaddnstr()
943 * n... at most n characters
944 * str string
945 * mvwadd_wchnstr()
946 * mv.... ....... move the cursor to the specified position before drawing
947 * ..w... ....... destination window or plane
948 * ...add ....... action
949 * ...... wch.... wide character cchar_t
950 * ...... ...n... at most n characters
951 * ...... ....str string
952 * @end verbatim
953 * @param s The UiSurface to draw on.
954 * @param w The sub-surface identifier (ss_t) to draw on.
955 * @param y
956 * @param x
957 * @param c character
958 * @param wc wide character
959 * @param text string
960 * @param cell
961 * @param m maximum number of characters
962 * @return 0 on success, or a negative error code on failure.
963 */
964int ui_waddch(UiSurface *s, ss_t w, const char c);
965int ui_mvwaddch(UiSurface *s, ss_t w, uint y, uint x, const char c);
966int ui_waddstr(UiSurface *s, ss_t w, const char *text);
967int ui_mvaddstr(UiSurface *s, ss_t w, uint y, uint x, const char *text);
968int ui_mvwaddstr(UiSurface *s, ss_t w, uint y, uint x, const char *text);
969int ui_waddnstr(UiSurface *s, ss_t w, const char *text, int m);
970int ui_mvwaddstr(UiSurface *s, ss_t w, uint y, uint x, const char *text);
971int ui_mvwaddstr_fill(UiSurface *s, ss_t w, uint y, uint x, const char *str, int m);
972int ui_mvwaddnstr(UiSurface *s, ss_t w, uint y, uint x, const char *text, int m);
973int ui_waddwstr(UiSurface *s, ss_t w, const wchar_t *wstr);
974int ui_mvwaddwstr(UiSurface *s, ss_t w, uint y, uint x, const wchar_t *wstr);
975int ui_waddnwstr(UiSurface *s, ss_t w, const wchar_t *wstr, int m);
976int ui_mvwaddnwstr(UiSurface *s, ss_t w, uint y, uint x, const wchar_t *wstr, int m);
977int ui_wadd_wch(UiSurface *s, ss_t w, const UiCell *cell);
978int ui_mvwadd_wch(UiSurface *s, ss_t w, uint y, uint x, const UiCell *cell);
979int ui_wadd_wchstr(UiSurface *s, ss_t w, const UiCell *cell);
980int ui_mvwadd_wchstr(UiSurface *s, ss_t w, uint y, uint x, const UiCell *cell);
981int ui_wadd_wchnstr(UiSurface *s, ss_t w, const UiCell *cell, uint m);
982int ui_mvwadd_wchnstr(UiSurface *s, ss_t w, uint y, uint x, const UiCell *cell, uint m);
983// ---------------------------------------------------------------
984// Wide Character Cell conversions
985// ---------------------------------------------------------------
986UiCell ui_cell_from_ucp(const wchar_t *ucp, const uint32_t *fg, const uint32_t *bg);
987void ui_mbc_to_wc(wchar_t wc[2], const char mbc);
988wchar_t *ui_mbstr_to_wcstr(const char *mb_str);
989// ---------------------------------------------------------------
990// Color handling
991// ---------------------------------------------------------------
992void ui_apply_gamma(RGB *rgb);
993int ui_chg_color(uint16_t color_idx, uint32_t *color);
994uint32_t ui_get_color(uint16_t color_idx);
995RGB ui_hex_to_rgb(char *s);
996bool ui_init_clr_palette(SIO *sio);
997int ui_pair_from_hex(const char *fg, const char *bg);
998uint ui_rgb_to_xterm256_idx(RGB *rgb);
999RGB ui_xterm256_idx_to_rgb(uint idx);
1000// ---------------------------------------------------------------
1001// Error handling
1002// ---------------------------------------------------------------
1003int ui_display_error(char *msg0, char *msg1, char *msg2, char *msg3);
1004bool ui_action_disposition(char *title, char *action_str);
1005void ui_abend(int ec, char *s);
1006int ui_answer_yn(char *msg0, char *msg1, char *msg2, char *msg3);
1007// ---------------------------------------------------------------
1008// Miscelaneous
1009// ---------------------------------------------------------------
1010void fast_exit(UiSurface *s);
1011int ui_perror(char *emsg_str);
1012FileType file_type(const char *filename);
1013int utf8_decode(const unsigned char *s, uint32_t *codepoint);
1014void ui_parse_ansi(char *ansi_str, attr_t *attr, uint *cpx);
1015void ui_def_prog_mode();
1016// -------------------------------------------------------------------------------
1017// Multiplexed input
1018// -------------------------------------------------------------------------------
1019void ui_register_read_fd(int fd, int token_id);
1020void ui_unregister_read_fd(int fd);
1021int ui_timeout_prompt(char *msg0, char *msg1, uint timeout_ms, uint timeout_secs);
1022int ui_update_timeout_prompt(UiSurface *s, ss_t w, uint timeout_ms);
1023int ui_poll_reg_read_fd(int timeout_ms);
1024void ui_flush_input();
1025// ---------------------------------------------------------------
1026// NOTCURSES Specific
1027// ---------------------------------------------------------------
1028#ifdef NOTCURSES_UI
1029struct UiColor {
1030 union {
1031 struct {
1032 uint8_t b, g, r;
1033 };
1034 uint32_t rgb;
1035 };
1036};
1037struct UiPair {
1038 uint fg;
1039 uint bg;
1040};
1041extern UiCell bkgd_cell;
1042extern uint LINES, COLS;
1043void ui_cursor_yx(int *y, int *x);
1044void ui_abs_yx(UiSurface *s, ss_t w, int *y, int *x);
1045int mk_chimera(UiCell *cell, char c);
1046// How do you convert "NCurses" to "Notcurses"?
1047// Insert "ot" after "N".
1048int ui_init_color(uint16_t color, uint8_t r, uint8_t g, uint8_t b);
1049int ui_color_content(uint16_t color, uint8_t *r, uint8_t *g, uint8_t *b);
1050int ui_init_pair(uint16_t pair, uint fg, uint bg);
1051uint64_t ui_get_channels_from_pair(uint16_t pair);
1052int ui_get_pair(uint16_t pair, uint *fg, uint *bg);
1053uint ui_init_color_hex(char *s);
1054uint ui_add_pair(uint fg, uint bg);
1055uint ui_color_from_rgb(RGB *rgb);
1056uint ui_add_color_hex(char *s);
1057int ui_pair_content(uint16_t pair, uint *fg, uint *bg);
1058int ui_wch_to_utf8(const wchar_t fill_ch);
1059uint ui_get_plane_idx(UiSurface *s, NcPlane *n);
1060NcPlane *ui_ncplane_clicked(UiSurface *s, ss_t w, NcInput *ni);
1061struct ncvisual *ui_display_image(struct notcurses *nc, UiMultiMedia *mm, const char *image_file, int y, int x, int begy, int begx);
1062uint ui_mbstr_to_cellstr(UiSurface *sfc, ss_t w, UiCell *cmplx_buf, const char *str, const UiCell *cell_base, uint *pos, const uint atmost);
1063
1064int ui_get_nccell(
1065 UiSurface *sfc,
1066 ss_t w,
1067 const UiCell *cell,
1068 wchar_t *wstr,
1069 UiStyle *style,
1070 short *pair);
1071
1072#define ui_get_cell(sfc, w, cell, wstr, style, cp, opts)
1073 ui_get_nccell(sfc, w, cell, wstr, style, cp);
1074
1075int ui_set_nccell(
1076 UiSurface *sfc,
1077 ss_t w,
1078 UiCell *cell,
1079 const wchar_t *wstr,
1080 const UiStyle style,
1081 short pair);
1082
1083#define ui_set_cell(sfc, w, cell, wstr, attr, cp, opts)
1084 ui_set_nccell(sfc, w, cell, wstr, attr, cp);
1085
1086#else
1087// ---------------------------------------------------------------
1088// NCURSES Specific
1089// ---------------------------------------------------------------
1090int ui_add_color(uint r, uint g, uint b);
1091uint ui_add_pair(uint fg, uint bg);
1092int ui_chg_pair(uint pair, uint fg, uint bg);
1093int ui_color_content(uint color, uint *r, uint *g, uint *b);
1094int ui_color_from_rgb(RGB *rgb);
1095void ui_destroy_curses();
1096
1097int ui_getcchar(const UiCell *cell, wchar_t *wstr, attr_t *attrs, short *pair, const void *opts);
1098
1099int ui_setcchar(UiCell *cell, const wchar_t *wstr, const attr_t attrs, short pair, const void *opts);
1100
1101int ui_get_pair(uint pair, uint *fg, uint *bg);
1102int ui_init_color(uint color, uint r, uint g, uint b);
1103int ui_init_pair(uint pair, uint fg, uint bg);
1104SCREEN *ui_ncurses_get_screen();
1105int ui_pair_content(uint pair, uint *fg, uint *bg);
1106uint ui__mbstr_to_cellstr(UiCell *cmplx_buf, const char *str, const UiCell *cell_base, uint *pos, const uint atmost);
1107
1108#define ui_mbstr_to_cellstr(sfc, w, cmplx_buf, str, cell_base, pos, atmost)
1109 ui__mbstr_to_cellstr(cmplx_buf, str, cell_base, pos, atmost);
1110
1111#define ui_get_cell(s, w, cell, wstr, attr, pair, opts)
1112 ui_getcchar(cell, wstr, attr, pair, nullptr);
1113
1114#define ui_set_cell(s, w, cell, wstr, attrs, pair, nullptr)
1115 ui_setcchar(cell, wstr, attrs, pair, nullptr);
1116#endif
1117
1118extern STDRGB std_color[];
1119extern UiRuntime *ui;
1120extern UiSurface *ui_surface[UI_SFC_MAX];
1121extern uint ui_color_cnt;
1122extern uint ui_pair_cnt;
1123
1124// ---------------------------------------------------------------
1125// Chyron Data Structures
1126// ---------------------------------------------------------------
1127
1128typedef struct {
1129 bool active; /**< whether the key binding is active */
1130 char text[CHYRON_KEY_MAXLEN]; /**< command text associated with the key code */
1131 uint keycode; /**< key code associated with the command */
1132 uint end_pos; /**< end position of the command text */
1133 UiCell cell_base; /**< cell base for colors/attributes */
1134} UiChyronKey;
1135
1136typedef struct {
1137 UiChyronKey *key[CHYRON_KEYS]; /**< array of key bindings for the chyron */
1138 char s[MAXLEN]; /**< the chyron string, for displaying messages in */
1139 UiCell cmplx_buf[MAXLEN]; /**< the chyron wide character string */
1140 uint l; /**< length of the chyron string, for display */
1141 struct UiSurface *sfc; /** pointer to surface for the chyron */
1142 ss_t w; /** index to window of surface */
1143 uint y; /** y coordinante of the chyron in the window */
1144} UiChyron;
1145
1146// ---------------------------------------------------------------
1147// Chyron API
1148// ---------------------------------------------------------------
1149void ui_activate_chyron_key(UiChyron *chyron, uint k);
1150void ui_activate_all_chyron_keys(UiChyron *chyron);
1151int ui_assign_chyron_win(UiChyron *chyron, UiSurface *sfc, ss_t w, char *y);
1152void ui_deactivate_chyron_key(UiChyron *chyron, uint k);
1153void ui_deactivate_all_chyron_keys(UiChyron *chyron);
1154UiChyron *ui_destroy_chyron(UiChyron *chyron);
1155UiChyron *ui_new_chyron(UiSurface *sfc, ss_t w);
1156void ui_display_chyron(UiSurface *sfc, ss_t w, UiChyron *chyron, uint line, uint col);
1157int ui_get_chyron_key(UiChyron *chyron, uint x);
1158bool ui_is_set_chyron_key(UiChyron *chyron, uint k);
1159void ui_set_chyron_key(UiChyron *chyron, uint k, char *s, uint kc);
1160void ui_set_chyron_key_cb(UiChyron *chyron, uint k, char *s, uint kc, UiCell cell_base);
1161void ui_unset_chyron_key(UiChyron *chyron, uint k);
1162int ui_get_event(UiSurface *s, ss_t w, UiChyron *chyron, UiEvent *ev, int timeout_ms);
1163void ui_compile_chyron(UiChyron *);
1164
1165// ---------------------------------------------------------------
1166// Logging
1167// ---------------------------------------------------------------
1168extern char *ui_iso8601_timestamp(char *buf, size_t n, bool local);
1169extern int ui_open_log();
1170ATTR_FORMAT(printf, 5, 6)
1171void ui_log_write(const UiLogLevel level, const char *file, const char *func, const int line, const char *fmt, ...);
1172#define ui_log(level, fmt, ...)
1173 {
1174 if (level <= ui_log_ctx.min_level) {
1175 ui_log_write(level, __FILE__, __func__, __LINE__, fmt, ##__VA_ARGS__);
1176 }
1177 }
1178
1179#ifdef __cplusplus
1180extern "C" {
1181#endif
void form_help(char *)
#define FIELD_MAXLEN
Definition form.h:18
@ FF_DECIMAL_INT
Definition form.h:50
@ FF_STRING
Definition form.h:48
@ FF_HEX_INT
Definition form.h:52
@ FF_YYYYMMDD
Definition form.h:61
@ FF_HHMMSS
Definition form.h:63
@ FF_CURRENCY
Definition form.h:58
@ FF_FLOAT
Definition form.h:54
@ FF_INVALID
Definition form.h:68
@ FF_DOUBLE
Definition form.h:56
@ FF_APR
Definition form.h:65
@ FA_END
Definition form.h:42
@ FA_ACCEPT
Definition form.h:29
@ FA_EDIT
Definition form.h:40
@ FA_CALC
Definition form.h:37
@ FA_HELP
Definition form.h:31
@ FA_REFUSE
Definition form.h:35
@ FA_CANCEL
Definition form.h:33
@ FA_CONTINUE
Definition form.h:27
int form_read_description(Form *)
void form_display_chyron(Form *)
#define FIELD_MAXCNT
Definition form.h:19
int cmd_processor(Init *)
int open_pick_win(Init *)
bool view_stack_peek(const ViewStack *, View *)
@ OT_INT
Definition common.h:88
@ OT_BOOL
Definition common.h:89
@ OT_HEX
Definition common.h:90
@ OT_STRING
Definition common.h:87
int popup_form(Init *, int, char **, uint, uint)
instantiate a form popup window
Definition popups.c:113
bool view_stack_push(ViewStack *, View)
int popup_menu(Init *, int, char **, uint, uint)
instantiate a menu popup window
Definition popups.c:53
void view_stack_free(ViewStack *)
@ FORM
Definition common.h:80
@ MENU
Definition common.h:82
@ VIEW
Definition common.h:79
@ PICK
Definition common.h:81
@ OG_FILES
Definition common.h:95
@ OG_DIRS
Definition common.h:96
@ OG_SPECS
Definition common.h:97
@ OG_MISC
Definition common.h:98
@ OG_FLAGS
Definition common.h:100
@ OG_PARMS
Definition common.h:99
@ OG_COL
Definition common.h:101
bool view_stack_pop(ViewStack *, View *)
int popup_pick(Init *, int, char **, uint, uint)
instantiate a pick popup window
Definition popups.c:83
bool view_stack_init(ViewStack *, size_t)
void destroy_view_win(Init *)
#define COLOR_LEN
Definition common.h:30
int popup_view(Init *, int, char **, uint, uint, uint, uint)
instantiate a view popup window
Definition popups.c:145
int pick_engine(Init *)
char minitrc[MAXLEN]
int mpick(int, char **, int, int, int, int, char *, int)
#define OBJ_MAXCNT
Definition pick.h:21
volatile sig_atomic_t sig_received
Definition sig.c:32
size_t rtrim(char *)
Trims trailing spaces from string s in place.
Definition futil.c:307
bool handle_signal(sig_atomic_t)
void win_Toggle_Attrs()
uint mlines
uint mbegx
bool strnfill(char *, char, uint)
void sig_shell_mode()
void get_rfc3339_s(char *, size_t)
bool f_have_shell_tioctl
Definition scriou.c:24
bool waitpid_with_timeout(pid_t, uint)
void init_stdscr()
struct termios shell_out_tioctl program_out_tioctl
Definition scriou.c:36
char stdio_names_str[4096]
Definition futil.c:121
bool verify_dir_q(char *, uint)
uint dbgfd
@ F_REG
Definition cm.h:221
@ F_BLK
Definition cm.h:219
@ F_FIFO
Definition cm.h:214
@ F_F0
Definition cm.h:213
@ F_F3
Definition cm.h:220
@ F_SOCK
Definition cm.h:225
@ F_CHR
Definition cm.h:215
@ F_F5
Definition cm.h:224
@ F_F1
Definition cm.h:216
@ F_DIR
Definition cm.h:217
@ F_UNKNOWN
Definition cm.h:227
@ F_F2
Definition cm.h:218
@ F_F4
Definition cm.h:222
@ F_LNK
Definition cm.h:223
@ F_F6
Definition cm.h:226
#define KEY_ALTF0
Definition cm.h:334
uint n_lines
void restore_wins()
int stdout_fd
Definition ui_common.c:78
void dump_opts()
void win_del()
void win_resize(uint, uint, char *)
bool construct_file_spec(char *, char *, char *, char *, char *, uint)
struct termios shell_tioctl program_tioctl
Definition scriou.c:34
char * stdio_names(char *, char *)
Definition futil.c:1105
unsigned char uchar
Definition cm.h:348
String mk_string(size_t)
Create a String struct with a dynamically allocated string.
Definition futil.c:1572
uint mg_col
uint n_cols
bool verify_file_q(char *, uint)
char fn[MAXLEN]
Definition ui_common.c:45
void win_init_attrs()
struct termios shell_in_tioctl program_in_tioctl
Definition scriou.c:35
bool f_debug
uint mg_line
#define SCR_COLS
Definition cm.h:68
void dump_opts_by_use(char *, char *)
char errmsg[]
Definition futil.c:125
uint src_line
Definition ui_common.c:43
int wait_timeout
Definition futil.c:139
@ LF_EXC_REGEX
Definition cm.h:187
@ LF_HIDE
Definition cm.h:185
@ LF_ISUID
Definition cm.h:197
@ LF_IRUSR
Definition cm.h:195
@ LF_ICASE
Definition cm.h:186
@ LF_ISGID
Definition cm.h:196
@ LF_EXEC
Definition cm.h:189
@ LF_REGEX
Definition cm.h:188
@ LF_USER
Definition cm.h:190
@ LF_IXUSR
Definition cm.h:193
@ LF_IWUSR
Definition cm.h:194
bool f_restore_screen
@ LF_FIFO
Definition cm.h:202
@ LF_DIR
Definition cm.h:204
@ LF_UNKNOWN
Definition cm.h:209
@ LF_SOCK
Definition cm.h:208
@ LF_BLK
Definition cm.h:205
@ LF_LNK
Definition cm.h:207
@ LF_REG
Definition cm.h:206
@ LF_CHR
Definition cm.h:203
int exit_code
Definition ui_common.c:31
FILE * tty_fp
struct termios shell_err_tioctl program_err_tioctl
Definition scriou.c:37
uint16_t win_attr
Definition ui_common.c:34
int stdin_fd
Definition ui_common.c:78
bool f_program_open
uint mbegy
bool str_to_bool(const char *)
Converts String to boolean true or false.
Definition futil.c:982
uint mcols
bool is_image_file(const char *filename)
char * src_name
Definition ui_common.c:44
char * fill_field(char *, char *, char, uint)
Definition futil.c:1736
uint mg_action
char * stdio_fdnames(char *, char *)
Definition futil.c:1130
size_t strnz__pcat(char *d, size_t pos, const char *s, size_t max_len)
Definition futil.c:577
void user_end()
UiChyron * wait_mk_chyron()
int display_curses_keys()
bool f_have_program_tioctl
Definition scriou.c:25
uint enter_option()
#define Ctrl(c)
Definition cm.h:70
int stderr_fd
Definition lf.c:62
void display_argv_error_msg(char *, char **)
bool wait_destroy(UiChyron *)
char * rep_substring(const char *, const char *, const char *) __attribute__((nonnull(1
Replace all occurrences of "tgt_s" in "org_s" with "rep_s".
Definition futil.c:1471
@ MT_TEXT
Definition menu.h:22
@ MT_CHOICE
Definition menu.h:23
@ MT_NULL
Definition menu.h:21
@ CT_PICK
Definition menu.h:45
@ CT_FORM
Definition menu.h:41
@ CT_DEXE
Definition menu.h:37
@ CT_UNDEFINED
Definition menu.h:51
@ CT_MENU
Definition menu.h:44
@ CT_RETURN
Definition menu.h:48
@ CT_TOGGLE
Definition menu.h:49
@ CT_HELP
Definition menu.h:39
@ CT_WRITE_CONFIG
Definition menu.h:50
@ CT_FORM_WRITE
Definition menu.h:43
@ CT_EXEC
Definition menu.h:38
@ CT_VIEW
Definition menu.h:46
@ CT_NULL
Definition menu.h:36
@ CT_ABOUT
Definition menu.h:40
@ CT_FORM_EXEC
Definition menu.h:42
@ CT_CKEYS
Definition menu.h:47
void free_menu_line(Line *)
@ MA_RETURN
Definition menu.h:28
@ MA_DISPLAY_MENU
Definition menu.h:29
@ MA_RESET_MENU
Definition menu.h:30
@ MA_NEW
Definition menu.h:27
@ MA_CONTINUE
Definition menu.h:31
#define MAX_MENU_LINES
Definition menu.h:18
UiSurface * ui_surface_box(UiSurface *parent, ss_t p, uint lines, uint cols, uint y, uint x, const char *title)
Create a new UI surface with a border box and optional title.
Definition ui_ncurses.c:293
int ui_surface_resize(UiSurface *s, ss_t w, uint lines, uint cols)
Resize a UiSurface to new dimensions.
Definition ui_ncurses.c:567
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.
#define SUB_SURFACE_LIST(X)
Definition ui_backend.h:74
UiRuntime * ui_init(const UiConfig *config, SIO *sio)
Initialize the UI runtime with the given configuration and SIO.
Definition ui_ncurses.c:130
void ui_render()
Render the UI by updating panels and refreshing the display.
Definition ui_ncurses.c:931
void ui_getyx(UiSurface *s, ss_t w, uint *lines, uint *cols)
Get the current cursor position within a window of a UI surface.
Definition ui_ncurses.c:707
int ui_wresize(UiSurface *s, ss_t w, uint lines, uint cols)
UiSurface * ui_surface_new(ss_t w, UiSurface *parent, ss_t p, uint lines, uint cols, uint y, uint x)
Create a new UI surface with the specified parameters.
Definition ui_ncurses.c:230
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.
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 space...
int ui_whide(UiSurface *s, ss_t w)
int ui_mice_enable(int mask)
Enable or disable mouse support.
int ui_setscrreg(UiSurface *s, ss_t w, uint top, uint bottom)
Set the scrolling region for a UiSurface.
Definition ui_ncurses.c:861
#define BORDER_STYLE(X)
Definition ui_backend.h:197
@ FT_MAX
Definition ui_backend.h:122
ushort cp_ln_fg
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_plane_cpy(NcPlane *dst, NcPlane *src, int dst_y, int dst_x, int src_y, int src_x, int ylen, int xlen)
int ui_draw_hline(UiSurface *s, ss_t w, uint y, uint x, uint len, const UiStyle *style)
@ LOG_LEVEL_COUNT
Definition ui_backend.h:232
int ui_wmove(UiSurface *s, ss_t w, uint y, uint x)
Move the cursor to a specified position within a UiSurface.
Definition ui_ncurses.c:685
void ui_getmaxyx(UiSurface *s, ss_t w, uint *lines, uint *cols)
Get the maximum dimensions of a UiSurface.
Definition ui_ncurses.c:722
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.
Definition ui_ncurses.c:896
uint clr_pair_cnt
int ui_wscrl(UiSurface *s, ss_t w, int rows)
Scroll the contents of a UiSurface by a specified number of lines.
Definition ui_ncurses.c:770
#define MAX_EXT_FDS
Definition ui_backend.h:157
int ui_idcok(UiSurface *s, ss_t w, bool enable)
Enable or disable the use of the insert/delete character capabilities for a UiSurface.
Definition ui_ncurses.c:844
ushort cp_bold
uint clr_cnt
int ui_immedok(UiSurface *s, ss_t w, bool enable)
Definition ui_ncurses.c:780
#define CHYRON_KEYS
Definition ui_backend.h:92
ushort cp_cmdln_bg
ushort cp_highlight
uint clr_idx
int ui_cursor_move(UiSurface *s, ss_t w, uint y, uint x)
Move the cursor to a specified position within a UiSurface.
Definition ui_ncurses.c:698
#define UI_SFC_MAX
Definition ui_backend.h:64
int ui_surface_addwin(UiSurface *s, ss_t w, ss_t p, uint lines, uint cols, uint y, uint x)
Add a new window to the specified UiSurface.
Definition ui_ncurses.c:423
@ BORDER_MAX
Definition ui_backend.h:206
int ui_suspend()
Suspend the UI, saving the current program state and ending the window session.
Definition ui_ncurses.c:525
ushort cp_cmdln_fg
void ui_surface_destroy(UiSurface *s)
Destroy a UiSurface, cleaning up its windows and panels.
Definition ui_ncurses.c:499
int ui_surface_addpad(UiSurface *s, ss_t w, ss_t view_win, uint lines, uint cols, uint y, uint x, bool hidden)
Add a new pad to the specified UiSurface.
Definition ui_ncurses.c:381
@ SUB_SFC_MAX
Definition ui_backend.h:86
uint clr_pair_idx
int ui_wshow(UiSurface *s, ss_t w)
void ui_update_panels()
Update the panels in the UI.
Definition ui_ncurses.c:937
int ui_bkgd(UiSurface *s, ss_t w, const UiCell *cell)
Set the background of a specific window within a UiSurface.
Definition ui_ncurses.c:974
void ui_restore_wins()
Restore the state of all windows in the UI. This function refreshes the standard screen and all surfa...
int ui_idlok(UiSurface *s, ss_t w, bool enable)
Enable or disable the use of the insert/delete line capabilities for a UiSurface.
Definition ui_ncurses.c:828
int ui_surface_move(UiSurface *s, ss_t w, uint y, uint x)
Move a UiSurface to a new position on the screen.
Definition ui_ncurses.c:552
int ui_prefresh(UiSurface *s, ss_t w, int pminrow, int pmincol, int sminrow, int smincol, int smaxrow, int smaxcol)
Definition ui_ncurses.c:923
int ui_getmaxy(UiSurface *s, ss_t w)
Get the maximum number of lines (rows) of a UiSurface.
Definition ui_ncurses.c:733
#define XTERM_256COLOR
Definition ui_backend.h:694
uint UiColorIdx
Definition ui_backend.h:186
int ui_draw_ch(UiSurface *s, ss_t w, const char c)
Draw a character in a surface window.
#define CHYRON_KEY_MAXLEN
Definition ui_backend.h:91
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).
Definition ui_ncurses.c:754
int ui_surface_show(UiSurface *s, ss_t w)
Show a UiSurface, making it visible on the screen.
Definition ui_ncurses.c:641
int ui_getch()
Wait for a single input character from the NotCurses context.
int ui_erase()
Erase the entire screen.
Definition ui_ncurses.c:623
void ui_shutdown()
Shutdown the UI runtime, cleaning up resources and freeing memory.
Definition ui_ncurses.c:449
int win_ptr
int ui_mousemask(int mask)
Enable or disable mouse support.
@ CLR_CMDLN_BG
Definition ui_backend.h:582
@ CLR_FILL_CHAR_BG
Definition ui_backend.h:578
@ CLR_BOX_BG
Definition ui_backend.h:572
@ CLR_FILL_CHAR_FG
Definition ui_backend.h:577
@ CLR_FG
Definition ui_backend.h:569
@ CLR_RED
Definition ui_backend.h:553
@ CLR_NT_FG
Definition ui_backend.h:583
@ CLR_BRACKETS_FG
Definition ui_backend.h:575
@ CLR_YELLOW
Definition ui_backend.h:555
@ CLR_IND_FG
Definition ui_backend.h:573
@ CLR_BCYAN
Definition ui_backend.h:566
@ CLR_TITLE_FG
Definition ui_backend.h:591
@ CLR_WHITE
Definition ui_backend.h:559
@ CLR_MAGENTA
Definition ui_backend.h:557
@ CLR_BRACKETS_BG
Definition ui_backend.h:576
@ CLR_NT_REV_BG
Definition ui_backend.h:586
@ CLR_BLACK
Definition ui_backend.h:552
@ CLR_BWHITE
Definition ui_backend.h:567
@ CLR_LN_BG
Definition ui_backend.h:580
@ CLR_NT_HL_REV_BG
Definition ui_backend.h:590
@ CLR_BBLACK
Definition ui_backend.h:560
@ CLR_LN_FG
Definition ui_backend.h:579
@ CLR_NT_HL_FG
Definition ui_backend.h:587
@ CLR_BBLUE
Definition ui_backend.h:564
@ CLR_BGREEN
Definition ui_backend.h:562
@ CLR_BYELLOW
Definition ui_backend.h:563
@ CLR_BMAGENTA
Definition ui_backend.h:565
@ CLR_BORANGE
Definition ui_backend.h:568
@ CLR_NT_HL_BG
Definition ui_backend.h:588
@ CLR_NT_HL_REV_FG
Definition ui_backend.h:589
@ CLR_BG
Definition ui_backend.h:570
@ CLR_BOX_FG
Definition ui_backend.h:571
@ CLR_NT_BG
Definition ui_backend.h:584
@ CLR_TITLE_BG
Definition ui_backend.h:592
@ CLR_BRED
Definition ui_backend.h:561
@ CLR_NCOLORS
Definition ui_backend.h:593
@ CLR_BLUE
Definition ui_backend.h:556
@ CLR_IND_BG
Definition ui_backend.h:574
@ CLR_GREEN
Definition ui_backend.h:554
@ CLR_CMDLN_FG
Definition ui_backend.h:581
@ CLR_NT_REV_FG
Definition ui_backend.h:585
@ CLR_CYAN
Definition ui_backend.h:558
UiSurface * stdsfc
Definition ui_ncurses.c:46
int sfc_ptr
Definition ui_ncurses.c:42
int ui_wclrtobot(UiSurface *s, ss_t w)
Set the style of a surface window.
int ui_curs_set(int visibility)
Set the visibility of the cursor.
Definition ui_ncurses.c:881
int ui_resume()
Resume the UI, restoring the previous program state and updating the display.
Definition ui_ncurses.c:534
struct ncplane NcPlane
Definition ui_backend.h:189
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_top_surface(UiSurface *s, ss_t w)
Hide a UiSurface, making it invisible on the screen.
Definition ui_ncurses.c:655
int ui_wclear(UiSurface *s, ss_t w)
Clear the contents of a UiSurface or all surfaces.
Definition ui_ncurses.c:603
uint16_t UiPairIdx
Definition ui_backend.h:185
void ui_endwin()
End the UI application, cleaning up resources and shutting down the UI runtime.
Definition ui_ncurses.c:443
int ui_cursor_enable(UiSurface *s, ss_t w, bool visible)
Enable or disable the cursor for a UiSurface.
Definition ui_ncurses.c:911
#define MOUSE_ACTION(X)
Definition ui_backend.h:94
ushort cp_ln_bg
int ui_clear()
Clear the entire screen.
Definition ui_ncurses.c:631
int ui_getmaxx(UiSurface *s, ss_t w)
Get the maximum number of columns of a UiSurface.
Definition ui_ncurses.c:744
int ui_surface_hide(UiSurface *s, ss_t w)
Hide a UiSurface, making it invisible on the screen.
Definition ui_ncurses.c:667
int ui_bkgrnd(UiSurface *s, ss_t w, const UiCell *cell)
Set the background of a specific window within a UiSurface.
int ui_scrollok(UiSurface *s, ss_t w, bool enable)
Enable or disable scrolling for a UiSurface.
Definition ui_ncurses.c:796
struct ncinput NcInput
Definition ui_backend.h:187
struct ncvisual NcVisual
Definition ui_backend.h:188
int ui_wclrtoeol(UiSurface *s, ss_t w)
Clear to the end of the line in a surface window.
int ui_wnoutrefresh(UiSurface *s, ss_t w)
Refresh a specific window within a UiSurface.
Definition ui_ncurses.c:955
uint16_t UiStyle
Definition ui_backend.h:184
void ui_get_caps(UiCaps *caps)
Get the UI backend capabilities.
Definition ui_ncurses.c:62
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.
Definition ui_ncurses.c:988
int ui_doupdate()
Refresh the display by updating the screen.
Definition ui_ncurses.c:942
int ui_werase(UiSurface *s, ss_t w)
Erase the contents of a UiSurface or all surfaces.
Definition ui_ncurses.c:582
@ UI_BACKEND_NCURSES
Definition ui_backend.h:493
@ UI_BACKEND_NOTCURSES
Definition ui_backend.h:494
@ MOUSE_ACTION_MAX
Definition ui_backend.h:104
uint32_t UiKey
Definition ui_backend.h:107
#define FILE_TYPE_LIST(X)
Definition ui_backend.h:111
int ui_keypad(UiSurface *s, ss_t w, bool enable)
Enable or disable the keypad for a UiSurface.
Definition ui_ncurses.c:812
#define NMARKS
Definition view.h:33
char err_msg[MAXLEN]
@ PT_STRING
Definition view.h:44
@ PT_NONE
Definition view.h:41
@ PT_SHORT
Definition view.h:42
@ PT_LONG
Definition view.h:43
#define BUFSIZ
Definition view.h:38
int get_cmd_spec(View *, char *)
int view_accept_cmd(View *)
void go_to_position(View *, long)
#define PAD_COLS
Definition view.h:39
#define UIKEY_DC
#define UIKEY_BACKSPACE
#define UIKEY_LEFT
#define UIKEY_F09
#define UIKEY_IC
#define UIKEY_END
#define UIKEY_BUTTON1
#define UIKEY_RIGHT
#define UIKEY_HOME
#define UIKEY_ENTER
int ui_get_pair(uint16_t pair, uint *fg, uint *bg)
Get the foreground and background color indices for a given color pair index.
void ui_flush_input()
Flush any pending input events from the NotCurses context. This function discards any input events th...
int ui_get_event(UiSurface *s, ss_t w, UiChyron *chyron, UiEvent *ev, int timeout_ms)
Read input events.
const wchar_t * border_none
Definition ui_common.c:89
const wchar_t * bw_sp
Definition ui_common.c:96
UiCell cell_sp
Definition ui_common.c:149
void ui_unset_chyron_key(UiChyron *chyron, uint k)
Unset chyron key.
Definition ui_common.c:793
void ui_set_chyron_key(UiChyron *chyron, uint k, char *s, uint kc)
Set chyron key with default color pair (cp_nt_rev).
Definition ui_common.c:778
int ui_border_draw(UiSurface *sfc, ss_t w)
Definition ui_common.c:523
UiCell cell_blue_bg
Definition ui_common.c:154
UiCell cell_ve
Definition ui_common.c:141
ushort cp_nt
Definition ui_common.c:167
void ui_deactivate_all_chyron_keys(UiChyron *chyron)
Deactivate all chyron keys.
Definition ui_common.c:829
UiCell cell_tr
Definition ui_common.c:139
UiCell cell_nt
Definition ui_common.c:123
ushort cp_magenta
Definition ui_common.c:181
char const colors_text[][10]
Color names for .minitrc overrides.
Definition ui_common.c:110
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.
Definition ui_common.c:467
const wchar_t * bw_ran
Definition ui_common.c:101
UiCell cell_ls
Definition ui_common.c:134
UiCell cell_nt_hl_rev
Definition ui_common.c:126
bool f_ncurses_open
Definition ui_common.c:50
UiCell cell_cyan_bg
Definition ui_common.c:155
UiCell cell_bt
Definition ui_common.c:147
UiCell cell_br
Definition ui_common.c:143
const wchar_t * bw_rbr
Definition ui_common.c:95
ushort cp_green
Definition ui_common.c:177
UiCell cell_magenta_bg
Definition ui_common.c:156
const wchar_t * bw_ua
Definition ui_common.c:99
UiCell cell_tl
Definition ui_common.c:138
ushort cp_red
Definition ui_common.c:176
ushort cp_white
Definition ui_common.c:182
wchar_t * ui_mbstr_to_wcstr(const char *mb_str)
Convert a multibyte string to a wide character string.
Definition ui_common.c:364
ushort cp_box
Definition ui_common.c:163
UiChyron * ui_new_chyron(UiSurface *sfc, ss_t w)
Create new chyron structure.
Definition ui_common.c:662
ushort cp_blue
Definition ui_common.c:179
UiCell cell_ln
Definition ui_common.c:131
ui_context_t ui_ctx
Definition ui_common.c:76
const char * ui_sub_surface_str(ss_t w)
Definition ui_common.c:1436
const wchar_t * bw_chk
Definition ui_common.c:103
UiLogContext ui_log_ctx
Definition ui_common.c:53
BorderWide bw
Definition ui_common.c:27
char * ui_iso8601_timestamp(char *buf, size_t n, bool local)
Generate an ISO 8601 timestamp string.
Definition ui_common.c:1421
ushort cp_black
Definition ui_common.c:175
UiCell cell_ts
Definition ui_common.c:136
RGB ui_xterm256_idx_to_rgb(uint idx)
Convert XTerm 256 color index to RGB.
Definition ui_common.c:969
void ui_activate_chyron_key(UiChyron *chyron, uint k)
Activate chyron key.
Definition ui_common.c:802
const wchar_t * bw_rtl
Definition ui_common.c:92
ushort cp_cyan
Definition ui_common.c:180
ushort cp_nt_hl
Definition ui_common.c:169
int ui_cm_surface_destroy(UiSurface *sfc)
Destroy the most recently created surface.
Definition ui_common.c:515
UiCell cell_yellow_bg
Definition ui_common.c:153
const wchar_t * bw_rtr
Definition ui_common.c:93
const wchar_t * bw_lan
Definition ui_common.c:102
ushort cp_fill_char
Definition ui_common.c:173
UiCell cell_tt
Definition ui_common.c:146
void ui_display_chyron(UiSurface *sfc, ss_t w, UiChyron *chyron, uint line, uint col)
Display chyron on the specified line and column of the surface.
Definition ui_common.c:898
UiCell cell_bs
Definition ui_common.c:137
ushort cp_brackets
Definition ui_common.c:174
const wchar_t * bw_ra
Definition ui_common.c:97
ushort cp_yellow
Definition ui_common.c:178
STDRGB std_color[]
Definition ui_common.c:188
UiCell cell_ho
Definition ui_common.c:140
const wchar_t * border_double
Definition ui_common.c:86
UiCell cell_red_bg
Definition ui_common.c:151
UiCell cell_rs
Definition ui_common.c:135
void ui_set_chyron_key_cb(UiChyron *chyron, uint k, char *s, uint kc, UiCell cell_base)
Set chyron key with color pair (cp).
Definition ui_common.c:754
int ui_assign_chyron_win(UiChyron *chyron, UiSurface *sfc, ss_t w, char *y)
Assign surface and window to chyron structure.
Definition ui_common.c:695
const wchar_t * bw_h09
Definition ui_common.c:104
bool ui_init_clr_palette(SIO *sio)
Definition ui_common.c:289
UiCell cell_default
Definition ui_common.c:119
bool ui_is_set_chyron_key(UiChyron *chyron, uint k)
Check if function key label is set.
Definition ui_common.c:738
int click_x
Definition ui_common.c:30
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.
Definition ui_common.c:579
const wchar_t * border_single
Definition ui_common.c:85
ushort cp_nt_hl_rev
Definition ui_common.c:170
ushort cp_default
Definition ui_common.c:172
UiCell cell_nt_hl
Definition ui_common.c:125
ushort cp_nt_rev
Definition ui_common.c:168
ushort cp_title
Definition ui_common.c:166
void ui_parse_ansi(char *ansi_str, attr_t *attrs, uint *cpx)
Parse ANSI escape sequences for color and attributes.
Definition ui_common.c:1532
void ui_abend(int ec, char *s)
Convert multibyte string to complex character array.
Definition ui_common.c:404
UiCell cell_lt
Definition ui_common.c:144
void ui_initialize_sio(SIO *sio)
Definition ui_common.c:211
int ui_border_title(UiSurface *sfc, ss_t w, const char *title)
Draw a box with a title around the specified window.
Definition ui_common.c:621
int ui_border_ysplit(UiSurface *sfc, ss_t w, uint y)
Draw a box with a separator line around the specified window.
Definition ui_common.c:556
UiCell cell_brktl
Definition ui_common.c:121
UiCell cell_cr
Definition ui_common.c:148
UiCell cell_title
Definition ui_common.c:130
int click_y
Definition ui_common.c:29
const wchar_t * bw_la
Definition ui_common.c:98
UiCell cell_ind
Definition ui_common.c:128
int ui_tracked_sfc_box(uint wlines, uint wcols, uint wbegy, uint wbegx, const char *wtitle)
Create a new surface with a box window.
Definition ui_common.c:429
UiChyron * ui_destroy_chyron(UiChyron *chyron)
Destroy UiChyron structure.
Definition ui_common.c:717
int ui_get_chyron_key(UiChyron *chyron, uint x)
Get keycode from chyron.
Definition ui_common.c:922
void ui_mbc_to_wc(wchar_t wc[2], const char mbc)
Convert a multibyte character to a wide character.
Definition ui_common.c:344
UiCell cell_ran
Definition ui_common.c:132
UiCell cell_black_bg
Definition ui_common.c:150
void ui_deactivate_chyron_key(UiChyron *chyron, uint k)
Deactivate chyron key.
Definition ui_common.c:821
const wchar_t * border_heavy
Definition ui_common.c:88
bool f_notcurses_open
Definition ui_common.c:51
const wchar_t * border_rounded
Definition ui_common.c:87
UiCell cell_white_bg
Definition ui_common.c:157
void ui_apply_gamma(RGB *rgb)
Apply gamma correction to RGB color.
Definition ui_common.c:1002
UiCell cell_cmdln
Definition ui_common.c:129
void ui_activate_all_chyron_keys(UiChyron *chyron)
Deactivate chyron key.
Definition ui_common.c:811
const wchar_t * bw_da
Definition ui_common.c:100
UiCell cell_brktr
Definition ui_common.c:122
ushort cp_ind
Definition ui_common.c:164
UiCell cell_green_bg
Definition ui_common.c:152
uint ui_rgb_to_xterm256_idx(RGB *rgb)
Convert RGB color to XTerm 256 color index.
Definition ui_common.c:947
void ui_compile_chyron(UiChyron *chyron)
construct the chyron string from the chyron structure
Definition ui_common.c:843
UiCell cell_fill_char
Definition ui_common.c:120
UiCell cell_box
Definition ui_common.c:127
UiCell cell_rt
Definition ui_common.c:145
int ui_open_log()
Open the log file for writing.
Definition ui_common.c:1446
void ui_log_write(const UiLogLevel level, const char *file, const char *func, const int line, const char *fmt,...)
Definition ui_common.c:1476
const wchar_t * bw_rbl
Definition ui_common.c:94
UiCell cell_bl
Definition ui_common.c:142
UiCell cell_chk
Definition ui_common.c:133
UiCell cell_nt_rev
Definition ui_common.c:124
int ui_setcchar(UiCell *cell, const wchar_t *wstr, const attr_t attrs, short pair, const void *opts)
Set the character and attributes of a UiCell.
uint ui__mbstr_to_cellstr(UiCell *cmplx_buf, const char *str, const UiCell *cell_base, uint *p, const uint atmost)
int ui_chg_pair(uint pair, uint fg, uint bg)
Change the foreground and background colors of an existing color pair.
int ui_pair_content(uint pair, uint *fg, uint *bg)
Get the foreground and background colors of a specified color pair.
SCREEN * ui_ncurses_get_screen()
Get the current SCREEN pointer used by the UI.
int ui_getcchar(const UiCell *cell, wchar_t *wstr, attr_t *attrs, short *pair, const void *opts)
Get the character and attributes from a UiCell.
int ui_init_color(uint color, uint r, uint g, uint b)
Initialize a color in the curses color table with specified RGB values.
int ui_init_pair(uint pair, uint fg, uint bg)
Initialize a color pair in the curses color table with specified foreground and background colors.
uint ui_add_pair(uint fg, uint bg)
Add a new color pair to the UI, or retrieve the index of an existing pair.
UiSurface * ui_surface[UI_SFC_MAX]
Definition ui_ncurses.c:40
uint32_t ui_get_color(uint16_t color_idx)
Get the RGB color value for a given color index.
int ui_color_content(uint color, uint *r, uint *g, uint *b)
void fast_exit(UiSurface *s)
Exit the UI application quickly, cleaning up resources.
Definition ui_ncurses.c:351
UiRuntime * ui
Definition ui_ncurses.c:39
RGB ui_hex_to_rgb(char *s)
Convert a hexadecimal color string to an RGB structure.
int ui_pair_from_hex(const char *fg, const char *bg)
Convert hex color strings to a curses color pair index.
Definition ui_ncurses.c:87
void ui_destroy_curses()
UiCell ui_cell_from_ucp(const wchar_t *ucp, const uint32_t *fg, const uint32_t *bg)
Convert a Unicode code point to a curses UiCell with specified foreground and background colors.
Definition ui_ncurses.c:102
uint ui_pair_cnt
Definition ui_ncurses.c:44
uint ui_color_cnt
Definition ui_ncurses.c:43
void ui_def_prog_mode()
Definition ui_ncurses.c:867
int ui_color_from_rgb(RGB *rgb)
Convert RGB to curses color index, adding new color if necessary.
int ui_chg_color(uint16_t color_idx, uint32_t *color)
Change the RGB color value for a given color index.
int ui_mvwadd_wchnstr(UiSurface *s, ss_t w, uint y, uint x, const UiCell *cmplx_buf, uint n)
Draw a complex character string at a specific position in a surface window, with a maximum length.
int ui_waddstr(UiSurface *s, ss_t w, const char *text)
Draw a text string in a surface window.
int ui_mvwaddnwstr(UiSurface *s, ss_t w, uint y, uint x, const wchar_t *wstr, int m)
Draw a wide-character string at a specific position in a surface window, with a maximum length.
int ui_waddwstr(UiSurface *s, ss_t w, const wchar_t *wstr)
Draw a wide-character string in a surface window.
int ui_mvwaddch(UiSurface *s, ss_t w, uint y, uint x, const char c)
Draw a character in a surface window.
int ui_waddnstr(UiSurface *s, ss_t w, const char *text, int m)
Draw a text string in a surface window, with a maximum length.
int ui_mvwaddnstr(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, with a maximum length.
int ui_mvwadd_wchstr(UiSurface *s, ss_t w, uint y, uint x, const UiCell *cmplx_buf)
Draw a complex character string at a specific position in a surface window.
int ui_mvwaddwstr(UiSurface *s, ss_t w, uint y, uint x, const wchar_t *wstr)
Draw a wide-character string at a specific position in a surface window.
int ui_mvwaddstr(UiSurface *s, ss_t w, uint y, uint x, const char *text)
Draw a text string at a specific position in a surface window.
int ui_mvwadd_wch(UiSurface *s, ss_t w, uint y, uint x, const UiCell *cell)
Draw a complex character at a specific position in a surface window.
int ui_mvwaddstr_fill(UiSurface *s, ss_t w, uint y, uint x, const char *str, int m)
Draw a text string at a specific position in a surface window, filling the remaining space with space...
int ui_wadd_wch(UiSurface *s, ss_t w, const UiCell *cell)
Draw a complex character in a surface window.
int ui_waddnwstr(UiSurface *s, ss_t w, const wchar_t *wstr, int m)
Draw a wide-character string in a surface window, with a maximum length.
int ui_wadd_wchstr(UiSurface *s, ss_t w, const UiCell *cmplx_buf)
Draw a complex character string in a surface window.
int ui_wadd_wchnstr(UiSurface *s, ss_t w, const UiCell *cmplx_buf, uint n)
Draw a complex character string in a surface window, with a maximum length.
int ui_waddch(UiSurface *s, ss_t w, const char c)
on specified window, at current location, add character
int init_cnt
Definition mem.c:28
void view_full_screen_resize(Init *)
Resize the full screen view and its components.
Definition init_view.c:93
void view_boxwin_resize(Init *)
Resize the current window and its box.
Definition init_view.c:228
ViewStack view_stack
Definition init_view.c:32
#define TRUE
Definition iloan.c:31
int popup_ckeys()
Definition curskeys.c:31
#define ATTR_FORMAT(archetype, fmt_idx, first_arg)
Definition lf.h:67
#define LOG_LEVEL_LIST(X)
Definition lf.h:89
#define min(x, y)
Definition lf.h:158
#define __atexit
This macro registers the end_pgm function to be called when the program exits.
Definition lf.h:292
#define MAXLEN
Definition lf.h:38
void cmenu_shutdown(Init *init)
Definition menu.c:88
void cmenu_abend(Init *init, int ec, char *s)
Definition menu.c:94
uint form_yx_to_fidx(Form *, uint, uint)
int cf_accept(UiSurface *sfc, ss_t w, char *accept_s, uint flin, uint fcol, uint flen)
Accepts input for a field in a C-Menu window.
Definition cm_fields.c:41
bool f_erase_remainder
Structure to hold field information for C-Menu.
Definition cm_fields.c:30
char em1[MAXLEN]
Definition lf.c:43
char em2[MAXLEN]
Definition lf.c:44
char em3[MAXLEN]
Definition lf.c:45
char em0[MAXLEN]
Definition lf.c:42
int process_config_file(char *, Init *)
Definition init.c:690
void display_field(UiCell *cmplx_buf, uint y, uint x)
Definition fields.c:355
char ff_tbl[][26]
Definition fields.c:25
struct termios shell_tioctl
Definition scriou.c:22
int fork_exec(char **)
Fork and exec a command.
Definition exec.c:122
int shell(char *)
Execute a shell command.
Definition exec.c:74
int full_screen_fork_exec(char **)
Execute a command in full screen mode.
Definition exec.c:45
int full_screen_shell(char *)
Execute a shell command in full screen mode.
Definition exec.c:58
int fork_detach_execvp(char **eargv)
Fork, set new session ID, close files, and execute detached command.
Definition detach.c:41
int form_fmt_field(Form *form, char *s)
Format field according to its format type.
Definition fields.c:449
bool is_valid_date(uint yyyy, uint mm, uint dd)
Check if a given date is valid, including leap years.
Definition fields.c:612
int field_editor(Form *)
Accept input for a field.
Definition fields.c:47
void numeric(char *d, char *s)
Extract numeric characters from source string to destination string.
Definition fields.c:649
bool is_valid_time(uint hh, uint mm, uint ss)
Check if a given time is valid.
Definition fields.c:633
void right_justify(char *, uint)
Right justify string by removing trailing spaces and adding leadingspaces.
Definition fields.c:586
void left_justify(char *s)
Left justify string by removing leading spaces.
Definition fields.c:573
int form_display_field_n(Form *, uint)
Display field n.
Definition fields.c:348
int form_display_field(Form *)
Display current field.
Definition fields.c:370
int form_desc_error(Form *form, int, char *, char *)
Handle errors encountered while parsing the form description file, providing detailed error messages ...
int init_form(Init *, int, char **, uint, uint)
Initialize form data structure and parse description file.
Definition form_engine.c:61
int field_navigator(Form *)
Handle user input for field entry, allowing navigation between fields and looping until an exit actio...
bool locate_file_in_path(char *, char *)
Locates a file in the system PATH.
Definition futil.c:1318
size_t canonicalize_file_spec(char *)
Removes quotes and trims at first space.
Definition futil.c:1372
size_t strnz__cpy(char *, const char *, size_t)
safer alternative to strncpy
Definition lf.c:2299
bool parse_local_timestamp(const char *, time_t *)
Parses an ISO 8601 timestamp string in local time and converts it to time_t.
Definition futil.c:249
bool trim_ext(char *, char *)
trims the file extension from "filename" and copies the result to "buf"
Definition futil.c:1057
bool stripz_quotes(char *)
removes leading and trailing double quotes if present
Definition futil.c:745
size_t trim(char *)
Trims leading and trailing spaces from string s in place.
Definition futil.c:360
char * get_local_timestamp()
Returns the current local time as an ISO 8601 formatted string.
Definition futil.c:283
bool is_directory(const char *)
Check if a given path is a directory.
Definition lf.c:2358
bool file_spec_path(char *, char *)
extracts the path component of a file specification
Definition futil.c:911
bool str_to_upper(char *)
Converts a string to uppercase.
Definition futil.c:502
bool dir_name(char *, char *)
Returns the directory name of a file specification.
Definition futil.c:1180
bool is_hex_str(char *, uint)
Validates that a string consists of exactly len hexadecimal digits.
Definition futil.c:196
double str_to_double(char *)
converts string to double
Definition futil.c:970
bool str_to_lower(char *)
Converts a string to lowercase.
Definition futil.c:488
size_t strnz(char *, size_t)
terminates string at New Line, Carriage Return, or max_len
Definition futil.c:621
size_t ssnprintf(char *, size_t, const char *,...)
Custom safe string formatting utility (Variadic version).
Definition futil.c:398
bool strip_quotes(char *)
removes leading and trailing double quotes if present
Definition futil.c:732
int str_to_args(char **, char *, uint)
Converts a string into an array of argument strings.
Definition futil.c:418
bool is_valid_regex(const char *)
Check if a given path is a regular file.
Definition lf.c:2374
bool expand_tilde(char *, uint)
Expand a tilde (~) in a file path to the user's home directory.
Definition lf.c:2089
char * strnz_dup(char *, size_t)
Allocates memory for and duplicates string s up to length l or until line feed or carriage return.
Definition futil.c:664
bool file_spec_name(char *, char *)
extracts the file name component of a file specification
Definition futil.c:938
char size_t strip_ansi(char *, char *)
Strips ANSI SGR escape sequences (ending in 'm') from string s to d.
Definition futil.c:870
bool mk_dir(char *dir)
If directory doesn't exist, make it.
Definition futil.c:1351
size_t strnz__cat(char *, const char *, size_t)
safer alternative to strncat
Definition lf.c:2330
bool get_argp_doc_by_name(char *comment, const struct argp_option *, const char *)
Retrieves the documentation string for a given key name from an argp options array.
Definition futil.c:163
char * get_ip_addresses(char *, uint)
Retrieves the IP addresses of the local machine and formats them into a string.
Definition futil.c:323
bool is_symlink_to_dir(const char *)
Check if a given path is a symbolic link that points to a directory.
Definition lf.c:2220
bool verify_file(char *, uint)
Verifies that the file specified by "in_spec" exists and is accessible with the permissions specified...
Definition futil.c:1271
size_t strnlf(char *, size_t)
terminates string with line feed
Definition futil.c:641
int a_toi(char *, bool *)
a safer alternative to atoi() for converting ASCII strings to integers.
Definition futil.c:806
bool str_subc(char *, char *, char, char *, uint)
Replaces "ReplaceChr" in "s" with "Withstr" in "d" won't copy more than "l" bytes to "d" Replaces all...
Definition futil.c:702
char * strerror__r(int errnum, char *buf, size_t buflen)
A thread-safe alternative to strerror() that writes the error message corresponding to errnum into th...
Definition futil.c:770
int destroy_argv(uint argc, char **argv)
Deallocates memory allocated for argument strings in argv.
Definition futil.c:474
bool chrep(char *, char, char)
Replaces all occurrences of old_chr in s with new_chr in place.
Definition futil.c:787
size_t vssnprintf(char *buf, size_t buf_size, const char *format, va_list args)
Custom safe string formatting utility (va_list version).
Definition futil.c:377
bool base_name(char *, char *)
Returns the base name of a file specification.
Definition futil.c:1154
bool normalize_file_spec(char *)
replace backslashes with forward lashes
Definition futil.c:894
char * format_local_timestamp(time_t, char *, size_t)
Formats a time_t as an ISO 8601 string in local time.
Definition futil.c:272
bool is_newer(char *, char *)
Checks if the file specified by "fut" is newer than the file specified by "control".
Definition futil.c:147
char * fdname(int, char *)
Retrieves the file path associated with a given file descriptor.
Definition futil.c:1095
bool verify_dir(char *, uint)
Verifies that the directory specified by "spec" exists and is accessible with the permissions specifi...
Definition futil.c:1220
char * get_user_str(char *, size_t)
Retrieves the current user's name and UID, and formats it into a string.
Definition futil.c:296
bool trim_path(char *)
Trims trailing spaces and slashes from directory path in place.
Definition futil.c:1029
unsigned long a_to_ul(const char *)
Convert a string to an unsigned long with optional size suffixes.
Definition lf.c:2241
bool unstr_hex_clr(char *, char *)
Validates that a string is a hex color code in the format "#RRGGBB".
Definition futil.c:219
size_t string_cpy(String *, const String *)
Copy src String to dest String, allocating additional memory for dest String if necessary.
Definition futil.c:1606
String to_string(const char *)
String functions provide a simple string library to facilitate string manipulation in C,...
Definition futil.c:1552
size_t string_ncpy(String *, const String *, size_t)
copies up to n characters from src String to dest String, allocating additional memory for dest Strin...
Definition futil.c:1663
size_t string_cat(String *, const String *)
Concatenates src String to dest String, allocating additional memory for dest String if necessary.
Definition futil.c:1623
String free_string(String)
Free the dynamically allocated String.
Definition futil.c:1591
size_t string_ncat(String *, const String *, size_t)
Concatenates up to n characters from src String to dest String, allocating additional memory for dest...
Definition futil.c:1642
int segmentation_fault()
Function to intentionally cause a segmentation fault for testing purposes.
Definition futil.c:1688
int parse_opt_args(Init *, int, char **)
Parse command-line options and set Init struct values accordingly.
Definition init.c:618
bool derive_file_spec(char *, char *, char *)
Derive full file specification from directory and file name.
Definition init.c:1426
int write_config(Init *init)
Write the current configuration to a file specified in init->minitrc.
Definition init.c:1152
void mapp_initialization(Init *, int, char **)
Main initialization function for MAPP - Menu Application.
Definition init.c:494
void zero_opt_args(Init *)
Initialize optional arguments in the Init struct to default values.
Definition init.c:633
void view_calc_boxwin_dimensions(Init *)
Calculate the dimensions and position of the box window for C-Menu View.
Definition init_view.c:245
int init_view_full_screen(Init *init)
Initialize C-Menu View in full screen mode.
Definition init_view.c:48
int init_view_boxwin(Init *init)
Initialize the C-Menu View in box window mode.
Definition init_view.c:145
void view_calc_full_screen_dimensions(Init *)
Calculate the dimensions for full screen mode.
Definition init_view.c:110
int view_init_input(Init *init, char *file_name)
Initialize the input for the C-Menu View.
Definition init_view.c:331
bool verify_spec_arg(char *, char *, char *, char *, uint)
Verify file specification argument.
Definition mem.c:361
Pick * new_pick(Init *init, int argc, char **argv, uint begy, uint begx)
Create and initialize Pick structure.
Definition mem.c:178
View * destroy_view(Init *init)
Destroy View structure.
Definition mem.c:337
Menu * new_menu(Init *init, int argc, char **argv, uint begy, uint begx)
Create and initialize Menu structure.
Definition mem.c:126
Init * new_init(int argc, char **argv)
Create and initialize Init structure.
Definition mem.c:60
Menu * destroy_menu(Init *init)
Destroy Menu structure.
Definition mem.c:147
Form * destroy_form(Init *init)
Destroy Form structure.
Definition mem.c:267
View * new_view(Init *init)
Create and initialize View structure.
Definition mem.c:291
Init * destroy_init(Init *init)
Destroy Init structure.
Definition mem.c:91
Form * new_form(Init *init, int argc, char **argv, uint begy, uint begx)
Create and initialize Form structure.
Definition mem.c:244
Pick * destroy_pick(Init *init)
Destroy Pick structure.
Definition mem.c:217
unsigned int menu_engine(Init *)
The main loop of the menu system.
Definition menu_engine.c:36
unsigned int get_command_type(char *)
Get command type from command string.
unsigned int parse_menu_description(Init *)
Parse menu description file and create Menu.
void save_object(Pick *, char *)
Saves a string as an object in the pick structure.
void toggle_object(Pick *)
Toggles the selection state of the currently selected object in pick window.
int output_objects(Pick *)
Outputs selected objects to specified output file.
int init_pick(Init *, int, char **, uint, uint)
Initializes pick structure and opens pick input file or pipe.
Definition pick_engine.c:68
void reverse_object(Pick *)
Reverses the display of the currently selected object in pick window.
void display_pick_page(Pick *)
Displays current page of objects in pick window.
bool restore_program_tioctl()
restore_program_tioctl() - restore program terminal settings
Definition scriou.c:84
bool capture_shell_tioctl()
capture_shell_tioctl() - capture shell terminal settings
Definition scriou.c:43
char di_getch()
get single character from terminal in raw mode
Definition scriou.c:158
bool mk_raw_tioctl(struct termios *)
mk_raw_tioctl() - set terminal to raw mode
Definition scriou.c:132
bool set_sane_tioctl(struct termios *)
set_sane_tioctl() - set terminal to sane settings for C-MENU
Definition scriou.c:99
bool restore_shell_tioctl()
restore_shell_tioctl() - restore shell terminal settings
Definition scriou.c:57
bool capture_program_tioctl()
capture_program_tioctl() - capture program terminal settings
Definition scriou.c:70
void sig_dfl_mode()
Set signal handlers to default behavior.
Definition sig.c:41
void signal_handler(int)
Signal handler for interrupt signals.
Definition sig.c:94
void sig_prog_mode()
Set up signal handlers for interrupt signals.
Definition sig.c:61
int view_file(Init *)
Start view.
void cat_file(View *)
Concatenate File to Standard Output.
int view_cmd_processor(Init *)
Main Command Processing Loop for View.
void build_prompt(View *)
Build Prompt String.
void initialize_line_table(View *)
Initialize Line Table.
void destroy_line_table(View *)
Destroy Line Table.
void page_next(View *)
Advance to Next Page.
int pad_refresh(View *)
Refresh Pad and Line Number Window.
int display_prompt(View *, char *)
Display Command Line Prompt.
int ui_perror(char *emsg_str)
Display a simple error message window or print to stderr.
Definition ui_common.c:1323
void ui_unregister_read_fd(int fd)
Unregister an external file descriptor from polling.
Definition ui_common.c:1195
void ui_register_read_fd(int fd, int token_id)
Register an external file descriptor for polling.
Definition ui_common.c:1178
int ui_timeout_prompt(char *msg0, char *msg1, uint timeout_ms, uint timeout_secs)
Display a timeout prompt window or print to stderr.
Definition ui_common.c:1094
int ui_update_timeout_prompt(UiSurface *sfc, ss_t w, uint timeout_ms)
Update the timeout prompt with the remaining time.
Definition ui_common.c:1157
int ui_poll_reg_read_fd(int timeout_ms)
Poll for input on registered external files.
Definition ui_common.c:1216
bool ui_action_disposition(char *title, char *action_str)
Display a simple action disposition message window or print to stderr.
Definition ui_common.c:1379
int ui_answer_yn(char *msg0, char *msg1, char *msg2, char *msg3)
Accept a single letter answer.
Definition ui_common.c:1033
int ui_display_error(char *msg0, char *msg1, char *msg2, char *msg3)
Display an error message window or print to stderr.
Definition ui_common.c:1261
UiBackend ui_get_backend()
Get the UI backend type.
Definition ui_ncurses.c:55
uint mm
Definition cm.h:75
uint dd
Definition cm.h:76
uint yyyy
Definition cm.h:74
uint hh
Definition cm.h:80
uint mm
Definition cm.h:81
uint ss
Definition cm.h:82
char * s
Definition cm.h:405
size_t l
Definition cm.h:406
Arg ** v
Definition cm.h:409
size_t n
Definition cm.h:410
size_t l
Definition cm.h:414
char * s
Definition cm.h:413
size_t l
Definition cm.h:418
wchar_t * s
Definition cm.h:417
char fill_char
Definition cm.h:430
uint ff
Definition cm.h:429
uint flen
Definition cm.h:428
uint fcol
Definition cm.h:427
uint flin
Definition cm.h:426
bool cf_erase_remainder
Definition cm.h:431
char title[MAXLEN]
Definition common.h:132
char mapp_data[MAXLEN]
Definition common.h:151
char minitrc[MAXLEN]
Definition common.h:177
bool f_out_spec
Definition common.h:174
UiLogLevel log_min_level
Definition common.h:183
char mapp_help[MAXLEN]
Definition common.h:152
int begx
Definition common.h:121
bool f_title
Definition common.h:169
char chyron_s[MAXLEN]
Definition common.h:131
SIO * sio
Definition common.h:117
int pick_cnt
Definition common.h:192
bool f_cmd_all
Definition common.h:168
Form * form
Definition common.h:189
char in_spec[MAXLEN]
Definition common.h:171
char log_file_spec[MAXLEN]
Definition common.h:181
char cmd_all[MAXLEN]
Definition common.h:126
bool f_mapp_help
Definition common.h:160
bool f_mapp_msrc
Definition common.h:161
int argc
Definition common.h:133
char fill_char[2]
Definition common.h:149
bool f_cmd
Definition common.h:167
int prompt_type
Definition common.h:129
char about_fn[MAXLEN]
Definition common.h:178
char mapp_msrc[MAXLEN]
Definition common.h:153
int cols
Definition common.h:119
int menu_cnt
Definition common.h:188
int tab_stop
Definition common.h:185
bool f_mapp_home
Definition common.h:157
bool f_erase_remainder
Definition common.h:144
bool f_mapp_data
Definition common.h:158
bool f_read_theme
Definition common.h:145
bool f_mapp_desc
Definition common.h:164
char mapp_home[MAXLEN]
Definition common.h:150
bool f_mapp_user
Definition common.h:162
char prompt_str[MAXLEN]
Definition common.h:128
bool f_squeeze
Definition common.h:140
int begy
Definition common.h:120
char parent_cmd[MAXLEN]
Definition common.h:127
char mapp_spec[MAXLEN]
Definition common.h:179
char receiver_cmd[MAXLEN]
Definition common.h:124
int h_shift
Definition common.h:186
bool wrap
Definition common.h:147
bool f_multiple_cmd_args
Definition common.h:142
int select_max
Definition common.h:184
bool f_ln
Definition common.h:146
bool f_mapp_spec
Definition common.h:159
char provider_cmd[MAXLEN]
Definition common.h:123
char out_spec[MAXLEN]
Definition common.h:172
bool f_strip_ansi
Definition common.h:139
View * view
Definition common.h:193
bool p_view_files
Definition common.h:137
Menu * menu
Definition common.h:187
bool f_at_end_remove
Definition common.h:138
int view_cnt
Definition common.h:194
char brackets[3]
Definition common.h:148
bool f_ignore_case
Definition common.h:136
char ** argv
Definition common.h:134
int lines
Definition common.h:118
char mapp_user[MAXLEN]
Definition common.h:154
char cmd[MAXLEN]
Definition common.h:125
char mapp_theme[MAXLEN]
Definition common.h:155
uint timeout_secs
Definition common.h:182
int optind
Definition common.h:135
bool f_help_spec
Definition common.h:170
bool f_receiver_cmd
Definition common.h:166
bool f_provider_cmd
Definition common.h:165
int form_cnt
Definition common.h:190
char help_spec[MAXLEN]
Definition common.h:180
char editor[MAXLEN]
Definition common.h:175
Pick * pick
Definition common.h:191
bool f_in_spec
Definition common.h:173
char menuapp[MAXLEN]
Definition common.h:176
uint col
Definition form.h:102
char str[SCR_COLS]
Definition form.h:104
uint len
Definition form.h:106
uint line
Definition form.h:100
UiCell accept_cc[FIELD_MAXLEN]
Definition form.h:142
char display_s[FIELD_MAXLEN]
Definition form.h:130
UiCell display_cc[FIELD_MAXLEN]
Definition form.h:135
char accept_s[FIELD_MAXLEN]
Definition form.h:126
uint col
Definition form.h:115
uint ff
Definition form.h:119
uint len
Definition form.h:117
char input_s[FIELD_MAXLEN]
Definition form.h:123
UiCell filler_cc[FIELD_MAXLEN]
Definition form.h:141
uint line
Definition form.h:113
char filler_s[FIELD_MAXLEN]
Definition form.h:136
uint dcnt
Definition form.h:332
uint bo_clr_idx
Definition form.h:149
uint fg_clr_idx
Definition form.h:147
FILE * out_fp
Definition form.h:163
Text * text[FIELD_MAXCNT]
Definition form.h:340
uint cols
Definition form.h:151
bool f_in_pipe
Definition form.h:223
bool f_mapp_spec
Definition form.h:194
wchar_t brktr[5]
Definition form.h:296
bool f_erase_remainder
Definition form.h:237
Field * field[FIELD_MAXCNT]
Definition form.h:353
char receiver_cmd[MAXLEN]
Definition form.h:180
bool f_process
Definition form.h:248
uint fidx
Definition form.h:310
char provider_cmd[MAXLEN]
Definition form.h:172
bool f_query
Definition form.h:250
UiChyron * chyron
Definition form.h:365
int out_fd
Definition form.h:167
uint didx
Definition form.h:325
bool f_out_pipe
Definition form.h:228
uint begy
Definition form.h:152
bool f_provider_cmd
Definition form.h:258
bool f_calculate
Definition form.h:246
char fill_char[4]
Definition form.h:299
bool help
Definition form.h:252
bool f_cmd
Definition form.h:273
bool f_help_spec
Definition form.h:233
FILE * in_fp
Definition form.h:161
char out_spec[MAXLEN]
Definition form.h:210
uint lines
Definition form.h:150
bool f_receiver_cmd
Definition form.h:265
wchar_t brktl[5]
Definition form.h:293
bool f_multiple_cmd_args
Definition form.h:245
uint begx
Definition form.h:154
char in_spec[MAXLEN]
Definition form.h:203
char mapp_spec[FIELD_MAXLEN]
Definition form.h:169
char cmd[MAXLEN]
Definition form.h:187
char title[MAXLEN]
Definition form.h:159
char brackets[3]
Definition form.h:281
uint bg_clr_idx
Definition form.h:148
bool f_out_spec
Definition form.h:220
bool f_in_spec
Definition form.h:217
uint fcnt
Definition form.h:318
int in_fd
Definition form.h:165
char help_spec[MAXLEN]
Definition form.h:196
char * choice_text
Definition menu.h:78
void * ui_surface
Definition menu.h:65
void * ui_runtime
Definition menu.h:58
char * raw_text
Definition menu.h:75
char * command_str
Definition menu.h:93
unsigned int type
Definition menu.h:73
uint letter_pos
Definition menu.h:84
char choice_letter
Definition menu.h:81
uint command_type
Definition menu.h:87
char provider_cmd[MAXLEN]
Definition menu.h:154
uint bg_clr_idx
Definition menu.h:108
char mapp_spec[MAXLEN]
Definition menu.h:143
int argc
Definition menu.h:137
Line * line[MAX_MENU_LINES]
Definition menu.h:222
bool f_help_spec
Definition menu.h:181
char cmd[MAXLEN]
Definition menu.h:169
bool f_provider_cmd
Definition menu.h:186
uint fg_clr_idx
Definition menu.h:105
uint text_max_len
Definition menu.h:209
uint begy
Definition menu.h:117
bool f_mapp_spec
Definition menu.h:176
uint cols
Definition menu.h:115
char receiver_cmd[MAXLEN]
Definition menu.h:162
uint bo_clr_idx
Definition menu.h:111
bool f_receiver_cmd
Definition menu.h:193
bool f_cmd
Definition menu.h:199
uint choice_max_len
Definition menu.h:203
char help_spec[MAXLEN]
Definition menu.h:149
uint begx
Definition menu.h:120
uint line_idx
Definition menu.h:218
uint lines
Definition menu.h:113
char ** argv
Definition menu.h:140
uint item_count
Definition menu.h:215
char title[MAXLEN]
Definition menu.h:134
off_t sl_ln_no
Definition view.h:50
uint sl_cnt
Definition view.h:56
uint sl_cols[MAXLEN]
Definition view.h:53
uint sl_idx
Definition view.h:55
UiCell * sl_cc[MAXLEN]
Definition view.h:52
uint sl_cells[MAXLEN]
Definition view.h:54
char * sl_s[MAXLEN]
Definition view.h:51
uint smaxrow
Definition view.h:133
char provider_cmd[MAXLEN]
Definition view.h:74
uint sminrow
Definition view.h:129
char in_spec[MAXLEN]
Definition view.h:141
char * lnbuf_curr_ptr
Definition view.h:178
off_t page_top_ln_no
Definition view.h:158
char stripped_line_out[PAD_COLS+1]
Definition view.h:116
off_t srch_curr_ln_no
Definition view.h:160
uint ln_clr_idx
Definition view.h:63
char ln_bg_clr_x[COLOR_LEN]
Definition view.h:69
char fg_clr_x[COLOR_LEN]
Definition view.h:65
int argc
Definition view.h:80
int optind
Definition view.h:82
char ** argv
Definition view.h:81
bool f_search_complete
Definition view.h:107
int next_cmd_char
Definition view.h:97
uint page_bot_sl_idx
Definition view.h:195
char * buf
Definition view.h:173
uint maxcol
Definition view.h:126
bool wrap
Definition view.h:190
uint smincol
Definition view.h:131
char * line_out_p
Definition view.h:119
char * line_in_end_p
Definition view.h:121
int in_fd
Definition view.h:165
off_t srch_curr_pos
Definition view.h:156
uint bo_clr_idx
Definition view.h:62
bool f_in_spec
Definition view.h:144
off_t page_top_pos
Definition view.h:153
FILE * in_fp
Definition view.h:168
off_t file_pos
Definition view.h:151
bool page_bot_sl
Definition view.h:193
uint lines
Definition view.h:70
off_t ln_no
Definition view.h:184
char prompt_str[MAXLEN]
Definition view.h:78
off_t prev_file_pos
Definition view.h:152
uint begx
Definition view.h:73
bool f_bod
Definition view.h:99
bool f_first_iter
Definition view.h:106
char line_in_s[PAD_COLS+1]
Definition view.h:114
char help_spec[MAXLEN]
Definition view.h:143
bool f_redisplay_page
Definition view.h:104
char * file_spec_ptr
Definition view.h:147
off_t ln_pos_max
Definition view.h:189
char * next_file_spec_ptr
Definition view.h:148
int stdout_fd
Definition view.h:171
bool f_is_pipe
Definition view.h:102
bool f_ignore_case
Definition view.h:83
char * lnbuf
Definition view.h:177
uint ln_bg_clr_idx
Definition view.h:64
bool f_cmd_all
Definition view.h:112
bool f_help_spec
Definition view.h:146
char line_out_s[PAD_COLS+1]
Definition view.h:115
char cmd[MAXLEN]
Definition view.h:76
bool page_top_sl
Definition view.h:192
off_t srch_beg_ln_no
Definition view.h:161
bool f_in_pipe
Definition view.h:163
int tmp_fd
Definition view.h:166
char receiver_cmd[MAXLEN]
Definition view.h:75
char * buf_curr_ptr
Definition view.h:174
off_t * ln_tbl
Definition view.h:186
bool f_full_screen
Definition view.h:108
bool f_ln
Definition view.h:183
bool f_strip_ansi
Definition view.h:86
bool f_eod
Definition view.h:100
off_t mark_tbl[NMARKS]
Definition view.h:162
char ln_s[10]
Definition view.h:185
off_t ln_no_max
Definition view.h:188
bool f_cmd
Definition view.h:111
UiCell cmplx_buf[PAD_COLS+1]
Definition view.h:117
uint cmd_line
Definition view.h:125
bool f_forward
Definition view.h:101
uint page_top_sl_cnt
Definition view.h:196
off_t srch_beg_pos
Definition view.h:157
bool f_at_end_remove
Definition view.h:84
uint ln_win_cols
Definition view.h:182
uint first_match_x
Definition view.h:137
char * tmp_file_name_ptr
Definition view.h:149
uint curx
Definition view.h:123
char bo_clr_x[COLOR_LEN]
Definition view.h:67
off_t file_size
Definition view.h:150
uint scroll_lines
Definition view.h:124
char bg_clr_x[COLOR_LEN]
Definition view.h:66
bool f_squeeze
Definition view.h:85
char tmp_prompt_str[MAXLEN]
Definition view.h:90
char cur_file_str[MAXLEN]
Definition view.h:113
char * buf_end_ptr
Definition view.h:175
uint cury
Definition view.h:122
FILE * stdin_fp
Definition view.h:170
char out_spec[MAXLEN]
Definition view.h:142
bool f_timer
Definition view.h:109
int tab_stop
Definition view.h:95
uint page_bot_sl_cnt
Definition view.h:197
char title[MAXLEN]
Definition view.h:79
uint cols
Definition view.h:71
char cmd_all[MAXLEN]
Definition view.h:77
off_t page_bot_pos
Definition view.h:154
off_t page_bot_ln_no
Definition view.h:159
uint begy
Definition view.h:72
bool f_displaying_help
Definition view.h:105
int h_shift
Definition view.h:96
int curr_argc
Definition view.h:92
int out_fd
Definition view.h:167
char * lnbuf_end_ptr
Definition view.h:179
uint pmincol
Definition view.h:128
FILE * stdout_fp
Definition view.h:172
uint page_top_sl_idx
Definition view.h:194
char ln_clr_x[COLOR_LEN]
Definition view.h:68
uint smaxcol
Definition view.h:135
uint fg_clr_idx
Definition view.h:60
bool f_out_spec
Definition view.h:145
off_t page_bot_end_pos
Definition view.h:155
UiSurface * sfc
Definition view.h:89
SplitLine cur
Definition view.h:191
char file_name[MAXLEN]
Definition view.h:103
int stdin_fd
Definition view.h:169
uint ln_win_lines
Definition view.h:181
uint last_match_x
Definition view.h:139
off_t ln_tbl_size
Definition view.h:187
char * line_in_beg_p
Definition view.h:120
uint bg_clr_idx
Definition view.h:61
uint pminrow
Definition view.h:127
bool f_multiple_cmd_args
Definition view.h:87
char cmd_arg[MAXLEN]
Definition view.h:94
size_t capacity
Definition view.h:203
size_t top
Definition view.h:204
View * items
Definition view.h:202
bool f_mapp_spec
Definition pick.h:56
char ** m_object
Definition pick.h:71
UiChyron * chyron
Definition pick.h:94
uint select_idx
Definition pick.h:72
uint separator_line
Definition pick.h:92
uint tbl_line
Definition pick.h:87
bool f_cmd
Definition pick.h:69
uint pg_objs
Definition pick.h:83
bool f_provider_cmd
Definition pick.h:67
uint y
Definition pick.h:33
uint select_max
Definition pick.h:74
bool p_view_files
Definition pick.h:64
uint m_idx
Definition pick.h:77
uint tbl_cols
Definition pick.h:89
uint tbl_page
Definition pick.h:86
bool f_in_spec
Definition pick.h:57
char ** d_object
Definition pick.h:79
char cmd[MAXLEN]
Definition pick.h:54
bool f_help_spec
Definition pick.h:61
FILE * in_fp
Definition pick.h:44
bool f_out_spec
Definition pick.h:58
int argc
Definition pick.h:42
bool f_multiple_cmd_args
Definition pick.h:63
uint d_cnt
Definition pick.h:76
uint pg_lines
Definition pick.h:82
char mapp_spec[MAXLEN]
Definition pick.h:48
bool f_in_pipe
Definition pick.h:59
bool f_selected[OBJ_MAXCNT]
Definition pick.h:65
int out_fd
Definition pick.h:47
uint m_cnt
Definition pick.h:75
char title[MAXLEN]
Definition pick.h:41
bool help
Definition pick.h:66
char help_spec[MAXLEN]
Definition pick.h:51
char in_buf[BUFSIZ]
Definition pick.h:70
uint tbl_pages
Definition pick.h:85
int in_fd
Definition pick.h:46
uint fg_clr_idx
Definition pick.h:26
bool f_out_pipe
Definition pick.h:60
UiSurface * surface
Definition pick.h:40
char receiver_cmd[MAXLEN]
Definition pick.h:53
char ** argv
Definition pick.h:43
uint tab_idx
Definition pick.h:84
uint tbl_col_width
Definition pick.h:91
bool f_read_theme
Definition pick.h:62
char in_spec[MAXLEN]
Definition pick.h:49
FILE * out_fp
Definition pick.h:45
char parent_cmd[MAXLEN]
Definition pick.h:55
uint lines
Definition pick.h:29
uint x
Definition pick.h:34
uint select_cnt
Definition pick.h:73
uint d_idx
Definition pick.h:78
uint tbl_lines
Definition pick.h:88
uint bo_clr_idx
Definition pick.h:28
uint begy
Definition pick.h:31
uint tbl_col
Definition pick.h:90
uint y_offset
Definition pick.h:80
uint begx
Definition pick.h:32
uint pg_line
Definition pick.h:81
bool f_receiver_cmd
Definition pick.h:68
uint width
Definition pick.h:30
uint bg_clr_idx
Definition pick.h:27
char provider_cmd[MAXLEN]
Definition pick.h:52
char out_spec[MAXLEN]
Definition pick.h:50
bool active
Definition ui_backend.h:136
uint32_t ch
Definition ui_backend.h:130
UiMouseAction mouse_action
Definition ui_backend.h:140
bool shift
Definition ui_backend.h:133
int bstate
Definition ui_backend.h:139
char keybound[16]
Definition ui_backend.h:142
int chyron
Definition ui_backend.h:137
ss_t in_win
Definition ui_backend.h:138
bool ctrl
Definition ui_backend.h:132
UiKey key
Definition ui_backend.h:129
bool alt
Definition ui_backend.h:131
bool mouse_inside
Definition ui_backend.h:141
wchar_t w32
Definition ui_backend.h:148
char c[4]
Definition ui_backend.h:149
uint32_t u32
Definition ui_backend.h:147
nfds_t ext_nfds
Definition ui_backend.h:170
ext_fd_reg_t ext_fds[MAX_EXT_FDS]
Definition ui_backend.h:169
wchar_t wc
Definition ui_backend.h:192
short attrs
Definition ui_backend.h:193
short color_pair
Definition ui_backend.h:194
int cols
Definition ui_backend.h:213
int lines
Definition ui_backend.h:212
char * color[LOG_LEVEL_COUNT]
Definition ui_backend.h:240
char file_spec[MAXLEN]
Definition ui_backend.h:236
char timestamp[32]
Definition ui_backend.h:239
UiLogLevel min_level
Definition ui_backend.h:237
char * level[LOG_LEVEL_COUNT]
Definition ui_backend.h:241
UiBorderStyle border_style
Definition ui_backend.h:486
char * log_file
Definition ui_backend.h:487
UiLogLevel log_level
Definition ui_backend.h:488
bool palette256
Definition ui_backend.h:499
bool mouse
Definition ui_backend.h:500
bool pad_relative_yx
Definition ui_backend.h:504
int color_pairs
Definition ui_backend.h:503
bool truecolor
Definition ui_backend.h:498
bool unicode
Definition ui_backend.h:501
bool resize
Definition ui_backend.h:502
wchar_t cr
Definition ui_backend.h:617
wchar_t tl
Definition ui_backend.h:618
wchar_t bt
Definition ui_backend.h:616
wchar_t rt
Definition ui_backend.h:614
wchar_t tr
Definition ui_backend.h:619
wchar_t br
Definition ui_backend.h:621
wchar_t bl
Definition ui_backend.h:620
wchar_t lt
Definition ui_backend.h:613
wchar_t str[11]
Definition ui_backend.h:609
wchar_t ve
Definition ui_backend.h:612
wchar_t tt
Definition ui_backend.h:615
wchar_t ho
Definition ui_backend.h:611
uint32_t ran_bg
Definition ui_backend.h:794
double green_gamma
Definition ui_backend.h:747
uint32_t ln_bg
Definition ui_backend.h:780
ushort cp_ran
Definition ui_backend.h:823
FILE * stdout_fp
Definition ui_backend.h:796
ushort cp_ind
Definition ui_backend.h:819
double blue_gamma
Definition ui_backend.h:748
ushort cp_nt_hl
Definition ui_backend.h:816
uint32_t abg
Definition ui_backend.h:768
char brackets[3]
Definition ui_backend.h:807
uint32_t magenta
Definition ui_backend.h:755
uint32_t cmdln_bg
Definition ui_backend.h:782
ushort cp_title
Definition ui_backend.h:821
int stdout_fd
Definition ui_backend.h:800
uint32_t cmdln_fg
Definition ui_backend.h:781
ushort cp_default
Definition ui_backend.h:811
int stderr_fd
Definition ui_backend.h:801
uint32_t nt_hl_rev_fg
Definition ui_backend.h:789
uint clr_cnt
Definition ui_backend.h:803
uint32_t ran_fg
Definition ui_backend.h:793
ushort cp_brackets
Definition ui_backend.h:813
ushort cp_cmdln
Definition ui_backend.h:820
FILE * stdin_fp
Definition ui_backend.h:795
uint32_t bgreen
Definition ui_backend.h:761
ushort cp_ln
Definition ui_backend.h:822
double red_gamma
Definition ui_backend.h:746
ushort cp_box
Definition ui_backend.h:818
uint32_t green
Definition ui_backend.h:752
char fill_char[2]
Definition ui_backend.h:808
ushort cp_nt
Definition ui_backend.h:814
FILE * tty_fp
Definition ui_backend.h:798
uint32_t nt_fg
Definition ui_backend.h:783
uint32_t yellow
Definition ui_backend.h:753
uint32_t fill_char_fg
Definition ui_backend.h:777
uint32_t box_fg
Definition ui_backend.h:771
ushort cp_nt_hl_rev
Definition ui_backend.h:817
uint clr_pair_cnt
Definition ui_backend.h:804
uint32_t orange
Definition ui_backend.h:758
ushort cp_bold
Definition ui_backend.h:825
uint32_t ln_fg
Definition ui_backend.h:779
uint32_t ind_bg
Definition ui_backend.h:774
FILE * stderr_fp
Definition ui_backend.h:797
uint32_t bmagenta
Definition ui_backend.h:764
uint32_t ind_fg
Definition ui_backend.h:773
uint32_t byellow
Definition ui_backend.h:762
uint clr_pair_idx
Definition ui_backend.h:806
char tty_name[MAXLEN]
Definition ui_backend.h:810
uint32_t bblue
Definition ui_backend.h:763
uint32_t borange
Definition ui_backend.h:767
uint32_t title_bg
Definition ui_backend.h:792
uint32_t fg
Definition ui_backend.h:769
uint32_t cyan
Definition ui_backend.h:756
uint32_t bblack
Definition ui_backend.h:759
uint32_t red
Definition ui_backend.h:751
ushort cp_fill_char
Definition ui_backend.h:812
uint32_t nt_hl_rev_bg
Definition ui_backend.h:790
uint32_t title_fg
Definition ui_backend.h:791
uint32_t bred
Definition ui_backend.h:760
uint32_t fill_char_bg
Definition ui_backend.h:778
uint32_t black
Definition ui_backend.h:750
ushort cp_chk
Definition ui_backend.h:824
uint32_t nt_rev_bg
Definition ui_backend.h:786
uint32_t brackets_bg
Definition ui_backend.h:776
uint32_t bcyan
Definition ui_backend.h:765
uint clr_idx
Definition ui_backend.h:805
uint32_t nt_bg
Definition ui_backend.h:784
uint32_t blue
Definition ui_backend.h:754
int tty_fd
Definition ui_backend.h:802
uint32_t brackets_fg
Definition ui_backend.h:775
uint32_t white
Definition ui_backend.h:757
uint32_t box_bg
Definition ui_backend.h:772
ushort cp_nt_rev
Definition ui_backend.h:815
uint32_t nt_hl_fg
Definition ui_backend.h:787
int stdin_fd
Definition ui_backend.h:799
uint32_t bwhite
Definition ui_backend.h:766
char border
Definition ui_backend.h:809
uint32_t nt_rev_fg
Definition ui_backend.h:785
double gray_gamma
Definition ui_backend.h:749
uint32_t nt_hl_bg
Definition ui_backend.h:788
uint32_t bg
Definition ui_backend.h:770
NcVisual * ncv
Definition ui_backend.h:830
UiSurface * sfc
Definition ui_backend.h:831