updates
[silc.git] / apps / irssi / src / fe-text / screen.h
1 #ifndef __SCREEN_H
2 #define __SCREEN_H
3
4 #if defined(USE_NCURSES) && !defined(RENAMED_NCURSES)
5 #  include <ncurses.h>
6 #else
7 #  include <curses.h>
8 #endif
9
10 /* Some curseses include term.h, which #defines some things breaking irssi */
11 #undef lines
12 #undef key_backspace
13 #undef tab
14
15 #define ATTR_UNDERLINE 0x100
16 #define ATTR_COLOR8    0x200
17 #define ATTR_REVERSE   0x400
18
19 /* XXX I hope this could be integrated into BX.
20  * XXX Well, this should be done via libc,
21  *     but FreeBSD libc support is quite LAME.
22  *     Macro below are copied from lynx.
23  *
24  *                              clive@FreeBSD.org
25  */
26 #ifdef WANT_BIG5
27 /* XXX I didn't check the encoding range of big5+. This is standard big5. */
28 #define is_big5_los(lo) (((char)0x40<=lo)&&(lo<=(char)0x7E))    /* standard */
29 #define is_big5_lox(lo) (((char)0x80<=lo)&&(lo<=(char)0xFE))    /* extended */
30 #define is_big5_hi(hi)  (((char)0x81<=hi)&&(hi<=(char)0xFE))
31 #define is_big5(hi,lo) is_big5_hi(hi) && (is_big5_los(lo) || is_big5_lox(lo))
32 #endif WANT_BIG5
33
34 void screen_check_resizes(void);
35
36 int init_screen(void); /* Initialize screen, detect screen length */
37 void deinit_screen(void); /* Deinitialize screen */
38
39 void set_color(WINDOW *window, int col);
40 void set_bg(WINDOW *window, int col);
41
42 void move_cursor(int y, int x);
43
44 void screen_refresh_freeze(void);
45 void screen_refresh_thaw(void);
46 void screen_refresh(WINDOW *window);
47
48 #endif