static cb_ret_t view_dialog_callback (Dlg_head *h, dlg_msg_t msg, int parm) { switch (msg) { case DLG_RESIZE: view_adjust_size(h); return MSG_HANDLED; default: return default_dlg_callback(h, msg, parm); } }
void change_screen_size (void) { #if defined(HAVE_SLANG) || NCURSES_VERSION_MAJOR >= 4 #if defined TIOCGWINSZ && !defined SCO_FLAVOR extern Dlg_head *view_dlg; extern Dlg_head *edit_dlg; #ifndef NCURSES_VERSION mc_noraw_mode (); endwin (); #endif low_level_change_screen_size (); check_split (); #ifndef NCURSES_VERSION /* XSI Curses spec states that portable applications shall not invoke * initscr() more than once. This kludge could be done within the scope * of the specification by using endwin followed by a refresh (in fact, * more than one curses implementation does this); it is guaranteed to work * only with slang. */ init_curses (); #endif setup_panels (); if (current_dlg == view_dlg) view_adjust_size (view_dlg); #ifdef USE_INTERNAL_EDIT if (current_dlg == edit_dlg) edit_adjust_size (edit_dlg); #endif #ifdef RESIZABLE_MENUBAR menubar_arrange(the_menubar); #endif /* Now, force the redraw */ do_refresh (); touchwin (stdscr); #endif /* TIOCGWINSZ && !SCO_FLAVOR */ #endif /* defined(HAVE_SLANG) || NCURSES_VERSION_MAJOR >= 4 */ winch_flag = 0; }