2
3
4
5
6
7
8
13#include "../ui/ui_ncurses_internal.h"
14#include "ui_backend.h"
15#include <ncursesw/ncurses.h>
16#include <ncursesw/panel.h>
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37static void end_pgm(
void) {
41int main(
int argc,
char **argv) {
47 UiConfig ui_config = {
54 fprintf(stderr,
"\n");
55 fprintf(stderr,
_(
"Cannot set exit function"));
56 fprintf(stderr,
"\n");
62 if (!strcmp(pgm_name,
"menu")) {
65 }
else if (!strcmp(pgm_name,
"form")) {
67 }
else if (!strcmp(pgm_name,
"pick")) {
69 }
else if (!strcmp(pgm_name,
"view")) {
80 }
else if (!strcmp(pgm_name,
"ckeys"))
98 fprintf(stderr,
_(
"\n\nABEND: %s (code: %d)\n"), s, ec);
UiRuntime * ui_init(const UiConfig *config, SIO *sio)
Initialize the UI runtime with the given configuration and SIO.
void ui_shutdown()
Shutdown the UI runtime, cleaning up resources and freeing memory.
void cmenu_shutdown(Init *init)
void cmenu_abend(Init *init, int ec, char *s)
int main(int argc, char **argv)
Capture the current terminal settings for later restoration.
int init_form(Init *, int, char **, uint, uint)
Initialize form data structure and parse description file.
bool base_name(char *, char *)
Returns the base name of a file specification.
void mapp_initialization(Init *, int, char **)
Main initialization function for MAPP - Menu Application.
int init_view_full_screen(Init *init)
Initialize C-Menu View in full screen mode.
int init_view_boxwin(Init *init)
Initialize the C-Menu View in box window mode.
View * destroy_view(Init *init)
Destroy View structure.
Menu * new_menu(Init *init, int argc, char **argv, uint begy, uint begx)
Create and initialize Menu structure.
Init * new_init(int argc, char **argv)
Create and initialize Init structure.
View * new_view(Init *init)
Create and initialize View structure.
Init * destroy_init(Init *init)
Destroy Init structure.
unsigned int menu_engine(Init *)
The main loop of the menu system.
int init_pick(Init *, int, char **, uint, uint)
Initializes pick structure and opens pick input file or pipe.
bool capture_shell_tioctl()
capture_shell_tioctl() - capture shell terminal settings
bool restore_shell_tioctl()
restore_shell_tioctl() - restore shell terminal settings
bool capture_program_tioctl()
capture_program_tioctl() - capture program terminal settings
void sig_dfl_mode()
Set signal handlers to default behavior.
void sig_prog_mode()
Set up signal handlers for interrupt signals.
int view_file(Init *)
Start view.
UiBorderStyle border_style