C-Menu 0.2.9
A User Interface Toolkit
Loading...
Searching...
No Matches
ui_backend.h
Go to the documentation of this file.
1#ifndef UI_BACKEND_H
2#define UI_BACKEND_H 1
3
4/** @file ui_backend.h
5 @ingroup ui_backend
6 @brief Backend API for terminal UI library
7*/
8#define _XOPEN_SOURCE_EXTENDED 1
9#define _GNU_SOURCE
10#define NCURSES_WIDECHAR 1
11
12#ifdef UAL_UI
13#include "../ui/ui_ncurses_internal.h"
14#include <ncursesw/ncurses.h>
15#include <ncursesw/panel.h>
16#endif
17#ifdef NOTCURSES_UI
18#include "../ui/ui_notcurses_internal.h"
19#include <notcurses/notcurses.h>
20#endif
21#include <stdbool.h>
22#include <stddef.h>
23#include <stdint.h>
24#define UI_SFC_MAX 30
25#define SFC_MAX 30
26
27extern int sfc_ptr;
28extern int win_ptr;
29
30typedef struct UiRuntime UiRuntime;
31typedef struct UiSurface UiSurface;
32typedef struct UiSplitSurface UiSplitSurface;
33typedef union UiChannels UiChannels;
34typedef struct UiMB UiMB;
35typedef uint16_t UiStyle;
36typedef uint16_t UiPairIdx;
37typedef uint UiColorIdx;
38
39#define UI_COLORS 512
40#define UI_PAIRS 512
41
42typedef enum {
74} UiKey;
75
76typedef enum {
83} UiMouseAction;
84
85typedef enum {
90} UiBorderKind;
91
92#define ALLWINS (uint)1000
93
94typedef struct {
95 wchar_t wc; // Wide character 4-bytes
96 short attrs; // attributes 2-bytes
97 short color_pair; // color pair index 2-bytes
98} UiCchar64; // total 8-bytes
99
100typedef struct {
101 UiKey key;
102 uint32_t ch; /* Unicode codepoint when key == UI_KEY_CHAR */
103 bool alt;
104 bool ctrl;
105 bool shift;
106 uint y;
107 uint x;
108 bool active;
110 uint in_win;
112 UiMouseAction mouse_action;
114 char keybound[16];
115} UiEvent;
116
117typedef struct {
118 int y;
119 int x;
120 int lines;
121 int cols;
122} UiRect;
123
124/** @struct UiConfig
125 @brief Structure representing the configuration options for the UI runtime.
126 @ingroup ui_backend
127 @details The UiConfig structure encapsulates the configuration options that
128 can be set when initializing the UI runtime. This includes enabling mouse
129 support, using an alternate screen buffer, and controlling cursor visibility.
130 The enable_mouse field allows you to specify whether mouse input should be
131 captured and processed by the UI. The enable_alt_screen field determines
132 whether the UI should use an alternate screen buffer, which can help prevent
133 cluttering the main terminal screen. The cursor_visible field controls
134 whether the cursor is visible while the UI is active, which can enhance the
135 user experience in certain applications. The tty_path field, if non-NULL,
136 specifies the terminal device to use; if NULL, the backend auto-detects the
137 terminal (typically via stderr). By configuring these options appropriately,
138 you can tailor the behavior of the UI runtime to suit your application's
139 needs.
140 @see ui_init
141*/
142typedef struct {
147 const char *tty_path; /**< optional TTY device path; NULL = auto-detect */
148 FILE *tty_fp; /**< optional TTY FILE pointer; NULL = auto-detect */
149} UiConfig;
150
151/** @enum UiBackend
152 @brief Identifies which terminal library is powering the UI runtime.
153 @ingroup ui_backend
154*/
155typedef enum {
156 UI_BACKEND_NCURSES = 0, /**< NCurses / NCursesW backend */
157 UI_BACKEND_NOTCURSES /**< NotCurses backend */
158} UiBackend;
159
160/** @struct UiCaps
161 @brief Capability flags reported by the active UI backend.
162 @ingroup ui_backend
163 @details Query via ui_get_caps() after ui_init() succeeds. Differences
164 between backends are made explicit through these flags so application code
165 can adapt rather than assume.
166 @see ui_get_caps
167*/
168typedef struct {
169 bool truecolor; /**< backend can display 24-bit RGB colors */
170 bool palette256; /**< backend supports at least 256 palette entries */
171 bool mouse; /**< backend can deliver mouse events */
172 bool unicode; /**< backend handles full Unicode / UTF-8 correctly */
173 bool resize; /**< backend emits UI_KEY_RESIZE on terminal resize */
174 int color_pairs; /**< max simultaneous color pairs; 0 = unlimited */
175} UiCaps;
176
177/** BOX WIDE UNICODE CODEPOINTS */
178
179extern wchar_t *border_rounded;
180extern wchar_t *border_square;
181extern wchar_t *border_double;
182extern wchar_t *border_heavy;
183
184typedef union border_wide {
185 wchar_t str[11];
186 struct {
187 wchar_t ho; /**< horizontal line */
188 wchar_t ve; /**< vertical line */
189 wchar_t lt; /**< left tee */
190 wchar_t rt; /**< right tee */
191 wchar_t tt; /**< top tee */
192 wchar_t bt; /**< bottom tee */
193 wchar_t cr; /**< cross */
194 wchar_t tl; /**< top left */
195 wchar_t tr; /**< top right */
196 wchar_t bl; /**< bottom left */
197 wchar_t br; /**< bottom right */
198 };
199} BorderWide;
200
201// extern const wchar_t *bw_ho; /**< horizontal line */
202// extern const wchar_t *bw_ve; /**< vertical line */
203// extern const wchar_t *bw_lt; /**< left tee */
204// extern const wchar_t *bw_rt; /**< right tee */
205// extern const wchar_t *bw_tt; /**< top tee */
206// extern const wchar_t *bw_bt; /**< bottom tee */
207// extern const wchar_t *bw_cr; /**< cross */
208// extern const wchar_t *bw_tl; /**< top left */
209// extern const wchar_t *bw_tr; /**< top right */
210// extern const wchar_t *bw_bl; /**< bottom left */
211// extern const wchar_t *bw_br; /**< bottom right */
212
213#define bw_ho bw.ho
214#define bw_ve bw.ve
215#define bw_lt bw.lt
216#define bw_rt bw.rt
217#define bw_tt bw.tt
218#define bw_bt bw.bt
219#define bw_cr bw.cr
220#define bw_tl bw.tl
221#define bw_tr bw.tr
222#define bw_bl bw.bl
223#define bw_br bw.br
224
225extern BorderWide bw;
226extern const wchar_t *bw_rtl;
227extern const wchar_t *bw_rtr;
228extern const wchar_t *bw_rbl;
229extern const wchar_t *bw_rbr;
230extern const wchar_t *bw_sp;
231extern const wchar_t *bw_ra;
232extern const wchar_t *bw_la;
233extern const wchar_t *bw_ua;
234extern const wchar_t *bw_da;
235extern const wchar_t *bw_ran;
236extern const wchar_t *bw_lan;
237extern const wchar_t *bw_chk;
238extern const wchar_t *bw_h09;
239
240#ifdef UAL_UI
241typedef cchar_t UiCell;
242typedef struct {
243 uint r;
244 uint g;
245 uint b;
246} STDRGB;
247#else
248#define CCHARW_MAX 5
249#define ERR -1
250typedef struct nccell UiCell;
251typedef struct ncplane NcPlane;
252typedef struct notcurses NotCurses;
253typedef struct notcurses_options NotCursesOptions;
254typedef struct ncplane_options NcPlaneOptions;
255
256typedef uint16_t attr_t;
257typedef struct UiPair UiPair;
258typedef struct UiColor UiColor;
259typedef struct {
260 uint8_t r;
261 uint8_t g;
262 uint8_t b;
263} STDRGB;
264extern NcPlane *stdplane;
265extern UiSurface *stdsfc;
266extern uint LINES, COLS;
267#define CELL_CHAR_INITIALIZER(c) {
268 .gcluster = (c),
269 .gcluster_backstop = 0,
270 .stylemask = 0,
271 .channels = 0, \
272}
273#define CELL_INITIALIZER(c, s, chan) {
274 .gcluster = (c),
275 .gcluster_backstop = 0,
276 .stylemask = (s),
277 .channels = (chan), \
278}
279#define DEFAULT_INITIALIZER(c) {
280 .gcluster = (c),
281 .gcluster_backstop = 0,
282 .stylemask = (bkgd_cell.stylemask),
283 .channels = (bkgd_cell.channels), \
284}
285#endif
286typedef struct {
287 union {
288 uint32_t u32;
289 wchar_t u16[2];
290 uint8_t u8[4];
291 char c[4];
292 };
293 uint8_t backstop;
294 uint8_t width;
295} GCluster;
296
297static inline int unicode_to_utf8_gcluster(uint32_t cp, GCluster *g) {
298 if (cp <= 0x7F) {
299 g->c[0] = (char)cp;
300 g->c[1] = '\0';
301 g->width = 1;
302 } else if (cp <= 0x7FF) {
303 g->c[0] = (char)(0xC0 | (cp >> 6));
304 g->c[1] = (char)(0x80 | (cp & 0x3F));
305 g->c[2] = '\0';
306 g->width = 2;
307 } else if (cp <= 0xFFFF) {
308 g->c[0] = (char)(0xE0 | (cp >> 12));
309 g->c[1] = (char)(0x80 | ((cp >> 6) & 0x3F));
310 g->c[2] = (char)(0x80 | (cp & 0x3F));
311 g->c[3] = '\0';
312 g->width = 3;
313 } else if (cp <= 0x10FFFF) {
314 g->c[0] = (char)(0xF0 | (cp >> 18));
315 g->c[1] = (char)(0x80 | ((cp >> 12) & 0x3F));
316 g->c[2] = (char)(0x80 | ((cp >> 6) & 0x3F));
317 g->c[3] = (char)(0x80 | (cp & 0x3F));
318 g->backstop = '\0';
319 g->width = 4;
320 }
321 return 0;
322}
323
324/* @name UI Backend API
325 @ingroup ui_backend
326 @details The following functions define the API for implementing a backend
327 for the terminal UI library. These functions cover the initialization and
328 shutdown of the UI runtime, management of surfaces, drawing operations,
329 input handling, and cursor control. Each function is designed to be
330 implemented by the backend according to the specifications provided in
331 the function comments. By implementing these functions, you can create a
332 functional backend that allows the terminal UI library to render and
333 interact with users effectively.
334 @note: ui_init should return NULL on failure and set an appropriate error
335 message that can be retrieved by the caller. The error message should provide
336 details about the reason for the failure, such as issues with terminal
337 capabilities, resource allocation failures, or unsupported features. This
338 allows the caller to handle initialization errors gracefully and provide
339 feedback to the user.
340 @see ui_backend.h
341*/
342UiRuntime *ui_init(const UiConfig *config);
343void ui_shutdown();
344void ui_render();
345int ui_clear();
346int ui_erase();
347int ui_suspend();
348int ui_resume();
349UiSurface *ui_surface_new(uint w, UiSurface *parent, uint p, uint lines, uint cols, uint y, uint x);
350UiSurface *ui_box_surface_new(UiSurface *parent, uint p, uint lines, uint cols, uint y, uint x, char *title);
351int ui_surface_addwin(UiSurface *s, uint w, uint p, uint lines, uint cols, uint y, uint x);
352int ui_surface_addpad(UiSurface *s, uint w, uint view_win, uint lines, uint cols);
353void ui_surface_destroy(UiSurface *s);
354int ui_wresize(UiSurface *s, uint w, uint lines, uint cols);
355int ui_wclear(UiSurface *s, uint w);
356int ui_werase(UiSurface *s, uint w);
357int ui_wset_base(UiSurface *s, uint w, const UiStyle *style, uint32_t fill_ch);
358int ui_wset_style(UiSurface *s, uint w, const UiStyle *style);
359int ui_draw_vline(UiSurface *s, uint w, uint y, uint x, uint len, const UiStyle *style);
360int ui_draw_border(UiSurface *s, uint w, UiBorderKind kind, const UiStyle *style);
361int ui_draw_box_title(UiSurface *s, uint w, uint x, const UiStyle *style, const char *title);
362int ui_wshow(UiSurface *s, uint w);
363int ui_whide(UiSurface *s, uint w);
364int ui_get_event(UiSurface *s, uint w, UiEvent *ev, int timeout_ms);
365int ui_get_event_multi(UiSurface *s, uint w, UiEvent *ev, int timeout_ms);
366int ui_get_event_no_mouse(UiSurface *surface, uint w, UiEvent *ev);
367int ui_wmove(UiSurface *s, uint w, uint y, uint x);
368int ui_cursor_enable(UiSurface *s, uint w, bool visible);
369int ui_cursor_enable_yx(UiSurface *s, uint w, uint y, uint x, bool visible);
370int ui_curs_set(int visibility);
371int ui_wscrl(UiSurface *s, uint w, int rows);
372int ui_wclrtoeol(UiSurface *s, uint w);
373int ui_wclrtobot(UiSurface *s, uint w);
374void ui_getyx(UiSurface *s, uint w, uint *lines, uint *cols);
375void ui_getmaxyx(UiSurface *s, uint w, uint *lines, uint *cols);
376int ui_draw_ch(UiSurface *s, uint w, const char c);
377int ui_draw_ch_yx(UiSurface *s, uint w, uint y, uint x, const char c);
378int ui_draw_text(UiSurface *s, uint w, uint y, uint x, const char *text);
379int ui_draw_text_n(UiSurface *s, uint w, uint y, uint x, const char *text, int m);
380int ui_draw_text_fill(UiSurface *s, uint w, uint y, uint x, const char *text, int m);
381
382// ----------------
383// char
384// ----------------
385// waddch
386// mvwaddch
387// wechochar
388// ----------------
389// string char
390// ----------------
391// waddstr
392// mvwaddstr
393// waddnstr
394// mvwaddnstr
395// ----------------
396// chtype
397// ----------------
398// waddchstr
399// mvwaddchstr
400// waddchnstr
401// mvwaddchnstr
402// ----------------
403// wchar_t
404// ----------------
405// waddwstr
406// mvwaddwstr
407// waddnwstr
408// mvwaddnwstr
409// ----------------
410// cchar_t
411// ----------------
412// wadd_wchstr
413// mvwadd_wchstr
414// wadd_wchnstr
415// mvwadd_wchnstr
416
417int ui_getch();
418int ui_waddch(UiSurface *s, uint w, const char c);
419int ui_mvwaddch(UiSurface *s, uint w, uint y, uint x, const char c);
420
421int ui_waddstr(UiSurface *s, uint w, const char *text);
422int ui_mvaddstr(UiSurface *s, uint w, uint y, uint x, const char *text);
423int ui_mvwaddstr(UiSurface *s, uint w, uint y, uint x, const char *text);
424int ui_waddnstr(UiSurface *s, uint w, const char *text, int m);
425int ui_mvwaddstr(UiSurface *s, uint w, uint y, uint x, const char *text);
426int ui_mvwaddstr_fill(UiSurface *s, uint w, uint y, uint x, const char *str, int m);
427int ui_mvwaddnstr(UiSurface *s, uint w, uint y, uint x, const char *text, int m);
428
429int ui_waddwstr(UiSurface *s, uint w, const wchar_t *wstr);
430int ui_mvwaddwstr(UiSurface *s, uint w, uint y, uint x, const wchar_t *wstr);
431int ui_waddnwstr(UiSurface *s, uint w, const wchar_t *wstr, int m);
432int ui_mvwaddnwstr(UiSurface *s, uint w, uint y, uint x, const wchar_t *wstr, int m);
433
434// int ui_wadd_chstr(UiSurface *s, uint w, uint y, uint x, const chtype *chstr);
435// int ui_mvwadd_chstr(UiSurface *s, uint w, uint y, uint x, const chtype
436// *chstr);
437// int ui_wadd_chnstr(UiSurface *s, uint w, const chtype *cell);
438// int ui_mvwadd_chnstr(UiSurface *s, uint w, uint y, uint x, const chtype
439// *chstr);
440
441int ui_wadd_wch(UiSurface *s, uint w, const UiCell *cell);
442int ui_mvwadd_wch(UiSurface *s, uint w, uint y, uint x, const UiCell *cell);
443int ui_wadd_wchstr(UiSurface *s, uint w, const UiCell *cell);
444int ui_mvwadd_wchstr(UiSurface *s, uint w, uint y, uint x, const UiCell *cell);
445int ui_wadd_wchnstr(UiSurface *s, uint w, const UiCell *cell, uint m);
446int ui_mvwadd_wchnstr(UiSurface *s, uint w, uint y, uint x, const UiCell *cell, uint m);
447
448int ui_setscrreg(UiSurface *s, uint w, uint top, uint bottom);
449int ui_scrollok(UiSurface *s, uint w, bool enable);
450int ui_keypad(UiSurface *s, uint w, bool enable);
451int ui_idlok(UiSurface *s, uint w, bool enable);
452int ui_idcok(UiSurface *s, uint w, bool enable);
453void ui_update_panels();
454int ui_doupdate();
455int ui_wnoutrefresh(UiSurface *s, uint w);
456int ui_draw_hline(UiSurface *s, uint w, uint y, uint x, uint len, const UiStyle *style);
457int ui_mousemask(int mask);
458int ui_mice_enable(int mask);
459void ui_get_screen_size(uint *lines, uint *cols);
460int ui_wclear(UiSurface *s, uint w);
461int ui_werase(UiSurface *s, uint w);
462int ui_clear();
463int ui_erase();
464int ui_cursor_move(UiSurface *s, uint w, uint y, uint x);
465int ui_add_color_rgb(RGB *rgb);
466int ui_surface_show(UiSurface *s, uint w);
467int ui_surface_hide(UiSurface *s, uint w);
468int ui_surface_move(UiSurface *s, uint w, uint y, uint x);
469int ui_surface_resize(UiSurface *s, uint w, uint lines, uint cols);
470UiCell ui_cell_from_ucp(const wchar_t *ucp, const uint32_t *fg, const uint32_t *bg);
471uint mbstr_to_cellstr(UiCell *cmplx_buf, const char *str, const UiCell *cell_base, uint *pos, const uint atmost);
472int ui_bkgd(UiSurface *s, uint w, const UiCell *cell);
473int ui_bkgdset(UiSurface *s, uint w, const UiCell *cell);
474int ui_chg_color(uint16_t color_idx, uint32_t *color);
475uint32_t ui_get_color(uint16_t color_idx);
476void fast_exit(UiSurface *s);
477
478#ifdef NOTCURSES_UI
479typedef struct nccell UiCell;
480extern UiCell bkgd_cell;
481extern uint LINES, COLS;
482int mk_chimera(UiCell *cell, char c);
483int ui_bkgrnd(UiSurface *s, uint w, const UiCell *cell);
484int ui_bkgrndset(UiSurface *s, uint w, const UiCell *cell);
485int ui_getcchar(const UiCell *cell, wchar_t *wstr, UiStyle *style, UiPairIdx *pair, const void *opts);
486int ui_setcchar(UiCell *cell, const wchar_t *wstr, const attr_t style, ushort pair, const void *opts);
487// How do you convert "NCurses" to "Notcurses"?
488// Insert "ot" after "N".
489int ui_init_color(uint16_t color, uint8_t r, uint8_t g, uint8_t b);
490int ui_color_content(uint16_t color, uint8_t *r, uint8_t *g, uint8_t *b);
491int ui_init_pair(uint16_t pair, uint fg, uint bg);
492uint64_t ui_get_channels_from_pair(uint16_t pair);
493uint ui_init_color_hex(char *s);
494int ui_pair_content(uint16_t pair, uint *fg, uint *bg);
495int ui_get_pair(uint16_t pair, uint *fg, uint *bg);
496uint ui_add_pair(uint fg, uint bg);
497uint ui_add_color(RGB *rgb);
498uint ui_add_color_hex(char *s);
499int ui_wch_to_utf8(const wchar_t fill_ch);
500int ui_get_nccell(const UiCell *cell, wchar_t *wstr, UiStyle *style, UiPairIdx *pair);
501int ui_set_nccell(UiCell *cell, const wchar_t *wstr, const UiStyle *style, ushort *pair);
502uint get_plane_idx(UiSurface *s, NcPlane *n);
503NcPlane *ncplane_clicked(UiSurface *s, uint w, ncinput *ni);
504uint ui_getmaxx(UiSurface *s, uint w);
505uint ui_getmaxy(UiSurface *s, uint w);
506#else
507int ui_bkgrnd(UiSurface *s, uint w, const UiCell *cell);
508int ui_bkgrndset(UiSurface *s, uint w, const UiCell *cell);
509int ui_getcchar(const UiCell *uc, wchar_t *wstr, attr_t *attrs, ushort *pair, void *opts);
510int ui_setcchar(UiCell *wch, const wchar_t *wc, const attr_t attrs, short pair, const void *opts);
511int ui_init_color(uint color, uint r, uint g, uint b);
512int ui_color_content(uint color, uint *r, uint *g, uint *b);
513int ui_init_pair(uint pair, uint fg, uint bg);
514int ui_pair_content(uint pair, uint *fg, uint *bg);
515uint ui_add_pair(uint fg, uint bg);
516int ui_chg_pair(uint pair, uint fg, uint bg);
517int ui_get_pair(uint pair, uint *fg, uint *bg);
518int ui_add_color(uint r, uint g, uint b);
519SCREEN *ui_ncurses_get_screen();
520int ui_getmaxx(UiSurface *s, uint w);
521int ui_getmaxy(UiSurface *s, uint w);
522#endif
523void ui_endwin();
524RGB ui_hex_to_rgb(char *s);
525void ui_restore_wins();
526int ui_top_panel(UiSurface *s, uint w);
527
528/* @brief backend identification and capability query
529 @ingroup ui_backend */
530
531/** @brief Return which backend is powering this runtime.
532 @ingroup ui_backend
533 @param ui The UiRuntime returned by ui_init().
534 @return The UiBackend enum value for the compiled-in backend.
535*/
536UiBackend ui_get_backend();
537
538/** @brief Query the capabilities of the active backend.
539 @ingroup ui_backend
540 @param ui The UiRuntime returned by ui_init().
541 @param caps Output structure filled with capability flags.
542*/
543void ui_get_caps(UiCaps *caps);
544extern STDRGB std_color[];
545extern UiRuntime *ui;
546extern UiSurface *ui_surface[UI_SFC_MAX];
547extern uint ui_color_cnt;
548extern uint ui_pair_cnt;
549
550#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 *)
bool view_stack_peek(const ViewStack *, View *)
@ OT_INT
Definition common.h:85
@ OT_BOOL
Definition common.h:86
@ OT_HEX
Definition common.h:87
@ OT_STRING
Definition common.h:84
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:77
@ MENU
Definition common.h:79
@ VIEW
Definition common.h:76
@ PICK
Definition common.h:78
@ OG_FILES
Definition common.h:92
@ OG_DIRS
Definition common.h:93
@ OG_SPECS
Definition common.h:94
@ OG_MISC
Definition common.h:95
@ OG_FLAGS
Definition common.h:97
@ OG_PARMS
Definition common.h:96
@ OG_COL
Definition common.h:98
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 *)
int popup_view(Init *, int, char **, uint, uint, uint, uint)
instantiate a view popup window
Definition popups.c:145
char minitrc[MAXLEN]
int mpick(int, char **, int, int, int, int, char *, int)
#define OBJ_MAXCNT
Definition pick.h:17
volatile sig_atomic_t sig_received
Definition sig.c:31
size_t rtrim(char *)
Trims trailing spaces from string s in place.
Definition futil.c:331
bool handle_signal(sig_atomic_t)
void win_Toggle_Attrs()
uint rgb_to_curses_clr(RGB *)
uint mlines
uint mbegx
bool strnfill(char *, char, uint)
void sig_shell_mode()
int cmenu_log_fd
Definition futil.c:47
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()
bool wait_destroy(Chyron *)
ushort cp_ln_fg
int bare_box_new(uint, uint, uint, uint, char *)
char stdio_names_str[4096]
Definition futil.c:127
int display_ok_message(char *)
bool verify_dir_q(char *, uint)
uint dbgfd
@ F_REG
Definition cm.h:281
@ F_BLK
Definition cm.h:279
@ F_FIFO
Definition cm.h:274
@ F_F0
Definition cm.h:273
@ F_F3
Definition cm.h:280
@ F_SOCK
Definition cm.h:285
@ F_CHR
Definition cm.h:275
@ F_F5
Definition cm.h:284
@ F_F1
Definition cm.h:276
@ F_DIR
Definition cm.h:277
@ F_UNKNOWN
Definition cm.h:287
@ F_F2
Definition cm.h:278
@ F_F4
Definition cm.h:282
@ F_LNK
Definition cm.h:283
@ F_F6
Definition cm.h:286
#define KEY_ALTF0
Definition cm.h:502
uint clr_pair_cnt
uint n_lines
void restore_wins()
ushort cp_bold
bool f_curses_open
Definition sig.c:33
uint clr_cnt
#define CHYRON_KEYS
Definition cm.h:375
struct termios shell_tioctl curses_tioctl
Definition scriou.c:34
ushort cp_cmdln_bg
ushort cp_highlight
void dump_opts()
uint clr_idx
void win_del()
void win_resize(uint, uint, char *)
bool construct_file_spec(char *, char *, char *, char *, char *, uint)
char * stdio_names(char *, char *)
Definition futil.c:1057
void write_log(char *)
unsigned char uchar
Definition cm.h:594
ushort cp_cmdln_fg
void check_panels(uint)
String mk_string(size_t)
Create a String struct with a dynamically allocated string.
Definition futil.c:1526
uint clr_pair_idx
uint mg_col
uint n_cols
FILE * cmenu_log_fp
bool verify_file_q(char *, uint)
#define XTERM_256COLOR
Definition cm.h:504
#define CHYRON_KEY_MAXLEN
Definition cm.h:372
void win_init_attrs()
bool f_debug
uint mg_line
#define SCR_COLS
Definition cm.h:51
void dump_opts_by_use(char *, char *)
char errmsg[]
Definition futil.c:131
int open_log(char *)
int wait_timeout
Definition futil.c:145
Chyron * wait_mk_chyron()
@ LF_EXC_REGEX
Definition cm.h:247
@ LF_HIDE
Definition cm.h:245
@ LF_ISUID
Definition cm.h:257
@ LF_IRUSR
Definition cm.h:255
@ LF_ICASE
Definition cm.h:246
@ LF_ISGID
Definition cm.h:256
@ LF_EXEC
Definition cm.h:249
@ LF_REGEX
Definition cm.h:248
@ LF_USER
Definition cm.h:250
@ LF_IXUSR
Definition cm.h:253
@ LF_IWUSR
Definition cm.h:254
@ CLR_CMDLN_BG
Definition cm.h:197
@ CLR_FILL_CHAR_BG
Definition cm.h:193
@ CLR_BOX_BG
Definition cm.h:187
@ CLR_FILL_CHAR_FG
Definition cm.h:192
@ CLR_FG
Definition cm.h:184
@ CLR_RED
Definition cm.h:168
@ CLR_NT_FG
Definition cm.h:198
@ CLR_BRACKETS_FG
Definition cm.h:190
@ CLR_YELLOW
Definition cm.h:170
@ CLR_IND_FG
Definition cm.h:188
@ CLR_BCYAN
Definition cm.h:181
@ CLR_TITLE_FG
Definition cm.h:206
@ CLR_WHITE
Definition cm.h:174
@ CLR_MAGENTA
Definition cm.h:172
@ CLR_BRACKETS_BG
Definition cm.h:191
@ CLR_NT_REV_BG
Definition cm.h:201
@ CLR_BLACK
Definition cm.h:167
@ CLR_BWHITE
Definition cm.h:182
@ CLR_LN_BG
Definition cm.h:195
@ CLR_NT_HL_REV_BG
Definition cm.h:205
@ CLR_BBLACK
Definition cm.h:175
@ CLR_LN_FG
Definition cm.h:194
@ CLR_NT_HL_FG
Definition cm.h:202
@ CLR_BBLUE
Definition cm.h:179
@ CLR_BGREEN
Definition cm.h:177
@ CLR_BYELLOW
Definition cm.h:178
@ CLR_BMAGENTA
Definition cm.h:180
@ CLR_BORANGE
Definition cm.h:183
@ CLR_NT_HL_BG
Definition cm.h:203
@ CLR_NT_HL_REV_FG
Definition cm.h:204
@ CLR_BG
Definition cm.h:185
@ CLR_BOX_FG
Definition cm.h:186
@ CLR_NT_BG
Definition cm.h:199
@ CLR_TITLE_BG
Definition cm.h:207
@ CLR_BRED
Definition cm.h:176
@ CLR_NCOLORS
Definition cm.h:208
@ CLR_BLUE
Definition cm.h:171
@ CLR_IND_BG
Definition cm.h:189
@ CLR_GREEN
Definition cm.h:169
@ CLR_CMDLN_FG
Definition cm.h:196
@ CLR_NT_REV_FG
Definition cm.h:200
@ CLR_CYAN
Definition cm.h:173
bool f_restore_screen
@ LF_FIFO
Definition cm.h:262
@ LF_DIR
Definition cm.h:264
@ LF_UNKNOWN
Definition cm.h:269
@ LF_SOCK
Definition cm.h:268
@ LF_BLK
Definition cm.h:265
@ LF_LNK
Definition cm.h:267
@ LF_REG
Definition cm.h:266
@ LF_CHR
Definition cm.h:263
FILE * tty_fp
#define COLOR_LEN
Definition cm.h:325
uint rgb_clr_to_cube(uint)
#define min(x, y)
min macro evaluates two expressions, returning least result
Definition cm.h:91
uint mbegy
bool f_have_curses_tioctl
Definition scriou.c:25
ushort cp_ln_bg
int wccp_to_str(wchar_t, uint8_t *)
bool str_to_bool(const char *)
Converts String to boolean true or false.
Definition futil.c:934
int win2_box_new(uint, uint, uint, uint, char *)
uint mcols
#define __atexit
This macro registers the end_pgm function to be called when the program exits.
Definition cm.h:339
char * fill_field(char *, char *, char, uint)
Definition futil.c:1731
struct termios shell_out_tioctl curses_out_tioctl
Definition scriou.c:36
uint mg_action
size_t codepoint_to_utf8(uint32_t codepoint, uint8_t *utf8)
char * stdio_fdnames(char *, char *)
Definition futil.c:1082
void user_end()
int display_curses_keys()
void initialize_styles(SIO *)
uint enter_option()
bool open_curses(SIO *)
#define Ctrl(c)
Definition cm.h:54
void display_argv_error_msg(char *, char **)
struct termios shell_in_tioctl curses_in_tioctl
Definition scriou.c:35
struct termios shell_err_tioctl curses_err_tioctl
Definition scriou.c:37
@ MT_TEXT
Definition menu.h:23
@ MT_CHOICE
Definition menu.h:24
@ MT_NULL
Definition menu.h:22
@ CT_PICK
Definition menu.h:46
@ CT_FORM
Definition menu.h:42
@ CT_DEXE
Definition menu.h:38
@ CT_UNDEFINED
Definition menu.h:52
@ CT_MENU
Definition menu.h:45
@ CT_RETURN
Definition menu.h:49
@ CT_TOGGLE
Definition menu.h:50
@ CT_HELP
Definition menu.h:40
@ CT_WRITE_CONFIG
Definition menu.h:51
@ CT_FORM_WRITE
Definition menu.h:44
@ CT_EXEC
Definition menu.h:39
@ CT_VIEW
Definition menu.h:47
@ CT_NULL
Definition menu.h:37
@ CT_ABOUT
Definition menu.h:41
@ CT_FORM_EXEC
Definition menu.h:43
@ CT_CKEYS
Definition menu.h:48
void free_menu_line(Line *)
@ MA_RETURN
Definition menu.h:29
@ MA_DISPLAY_MENU
Definition menu.h:30
@ MA_RESET_MENU
Definition menu.h:31
@ MA_NEW
Definition menu.h:28
@ MA_CONTINUE
Definition menu.h:32
#define MAX_MENU_LINES
Definition menu.h:19
int ui_waddnstr(UiSurface *s, uint w, const char *text, int m)
const wchar_t * bw_sp
Definition ui_ncurses.c:52
void ui_render()
Definition ui_ncurses.c:800
int ui_draw_vline(UiSurface *s, uint w, uint y, uint x, uint len, const UiStyle *style)
int ui_wadd_wch(UiSurface *s, uint w, const UiCell *cell)
int ui_draw_ch_yx(UiSurface *s, uint w, uint y, uint x, const char c)
int ui_wclrtobot(UiSurface *s, uint w)
int ui_mvwadd_wchstr(UiSurface *s, uint w, uint y, uint x, const UiCell *cell)
int ui_cursor_move(UiSurface *s, uint w, uint y, uint x)
Definition ui_ncurses.c:727
int ui_mvwaddnstr(UiSurface *s, uint w, uint y, uint x, const char *text, int m)
wchar_t * border_rounded
Definition ui_ncurses.c:41
UiRuntime * ui_init(const UiConfig *config)
Definition ui_ncurses.c:261
void ui_getyx(UiSurface *s, uint w, uint *lines, uint *cols)
Definition ui_ncurses.c:668
int ui_surface_hide(UiSurface *s, uint w)
Definition ui_ncurses.c:614
const wchar_t * bw_ran
Definition ui_ncurses.c:57
int ui_wshow(UiSurface *s, uint w)
int ui_wset_style(UiSurface *s, uint w, const UiStyle *style)
int ui_bkgdset(UiSurface *s, uint w, const UiCell *cell)
Definition ui_ncurses.c:760
int ui_mice_enable(int mask)
UiSurface * ui_surface_new(uint w, UiSurface *parent, uint p, uint lines, uint cols, uint y, uint x)
Definition ui_ncurses.c:414
int ui_mvwaddstr(UiSurface *s, uint w, uint y, uint x, const char *text)
int ui_setscrreg(UiSurface *s, uint w, uint top, uint bottom)
Definition ui_ncurses.c:662
int ui_scrollok(UiSurface *s, uint w, bool enable)
Definition ui_ncurses.c:626
NcPlane * stdplane
const wchar_t * bw_rbr
Definition ui_ncurses.c:51
int ui_wadd_wchnstr(UiSurface *s, uint w, const UiCell *cell, uint m)
int ui_add_color_rgb(RGB *rgb)
Definition ui_ncurses.c:138
int ui_mvwaddnwstr(UiSurface *s, uint w, uint y, uint x, const wchar_t *wstr, int m)
const wchar_t * bw_ua
Definition ui_ncurses.c:55
int ui_wclear(UiSurface *s, uint w)
Definition ui_ncurses.c:574
int ui_draw_text_n(UiSurface *s, uint w, uint y, uint x, const char *text, int m)
int ui_mvwadd_wchnstr(UiSurface *s, uint w, uint y, uint x, const UiCell *cell, uint m)
int ui_draw_box_title(UiSurface *s, uint w, uint x, const UiStyle *style, const char *title)
int ui_get_event_no_mouse(UiSurface *surface, uint w, UiEvent *ev)
@ UI_KEY_F8
Definition ui_backend.h:69
@ UI_KEY_BACKSPACE
Definition ui_backend.h:47
@ UI_KEY_F9
Definition ui_backend.h:70
@ UI_KEY_TAB
Definition ui_backend.h:48
@ UI_KEY_F2
Definition ui_backend.h:63
@ UI_KEY_F7
Definition ui_backend.h:68
@ UI_KEY_DELETE
Definition ui_backend.h:59
@ UI_KEY_CHAR
Definition ui_backend.h:44
@ UI_KEY_MOUSE
Definition ui_backend.h:61
@ UI_KEY_F11
Definition ui_backend.h:72
@ UI_KEY_DOWN
Definition ui_backend.h:51
@ UI_KEY_F4
Definition ui_backend.h:65
@ UI_KEY_F3
Definition ui_backend.h:64
@ UI_KEY_HOME
Definition ui_backend.h:54
@ UI_KEY_F6
Definition ui_backend.h:67
@ UI_KEY_PGDN
Definition ui_backend.h:57
@ UI_KEY_PGUP
Definition ui_backend.h:56
@ UI_KEY_NONE
Definition ui_backend.h:43
@ UI_KEY_BTAB
Definition ui_backend.h:49
@ UI_KEY_END
Definition ui_backend.h:55
@ UI_KEY_F5
Definition ui_backend.h:66
@ UI_KEY_ESCAPE
Definition ui_backend.h:46
@ UI_KEY_LEFT
Definition ui_backend.h:52
@ UI_KEY_F1
Definition ui_backend.h:62
@ UI_KEY_ENTER
Definition ui_backend.h:45
@ UI_KEY_UP
Definition ui_backend.h:50
@ UI_KEY_F12
Definition ui_backend.h:73
@ UI_KEY_RESIZE
Definition ui_backend.h:60
@ UI_KEY_INSERT
Definition ui_backend.h:58
@ UI_KEY_RIGHT
Definition ui_backend.h:53
@ UI_KEY_F10
Definition ui_backend.h:71
int ui_mvwaddch(UiSurface *s, uint w, uint y, uint x, const char c)
uint COLS
Definition ui_backend.h:266
const wchar_t * bw_chk
Definition ui_ncurses.c:59
int ui_get_event(UiSurface *s, uint w, UiEvent *ev, int timeout_ms)
Wait for an input event on target (or stdscr if NULL).
BorderWide bw
Definition ui_ncurses.c:46
uint16_t attr_t
Definition ui_backend.h:256
int ui_bkgd(UiSurface *s, uint w, const UiCell *cell)
Definition ui_ncurses.c:753
#define UI_SFC_MAX
Definition ui_backend.h:24
const wchar_t * bw_rtl
Definition ui_ncurses.c:48
int ui_draw_text(UiSurface *s, uint w, uint y, uint x, const char *text)
const wchar_t * bw_rtr
Definition ui_ncurses.c:49
int ui_wresize(UiSurface *s, uint w, uint lines, uint cols)
const wchar_t * bw_lan
Definition ui_ncurses.c:58
int ui_suspend()
Definition ui_ncurses.c:398
struct notcurses NotCurses
Definition ui_backend.h:252
struct notcurses_options NotCursesOptions
Definition ui_backend.h:253
void ui_surface_destroy(UiSurface *s)
Definition ui_ncurses.c:377
int ui_surface_move(UiSurface *s, uint w, uint y, uint x)
Definition ui_ncurses.c:542
int ui_idlok(UiSurface *s, uint w, bool enable)
Definition ui_ncurses.c:644
int ui_waddnwstr(UiSurface *s, uint w, const wchar_t *wstr, int m)
const wchar_t * bw_ra
Definition ui_ncurses.c:53
void ui_update_panels()
Definition ui_ncurses.c:804
void ui_restore_wins()
STDRGB std_color[]
Definition ui_ncurses.c:62
int ui_mvaddstr(UiSurface *s, uint w, uint y, uint x, const char *text)
int ui_wmove(UiSurface *s, uint w, uint y, uint x)
Definition ui_ncurses.c:732
UiSurface * ui_surface[UI_SFC_MAX]
Definition ui_ncurses.c:28
uint UiColorIdx
Definition ui_backend.h:37
const wchar_t * bw_h09
Definition ui_ncurses.c:60
wchar_t * border_square
int ui_draw_text_fill(UiSurface *s, uint w, uint y, uint x, const char *text, int m)
uint32_t ui_get_color(uint16_t color_idx)
Definition ui_ncurses.c:164
int ui_whide(UiSurface *s, uint w)
int ui_werase(UiSurface *s, uint w)
Definition ui_ncurses.c:560
void ui_get_screen_size(uint *lines, uint *cols)
Definition ui_ncurses.c:692
void fast_exit(UiSurface *s)
Definition ui_ncurses.c:490
int ui_getch()
Definition nckeys.c:255
int ui_erase()
Definition ui_ncurses.c:590
UiRuntime * ui
RGB ui_hex_to_rgb(char *s)
Definition ui_ncurses.c:174
void ui_shutdown()
Definition ui_ncurses.c:344
int ui_waddstr(UiSurface *s, uint w, const char *text)
int ui_wclrtoeol(UiSurface *s, uint w)
int ui_wscrl(UiSurface *s, uint w, int rows)
int win_ptr
Definition ui_ncurses.c:30
int ui_mousemask(int mask)
int ui_wset_base(UiSurface *s, uint w, const UiStyle *style, uint32_t fill_ch)
uint LINES
int ui_get_event_multi(UiSurface *s, uint w, UiEvent *ev, int timeout_ms)
UiSurface * stdsfc
Definition ui_ncurses.c:36
int sfc_ptr
Definition nckeys.c:47
UiCell ui_cell_from_ucp(const wchar_t *ucp, const uint32_t *fg, const uint32_t *bg)
Definition ui_ncurses.c:239
int ui_curs_set(int visibility)
Definition ui_ncurses.c:737
int ui_top_panel(UiSurface *s, uint w)
Definition ui_ncurses.c:607
int ui_resume()
Definition ui_ncurses.c:403
struct ncplane NcPlane
Definition ui_backend.h:251
uint ui_pair_cnt
Definition ui_ncurses.c:34
int ui_wnoutrefresh(UiSurface *s, uint w)
Definition ui_ncurses.c:811
struct nccell UiCell
Definition ui_backend.h:250
int ui_surface_resize(UiSurface *s, uint w, uint lines, uint cols)
Definition ui_ncurses.c:550
uint16_t UiPairIdx
Definition ui_backend.h:36
const wchar_t * bw_la
Definition ui_ncurses.c:54
uint ui_color_cnt
Definition ui_ncurses.c:33
void ui_endwin()
Definition ui_ncurses.c:341
wchar_t * border_heavy
Definition ui_ncurses.c:43
int ui_surface_show(UiSurface *s, uint w)
Definition ui_ncurses.c:598
int ui_draw_hline(UiSurface *s, uint w, uint y, uint x, uint len, const UiStyle *style)
int ui_clear()
Definition ui_ncurses.c:594
UiSurface * ui_box_surface_new(UiSurface *parent, uint p, uint lines, uint cols, uint y, uint x, char *title)
Definition ui_ncurses.c:453
int ui_wadd_wchstr(UiSurface *s, uint w, const UiCell *cell)
struct ncplane_options NcPlaneOptions
Definition ui_backend.h:254
int ui_keypad(UiSurface *s, uint w, bool enable)
Definition ui_ncurses.c:635
int ui_cursor_enable(UiSurface *s, uint w, bool visible)
Disable (visible = false) or enable (visibile = true) the cursor at its current position on the surfa...
Definition ui_ncurses.c:713
const wchar_t * bw_da
Definition ui_ncurses.c:56
wchar_t * border_double
Definition ui_ncurses.c:42
int ui_idcok(UiSurface *s, uint w, bool enable)
Definition ui_ncurses.c:653
uint16_t UiStyle
Definition ui_backend.h:35
void ui_get_caps(UiCaps *caps)
Query the capabilities of the active backend.
Definition ui_ncurses.c:88
int ui_doupdate()
Definition ui_ncurses.c:807
int ui_mvwadd_wch(UiSurface *s, uint w, uint y, uint x, const UiCell *cell)
@ UI_BACKEND_NCURSES
Definition ui_backend.h:156
@ UI_BACKEND_NOTCURSES
Definition ui_backend.h:157
@ UI_MOUSE_SCROLL_DOWN
Definition ui_backend.h:82
@ UI_MOUSE_PRESS
Definition ui_backend.h:78
@ UI_MOUSE_SCROLL_UP
Definition ui_backend.h:81
@ UI_MOUSE_NONE
Definition ui_backend.h:77
@ UI_MOUSE_DRAG
Definition ui_backend.h:80
@ UI_MOUSE_RELEASE
Definition ui_backend.h:79
int ui_draw_border(UiSurface *s, uint w, UiBorderKind kind, const UiStyle *style)
UiBackend ui_get_backend()
Return which backend is powering this runtime.
Definition ui_ncurses.c:84
@ UI_BORDER_ROUNDED
Definition ui_backend.h:89
@ UI_BORDER_ASCII
Definition ui_backend.h:87
@ UI_BORDER_LIGHT
Definition ui_backend.h:88
@ UI_BORDER_NONE
Definition ui_backend.h:86
int ui_surface_addpad(UiSurface *s, uint w, uint view_win, uint lines, uint cols)
Definition ui_ncurses.c:509
void ui_getmaxyx(UiSurface *s, uint w, uint *lines, uint *cols)
Definition ui_ncurses.c:676
const wchar_t * bw_rbl
Definition ui_ncurses.c:50
int ui_cursor_enable_yx(UiSurface *s, uint w, uint y, uint x, bool visible)
Disable (visible = false) or enable (visibile = true) the cursor at a specified position on the surfa...
Definition ui_ncurses.c:703
int ui_mvwaddwstr(UiSurface *s, uint w, uint y, uint x, const wchar_t *wstr)
int ui_mvwaddstr_fill(UiSurface *s, uint w, uint y, uint x, const char *str, int m)
int ui_waddch(UiSurface *s, uint w, const char c)
int ui_draw_ch(UiSurface *s, uint w, const char c)
int ui_waddwstr(UiSurface *s, uint w, const wchar_t *wstr)
int ui_surface_addwin(UiSurface *s, uint w, uint p, uint lines, uint cols, uint y, uint x)
Definition ui_ncurses.c:523
int ui_chg_color(uint16_t color_idx, uint32_t *color)
Definition ui_ncurses.c:206
#define NMARKS
Definition view.h:35
@ PT_STRING
Definition view.h:46
@ PT_NONE
Definition view.h:43
@ PT_SHORT
Definition view.h:44
@ PT_LONG
Definition view.h:45
#define BUFSIZ
Definition view.h:40
int get_cmd_spec(View *, char *)
int view_accept_cmd(View *)
#define PAD_COLS
Definition view.h:41
#define XLEN
#define KEY_F09
#define KEY_RIGHT
#define KEY_DC
#define KEY_BACKSPACE
#define KEY_END
#define KEY_ENTER
#define KEY_MOUSE
#define KEY_IC
#define KEY_LEFT
#define KEY_HOME
int ui_get_pair(uint16_t pair, uint *fg, uint *bg)
UiCell bkgd_cell
uint ui_init_color_hex(char *s)
uint64_t ui_get_channels_from_pair(uint16_t pair)
int ui_pair_content(uint pair, uint *fg, uint *bg)
Definition ui_ncurses.c:194
int ui_getmaxx(UiSurface *s, uint w)
Definition ui_ncurses.c:686
int ui_bkgrndset(UiSurface *s, uint w, const UiCell *cell)
Definition ui_ncurses.c:774
int ui_init_color(uint color, uint r, uint g, uint b)
Definition ui_ncurses.c:189
int ui_init_pair(uint pair, uint fg, uint bg)
Definition ui_ncurses.c:202
uint ui_add_pair(uint fg, uint bg)
Definition ui_ncurses.c:105
int ui_getcchar(const UiCell *uc, wchar_t *wstr, attr_t *attrs, uint16_t *pair, void *opts)
Definition ui_ncurses.c:784
int ui_color_content(uint color, uint *r, uint *g, uint *b)
Definition ui_ncurses.c:179
int ui_getmaxy(UiSurface *s, uint w)
Definition ui_ncurses.c:681
int ui_bkgrnd(UiSurface *s, uint w, const UiCell *cell)
Definition ui_ncurses.c:767
int ui_setcchar(cchar_t *wch, const wchar_t *wc, const attr_t attrs, short pair, const void *opts)
Definition ui_ncurses.c:792
NcPlane * ncplane_clicked(NcPlane *pile_member, ncinput *ni)
Definition nckeys.c:295
int mk_chimera(UiCell *cell, char c)
uint get_plane_idx(UiSurface *s, struct ncplane *plane)
int init_cnt
Definition mem.c:28
ViewStack view_stack
Definition init_view.c:32
#define TRUE
Definition iloan.c:19
int popup_ckeys()
Definition curskeys.c:31
#define MAXLEN
Definition curskeys.c:15
uint form_yx_to_fidx(Form *, uint, uint)
char err_msg[MAXLEN]
int cf_accept(UiSurface *sfc, uint 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
int process_config_file(char *, Init *)
Definition init.c:663
uint rgb_to_xterm256_idx(RGB *rgb)
Convert RGB color to XTerm 256 color index.
Definition dwin.c:252
UiCell cell_sp
Definition dwin.c:120
UiCell cell_ve
Definition dwin.c:112
ushort cp_nt
Definition dwin.c:151
UiCell cell_tr
Definition dwin.c:110
int surface_box_win_new(uint wlines, uint wcols, uint wbegy, uint wbegx, char *wtitle)
Definition dwin.c:521
UiCell cell_nt
Definition dwin.c:94
char const colors_text[][10]
Color names for .minitrc overrides.
Definition dwin.c:51
UiCell cell_ls
Definition dwin.c:105
UiCell cell_nt_hl_rev
Definition dwin.c:97
char em1[MAXLEN]
Definition dwin.c:143
UiCell cell_bt
Definition dwin.c:118
UiCell cell_br
Definition dwin.c:114
ushort cp_green
Definition dwin.c:160
UiCell cell_tl
Definition dwin.c:109
ushort cp_red
Definition dwin.c:159
ushort cp_box
Definition dwin.c:147
char em2[MAXLEN]
Definition dwin.c:144
wchar_t * mbstr_to_wcstr(const char *mb_str)
Definition dwin.c:404
ushort cp_blue
Definition dwin.c:162
UiCell cell_ln
Definition dwin.c:102
int stdout_fd
Definition dwin.c:138
void initialize_cells(SIO *sio)
Initialize local color variables and color pairs based on SIO settings.
Definition dwin.c:177
UiCell cell_ts
Definition dwin.c:107
ushort cp_nt_hl
Definition dwin.c:153
int border_draw(UiSurface *sfc)
Definition dwin.c:581
ushort cp_fill_char
Definition dwin.c:157
UiCell cell_tt
Definition dwin.c:117
UiCell cell_bs
Definition dwin.c:108
ushort cp_brackets
Definition dwin.c:158
ushort cp_yellow
Definition dwin.c:161
UiCell cell_ho
Definition dwin.c:111
UiCell cell_rs
Definition dwin.c:106
bool init_clr_palette(SIO *sio)
Initialize color palette based on SIO settings.
Definition dwin.c:333
UiCell cell_default
Definition dwin.c:90
int click_x
Definition dwin.c:45
char fn[MAXLEN]
Definition dwin.c:141
int surface_split_box_win_new(uint wlines, uint wcols, uint split_y, uint split_x, uint wbegy, uint wbegx, char *wtitle)
Definition dwin.c:539
void mbc_to_wc(wchar_t wc[2], const char mbc)
Definition dwin.c:393
ushort cp_nt_hl_rev
Definition dwin.c:154
ushort cp_default
Definition dwin.c:156
UiCell cell_nt_hl
Definition dwin.c:96
ushort cp_nt_rev
Definition dwin.c:152
char em3[MAXLEN]
Definition dwin.c:145
ushort cp_title
Definition dwin.c:150
uint src_line
Definition dwin.c:139
void apply_gamma(RGB *rgb)
Apply gamma correction to RGB color.
Definition dwin.c:307
RGB xterm256_idx_to_rgb(uint idx)
Convert XTerm 256 color index to RGB.
Definition dwin.c:274
UiCell cell_lt
Definition dwin.c:115
int exit_code
Definition dwin.c:127
UiCell cell_brktl
Definition dwin.c:92
UiCell cell_cr
Definition dwin.c:119
UiCell cell_title
Definition dwin.c:101
int click_y
Definition dwin.c:44
uint16_t win_attr
Definition dwin.c:130
int stdin_fd
Definition dwin.c:137
char em0[MAXLEN]
Definition dwin.c:142
UiCell cell_ind
Definition dwin.c:99
UiCell cell_ran
Definition dwin.c:103
int assign_chyron_win(Chyron *chyron, UiSurface *sfc, uint win, char *y)
Definition dwin.c:962
char * src_name
Definition dwin.c:140
UiCell cell_cmdln
Definition dwin.c:100
UiCell cell_brktr
Definition dwin.c:93
ushort cp_ind
Definition dwin.c:148
UiCell cell_fill_char
Definition dwin.c:91
UiCell cell_box
Definition dwin.c:98
UiCell cell_rt
Definition dwin.c:116
UiCell cell_bl
Definition dwin.c:113
UiCell cell_chk
Definition dwin.c:104
UiCell cell_nt_rev
Definition dwin.c:95
int stderr_fd
Definition dwin.c:164
void display_field(UiCell *cmplx_buf, uint y, uint x)
Definition fields.c:354
char ff_tbl[][26]
Definition fields.c:25
struct termios shell_tioctl
Definition scriou.c:22
int border_ysplit(UiSurface *sfc, uint y)
Draw a box with a separator line around the specified window.
Definition dwin.c:617
int border_ysplit_text(UiSurface *sfc, char *text, uint separator_line)
Draw a box with a separator line and text around the specified window.
Definition dwin.c:637
void view_full_screen_resize(Init *)
Resize the full screen view and its components.
Definition init_view.c:97
void view_boxwin_resize(Init *)
Resize the current window and its box.
Definition init_view.c:178
int cm_surface_destroy(UiSurface *sfc)
Destroy the most recently created surface.
Definition dwin.c:576
int border_title(UiSurface *sfc, char *title)
Draw a box with a title around the specified window.
Definition dwin.c:676
void destroy_curses()
Gracefully shut down NCurses and restore terminal settings.
Definition dwin.c:384
bool action_disposition(char *title, char *action_str)
Display a simple action disposition message window or print to stderr.
Definition dwin.c:895
int answer_yn(char *msg0, char *msg1, char *msg2, char *msg3)
Accept a single letter answer.
Definition dwin.c:715
int Perror(char *emsg_str)
Display a simple error message window or print to stderr.
Definition dwin.c:841
void abend(int ec, char *s)
Abnormal program termination.
Definition dwin.c:1204
int display_error(char *msg0, char *msg1, char *msg2, char *msg3)
Display an error message window or print to stderr.
Definition dwin.c:778
void set_chyron_key_cb(Chyron *chyron, uint k, char *s, uint kc, UiCell cell_base)
Set chyron key with color pair (cp).
Definition dwin.c:1021
Chyron * destroy_chyron(Chyron *chyron)
Destroy Chyron structure.
Definition dwin.c:984
void compile_chyron(Chyron *chyron)
construct the chyron string from the chyron structure
Definition dwin.c:1110
int get_chyron_key(Chyron *chyron, uint x)
Get keycode from chyron.
Definition dwin.c:1186
void activate_all_chyron_keys(Chyron *chyron)
Deactivate chyron key.
Definition dwin.c:1078
void unset_chyron_key(Chyron *chyron, uint k)
Unset chyron key.
Definition dwin.c:1060
void activate_chyron_key(Chyron *chyron, uint k)
Activate chyron key.
Definition dwin.c:1069
uint mbstr_to_cellstr(UiCell *cmplx_buf, const char *str, const UiCell *cell_base, uint *pos, const uint atmost)
Convert multibyte string to complex character array.
Definition dwin.c:480
void deactivate_all_chyron_keys(Chyron *chyron)
Deactivate all chyron keys.
Definition dwin.c:1096
Chyron * new_chyron()
Create and initialize Chyron structure.
Definition dwin.c:947
bool is_set_chyron_key(Chyron *chyron, uint k)
Check if function key label is set.
Definition dwin.c:1005
void display_chyron(UiSurface *sfc, uint w, Chyron *chyron, uint line, uint col)
Display chyron on the specified line and column of the surface.
Definition dwin.c:1163
void deactivate_chyron_key(Chyron *chyron, uint k)
Deactivate chyron key.
Definition dwin.c:1088
void set_chyron_key(Chyron *chyron, uint k, char *s, uint kc)
Set chyron key with default color pair (cp_nt_rev).
Definition dwin.c:1045
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:29
int form_fmt_field(Form *form, char *s)
Format field according to its format type.
Definition fields.c:448
bool is_valid_date(uint yyyy, uint mm, uint dd)
Check if a given date is valid, including leap years.
Definition fields.c:611
int field_editor(Form *)
Accept input for a field.
Definition fields.c:48
void numeric(char *d, char *s)
Extract numeric characters from source string to destination string.
Definition fields.c:648
bool is_valid_time(uint hh, uint mm, uint ss)
Check if a given time is valid.
Definition fields.c:632
void right_justify(char *, uint)
Right justify string by removing trailing spaces and adding leadingspaces.
Definition fields.c:585
void left_justify(char *s)
Left justify string by removing leading spaces.
Definition fields.c:572
int form_display_field_n(Form *, uint)
Display field n.
Definition fields.c:347
int form_display_field(Form *)
Display current field.
Definition fields.c:369
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:1270
size_t canonicalize_file_spec(char *)
Removes quotes and trims at first space.
Definition futil.c:1324
size_t strnz__cpy(char *, const char *, size_t)
safer alternative to strncpy
Definition futil.c:537
char * iso8601_time(char *, uint, time_t *, bool)
Formats a struct tm as an ISO 8601 string.
Definition futil.c:257
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:273
bool trim_ext(char *, char *)
trims the file extension from "filename" and copies the result to "buf"
Definition futil.c:1009
bool stripz_quotes(char *)
removes leading and trailing double quotes if present
Definition futil.c:726
void write_cmenu_log(char *)
Write message to C-Menu log file without timestamp.
Definition futil.c:1684
size_t trim(char *)
Trims leading and trailing spaces from string s in place.
Definition futil.c:384
char * get_local_timestamp()
Returns the current local time as an ISO 8601 formatted string.
Definition futil.c:307
bool is_directory(const char *)
Checks if the given path is a directory.
Definition futil.c:1355
bool file_spec_path(char *, char *)
extracts the path component of a file specification
Definition futil.c:863
bool str_to_upper(char *)
Converts a string to uppercase.
Definition futil.c:515
bool dir_name(char *, char *)
Returns the directory name of a file specification.
Definition futil.c:1132
bool is_hex_str(char *, uint)
Validates that a string consists of exactly len hexadecimal digits.
Definition futil.c:202
double str_to_double(char *)
converts string to double
Definition futil.c:922
bool str_to_lower(char *)
Converts a string to lowercase.
Definition futil.c:501
size_t strnz(char *, size_t)
terminates string at New Line, Carriage Return, or max_len
Definition futil.c:608
size_t ssnprintf(char *, size_t, const char *,...)
ssnprintf was designed to be a safer alternative to snprintf.
Definition futil.c:413
bool strip_quotes(char *)
removes leading and trailing double quotes if present
Definition futil.c:711
int str_to_args(char **, char *, uint)
Converts a string into an array of argument strings.
Definition futil.c:433
bool is_valid_regex(const char *)
Checks if the given regular expression pattern is valid.
Definition futil.c:1383
void open_cmenu_log()
Open new C-Menu log file.
Definition futil.c:1650
bool expand_tilde(char *, uint)
Replaces "~/" in string with the user's home directory.
Definition futil.c:963
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:647
bool file_spec_name(char *, char *)
extracts the file name component of a file specification
Definition futil.c:890
size_t strip_ansi(char *, char *)
Strips ANSI SGR escape sequences (ending in 'm') from string s to d.
Definition futil.c:822
bool mk_dir(char *dir)
If directory doesn't exist, make it.
Definition futil.c:1303
size_t strnz__cat(char *, const char *, size_t)
safer alternative to strncat
Definition futil.c:566
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:169
char * get_ip_addresses(char *, uint)
Retrieves the IP addresses of the local machine and formats them into a string.
Definition futil.c:347
char * rep_substring(const char *, const char *, const char *)
Replace all occurrences of "tgt_s" in "org_s" with "rep_s".
Definition futil.c:1423
bool is_symlink_to_dir(const char *)
Checks if the given path is a symbolic link to a directory.
Definition futil.c:1368
bool verify_file(char *, uint)
Verifies that the file specified by "in_spec" exists and is accessible with the permissions specified...
Definition futil.c:1223
size_t strnlf(char *, size_t)
terminates string with line feed
Definition futil.c:626
void write_cmenu_log_ts(char *)
Write message to C-Menu log file with timestamp.
Definition futil.c:1668
int a_toi(char *, bool *)
a safer alternative to atoi() for converting ASCII strings to integers.
Definition futil.c:762
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:683
int destroy_argv(uint argc, char **argv)
Deallocates memory allocated for argument strings in argv.
Definition futil.c:487
bool chrep(char *, char, char)
Replaces all occurrences of old_chr in s with new_chr in place.
Definition futil.c:743
bool base_name(char *, char *)
Returns the base name of a file specification.
Definition futil.c:1106
bool normalize_file_spec(char *)
replace backslashes with forward lashes
Definition futil.c:846
char * format_local_timestamp(time_t, char *, size_t)
Formats a time_t as an ISO 8601 string in local time.
Definition futil.c:296
bool is_newer(char *, char *)
Checks if the file specified by "fut" is newer than the file specified by "control".
Definition futil.c:153
char * fdname(int, char *)
Retrieves the file path associated with a given file descriptor.
Definition futil.c:1047
bool verify_dir(char *, uint)
Verifies that the directory specified by "spec" exists and is accessible with the permissions specifi...
Definition futil.c:1172
char * get_user_str(char *, size_t)
Retrieves the current user's name and UID, and formats it into a string.
Definition futil.c:320
bool trim_path(char *)
Trims trailing spaces and slashes from directory path in place.
Definition futil.c:981
unsigned long a_to_ul(const char *)
Converts a string to an unsigned long long integer, with support for suffixes K, M,...
Definition futil.c:786
bool unstr_hex_clr(char *, char *)
Validates that a string is a hex color code in the format "#RRGGBB".
Definition futil.c:225
size_t string_cpy(String *, const String *)
Copy src String to dest String, allocating additional memory for dest String if necessary.
Definition futil.c:1560
String to_string(const char *)
String functions provide a simple string library to facilitate string manipulation in C,...
Definition futil.c:1506
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:1617
size_t string_cat(String *, const String *)
Concatenates src String to dest String, allocating additional memory for dest String if necessary.
Definition futil.c:1577
String free_string(String)
Free the dynamically allocated String.
Definition futil.c:1545
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:1596
int segmentation_fault()
Function to intentionally cause a segmentation fault for testing purposes.
Definition futil.c:1642
int parse_opt_args(Init *, int, char **)
Parse command-line options and set Init struct values accordingly.
Definition init.c:591
bool derive_file_spec(char *, char *, char *)
Derive full file specification from directory and file name.
Definition init.c:1367
int write_config(Init *init)
Write the current configuration to a file specified in init->minitrc.
Definition init.c:1103
void mapp_initialization(Init *, int, char **)
Main initialization function for MAPP - Menu Application.
Definition init.c:474
void zero_opt_args(Init *)
Initialize optional arguments in the Init struct to default values.
Definition init.c:606
void view_calc_boxwin_dimensions(Init *)
Calculate the dimensions and position of the box window for C-Menu View.
Definition init_view.c:195
int init_view_full_screen(Init *init)
Initialize C-Menu View in full screen mode.
Definition init_view.c:47
int init_view_boxwin(Init *init)
Initialize the C-Menu View in box window mode.
Definition init_view.c:147
void view_calc_full_screen_dimensions(Init *)
Calculate the dimensions for full screen mode.
Definition init_view.c:113
int view_init_input(Init *init, char *file_name)
Initialize the input for the C-Menu View.
Definition init_view.c:279
bool verify_spec_arg(char *, char *, char *, char *, uint)
Verify file specification argument.
Definition mem.c:369
Pick * new_pick(Init *init, int argc, char **argv, uint begy, uint begx)
Create and initialize Pick structure.
Definition mem.c:186
View * destroy_view(Init *init)
Destroy View structure.
Definition mem.c:345
Menu * new_menu(Init *init, int argc, char **argv, uint begy, uint begx)
Create and initialize Menu structure.
Definition mem.c:134
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:155
Form * destroy_form(Init *init)
Destroy Form structure.
Definition mem.c:275
View * new_view(Init *init)
Create and initialize View structure.
Definition mem.c:299
Init * destroy_init(Init *init)
Destroy Init structure.
Definition mem.c:95
Form * new_form(Init *init, int argc, char **argv, uint begy, uint begx)
Create and initialize Form structure.
Definition mem.c:252
Pick * destroy_pick(Init *init)
Destroy Pick structure.
Definition mem.c:225
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:66
void reverse_object(Pick *)
Reverses the display of the currently selected object in pick window.
int pick_engine(Init *)
Initializes pick interface, calculates window size and position, and enters picker loop.
void display_pick_page(Pick *)
Displays current page of objects in pick window.
int open_pick_win(Init *)
Initializes the pick window based on the parameters specified in the Pick structure.
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 restore_curses_tioctl()
restore_curses_tioctl() - restore curses terminal settings
Definition scriou.c:84
bool capture_curses_tioctl()
capture_curses_tioctl() - capture curses terminal settings
Definition scriou.c:70
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
void sig_dfl_mode()
Set signal handlers to default behavior.
Definition sig.c:42
void signal_handler(int)
Signal handler for interrupt signals.
Definition sig.c:95
void sig_prog_mode()
Set up signal handlers for interrupt signals.
Definition sig.c:62
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 go_to_position(View *, off_t)
Go to Specific File Position.
void initialize_line_table(View *)
Initialize Line Table.
void destroy_line_table(View *)
Destroy Line Table.
void next_page(View *)
Advance to Next Page.
int pad_refresh(View *)
Refresh Pad and Line Number Window.
int display_prompt(View *, char *)
Display Command Line Prompt.
wchar_t wc
Definition ui_backend.h:95
short attrs
Definition ui_backend.h:96
short color_pair
Definition ui_backend.h:97
bool active
Definition ui_backend.h:108
uint32_t ch
Definition ui_backend.h:102
UiMouseAction mouse_action
Definition ui_backend.h:112
bool shift
Definition ui_backend.h:105
uint in_win
Definition ui_backend.h:110
int bstate
Definition ui_backend.h:111
char keybound[16]
Definition ui_backend.h:114
int chyron
Definition ui_backend.h:109
bool ctrl
Definition ui_backend.h:104
UiKey key
Definition ui_backend.h:101
bool alt
Definition ui_backend.h:103
bool mouse_inside
Definition ui_backend.h:113
int cols
Definition ui_backend.h:121
int lines
Definition ui_backend.h:120
FILE * tty_fp
Definition ui_backend.h:148
bool cursor_visible
Definition ui_backend.h:145
const char * tty_path
Definition ui_backend.h:147
bool enable_mouse
Definition ui_backend.h:143
char border_style
Definition ui_backend.h:146
bool enable_alt_screen
Definition ui_backend.h:144
bool palette256
Definition ui_backend.h:170
bool mouse
Definition ui_backend.h:171
int color_pairs
Definition ui_backend.h:174
bool truecolor
Definition ui_backend.h:169
bool unicode
Definition ui_backend.h:172
bool resize
Definition ui_backend.h:173
wchar_t cr
Definition ui_backend.h:193
wchar_t tl
Definition ui_backend.h:194
wchar_t bt
Definition ui_backend.h:192
wchar_t rt
Definition ui_backend.h:190
wchar_t tr
Definition ui_backend.h:195
wchar_t br
Definition ui_backend.h:197
wchar_t bl
Definition ui_backend.h:196
wchar_t lt
Definition ui_backend.h:189
wchar_t str[11]
Definition ui_backend.h:185
wchar_t ve
Definition ui_backend.h:188
wchar_t tt
Definition ui_backend.h:191
wchar_t ho
Definition ui_backend.h:187
uint8_t g
Definition ui_backend.h:261
uint8_t r
Definition ui_backend.h:260
uint8_t b
Definition ui_backend.h:262
uint8_t backstop
Definition ui_backend.h:293
char c[4]
Definition ui_backend.h:291
uint8_t u8[4]
Definition ui_backend.h:290
uint32_t u32
Definition ui_backend.h:288
uint8_t width
Definition ui_backend.h:294
wchar_t u16[2]
Definition ui_backend.h:289
Runtime state for the NotCurses backend.
struct notcurses * nc
unsigned int cols
unsigned int lines
A drawable surface in the NotCurses backend.
struct UiSurface * parent
struct ncplane * plane1
struct ncplane * cmdln
struct ncplane * mplane[SUB_SFC_MAX]
struct ncplane * lnno
struct ncplane * box
struct ncplane * plane2
struct ncplane * win2
struct ncplane * pad
struct UiRuntime * runtime
struct UiSurfaceMeta meta[SUB_SFC_MAX]
struct ncplane * win
uint32_t color
uint mm
Definition cm.h:59
uint dd
Definition cm.h:60
uint yyyy
Definition cm.h:58
uint hh
Definition cm.h:64
uint mm
Definition cm.h:65
uint ss
Definition cm.h:66
char text[CHYRON_KEY_MAXLEN]
Definition cm.h:379
uint keycode
Definition cm.h:381
bool active
Definition cm.h:378
UiCell cell_base
Definition cm.h:383
uint end_pos
Definition cm.h:382
uint y
Definition cm.h:394
UiSurface * sfc
Definition cm.h:392
UiCell cmplx_buf[MAXLEN]
Definition cm.h:389
uint win
Definition cm.h:393
char s[MAXLEN]
Definition cm.h:388
ChyronKey * key[CHYRON_KEYS]
Definition cm.h:387
uint l
Definition cm.h:391
uint bg
Definition cm.h:458
uint pair_id
Definition cm.h:459
uint fg
Definition cm.h:457
char * s
Definition cm.h:655
size_t l
Definition cm.h:656
Arg ** v
Definition cm.h:659
size_t n
Definition cm.h:660
size_t l
Definition cm.h:664
char * s
Definition cm.h:663
size_t l
Definition cm.h:668
wchar_t * s
Definition cm.h:667
uint32_t ran_bg
Definition cm.h:737
double green_gamma
Definition cm.h:690
uint32_t ln_bg
Definition cm.h:723
ushort cp_ran
Definition cm.h:766
FILE * stdout_fp
Definition cm.h:739
ushort cp_ind
Definition cm.h:762
double blue_gamma
Definition cm.h:691
ushort cp_nt_hl
Definition cm.h:759
uint32_t abg
Definition cm.h:711
char brackets[3]
Definition cm.h:750
uint32_t magenta
Definition cm.h:698
uint32_t cmdln_bg
Definition cm.h:725
ushort cp_title
Definition cm.h:764
int stdout_fd
Definition cm.h:743
uint32_t cmdln_fg
Definition cm.h:724
ushort cp_default
Definition cm.h:754
int stderr_fd
Definition cm.h:744
uint32_t nt_hl_rev_fg
Definition cm.h:732
uint clr_cnt
Definition cm.h:746
uint32_t ran_fg
Definition cm.h:736
ushort cp_brackets
Definition cm.h:756
ushort cp_cmdln
Definition cm.h:763
FILE * stdin_fp
Definition cm.h:738
uint32_t bgreen
Definition cm.h:704
ushort cp_ln
Definition cm.h:765
double red_gamma
Definition cm.h:689
ushort cp_box
Definition cm.h:761
uint32_t green
Definition cm.h:695
char fill_char[2]
Definition cm.h:751
ushort cp_nt
Definition cm.h:757
FILE * tty_fp
Definition cm.h:741
uint32_t nt_fg
Definition cm.h:726
uint32_t yellow
Definition cm.h:696
uint32_t fill_char_fg
Definition cm.h:720
uint32_t box_fg
Definition cm.h:714
ushort cp_nt_hl_rev
Definition cm.h:760
uint clr_pair_cnt
Definition cm.h:747
uint32_t orange
Definition cm.h:701
ushort cp_bold
Definition cm.h:768
uint32_t ln_fg
Definition cm.h:722
uint32_t ind_bg
Definition cm.h:717
FILE * stderr_fp
Definition cm.h:740
uint32_t bmagenta
Definition cm.h:707
uint32_t ind_fg
Definition cm.h:716
uint32_t byellow
Definition cm.h:705
uint clr_pair_idx
Definition cm.h:749
char tty_name[MAXLEN]
Definition cm.h:753
uint32_t bblue
Definition cm.h:706
uint32_t borange
Definition cm.h:710
uint32_t title_bg
Definition cm.h:735
uint32_t fg
Definition cm.h:712
uint32_t cyan
Definition cm.h:699
uint32_t bblack
Definition cm.h:702
uint32_t red
Definition cm.h:694
ushort cp_fill_char
Definition cm.h:755
uint32_t nt_hl_rev_bg
Definition cm.h:733
uint32_t title_fg
Definition cm.h:734
uint32_t bred
Definition cm.h:703
uint32_t fill_char_bg
Definition cm.h:721
uint32_t black
Definition cm.h:693
ushort cp_chk
Definition cm.h:767
uint32_t nt_rev_bg
Definition cm.h:729
uint32_t brackets_bg
Definition cm.h:719
uint32_t bcyan
Definition cm.h:708
uint clr_idx
Definition cm.h:748
uint32_t nt_bg
Definition cm.h:727
uint32_t blue
Definition cm.h:697
int tty_fd
Definition cm.h:745
uint32_t brackets_fg
Definition cm.h:718
uint32_t white
Definition cm.h:700
uint32_t box_bg
Definition cm.h:715
ushort cp_nt_rev
Definition cm.h:758
uint32_t nt_hl_fg
Definition cm.h:730
int stdin_fd
Definition cm.h:742
uint32_t bwhite
Definition cm.h:709
char border
Definition cm.h:752
uint32_t nt_rev_fg
Definition cm.h:728
double gray_gamma
Definition cm.h:692
uint32_t nt_hl_bg
Definition cm.h:731
uint32_t bg
Definition cm.h:713
char fill_char
Definition cm.h:775
uint ff
Definition cm.h:774
uint flen
Definition cm.h:773
uint fcol
Definition cm.h:772
uint flin
Definition cm.h:771
bool cf_erase_remainder
Definition cm.h:776
char title[MAXLEN]
Definition common.h:129
char mapp_data[MAXLEN]
Definition common.h:148
char minitrc[MAXLEN]
Definition common.h:174
bool f_out_spec
Definition common.h:171
char mapp_help[MAXLEN]
Definition common.h:149
int begx
Definition common.h:118
bool f_title
Definition common.h:166
char chyron_s[MAXLEN]
Definition common.h:128
SIO * sio
Definition common.h:114
int pick_cnt
Definition common.h:188
bool f_cmd_all
Definition common.h:165
Form * form
Definition common.h:185
char in_spec[MAXLEN]
Definition common.h:168
char cmd_all[MAXLEN]
Definition common.h:123
bool f_mapp_help
Definition common.h:157
bool f_mapp_msrc
Definition common.h:158
int argc
Definition common.h:130
char fill_char[2]
Definition common.h:146
bool f_cmd
Definition common.h:164
int prompt_type
Definition common.h:126
char about_fn[MAXLEN]
Definition common.h:175
char mapp_msrc[MAXLEN]
Definition common.h:150
int cols
Definition common.h:116
int menu_cnt
Definition common.h:184
int tab_stop
Definition common.h:181
bool f_mapp_home
Definition common.h:154
bool f_erase_remainder
Definition common.h:141
bool f_mapp_data
Definition common.h:155
bool f_read_theme
Definition common.h:142
bool f_mapp_desc
Definition common.h:161
char mapp_home[MAXLEN]
Definition common.h:147
bool f_mapp_user
Definition common.h:159
char prompt_str[MAXLEN]
Definition common.h:125
bool f_squeeze
Definition common.h:137
int begy
Definition common.h:117
char parent_cmd[MAXLEN]
Definition common.h:124
char mapp_spec[MAXLEN]
Definition common.h:176
char receiver_cmd[MAXLEN]
Definition common.h:121
int h_shift
Definition common.h:182
bool wrap
Definition common.h:144
bool f_multiple_cmd_args
Definition common.h:139
int select_max
Definition common.h:179
bool f_ln
Definition common.h:143
bool f_mapp_spec
Definition common.h:156
char provider_cmd[MAXLEN]
Definition common.h:120
char out_spec[MAXLEN]
Definition common.h:169
bool f_strip_ansi
Definition common.h:136
View * view
Definition common.h:189
bool p_view_files
Definition common.h:134
Menu * menu
Definition common.h:183
bool f_at_end_remove
Definition common.h:135
int view_cnt
Definition common.h:190
char brackets[3]
Definition common.h:145
bool f_ignore_case
Definition common.h:133
char ** argv
Definition common.h:131
int lines
Definition common.h:115
char mapp_user[MAXLEN]
Definition common.h:151
char cmd[MAXLEN]
Definition common.h:122
char mapp_theme[MAXLEN]
Definition common.h:152
int optind
Definition common.h:132
bool f_help_spec
Definition common.h:167
bool f_receiver_cmd
Definition common.h:163
bool f_provider_cmd
Definition common.h:162
int form_cnt
Definition common.h:186
char help_spec[MAXLEN]
Definition common.h:177
char editor[MAXLEN]
Definition common.h:172
Pick * pick
Definition common.h:187
bool f_in_spec
Definition common.h:170
char menuapp[MAXLEN]
Definition common.h:173
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
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
Chyron * chyron
Definition form.h:365
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:79
void * ui_surface
Definition menu.h:66
void * ui_runtime
Definition menu.h:59
char * raw_text
Definition menu.h:76
char * command_str
Definition menu.h:94
unsigned int type
Definition menu.h:74
uint letter_pos
Definition menu.h:85
char choice_letter
Definition menu.h:82
uint command_type
Definition menu.h:88
char provider_cmd[MAXLEN]
Definition menu.h:155
uint bg_clr_idx
Definition menu.h:109
char mapp_spec[MAXLEN]
Definition menu.h:144
int argc
Definition menu.h:138
Line * line[MAX_MENU_LINES]
Definition menu.h:223
bool f_help_spec
Definition menu.h:182
char cmd[MAXLEN]
Definition menu.h:170
bool f_provider_cmd
Definition menu.h:187
uint fg_clr_idx
Definition menu.h:106
uint text_max_len
Definition menu.h:210
uint begy
Definition menu.h:118
bool f_mapp_spec
Definition menu.h:177
uint cols
Definition menu.h:116
char receiver_cmd[MAXLEN]
Definition menu.h:163
uint bo_clr_idx
Definition menu.h:112
bool f_receiver_cmd
Definition menu.h:194
bool f_cmd
Definition menu.h:200
uint choice_max_len
Definition menu.h:204
char help_spec[MAXLEN]
Definition menu.h:150
uint begx
Definition menu.h:121
uint line_idx
Definition menu.h:219
uint lines
Definition menu.h:114
char ** argv
Definition menu.h:141
uint item_count
Definition menu.h:216
char title[MAXLEN]
Definition menu.h:135
bool f_mapp_spec
Definition pick.h:56
char ** m_object
Definition pick.h:71
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
Chyron * chyron
Definition pick.h:94
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
off_t sl_ln_no
Definition view.h:52
uint sl_cnt
Definition view.h:58
uint sl_cols[MAXLEN]
Definition view.h:55
uint sl_idx
Definition view.h:57
UiCell * sl_cc[MAXLEN]
Definition view.h:54
uint sl_cells[MAXLEN]
Definition view.h:56
char * sl_s[MAXLEN]
Definition view.h:53
uint smaxrow
Definition view.h:144
char provider_cmd[MAXLEN]
Definition view.h:76
uint sminrow
Definition view.h:140
char in_spec[MAXLEN]
Definition view.h:152
char * lnbuf_curr_ptr
Definition view.h:188
off_t page_top_ln_no
Definition view.h:169
off_t srch_curr_ln_no
Definition view.h:171
uint ln_clr_idx
Definition view.h:65
char ln_bg_clr_x[COLOR_LEN]
Definition view.h:71
char fg_clr_x[COLOR_LEN]
Definition view.h:67
int argc
Definition view.h:82
int optind
Definition view.h:84
char ** argv
Definition view.h:83
bool f_search_complete
Definition view.h:119
int next_cmd_char
Definition view.h:109
uint page_bot_sl_idx
Definition view.h:206
char * buf
Definition view.h:183
uint maxcol
Definition view.h:137
bool wrap
Definition view.h:201
uint smincol
Definition view.h:142
char * line_out_p
Definition view.h:130
char * line_in_end_p
Definition view.h:132
int in_fd
Definition view.h:175
off_t srch_curr_pos
Definition view.h:167
uint bo_clr_idx
Definition view.h:64
bool f_in_spec
Definition view.h:155
off_t page_top_pos
Definition view.h:164
FILE * in_fp
Definition view.h:178
off_t file_pos
Definition view.h:162
bool page_bot_sl
Definition view.h:204
uint lines
Definition view.h:72
off_t ln_no
Definition view.h:194
char prompt_str[MAXLEN]
Definition view.h:80
off_t prev_file_pos
Definition view.h:163
uint begx
Definition view.h:75
bool f_bod
Definition view.h:111
bool f_first_iter
Definition view.h:118
char line_in_s[PAD_COLS]
Definition view.h:126
char help_spec[MAXLEN]
Definition view.h:154
bool f_redisplay_page
Definition view.h:116
char * file_spec_ptr
Definition view.h:158
char * next_file_spec_ptr
Definition view.h:159
int stdout_fd
Definition view.h:181
bool f_is_pipe
Definition view.h:114
bool f_ignore_case
Definition view.h:85
char * lnbuf
Definition view.h:187
uint ln_bg_clr_idx
Definition view.h:66
bool f_cmd_all
Definition view.h:124
bool f_help_spec
Definition view.h:157
char cmd[MAXLEN]
Definition view.h:78
bool page_top_sl
Definition view.h:203
off_t srch_beg_ln_no
Definition view.h:172
bool f_in_pipe
Definition view.h:174
int tmp_fd
Definition view.h:176
char receiver_cmd[MAXLEN]
Definition view.h:77
char * buf_curr_ptr
Definition view.h:184
off_t * ln_tbl
Definition view.h:197
bool f_full_screen
Definition view.h:120
bool f_ln
Definition view.h:193
bool f_strip_ansi
Definition view.h:88
bool f_eod
Definition view.h:112
off_t mark_tbl[NMARKS]
Definition view.h:173
char ln_s[10]
Definition view.h:196
off_t ln_no_max
Definition view.h:195
UiCell cmplx_buf[PAD_COLS]
Definition view.h:129
bool f_cmd
Definition view.h:123
uint cmd_line
Definition view.h:136
bool f_forward
Definition view.h:113
off_t ln_max_pos
Definition view.h:200
char stripped_line_out[PAD_COLS]
Definition view.h:128
uint page_top_sl_cnt
Definition view.h:207
off_t srch_beg_pos
Definition view.h:168
off_t ln_tbl_cnt
Definition view.h:199
bool f_at_end_remove
Definition view.h:86
uint ln_win_cols
Definition view.h:192
uint first_match_x
Definition view.h:148
char * tmp_file_name_ptr
Definition view.h:160
uint curx
Definition view.h:134
char bo_clr_x[COLOR_LEN]
Definition view.h:69
off_t file_size
Definition view.h:161
uint scroll_lines
Definition view.h:135
char bg_clr_x[COLOR_LEN]
Definition view.h:68
bool f_squeeze
Definition view.h:87
char tmp_prompt_str[MAXLEN]
Definition view.h:102
char cur_file_str[MAXLEN]
Definition view.h:125
char * buf_end_ptr
Definition view.h:185
char line_out_s[PAD_COLS]
Definition view.h:127
uint cury
Definition view.h:133
FILE * stdin_fp
Definition view.h:180
char out_spec[MAXLEN]
Definition view.h:153
bool f_timer
Definition view.h:121
int tab_stop
Definition view.h:107
uint page_bot_sl_cnt
Definition view.h:208
char title[MAXLEN]
Definition view.h:81
uint cols
Definition view.h:73
char cmd_all[MAXLEN]
Definition view.h:79
off_t page_bot_pos
Definition view.h:165
off_t page_bot_ln_no
Definition view.h:170
uint begy
Definition view.h:74
bool f_displaying_help
Definition view.h:117
int h_shift
Definition view.h:108
int curr_argc
Definition view.h:104
int out_fd
Definition view.h:177
char * lnbuf_end_ptr
Definition view.h:189
uint pmincol
Definition view.h:139
FILE * stdout_fp
Definition view.h:182
uint page_top_sl_idx
Definition view.h:205
char ln_clr_x[COLOR_LEN]
Definition view.h:70
uint smaxcol
Definition view.h:146
uint fg_clr_idx
Definition view.h:62
bool f_out_spec
Definition view.h:156
off_t page_bot_end_pos
Definition view.h:166
UiSurface * sfc
Definition view.h:101
SplitLine cur
Definition view.h:202
char file_name[MAXLEN]
Definition view.h:115
int stdin_fd
Definition view.h:179
uint ln_win_lines
Definition view.h:191
uint last_match_x
Definition view.h:150
off_t ln_tbl_size
Definition view.h:198
char * line_in_beg_p
Definition view.h:131
uint bg_clr_idx
Definition view.h:63
uint pminrow
Definition view.h:138
bool f_multiple_cmd_args
Definition view.h:89
char cmd_arg[MAXLEN]
Definition view.h:106
size_t capacity
Definition view.h:214
size_t top
Definition view.h:215
View * items
Definition view.h:213
Definition nccell.h:3