C-Menu 0.2.9
A User Interface Toolkit
Loading...
Searching...
No Matches
init_view.c File Reference

Initialize C-Menu View Screen IO and Input. More...

#include <common.h>
#include <errno.h>
#include <fcntl.h>
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <sys/sysmacros.h>
#include <unistd.h>
#include <wait.h>
Include dependency graph for init_view.c:

Go to the source code of this file.

Functions

void destroy_view_win (Init *)
int init_view_boxwin (Init *init)
 Initialize the C-Menu View in box window mode.
int init_view_full_screen (Init *init)
 Initialize C-Menu View in full screen mode.
void view_boxwin_resize (Init *init)
 Resize the current window and its box.
void view_calc_boxwin_dimensions (Init *init)
 Calculate the dimensions and position of the box window for C-Menu View.
void view_calc_full_screen_dimensions (Init *init)
 Calculate the dimensions for full screen mode.
void view_full_screen_resize (Init *init)
 Resize the full screen view and its components.
int view_init_input (Init *init, char *file_name)
 Initialize the input for the C-Menu View.
void view_win_del (PANEL *, WINDOW *)

Variables

ViewStack view_stack

Detailed Description

Initialize C-Menu View Screen IO and Input.

Author
Bill Waller Copyright (c) 2025 MIT License billx.nosp@m.wall.nosp@m.er@gm.nosp@m.ail..nosp@m.com
Date
2026-02-09

Definition in file init_view.c.

Function Documentation

◆ destroy_view_win()

void destroy_view_win ( Init * init)

Definition at line 318 of file init_view.c.

318 {
319 View *view = init->view;
320 if (!view)
321 return;
322 view_win_del(view->pad_view_pan, view->pad_view_win);
323 delwin(view->pad);
324 view_win_del(view->cmdln_pan, view->cmdln_win);
325 view_win_del(view->lnno_pan, view->lnno_win);
326 view_win_del(view->win_pan, view->win_win);
327 view_win_del(view->box_pan, view->box_win);
328 wnoutrefresh(stdscr);
329 update_panels();
330 doupdate();
331}
View * view
Definition mem.c:49
void view_win_del(PANEL *, WINDOW *)
Definition init_view.c:332
View * view
Definition common.h:188
Definition view.h:42

References View::box_pan, View::box_win, View::cmdln_pan, View::cmdln_win, View::lnno_pan, View::lnno_win, View::pad, View::pad_view_pan, View::pad_view_win, Init::view, view_win_del(), View::win_pan, and View::win_win.

Referenced by destroy_pick_view(), view_boxwin_resize(), and view_file().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ view_win_del()

void view_win_del ( PANEL * pan,
WINDOW * win )

Definition at line 332 of file init_view.c.

332 {
333 if (pan) {
334 del_panel(pan);
335 pan = nullptr;
336 delwin(win);
337 win = nullptr;
338 }
339}

Referenced by destroy_view_win().

Here is the caller graph for this function:

Variable Documentation

◆ view_stack

ViewStack view_stack

Definition at line 34 of file init_view.c.