|
C-Menu 0.2.9
A User Interface Toolkit
|
Populate the C-Menu View Struct and Connect Input. More...
Files | |
| file | init_view.c |
| Initialize C-Menu View Screen IO and Input. | |
Functions | |
| int | init_view_full_screen (Init *init) |
| Initialize C-Menu View in full screen mode. | |
| int | init_view_boxwin (Init *init, char *title) |
| Initialize the C-Menu View in box window mode. | |
| int | view_init_input (View *view, char *file_name) |
| Initialize the input for a C-Menu View. | |
Populate the C-Menu View Struct and Connect Input.
| int init_view_boxwin | ( | Init * | init, |
| char * | title ) |
Initialize the C-Menu View in box window mode.
| init | Pointer to the Init structure containing view settings. |
| title | Title for the box window. |
view->ln_win: line number window
pad for main content
Definition at line 123 of file init_view.c.
References View::argv, View::begx, View::begy, CCC_LN, CCC_WIN, View::cmd_line, View::cols, display_error(), em0, em1, em2, View::f_full_screen, View::lines, View::ln_win, View::ln_win_cols, View::ln_win_lines, View::pad, View::pmincol, View::pminrow, View::scroll_lines, View::smaxcol, View::smaxrow, View::smincol, View::sminrow, ssnprintf(), strnz__cpy(), View::tab_stop, View::title, Init::view, view, View::win, and win_new().
Referenced by mview(), and popup_view().
| int init_view_full_screen | ( | Init * | init | ) |
Initialize C-Menu View in full screen mode.
| init | Pointer to the Init structure containing view settings. |
The function creates the following windows: 1. view->win: Status or Command Line 2. view->ln_win: Line Number Window 3. view->pad: Main Content Pad
view->win: status or command line window
view->ln_win: line number window
view->win: status or command line window
Definition at line 40 of file init_view.c.
References abend(), View::begx, View::begy, CCC_LN, CCC_WIN, View::cmd_line, View::cols, display_error(), em0, em1, em2, View::f_full_screen, View::lines, View::ln_win, View::ln_win_cols, View::ln_win_lines, View::pad, View::pmincol, View::pminrow, View::scroll_lines, View::smaxcol, View::smaxrow, View::smincol, View::sminrow, ssnprintf(), View::tab_stop, Init::view, view, and View::win.
Referenced by main().
| int view_init_input | ( | View * | view, |
| char * | file_name ) |
Initialize the input for a C-Menu View.
This function initializes the input for view, which can be a file, standard input, or a provider command to be initiated by view. It handles different input sources and sets up the necessary file descriptors and memory mapping for efficient access.
| view | Pointer to the View structure to be initialized. |
| file_name | Name of the input file or "-" for standard input. |
Open the input file for reading and get its size.
< 200ms timeout to check for input
If user cancels while waiting for view input, kill provider_cmd child process and close pipe
If error occurs while waiting for view input, kill provider_cmd child process and close pipe
If timeout occurs while waiting for view input, kill provider_cmd child process and close pipe
If unexpected error occurs while waiting for view input, kill provider_cmd child process and close pipe
Definition at line 223 of file init_view.c.
References abend(), base_name(), View::buf, View::buf_curr_ptr, View::cmd, View::cmd_all, cmd_key, View::cur_file_str, destroy_argv(), display_error(), em0, em1, em2, expand_tilde(), View::f_in_pipe, View::file_name, View::file_size, View::in_fd, View::mark_tbl, Perror(), View::prev_file_pos, View::provider_cmd, ssnprintf(), str_to_args(), strnz__cat(), strnz__cpy(), wait_continue(), wait_destroy(), wait_mk_chyron(), wait_mk_win(), wait_timeout, and waitpid_with_timeout().
Referenced by view_file().