예제 #1
0
void
ui_redraw(void)
{
    title_bar_resize();
    wins_resize_all();
    status_bar_resize();
    inp_win_resize();
}
예제 #2
0
파일: core.c 프로젝트: jesseadams/profanity
void
ui_resize(const int ch, const char * const input, const int size)
{
    log_info("Resizing UI");
    title_bar_resize();
    status_bar_resize();
    wins_resize_all();
    inp_win_resize(input, size);
    wins_refresh_current();
}
예제 #3
0
파일: screen.c 프로젝트: djrtl/ncmpc-dj
void
screen_resize(struct mpdclient *c)
{
	if (COLS<SCREEN_MIN_COLS || LINES<SCREEN_MIN_ROWS) {
		screen_exit();
		fprintf(stderr, "%s\n", _("Error: Screen too small"));
		exit(EXIT_FAILURE);
	}
#ifdef PDCURSES
	resize_term(LINES, COLS);
#else 
	resizeterm(LINES, COLS);
#endif

	screen.cols = COLS;
	screen.rows = LINES;

	title_bar_resize(&screen.title_bar, screen.cols);

	/* main window */
	screen.main_window.cols = screen.cols;
	screen.main_window.rows = screen.rows-4;
	wresize(screen.main_window.w, screen.main_window.rows, screen.cols);
	wclear(screen.main_window.w);

	/* progress window */
	progress_bar_resize(&screen.progress_bar, screen.cols,
			    screen.rows - 2, 0);
	progress_bar_paint(&screen.progress_bar);

	/* status window */
	status_bar_resize(&screen.status_bar, screen.cols, screen.rows - 1, 0);
	status_bar_paint(&screen.status_bar, c->status, c->song);

	screen.buf_size = screen.cols;
	g_free(screen.buf);
	screen.buf = g_malloc(screen.cols);

	/* resize all screens */
	screen_list_resize(screen.main_window.cols, screen.main_window.rows);

	/* ? - without this the cursor becomes visible with aterm & Eterm */
	curs_set(1);
	curs_set(0);

	screen_paint(c);
}
예제 #4
0
void
ui_resize(void)
{
    struct winsize w;
    ioctl(STDOUT_FILENO, TIOCGWINSZ, &w);
    erase();
    resizeterm(w.ws_row, w.ws_col);
    refresh();

    log_debug("Resizing UI");
    title_bar_resize();
    wins_resize_all();
    status_bar_resize();
    inp_win_resize();
    ProfWin *window = wins_get_current();
    win_update_virtual(window);
}