36 #ifdef USE_SLANG_CURSES 39 #ifdef HAVE_SYS_IOCTL_H 40 #include <sys/ioctl.h> 53 struct winsize w = { 0 };
54 int fd = open(
"/dev/tty", O_RDONLY);
57 ioctl(fd, TIOCGWINSZ, &w);
63 #ifdef USE_SLANG_CURSES 72 SLtt_Screen_Rows = w.ws_row;
73 SLtt_Screen_Cols = w.ws_col;
75 if (SLtt_Screen_Rows <= 0)
79 SLtt_Screen_Rows = 24;
82 if (SLtt_Screen_Cols <= 0)
86 SLtt_Screen_Cols = 80;
92 stdscr = newwin(0, 0, 0, 0);
105 int screenrows = w.ws_row;
106 int screencols = w.ws_col;
122 resizeterm(screenrows, screencols);
Convenience wrapper for the gui headers.
int mutt_str_atoi(const char *str, int *dst)
Convert ASCII string to an integer.
const char * mutt_str_getenv(const char *name)
Get an environment variable.
static struct winsize mutt_get_winsize(void)
Use an ioctl to get the window size.
void mutt_window_set_root(int cols, int rows)
Set the dimensions of the Root Window.
void window_notify_all(struct MuttWindow *win)
Notify observers of changes to a Window and its children.
void mutt_resize_screen(void)
Update NeoMutt's opinion about the window size (CURSES)
Convenience wrapper for the library headers.