3 * \brief Header: %interface to the terminal controlling library
5 * This file is the %interface to the terminal controlling library:
6 * slang or ncurses. It provides an additional layer of abstraction
7 * above the "real" libraries to keep the number of ifdefs in the other
14 #include "lib/global.h" /* include <glib.h> */
17 # include "tty-slang.h"
19 # include "tty-ncurses.h"
24 extern int reset_hp_softkeys
;
26 extern void tty_init (gboolean slow
, gboolean ugly_lines
);
27 extern void tty_shutdown (void);
29 extern gboolean
tty_is_slow (void);
31 extern void tty_start_interrupt_key (void);
32 extern void tty_enable_interrupt_key (void);
33 extern void tty_disable_interrupt_key (void);
34 extern gboolean
tty_got_interrupt (void);
36 extern void tty_reset_prog_mode (void);
37 extern void tty_reset_shell_mode (void);
39 extern void tty_raw_mode (void);
40 extern void tty_noraw_mode (void);
42 extern void tty_noecho (void);
43 extern int tty_flush_input (void);
45 extern void tty_keypad (gboolean set
);
46 extern void tty_nodelay (gboolean set
);
47 extern int tty_baudrate (void);
49 extern int tty_lowlevel_getch (void);
54 The output functions do not check themselves for screen overflows,
55 so make sure that you never write more than what fits on the screen.
56 While SLang provides such a feature, ncurses does not.
59 extern int tty_reset_screen (void);
60 extern void tty_touch_screen (void);
62 extern void tty_gotoyx (int y
, int x
);
63 extern void tty_getyx (int *py
, int *px
);
65 extern void tty_set_alt_charset (gboolean alt_charset
);
67 extern void tty_display_8bit (gboolean what
);
68 extern void tty_print_char (int c
);
69 extern void tty_print_alt_char (int c
);
70 extern void tty_print_anychar (int c
);
71 extern void tty_print_string (const char *s
);
72 extern void tty_printf (const char *s
, ...);
74 extern void tty_print_one_vline (void);
75 extern void tty_print_one_hline (void);
76 extern void tty_draw_hline (int y
, int x
, int ch
, int len
);
77 extern void tty_draw_vline (int y
, int x
, int ch
, int len
);
78 extern void tty_draw_box (int y
, int x
, int rows
, int cols
);
79 extern void tty_fill_region (int y
, int x
, int rows
, int cols
, unsigned char ch
);
81 extern int mc_tty_ugly_frm
[];
90 MC_TTY_FRM_leftbottom
,
91 MC_TTY_FRM_rightbottom
,
93 MC_TTY_FRM_centerbottom
,
94 MC_TTY_FRM_leftmiddle
,
95 MC_TTY_FRM_rightmiddle
,
96 MC_TTY_FRM_centermiddle
,
100 extern char *tty_tgetstr (const char *name
);
102 extern void tty_beep (void);
104 #define KEY_KP_ADD 4001
105 #define KEY_KP_SUBTRACT 4002
106 #define KEY_KP_MULTIPLY 4003
108 extern void tty_refresh (void);
109 extern void tty_setup_sigwinch (void (*handler
) (int));
111 extern int mc_tty_normalize_lines_char (const char *);
113 #endif /* MC_TTY_H */