2004-12-03 19:17:46 +00:00
|
|
|
#ifndef MC_TTY_H
|
|
|
|
#define MC_TTY_H
|
2001-09-03 03:07:46 +00:00
|
|
|
|
2005-08-29 08:45:28 +00:00
|
|
|
/*
|
|
|
|
This file is the interface to the terminal controlling library---
|
|
|
|
ncurses, slang or the built-in slang. It provides an additional
|
|
|
|
layer of abstraction above the "real" libraries to keep the number
|
|
|
|
of ifdefs in the other files small.
|
|
|
|
*/
|
1998-02-27 04:54:42 +00:00
|
|
|
|
|
|
|
#ifdef HAVE_SLANG
|
|
|
|
# include "myslang.h"
|
|
|
|
#endif
|
|
|
|
|
2001-09-03 03:07:46 +00:00
|
|
|
#ifdef USE_NCURSES
|
2002-07-13 05:13:07 +00:00
|
|
|
# ifdef HAVE_NCURSES_CURSES_H
|
|
|
|
# include <ncurses/curses.h>
|
|
|
|
# elif HAVE_NCURSES_H
|
1998-02-27 04:54:42 +00:00
|
|
|
# include <ncurses.h>
|
2002-07-13 05:13:07 +00:00
|
|
|
# else
|
|
|
|
# include <curses.h>
|
1998-02-27 04:54:42 +00:00
|
|
|
# endif
|
2001-09-03 03:07:46 +00:00
|
|
|
#endif /* USE_NCURSES */
|
1998-02-27 04:54:42 +00:00
|
|
|
|
2005-08-29 08:45:28 +00:00
|
|
|
/* Input */
|
|
|
|
extern void tty_enable_interrupt_key(void);
|
|
|
|
extern void tty_disable_interrupt_key(void);
|
|
|
|
extern gboolean tty_got_interrupt(void);
|
|
|
|
|
|
|
|
/* Output */
|
|
|
|
extern void tty_gotoyx(int, int);
|
|
|
|
extern void tty_getyx(int *, int *);
|
|
|
|
extern void tty_print_char(int);
|
|
|
|
extern void tty_print_alt_char(int);
|
|
|
|
extern void tty_print_string(const char *);
|
|
|
|
extern void tty_print_one_vline(void);
|
|
|
|
extern void tty_print_one_hline(void);
|
|
|
|
extern void tty_print_vline(int x, int top, int bottom);
|
|
|
|
extern void tty_print_hline(int left, int right, int y);
|
|
|
|
|
|
|
|
/* legacy interface */
|
|
|
|
|
|
|
|
#define enable_interrupt_key() tty_enable_interrupt_key()
|
|
|
|
#define disable_interrupt_key() tty_disable_interrupt_key()
|
|
|
|
#define got_interrupt() tty_got_interrupt()
|
|
|
|
|
|
|
|
#ifndef HAVE_SLANG
|
|
|
|
# define acs()
|
|
|
|
# define noacs()
|
|
|
|
#endif
|
|
|
|
|
1998-02-27 04:54:42 +00:00
|
|
|
#define KEY_KP_ADD 4001
|
|
|
|
#define KEY_KP_SUBTRACT 4002
|
|
|
|
#define KEY_KP_MULTIPLY 4003
|
|
|
|
|
2001-06-15 00:24:14 +00:00
|
|
|
void mc_refresh (void);
|
|
|
|
|
2005-02-23 19:55:06 +00:00
|
|
|
/* print S left-aligned, adjusted to exactly LEN characters */
|
|
|
|
extern void printwstr (const char *s, int len);
|
2005-01-27 21:44:00 +00:00
|
|
|
|
2004-12-03 19:17:46 +00:00
|
|
|
#endif
|