--- rxvt-unicode/src/rxvt.h 2003/12/18 02:07:12 1.15 +++ rxvt-unicode/src/rxvt.h 2003/12/18 07:31:19 1.17 @@ -1,5 +1,5 @@ /* - * $Id: rxvt.h,v 1.15 2003/12/18 02:07:12 pcg Exp $ + * $Id: rxvt.h,v 1.17 2003/12/18 07:31:19 pcg Exp $ */ #ifndef _RXVT_H_ /* include once only */ @@ -19,6 +19,8 @@ #include "iom.h" #include "salloc.h" +#include + /* ***************************************************************************** * SYSTEM HACKS @@ -724,11 +726,6 @@ #define scrollbar_isUpDn() isupper (R->scrollBar.state) #define isScrollbarWindow(w) (R->scrollBar.state && (w) == R->scrollBar.win) -#define scrollbar_setIdle() R->scrollBar.state = 1 -#define scrollbar_setMotion() R->scrollBar.state = 'm' -#define scrollbar_setUp() R->scrollBar.state = 'U' -#define scrollbar_setDn() R->scrollBar.state = 'D' - #define scrollbarnext_dnval() (R->scrollBar.end + (R->scrollBar.width + 1)) #define scrollbarnext_upButton(y) ((y) > R->scrollBar.end \ && (y) <= scrollbarnext_dnval()) @@ -838,13 +835,11 @@ #define BLINK_INTERVAL 0.5 struct mbstate { - unsigned char orig; - uint32_t reg; - int cnt; + mbstate_t mbs; mbstate () { - cnt = 0; + MEMSET (&mbs, 0, sizeof (mbs)); } }; @@ -870,7 +865,8 @@ hidden_pointer:1, #endif parsed_geometry:1, - seen_input:1; /* wether any input has been seen so far */ + seen_input:1, /* wether any input has been seen so far */ + enc_utf8:1; /* wether terminal reads/writes utf-8 */ unsigned char refresh_type, #ifdef UTMP_SUPPORT @@ -891,15 +887,15 @@ #endif short rvideo; int16_t num_scr; /* screen: number lines scrolled */ - uint16_t prev_ncol, /* screen: previous number of columns */ + uint16_t prev_ncol, /* screen: previous number of columns */ prev_nrow; /* screen: previous number of rows */ #ifdef RXVT_GRAPHICS - uint16_t gr_prev_start; + uint16_t gr_prev_start; #endif /* ---------- */ rend_t rstyle; /* ---------- */ - uint32_t pixcolor_set[NPIXCLR_SETS]; + uint32_t pixcolor_set[NPIXCLR_SETS]; /* ---------- */ #ifdef SELECTION_SCROLLING int scroll_selection_delay, @@ -1073,6 +1069,7 @@ char *env_colorfgbg; char *buffer; char *locale; + char *codeset; char charsets[4]; unsigned char *v_buffer; /* pointer to physical buffer */ unsigned int v_buflen; /* size of area to write */ @@ -1131,6 +1128,18 @@ void *operator new (size_t s); void operator delete (void *p, size_t s); + void init_secondary (); + const char **init_resources (int argc, const char *const *argv); + void init_env (); + void set_locale (const char *locale); + void init_xlocale (); + void init_command (const char *const *argv); + int run_command (const char *const *argv); + int run_child (const char *const *argv); + + void color_aliases(int idx); + void recolour_cursor (); + /* screen(!) */ void scr_blank_line (text_t *et, rend_t *er, unsigned int width, rend_t efs); void scr_blank_screen_mem (text_t **tp, rend_t **rp, unsigned int row, rend_t efs); @@ -1140,6 +1149,9 @@ void scr_release (); }; +#define SET_LOCALE(locale) rxvt_set_locale (locale) +extern void rxvt_set_locale (const char *locale); + #ifndef __attribute__ # ifdef __GNUC__ # if (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || (__GNUC__ < 2)