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

Window support for C-Menu - EXPERIMENTAL. More...

#include "include/ui_backend.h"
#include "ui/ui_ncurses_internal.h"
#include <cm.h>
#include <errno.h>
#include <fcntl.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <termios.h>
#include <unistd.h>
#include <wchar.h>
Include dependency graph for dwin.c:

Go to the source code of this file.

Macros

#define NC   true

Enumerations

enum  WinFlags { WF_BOX = 0b00000001 , WF_WIN = 0b00000010 , WF_WIN2 = 0b00000100 }

Functions

void abend (int ec, char *s)
 Abnormal program termination.
bool action_disposition (char *title, char *action_str)
 Display a simple action disposition message window or print to stderr.
void activate_all_chyron_keys (Chyron *chyron)
 Deactivate chyron key.
void activate_chyron_key (Chyron *chyron, int k)
 Activate chyron key.
int answer_yn (char *msg0, char *msg1, char *msg2, char *msg3)
 Accept a single letter answer.
void apply_gamma (RGB *rgb)
 Apply gamma correction to RGB color.
int bare_box_new (int wlines, int wcols, int wbegy, int wbegx, char *wtitle)
 Create a new window with optional box and title.
int border_draw (WINDOW *)
int border_hsplit (WINDOW *box, int y)
 Draw a box with a separator line around the specified window.
int border_hsplit_text (WINDOW *box, char *text, int separator_line)
 Draw a box with a separator line and text around the specified window.
int border_title (WINDOW *box, char *title)
 Draw a box with a title around the specified window.
int box_hsplit_new (int wlines, int split_win_lines, int wcols, int wbegy, int wbegx, char *wtitle)
 Create a new window with optional box and title, and a second window inside it, split horizontally.
int box_new (int wlines, int wcols, int wbegy, int wbegx, char *wtitle)
 Create a new window with optional box and title.
void check_panels (int i)
 Check and display the panels for a given window index.
int clr_name_to_idx (char *s)
 Get color index from color name.
void compile_chyron (Chyron *chyron)
 construct the chyron string from the chyron structure
void deactivate_all_chyron_keys (Chyron *chyron)
 Deactivate all chyron keys.
void deactivate_chyron_key (Chyron *chyron, int k)
 Deactivate chyron key.
Chyrondestroy_chyron (Chyron *chyron)
 Destroy Chyron structure.
void destroy_curses ()
 Gracefully shut down NCurses and restore terminal settings.
void display_chyron (WINDOW *win, Chyron *chyron, int line, int col)
 Display chyron on window.
void display_cmplx_str (WINDOW *win, cchar_t *cmplx_buf, int line, int col)
 Display a complex character string on a window.
int display_error (char *msg0, char *msg1, char *msg2, char *msg3)
 Display an error message window or print to stderr.
int dxwgetch (WINDOW *win_0, WINDOW *win_1, WINDOW *win_2, WINDOW *win_3, WINDOW *win_c, Chyron *chyron, int n)
 Wrapper for wgetch that handles signals, mouse events, checks for clicks on the chyron line, and accepts a sinigle character answer.
int get_chyron_key (Chyron *chyron, int x)
 Get keycode from chyron.
int get_clr_pair (int fg, int bg)
 Get color pair index for foreground and background colors.
RGB hex_clr_str_to_rgb (char *s)
 Convert six-digit HTML style hex color code to RGB struct.
bool init_clr_palette (SIO *sio)
 Initialize color palette based on SIO settings.
void init_hex_clr (int idx, char *s)
 Initialize extended ncurses color from HTML style hex string.
void initialize_local_colors (SIO *sio)
 Initialize local color variables and color pairs based on SIO settings.
bool is_set_chyron_key (Chyron *chyron, int k)
 Check if function key label is set.
void list_colors ()
 list colors to stderr
int mb_to_cc (cchar_t *cmplx_buf, char *str, attr_t attr, int cpx, int *pos, int maxlen)
 Convert multibyte string to complex character array.
WINDOW * message_win (char *msg)
 Display a message in a window or print to stderr if curses is not available.
size_t mk_cmplx_str (cchar_t *cmplx_buf, char *s, attr_t attr, int cp)
 Convert a multibyte string to an array of cchar_t complex characters.
cchar_t mkcc (int cp, attr_t attr, const char *s)
 Create a cchar_t with the specified color pair index.
void mvwaddstr_fill (WINDOW *w, int y, int x, char *s, int l)
 For lines shorter than their display area, fill the rest with spaces.
Chyronnew_chyron ()
 Create and initialize Chyron structure.
int nf_error (int ec, char *s)
 Display error message and wait for key press.
bool open_curses (SIO *sio)
 Initialize NCurses and color settings.
int Perror (char *emsg_str)
 Display a simple error message window or print to stderr.
void restore_wins ()
 Restore all windows after a screen resize.
int rgb_to_curses_clr (RGB *rgb)
 Get color index for RGB color.
int rgb_to_xterm256_idx (RGB *rgb)
 Convert RGB color to XTerm 256 color index.
void set_chyron_key (Chyron *chyron, int k, char *s, int kc)
 Set chyron key with default color pair (cp_nt_rev).
void set_chyron_key_cp (Chyron *chyron, int k, char *s, int kc, int cp)
 Set chyron key with color pair (cp).
size_t str_to_cc (cchar_t *cmplx_buf, const char *s, attr_t attr, int cp, size_t maxlen)
 Convert a multibyte string to an array of cchar_t complex characters.
void ui_rect_set (UiRect *r, int y, int x, int h, int w)
 Set the properties of a UiRect structure.
void unset_chyron_key (Chyron *chyron, int k)
 Unset chyron key.
int vgetch (WINDOW *win, int n)
 Wrapper for wgetch that handles signals and mouse events, and accepts a single character answer.
int wait_continue (WINDOW *wait_win, Chyron *chyron, int remaining)
 Update the waiting message with remaining time and check for user input.
bool wait_destroy (Chyron *chyron)
 Destroy the waiting message window and chyron.
Chyronwait_mk_chyron ()
 Create a Chyron struct for the waiting message.
WINDOW * wait_mk_win (Chyron *chyron, char *title)
 Display a popup waiting message.
bool waitpid_with_timeout (pid_t pid, int timeout)
 Wait for a process to finish with a timeout and optional user cancellation.
int wccp_to_str (wchar_t cp, uint8_t *buffer)
 Converts a Unicode code point to a UTF-8 encoded string.
int win2_box_new (int wlines, int wcols, int wbegy, int wbegx, char *wtitle)
 Create a new window with optional box and title, and a second window inside it.
int win2_new (int wlines, int wcols, int wbegy, int wbegx)
 Create a new subwindow (win2) with specified dimensions and position.
void win_del ()
 Delete the current window and its associated box window.
void win_init_attrs ()
 Initialize window attributes.
int win_new (int wlines, int wcols)
 Create a new window with specified dimensions and position.
void win_redraw (WINDOW *win)
 Redraw the specified window.
void win_resize (int wlines, int wcols, char *title)
 Resize the current window and its box, and update the title.
RGB xterm256_idx_to_rgb (int idx)
 Convert XTerm 256 color index to RGB.
int xwgetch (WINDOW *win, Chyron *chyron, int n)
 Wrapper for wgetch that handles signals, mouse events, checks for clicks on the chyron line, and accepts a sinigle character answer.

Variables

cchar_t bl
double BLUE_GAMMA = 1.2
int box_attr
cchar_t br
cchar_t bs
const wchar_t bw_bl = BW_RBL
const wchar_t bw_br = BW_RBR
const wchar_t bw_chk = BW_CHK
const wchar_t bw_da = BW_DA
const wchar_t bw_ho = BW_HO
const wchar_t bw_la = BW_LA
const wchar_t bw_lt = BW_LT
const wchar_t bw_ra = BW_RA
const wchar_t bw_ran = BW_RAN
const wchar_t bw_rt = BW_RT
const wchar_t bw_sp = BW_SP
const wchar_t bw_tl = BW_RTL
const wchar_t bw_tr = BW_RTR
const wchar_t bw_ua = BW_UA
const wchar_t bw_ve = BW_VE
cchar_t CC_BG
cchar_t CC_BLUE
cchar_t CC_BOX
cchar_t CC_BRKTL
cchar_t CC_BRKTR
cchar_t CC_CHK
cchar_t CC_CMDLN
cchar_t CC_FILL_CHAR
cchar_t CC_GREEN
cchar_t CC_IND
cchar_t CC_LN
cchar_t CC_NORM
cchar_t CC_NT
cchar_t CC_NT_HL
cchar_t CC_NT_HL_REV
cchar_t CC_NT_REV
cchar_t CC_RAN
cchar_t CC_RED
cchar_t CC_TITLE
cchar_t CC_YELLOW
cchar_t chk
int click_x
int click_y
int clr_cnt = 0
int clr_pair_cnt = 1
int clr_pair_idx = 1
unsigned int cmd_key
char const colors_text [][10]
 Color names for .minitrc overrides.
int cp_blue
int cp_box
int cp_brackets
int cp_cmdln
int cp_fill_char
int cp_green
int cp_ind
int cp_ln
int cp_norm
int cp_nt
int cp_nt_hl
int cp_nt_hl_rev
int cp_nt_rev
int cp_red
int cp_title
int cp_yellow
cchar_t da
char em0 [MAXLEN]
char em1 [MAXLEN]
char em2 [MAXLEN]
char em3 [MAXLEN]
int exit_code
bool f_sigwench = false
char fn [MAXLEN]
double GRAY_GAMMA = 1.2
double GREEN_GAMMA = 1.2
cchar_t la
cchar_t ls
cchar_t lt
int m_begx = -1
int m_begy = -1
int m_cols
int m_lines
int mouse_support
WINDOW * mouse_win
PANEL * panel_box [MAXWIN]
PANEL * panel_main
PANEL * panel_win [MAXWIN]
PANEL * panel_win2 [MAXWIN]
int pipe_in
int pipe_out
cchar_t ra
cchar_t ran
double RED_GAMMA = 1.2
cchar_t rs
cchar_t rt
SCREEN * screen
cchar_t sp
int src_line
char * src_name
RGB StdColors [16]
int stdin_fd
int stdout_fd
cchar_t tl
cchar_t tr
cchar_t ts
int tty_fd
FILE * tty_fp
cchar_t ua
UiSurfaceui_box [MAXWIN]
UiConfigui_config
UiRect ui_rect
UiRuntimeui_runtime
UiSurfaceui_win [MAXWIN]
UiSurfaceui_win2 [MAXWIN]
int win_attr
WINDOW * win_box [MAXWIN]
WINDOW * win_main
int win_ptr
WINDOW * win_win [MAXWIN]
WINDOW * win_win2 [MAXWIN]

Detailed Description

Window support for C-Menu - EXPERIMENTAL.

This file contains functions for managing NCurses windows and color settings for the Chyron structure for function key labels and mouse click handling. This file is a work in progress and may be subject to change as the C-Menu project evolves. Generally, don't try to use it yet unless you want complete the half-done code modifications.

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 dwin.c.

Macro Definition Documentation

◆ NC

#define NC   true

Definition at line 34 of file dwin.c.

Enumeration Type Documentation

◆ WinFlags

enum WinFlags
Enumerator
WF_BOX 
WF_WIN 
WF_WIN2 

Definition at line 36 of file dwin.c.

36 {
37 WF_BOX = 0b00000001,
38 WF_WIN = 0b00000010,
39 WF_WIN2 = 0b00000100
40};
@ WF_WIN2
Definition dwin.c:39
@ WF_BOX
Definition dwin.c:37
@ WF_WIN
Definition dwin.c:38

Function Documentation

◆ border_draw()

int border_draw ( WINDOW * box)

Definition at line 1236 of file dwin.c.

1236 {
1237 int maxy = getmaxy(box);
1238 int maxx = getmaxx(box);
1239 int y = 0;
1240 int x = 0;
1241 mvwadd_wchnstr(box, y, x++, &tl, 1); // top left
1242 for (x = 1; x < maxx - 1; x++)
1243 mvwadd_wchnstr(box, y, x, &ts, 1); // horizontal line
1244 mvwadd_wchnstr(box, y, maxx - 1, &tr, 1); // top left
1245
1246 for (y = 1; y < maxy - 1; y++) {
1247 mvwadd_wchnstr(box, y, 0, &ls, 1); // vertical line
1248 mvwadd_wchnstr(box, y, maxx - 1, &rs, 1); // vertical line
1249 }
1250
1251 mvwadd_wchnstr(box, y, 0, &bl, 1); // bottom left
1252 for (x = 1; x < maxx - 1; x++)
1253 mvwadd_wchnstr(box, y, x, &bs, 1); // horizontal line
1254 mvwadd_wchnstr(box, y, maxx - 1, &br, 1); // bottom right
1255 return 0;
1256}
cchar_t tl
Definition cm.h:501
cchar_t br
Definition cm.h:501
cchar_t rs
Definition cm.h:501
cchar_t bl
Definition cm.h:501
cchar_t ts
Definition cm.h:501
cchar_t tr
Definition cm.h:501
cchar_t ls
Definition cm.h:631
cchar_t bs
Definition cm.h:501

References bl, br, bs, ls, rs, tl, tr, and ts.

Referenced by bare_box_new().

Here is the caller graph for this function:

Variable Documentation

◆ bl

cchar_t bl

Definition at line 122 of file dwin.c.

◆ BLUE_GAMMA

double BLUE_GAMMA = 1.2

Gamma correction value for blue colors. Set in .minitrc

Definition at line 157 of file dwin.c.

Referenced by apply_gamma(), and initialize_local_colors().

◆ box_attr

int box_attr

Definition at line 163 of file dwin.c.

◆ br

cchar_t br

Definition at line 122 of file dwin.c.

◆ bs

cchar_t bs

Definition at line 122 of file dwin.c.

◆ bw_bl

const wchar_t bw_bl = BW_RBL

bottom left corner

Definition at line 142 of file dwin.c.

Referenced by initialize_local_colors().

◆ bw_br

const wchar_t bw_br = BW_RBR

bottom right corner

Definition at line 143 of file dwin.c.

Referenced by initialize_local_colors().

◆ bw_chk

const wchar_t bw_chk = BW_CHK

right angle

Definition at line 152 of file dwin.c.

Referenced by initialize_local_colors().

◆ bw_da

const wchar_t bw_da = BW_DA

right arrow

Definition at line 150 of file dwin.c.

Referenced by initialize_local_colors().

◆ bw_ho

const wchar_t bw_ho = BW_HO

horizontal line

Definition at line 138 of file dwin.c.

Referenced by border_hsplit(), and initialize_local_colors().

◆ bw_la

const wchar_t bw_la = BW_LA

right arrow

Definition at line 148 of file dwin.c.

Referenced by initialize_local_colors().

◆ bw_lt

const wchar_t bw_lt = BW_LT

left tee

Definition at line 144 of file dwin.c.

Referenced by border_hsplit(), initialize_local_colors(), and win_resize().

◆ bw_ra

const wchar_t bw_ra = BW_RA

right arrow

Definition at line 147 of file dwin.c.

Referenced by initialize_local_colors().

◆ bw_ran

const wchar_t bw_ran = BW_RAN

right angle

Definition at line 151 of file dwin.c.

Referenced by initialize_local_colors().

◆ bw_rt

const wchar_t bw_rt = BW_RT

right tee

Definition at line 145 of file dwin.c.

Referenced by border_hsplit(), initialize_local_colors(), and win_resize().

◆ bw_sp

const wchar_t bw_sp = BW_SP

tee space

Definition at line 146 of file dwin.c.

Referenced by initialize_local_colors(), picker(), and win_resize().

◆ bw_tl

const wchar_t bw_tl = BW_RTL

top left corner

Definition at line 140 of file dwin.c.

Referenced by initialize_local_colors().

◆ bw_tr

const wchar_t bw_tr = BW_RTR

top right corner

Definition at line 141 of file dwin.c.

Referenced by initialize_local_colors().

◆ bw_ua

const wchar_t bw_ua = BW_UA

right arrow

Definition at line 149 of file dwin.c.

Referenced by initialize_local_colors().

◆ bw_ve

const wchar_t bw_ve = BW_VE

vertical line

Definition at line 139 of file dwin.c.

Referenced by initialize_local_colors().

◆ CC_BG

cchar_t CC_BG

Definition at line 198 of file dwin.c.

◆ CC_BLUE

cchar_t CC_BLUE

blue background

Definition at line 217 of file dwin.c.

Referenced by check_panels(), and initialize_local_colors().

◆ CC_BOX

cchar_t CC_BOX

indicator colors

Definition at line 199 of file dwin.c.

Referenced by bare_box_new(), box_hsplit_new(), init_view_boxwin(), initialize_local_colors(), message_win(), and win_resize().

◆ CC_BRKTL

cchar_t CC_BRKTL

left bracket

left field bracket

Definition at line 209 of file dwin.c.

Referenced by initialize_local_colors().

◆ CC_BRKTR

cchar_t CC_BRKTR

right bracket

right field bracket

Definition at line 210 of file dwin.c.

Referenced by initialize_local_colors().

◆ CC_CHK

cchar_t CC_CHK

Definition at line 212 of file dwin.c.

Referenced by initialize_local_colors().

◆ CC_CMDLN

cchar_t CC_CMDLN

Definition at line 202 of file dwin.c.

Referenced by initialize_local_colors().

◆ CC_FILL_CHAR

cchar_t CC_FILL_CHAR

fill character

Definition at line 211 of file dwin.c.

Referenced by initialize_local_colors().

◆ CC_GREEN

cchar_t CC_GREEN

green background

Definition at line 215 of file dwin.c.

Referenced by check_panels(), and initialize_local_colors().

◆ CC_IND

cchar_t CC_IND

box colors

Definition at line 200 of file dwin.c.

Referenced by get_cmd_char(), and initialize_local_colors().

◆ CC_LN

cchar_t CC_LN

Definition at line 201 of file dwin.c.

Referenced by init_view_boxwin(), init_view_full_screen(), and initialize_local_colors().

◆ CC_NORM

cchar_t CC_NORM

Definition at line 208 of file dwin.c.

Referenced by initialize_local_colors(), and open_curses().

◆ CC_NT

◆ CC_NT_HL

cchar_t CC_NT_HL

highlight

Definition at line 207 of file dwin.c.

Referenced by initialize_local_colors().

◆ CC_NT_HL_REV

cchar_t CC_NT_HL_REV

highlight reverse

Definition at line 206 of file dwin.c.

Referenced by initialize_local_colors().

◆ CC_NT_REV

cchar_t CC_NT_REV

◆ CC_RAN

cchar_t CC_RAN

Definition at line 213 of file dwin.c.

Referenced by initialize_local_colors().

◆ CC_RED

cchar_t CC_RED

red background

Definition at line 214 of file dwin.c.

Referenced by check_panels(), and initialize_local_colors().

◆ CC_TITLE

cchar_t CC_TITLE

title colors

Definition at line 203 of file dwin.c.

Referenced by initialize_local_colors().

◆ CC_YELLOW

cchar_t CC_YELLOW

yellow background

Definition at line 216 of file dwin.c.

Referenced by initialize_local_colors().

◆ chk

cchar_t chk

Definition at line 122 of file dwin.c.

◆ click_x

int click_x

the x coordinate of a mouse click

Definition at line 81 of file dwin.c.

Referenced by cf_accept(), dxwgetch(), field_editor(), form_post(), form_process(), menu_cmd_processor(), picker(), and xwgetch().

◆ click_y

int click_y

the y coordinate of a mouse click

Definition at line 80 of file dwin.c.

Referenced by cf_accept(), dxwgetch(), field_editor(), form_post(), form_process(), menu_cmd_processor(), picker(), and xwgetch().

◆ clr_cnt

int clr_cnt = 0

number of colors used

Definition at line 195 of file dwin.c.

Referenced by init_clr_palette(), and rgb_to_curses_clr().

◆ clr_pair_cnt

int clr_pair_cnt = 1

number of color pairs supported by the terminal

Definition at line 197 of file dwin.c.

Referenced by get_clr_pair().

◆ clr_pair_idx

int clr_pair_idx = 1

current color pair index

Definition at line 196 of file dwin.c.

Referenced by parse_ansi_str().

◆ cmd_key

unsigned int cmd_key

◆ colors_text

char const colors_text[][10]
Initial value:
= {
"black", "red", "green", "yellow", "blue", "magenta", "cyan",
"white", "orange", "bg", "abg", "bblack", "bred", "bgreen",
"byellow", "bblue", "bcyan", "bmagenta", "bwhite", "borange", ""}

Color names for .minitrc overrides.

colors_text

These names are used in .minitrc to specify color overrides The order of these names corresponds to the ColorsEnum values

Definition at line 133 of file dwin.c.

133 {
134 "black", "red", "green", "yellow", "blue", "magenta", "cyan",
135 "white", "orange", "bg", "abg", "bblack", "bred", "bgreen",
136 "byellow", "bblue", "bcyan", "bmagenta", "bwhite", "borange", ""};

Referenced by clr_name_to_idx(), and list_colors().

◆ cp_blue

int cp_blue

blue background color pair index

Definition at line 194 of file dwin.c.

Referenced by initialize_local_colors().

◆ cp_box

int cp_box

box color pair index

Definition at line 179 of file dwin.c.

Referenced by border_hsplit_text(), initialize_local_colors(), and picker().

◆ cp_brackets

int cp_brackets

color pair index for field brackets

Definition at line 190 of file dwin.c.

Referenced by init_form(), and initialize_local_colors().

◆ cp_cmdln

int cp_cmdln

Definition at line 181 of file dwin.c.

Referenced by initialize_local_colors().

◆ cp_fill_char

int cp_fill_char

fill character color pair index

Definition at line 189 of file dwin.c.

Referenced by form_display_fields(), and initialize_local_colors().

◆ cp_green

int cp_green

green background color pair index

Definition at line 192 of file dwin.c.

Referenced by initialize_local_colors().

◆ cp_ind

int cp_ind

indicator color pair index

Definition at line 180 of file dwin.c.

Referenced by initialize_local_colors().

◆ cp_ln

int cp_ln

Definition at line 187 of file dwin.c.

Referenced by initialize_local_colors().

◆ cp_norm

int cp_norm

Definition at line 188 of file dwin.c.

Referenced by initialize_local_colors().

◆ cp_nt

int cp_nt

normal color pair index

Definition at line 183 of file dwin.c.

Referenced by fmt_line(), form_display_field(), form_display_fields(), and initialize_local_colors().

◆ cp_nt_hl

int cp_nt_hl

highlight color pair index

Definition at line 185 of file dwin.c.

Referenced by initialize_local_colors(), menu_cmd_processor(), and menu_engine().

◆ cp_nt_hl_rev

int cp_nt_hl_rev

highlight reverse color pair index

Definition at line 186 of file dwin.c.

Referenced by field_editor(), form_engine(), initialize_local_colors(), menu_cmd_processor(), and picker().

◆ cp_nt_rev

int cp_nt_rev

reverse color pair index

Definition at line 184 of file dwin.c.

Referenced by compile_chyron(), field_editor(), initialize_local_colors(), picker(), search(), and set_chyron_key().

◆ cp_red

int cp_red

red background color pair index

Definition at line 191 of file dwin.c.

Referenced by initialize_local_colors().

◆ cp_title

int cp_title

title color pair index

Definition at line 182 of file dwin.c.

Referenced by border_title(), and initialize_local_colors().

◆ cp_yellow

int cp_yellow

yellow background color pair index

Definition at line 193 of file dwin.c.

Referenced by initialize_local_colors().

◆ da

cchar_t da

Definition at line 122 of file dwin.c.

◆ em0

◆ em1

◆ em2

◆ em3

char em3[MAXLEN]

error message string for error messages

Definition at line 178 of file dwin.c.

Referenced by verify_dir(), and verify_file().

◆ exit_code

int exit_code

the exit code for the program, for error messages and other output

Definition at line 159 of file dwin.c.

◆ f_sigwench

bool f_sigwench = false

Definition at line 161 of file dwin.c.

◆ fn

char fn[MAXLEN]

function name for error messages

Definition at line 174 of file dwin.c.

Referenced by verify_dir(), and verify_file().

◆ GRAY_GAMMA

double GRAY_GAMMA = 1.2

Gamma correction value for gray colors. Set in .minitrc

Definition at line 154 of file dwin.c.

Referenced by apply_gamma(), and initialize_local_colors().

◆ GREEN_GAMMA

double GREEN_GAMMA = 1.2

Gamma correction value for green colors. Set in .minitrc

Definition at line 156 of file dwin.c.

Referenced by apply_gamma(), and initialize_local_colors().

◆ la

cchar_t la

Definition at line 122 of file dwin.c.

◆ ls

cchar_t ls

◆ lt

cchar_t lt

Definition at line 122 of file dwin.c.

◆ m_begx

int m_begx = -1

Definition at line 168 of file dwin.c.

◆ m_begy

int m_begy = -1

Definition at line 167 of file dwin.c.

◆ m_cols

int m_cols

Definition at line 166 of file dwin.c.

◆ m_lines

int m_lines

Definition at line 165 of file dwin.c.

◆ mouse_support

int mouse_support

Definition at line 169 of file dwin.c.

◆ mouse_win

WINDOW* mouse_win

input from window n

Definition at line 118 of file dwin.c.

Referenced by dxwgetch(), and picker().

◆ panel_box

PANEL* panel_box[MAXWIN]

Definition at line 57 of file dwin.c.

Referenced by bare_box_new(), check_panels(), destroy_curses(), open_curses(), and win_del().

◆ panel_main

PANEL* panel_main

Definition at line 83 of file dwin.c.

Referenced by open_curses().

◆ panel_win

PANEL* panel_win[MAXWIN]

Definition at line 56 of file dwin.c.

Referenced by check_panels(), win_del(), and win_new().

◆ panel_win2

PANEL* panel_win2[MAXWIN]

Definition at line 55 of file dwin.c.

Referenced by check_panels(), win2_new(), and win_del().

◆ pipe_in

int pipe_in

Definition at line 219 of file dwin.c.

◆ pipe_out

int pipe_out

Definition at line 219 of file dwin.c.

◆ ra

cchar_t ra

Definition at line 122 of file dwin.c.

◆ ran

cchar_t ran

Definition at line 122 of file dwin.c.

◆ RED_GAMMA

double RED_GAMMA = 1.2

Gamma correction value for red colors. Set in .minitrc

Definition at line 155 of file dwin.c.

Referenced by apply_gamma(), and initialize_local_colors().

◆ rs

cchar_t rs

Definition at line 122 of file dwin.c.

◆ rt

cchar_t rt

Definition at line 122 of file dwin.c.

◆ screen

SCREEN* screen

Definition at line 42 of file dwin.c.

Referenced by destroy_curses(), open_curses(), ui_init(), and ui_shutdown().

◆ sp

cchar_t sp

Definition at line 122 of file dwin.c.

◆ src_line

int src_line

the line number of the source file being processed, for error messages

Definition at line 172 of file dwin.c.

Referenced by verify_dir(), and verify_file().

◆ src_name

char* src_name

the name of the source file being processed, for error messages

Definition at line 173 of file dwin.c.

Referenced by verify_dir(), and verify_file().

◆ StdColors

RGB StdColors[16]
Initial value:
= {
{0, 0, 0}, {128, 0, 0}, {0, 128, 0}, {128, 128, 0}, {0, 0, 128}, {128, 0, 128}, {0, 128, 128}, {192, 192, 192}, {128, 128, 128}, {255, 0, 0}, {0, 255, 0}, {255, 255, 0}, {0, 0, 255}, {255, 0, 255}, {0, 255, 255}, {255, 255, 255}}

StdColors

Standard 16 colors for xterm256 color conversions These colors can be overridden in ".minitrc"

Definition at line 127 of file dwin.c.

127 {
128 {0, 0, 0}, {128, 0, 0}, {0, 128, 0}, {128, 128, 0}, {0, 0, 128}, {128, 0, 128}, {0, 128, 128}, {192, 192, 192}, {128, 128, 128}, {255, 0, 0}, {0, 255, 0}, {255, 255, 0}, {0, 0, 255}, {255, 0, 255}, {0, 255, 255}, {255, 255, 255}};

Referenced by init_hex_clr(), and xterm256_idx_to_rgb().

◆ stdin_fd

int stdin_fd

Definition at line 170 of file dwin.c.

◆ stdout_fd

int stdout_fd

Definition at line 171 of file dwin.c.

◆ tl

cchar_t tl

Definition at line 122 of file dwin.c.

◆ tr

cchar_t tr

Definition at line 122 of file dwin.c.

◆ ts

cchar_t ts

Definition at line 122 of file dwin.c.

◆ tty_fd

int tty_fd

Global file/pipe numbers

Definition at line 219 of file dwin.c.

◆ tty_fp

FILE* tty_fp

Definition at line 43 of file dwin.c.

Referenced by destroy_curses(), open_curses(), ui_init(), and ui_shutdown().

◆ ua

cchar_t ua

Definition at line 122 of file dwin.c.

◆ ui_box

UiSurface* ui_box[MAXWIN]

Definition at line 46 of file dwin.c.

Referenced by open_curses().

◆ ui_config

UiConfig* ui_config

Definition at line 45 of file dwin.c.

◆ ui_rect

UiRect ui_rect

Definition at line 49 of file dwin.c.

◆ ui_runtime

UiRuntime* ui_runtime

Definition at line 44 of file dwin.c.

Referenced by bare_box_new().

◆ ui_win

UiSurface* ui_win[MAXWIN]

Definition at line 47 of file dwin.c.

Referenced by open_curses().

◆ ui_win2

UiSurface* ui_win2[MAXWIN]

Definition at line 48 of file dwin.c.

Referenced by open_curses().

◆ win_attr

int win_attr

Ncurses attributes for the current window, such as color pair, bold, etc.

Definition at line 162 of file dwin.c.

◆ win_box

WINDOW* win_box[MAXWIN]

◆ win_main

WINDOW* win_main

Definition at line 82 of file dwin.c.

◆ win_ptr

int win_ptr

Pointer to the current window pair, box and window, which can be used to keep track of the currently active window and its associated box.

Definition at line 164 of file dwin.c.

Referenced by action_disposition(), answer_yn(), bare_box_new(), box_hsplit_new(), destroy_curses(), display_error(), display_form(), menu_cmd_processor(), menu_engine(), open_curses(), open_pick_win(), Perror(), popup_ckeys(), restore_wins(), ui_init(), wait_mk_win(), win2_new(), win_del(), win_new(), and win_resize().

◆ win_win

◆ win_win2

WINDOW* win_win2[MAXWIN]

array of pointers to windows

Definition at line 51 of file dwin.c.

Referenced by check_panels(), destroy_curses(), open_curses(), open_pick_win(), restore_wins(), win2_new(), and win_del().