4 #ifdef HAVE_SLANG_SLANG_H
5 # include <slang/slang.h>
8 #endif /* HAVE_SLANG_SLANG_H */
12 KEY_END
, KEY_UP
, KEY_DOWN
, KEY_LEFT
, KEY_RIGHT
,
13 KEY_HOME
, KEY_A1
, KEY_C1
, KEY_NPAGE
, KEY_PPAGE
, KEY_IC
,
14 KEY_ENTER
, KEY_DC
, KEY_SCANCEL
, KEY_BTAB
17 #define KEY_F(x) (1000+x)
19 #define ACS_VLINE SLSMG_VLINE_CHAR
20 #define ACS_HLINE SLSMG_HLINE_CHAR
21 #define ACS_ULCORNER SLSMG_ULCORN_CHAR
22 #define ACS_LLCORNER SLSMG_LLCORN_CHAR
23 #define ACS_URCORNER SLSMG_URCORN_CHAR
24 #define ACS_LRCORNER SLSMG_LRCORN_CHAR
27 #define acs() SLsmg_set_char_set(1)
28 #define noacs() SLsmg_set_char_set (0)
29 #define baudrate() SLang_TT_Baud_Rate
32 COLOR_BLACK
, COLOR_RED
, COLOR_GREEN
, COLOR_YELLOW
, COLOR_BLUE
,
33 COLOR_MAGENTA
, COLOR_CYAN
, COLOR_WHITE
36 /* When using Slang with color, we have all the indexes free but
37 * those defined here (A_BOLD, A_UNDERLINE, A_REVERSE, A_BOLD_REVERSE)
40 #define A_UNDERLINE 0x40
41 #define A_REVERSE 0x20
42 #define A_BOLD_REVERSE 0x21
45 # define A_NORMAL 0x00
48 #define COLOR_PAIR(x) x
55 void slang_set_raw_mode (void);
58 #define raw() slang_set_raw_mode()
60 #define nodelay(x,val) set_slang_delay(val)
62 #define beep() SLtt_beep ()
63 #define keypad(scr,value) slang_keypad (value)
65 #define ungetch(x) SLang_ungetkey(x)
67 #define touchwin(x) SLsmg_touch_lines(0, LINES)
68 #define reset_shell_mode() slang_shell_mode()
69 #define reset_prog_mode() slang_prog_mode()
72 void slint_goto (int y
, int x
);
73 void attrset (int color
);
74 void set_slang_delay (int);
75 void slang_init (void);
76 void slang_prog_mode (void);
77 void hline (int ch
, int len
);
78 void vline (int ch
, int len
);
80 void slang_keypad (int set
);
81 void slang_shell_mode (void);
82 void slang_shutdown (void);
83 int has_colors (void);
85 #define move(x, y) SLsmg_gotorc(x, y)
86 #define getyx(stdscr, row, col) \
88 row = SLsmg_get_row(); \
89 col = SLsmg_get_column(); \
91 #define printw SLsmg_printf
92 #define COLS SLtt_Screen_Cols
93 #define LINES SLtt_Screen_Rows
94 #define standend() SLsmg_normal_video()
98 * Patched S-Lang in Red Hat 8.0 expects wchar_t as the argument to addch()
99 * Avoid conversion by using SLsmg_write_nchars(), which takes char*
105 SLsmg_write_nchars (&c
, 1);
107 #define addch(c) mc_addch(c)
109 #define addch(c) SLsmg_write_char(c)
112 #define addstr(s) SLsmg_write_string(str_unconst(s))
113 #define refresh() SLsmg_refresh()
114 #define endwin() SLsmg_reset_smg()
116 #define SLsmg_draw_double_box(r,c,dr,dc) SLsmg_draw_box ((r), (c), (dr), (dc))