mirror of
https://github.com/irssi/irssi.git
synced 2026-08-10 12:23:37 +02:00
/SET term_type 8bit|utf8|big5 - Removed --with-big5 configure option, it's
now included the same way as utf8, though i'm not sure if it really works but at least it should partially :) Input line is now internally using 32bit chars but it's converted to 8bit chars for external use. Text buffer supports only 8bit + utf8 for now. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2448 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
612c061605
commit
afeb6fcb7d
14 changed files with 502 additions and 168 deletions
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
typedef struct _TERM_WINDOW TERM_WINDOW;
|
||||
|
||||
/* text attributes */
|
||||
#define ATTR_RESETFG 0x0100
|
||||
#define ATTR_RESETBG 0x0200
|
||||
#define ATTR_BOLD 0x0400
|
||||
|
|
@ -14,16 +15,16 @@ typedef struct _TERM_WINDOW TERM_WINDOW;
|
|||
|
||||
#define ATTR_NOCOLORS (ATTR_UNDERLINE|ATTR_REVERSE)
|
||||
|
||||
#ifdef WANT_BIG5
|
||||
/* XXX I didn't check the encoding range of big5+. This is standard big5. */
|
||||
# define is_big5_los(lo) (((char)0x40<=lo)&&(lo<=(char)0x7E)) /* standard */
|
||||
# define is_big5_lox(lo) (((char)0x80<=lo)&&(lo<=(char)0xFE)) /* extended */
|
||||
# define is_big5_hi(hi) (((char)0x81<=hi)&&(hi<=(char)0xFE))
|
||||
# define is_big5(hi,lo) is_big5_hi(hi) && (is_big5_los(lo) || is_big5_lox(lo))
|
||||
#endif
|
||||
/* terminal types */
|
||||
#define TERM_TYPE_8BIT 0 /* normal 8bit text */
|
||||
#define TERM_TYPE_UTF8 1
|
||||
#define TERM_TYPE_BIG5 2
|
||||
|
||||
typedef guint32 unichar;
|
||||
|
||||
extern TERM_WINDOW *root_window;
|
||||
extern int term_width, term_height, term_use_colors, term_detached;
|
||||
extern int term_width, term_height;
|
||||
extern int term_use_colors, term_type, term_detached;
|
||||
|
||||
/* Initialize / deinitialize terminal */
|
||||
int term_init(void);
|
||||
|
|
@ -63,6 +64,7 @@ void term_set_color(TERM_WINDOW *window, int col);
|
|||
|
||||
void term_move(TERM_WINDOW *window, int x, int y);
|
||||
void term_addch(TERM_WINDOW *window, int chr);
|
||||
void term_add_unichar(TERM_WINDOW *window, unichar chr);
|
||||
void term_addstr(TERM_WINDOW *window, const char *str);
|
||||
void term_clrtoeol(TERM_WINDOW *window);
|
||||
|
||||
|
|
@ -78,7 +80,10 @@ void term_detach(void);
|
|||
void term_attach(FILE *in, FILE *out);
|
||||
|
||||
void term_stop(void);
|
||||
int term_gets(unsigned char *buffer, int size);
|
||||
|
||||
/* keyboard input handling */
|
||||
void term_set_input_type(int type);
|
||||
int term_gets(unichar *buffer, int size);
|
||||
|
||||
/* internal */
|
||||
void term_common_init(void);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue