Code clean up.
Modification of tty_refresh for NCurses: call doupdate() after refresh()
every time.
tty_draw_box_slow() is not private function of TTY now.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Set color mode via tty_init_colors() function.
Made disable_colors and force_colors variables static in main.h.
Removed tty_disable_colors() function.
Some code optimization.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
getch have been renamed to tty_lowlevel_getch.
mi_getch have been renamed to tty_getch.
get_event have been renamed to tty_get_event.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
src/main.c (repaint_screen): call tty_touch_screen() here.
src/execute.c (toggle_panels): fixed comment.
Call repaint_screen() instead of do_refresh().
src/cmd.c (do_view_cmd): small optimization.
(do_edit_at_line): likewise.
(swap_cmd): since tty_touch_screen() is called in repaint_screen()
now, don't call it here.
src/dialog.c (update cursor): don't check h->current->options twice.
(dlg_try_hotkey): don't send WIDHET_HOTKEY message to h->current widget
twice. Type accuracy. Small optimization.
(dlg_key_event): type accuracy. Small optimization.
The call of color initialization function (tty_init_colors()) is moved out
from init_curses() function. Thus we avoid the color reinitialization
in SIGWINCH hangling function.
src/screen.c:
(mini_info_separator): since mini_info_separator() is called after
paint_dir(), no need to call tty_set_normal_attrs().
(paint_frame): removed unused code.
tty_noecho() is used instead of noecho() function or macro.
tty_flush_input() is used instead of flushinp() function or macro.
tty_reset_screen() is used instead of endwin() function or macro.
tty_shutdown() is based on slang_shutdown(). Also implemented for
NCurses as wrapper for endwin().
tty_touch_screen() is used instead of touchwin() function or macro.
tty_set_normal_attrs() is used instead of standend() function or macro.
tty_set_alt_charset() is used instead of acs() and noacs()
functions or macros.
tty_baudrate() is used instead of baudrate() function or macro.
tty_keypad() is used instead of keypad() function or macro.
tty_nodelay() is used instead of nodelay() function or macro.
tty_reset_prog_mode() is used instead of reset_prog_mode() function or macro.
tty_reset_shell_mode() is used instead of reset_shell_mode()
function or macro.
tty_beep() is used instead of beep() function or macro.
src/tty/tty.h:
src/tty/tty-slang.c:
src/tty/tty-ncurses.c: new tty_fill_region() function.
src/dialog.c (widget_erase, dlg_erase): tty_fill_region() function
is applied to erase area of widget and dialog.
src/tty/key.h: cleanup. Changed returned type of is_abort_char()
function from int to gboolean.
src/tty/key.c: moved is_abort_char() function here...
src/tty/win.h: ...from here.
src/dialog.c (dialog_handle_key): is_abort_char() function is used.
Changed order of dialog key handling. Formatting.
Created some TTY functions instead of MC core global variables.
Moved init_layer() function from MC core to TTY layer.
Renamed slang_init() to init_slang().
Added required #include's in TTY layer.
Moved S-Lang color and attribute definitions from src/tty/tty-slang.h
to colors-slang.h.