Commit Graph

9026 Commits

Author SHA1 Message Date
Andrew Borodin
ef282af7ae TTY: draw box for slow terminal was moved to TTY layer.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-08-12 21:23:54 +04:00
Andrew Borodin
05f3ee1f6c TTY: modifed initialization.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-08-12 21:23:54 +04:00
Andrew Borodin
a691a99278 Fix after rebasing.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-08-12 21:23:54 +04:00
Andrew Borodin
3c902477cb TTY: use direct cast instead of str_unconst() funcion.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-08-12 21:23:54 +04:00
Andrew Borodin
508c20c92d TTY: modified color initialization.
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>
2009-08-12 21:23:54 +04:00
Andrew Borodin
aadc438c20 TTY: code reorganization.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-08-12 21:23:54 +04:00
Andrew Borodin
6b07af2fc4 Some modification of initialization.
home_dir variable intialization is moved from main() to OS_setup().
Fixed memory leak ('shell' variable).
2009-08-12 21:23:54 +04:00
Andrew Borodin
7de080e123 Fixes after rebase to master. 2009-08-12 21:23:54 +04:00
Andrew Borodin
46559fd764 TTY: renamed functions.
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>
2009-08-12 21:23:54 +04:00
Slava Zanko
7b74e49bd2 Added Copyringt information. Corrected 'Written by' field.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-08-12 21:23:13 +04:00
Slava Zanko
ce54d07561 Fix include paths in some source files
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-08-12 21:23:13 +04:00
Andrew Borodin
0827144b5f TTY: renamed functions.
init_curses have been renamed to tty_init_curses.
init_lang have been renamed to tty_init_slang.
2009-08-12 21:23:13 +04:00
Andrew Borodin
5ac4a4ec1a TTY: new function: tty_display_8bit().
tty_display_8bit() is used instead of NCurses meta() and
S-Lang SLsmg_Display_Eight_Bit.
2009-08-12 21:23:13 +04:00
Andrew Borodin
4e40f6e98f Screen repainting modifications.
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.
2009-08-12 21:23:13 +04:00
Andrew Borodin
3225c15e69 Removed draw_double_box() function.
Since S-Lang library actually doesn't provide double boxes drawing,
the draw_box() function is used always.
2009-08-12 21:23:13 +04:00
Andrew Borodin
11a1c151d9 Type accuracy and optimization in dialog handling routines.
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.
2009-08-12 21:23:13 +04:00
Andrew Borodin
3318a5fd98 Call repaint_screen() in screen repaint command handling. 2009-08-12 21:23:13 +04:00
Andrew Borodin
9c9180ce81 TTY: reimplemented colors string parser. 2009-08-12 21:23:13 +04:00
Andrew Borodin
87408d00e9 TTY: separate color initalization.
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.
2009-08-12 21:23:13 +04:00
Andrew Borodin
828d1ed09e RXVT: merged src/tty/rxvt.c into src/tty/win.c.
src/tty/win.c: formatted in accordance with maint/template.c.
2009-08-12 21:23:13 +04:00
Andrew Borodin
4f4d0fa5ee Small optimization.
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.
2009-08-12 21:23:13 +04:00
Andrew Borodin
a1bbecce76 Screen clearing have been modified.
src/layout.c (clr_scr): tty_fill_region() is used instead of dlg_erase()
to clear screen.
2009-08-12 21:23:13 +04:00
Andrew Borodin
30fd7fc34a TTY: modified line drawing. 2009-08-12 21:23:13 +04:00
Andrew Borodin
28580ca023 done_screen() is moved from src/layout.c to src/main.c. 2009-08-12 21:23:13 +04:00
Andrew Borodin
16a15c0ee2 New functions.
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().
2009-08-12 21:23:12 +04:00
Andrew Borodin
55e626726c For NCurses, always call doupdate() in tty_refresh(). 2009-08-12 21:23:12 +04:00
Andrew Borodin
86f77f3cb2 New functions.
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.
2009-08-12 21:23:12 +04:00
Andrew Borodin
22ce788f9b .gitignore: added *.lo and *.la files. 2009-08-12 21:23:12 +04:00
Andrew Borodin
2b7a991fde New functions.
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.
2009-08-12 21:23:12 +04:00
Andrew Borodin
c4dc0b22b0 Set dialogs colors is moved from TTY layer to MC core. 2009-08-12 21:23:12 +04:00
Andrew Borodin
b0ce68a79b TTY: don't check use_colors twice.
start_color() is NCurses function. Don't call it in S-Lang TTY layer. Define
is removed.
2009-08-12 21:23:12 +04:00
Andrew Borodin
1b1f082123 Restored fix of default terminal colors usage for NCurses. 2009-08-12 21:23:12 +04:00
Andrew Borodin
fe1adb5f27 tty_print_char() function is used instead of addch() one.
Modified tty_print_char() function for S-Lang library to use it
instead of addch().
2009-08-12 21:23:12 +04:00
Andrew Borodin
26631548d8 Fixed TTY sublayer after rebase to current master. 2009-08-12 21:23:12 +04:00
Andrew Borodin
f1670d735e Fixed commnets about #include's. 2009-08-12 21:23:12 +04:00
Andrew Borodin
e68c67554b TTY: created tty_fill_region() function.
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.
2009-08-12 21:23:12 +04:00
Andrew Borodin
f1d526d84d Keys handling.
src/tty/key.c (keyboard_key_timeout): make static.
src/tty/key.h: removed unsed irix_fn_keys variable.
Moved declaration of mou_auto_repeat variable here...
src/main.h: ...from here.
2009-08-12 21:23:12 +04:00
Andrew Borodin
5a5a8bd3c0 Reorganization of key and window management functions. 2009-08-12 21:23:12 +04:00
Andrew Borodin
d91122a172 Reorganization of TTY raw/noraw mode setting functions. 2009-08-12 21:23:12 +04:00
Andrew Borodin
fb51cb8241 Use TTY function names instead of #define's. 2009-08-12 21:23:12 +04:00
Andrew Borodin
3720285612 Reorganization of is_abort_char() function.
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.
2009-08-12 21:23:12 +04:00
Andrew Borodin
c12ddff69b Reorganization of TTY color functions. 2009-08-12 21:23:12 +04:00
Andrew Borodin
bcc6a40486 Reorganization of TTY initalization and line drawing.
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.
2009-08-12 21:23:12 +04:00
Andrew Borodin
7a75f8723d Replaced addstr() call to tty_print_string() one. 2009-08-12 21:23:12 +04:00
Andrew Borodin
069aab9ebc Renamed mc_refresh() to tty_refresh(). 2009-08-12 21:22:17 +04:00
Andrew Borodin
7ed7c83e8d Replaced addstr(str_term_form(...)) to tty_print_string(...). 2009-08-12 21:22:17 +04:00
Andrew Borodin
62cdac4d1f The tty_draw_box() function has been created and used. 2009-08-12 21:19:20 +04:00
Andrew Borodin
ebbf6fbcdc Replaced functions.
attrset() -> tty_setcolor()
move() -> tty_gotoyx()
getyx() -> tty_getyx()
2009-08-12 21:19:20 +04:00
Andrew Borodin
ea0cb38b9e Initial step to split NCurses- and SLang-based TTY layers. 2009-08-12 21:19:20 +04:00
Andrew Borodin
389e5bf613 Moved rxvt.c, win.[ch] and x11con.[ch] from src to src/tty directory.
Fixed includes.
Fixed library order in src/Makefile.am due to --as-needed linking option.
2009-08-12 21:19:20 +04:00