--- rxvt-unicode/src/rxvt.h 2004/02/13 12:16:21 1.34 +++ rxvt-unicode/src/rxvt.h 2004/02/24 00:02:44 1.40 @@ -51,9 +51,6 @@ } ttymode_t; #endif -#ifdef GREEK_SUPPORT -# include "grkelot.h" -#endif #ifdef XPM_BACKGROUND # ifdef XPM_INC_X11 # include @@ -274,11 +271,13 @@ * +---< SB_WIDTH_NEXT */ -#define NO_REFRESH 0 /* Window not visible at all! */ -#define FAST_REFRESH (1<<0) /* Fully exposed window */ -#define SLOW_REFRESH (1<<1) /* Partially exposed window */ -#define SMOOTH_REFRESH (1<<2) /* Do sync'ing to make it smooth */ -#define REFRESH_BOUNDS (1<<3) +enum { + NO_REFRESH = 0 , /* Window not visible at all! */ + FAST_REFRESH = 1<<0, /* Fully exposed window */ + SLOW_REFRESH = 1<<1, /* Partially exposed window */ + SMOOTH_REFRESH = 1<<2, /* Do sync'ing to make it smooth */ + REFRESH_BOUNDS = 1<<3 +}; #ifdef NO_SECONDARY_SCREEN # define NSCREENS 0 @@ -296,14 +295,18 @@ #define FONT_UP "#+" /* flags for rxvt_scr_gotorc () */ -#define C_RELATIVE 1 /* col movement is relative */ -#define R_RELATIVE 2 /* row movement is relative */ -#define RELATIVE (R_RELATIVE|C_RELATIVE) +enum { + C_RELATIVE = 1 , /* col movement is relative */ + R_RELATIVE = 2, /* row movement is relative */ + RELATIVE = 1 | 2 +}; /* modes for rxvt_scr_insdel_chars (), rxvt_scr_insdel_lines () */ -#define INSERT -1 /* don't change these values */ -#define DELETE +1 -#define ERASE +2 +enum { + INSERT = -1, /* don't change these values */ + DELETE = +1, + ERASE = +2 +}; /* modes for rxvt_scr_page () - scroll page. used by scrollbar window */ enum page_dirn { @@ -372,6 +375,7 @@ /* * rxvt extensions of XTerm OSCs: ESC ] Ps;Pt (ST|BEL) */ +#define XTerm_locale 9 /* change locale */ #define XTerm_Menu 10 /* set menu item */ #define XTerm_Pixmap 20 /* new bg pixmap */ #define XTerm_restoreFG 39 /* change default fg color */ @@ -475,10 +479,6 @@ #if (MENUBAR_MAX) Rs_menu, #endif -#ifdef GREEK_SUPPORT - Rs_greek_keyboard, - Rs_greektoggle_key, -#endif Rs_loginShell, Rs_jumpScroll, #ifdef HAVE_SCROLLBARS @@ -821,10 +821,9 @@ struct mbstate { mbstate_t mbs; - mbstate () - { - MEMSET (&mbs, 0, sizeof (mbs)); - } + operator mbstate_t *() { return &mbs; } + void reset () { MEMSET (&mbs, 0, sizeof (mbs)); } + mbstate () { reset (); } }; struct rxvt_term : rxvt_vars { @@ -869,16 +868,10 @@ selection_wait, selection_type; /* ---------- */ -#ifdef GREEK_SUPPORT - short greek_mode; /* greek keyboard mode */ -#endif short rvideo; int16_t num_scr; /* screen: number lines scrolled */ unsigned int prev_ncol, /* screen: previous number of columns */ prev_nrow; /* screen: previous number of rows */ -#ifdef RXVT_GRAPHICS - uint16_t gr_prev_start; -#endif /* ---------- */ rend_t rstyle; /* ---------- */ @@ -990,9 +983,6 @@ #if defined (HOTKEY_CTRL) || defined (HOTKEY_META) KeySym ks_bigfont, ks_smallfont; #endif -#ifdef GREEK_SUPPORT - KeySym ks_greekmodeswith; -#endif #ifdef USE_XIM rxvt_xim *input_method; XIC Input_Context; @@ -1001,10 +991,6 @@ #endif struct mouse_event MEvent; XComposeStatus compose; -#ifdef RXVT_GRAPHICS - int graphics_up; - struct grwin_t *gr_root; -#endif ttymode_t tio; #ifdef UTMP_SUPPORT # ifdef HAVE_STRUCT_UTMP @@ -1023,10 +1009,6 @@ bgPixmap_t bgPixmap; XpmAttributes xpmAttr; /* originally loaded pixmap and its scaling */ #endif -#ifdef MULTICHAR_SET - int oldcursormulti; - void (*multichar_decode) (unsigned char *str, int len); -#endif #ifndef RESET_TTY_TO_COMMON_DEFAULTS struct stat ttyfd_stat; /* original status of our tty */ #endif @@ -1038,9 +1020,6 @@ bar_t BarList; # endif /* (MENUBAR_MAX > 1) */ #endif -#ifdef RXVT_GRAPHICS - Window gr_last_id; -#endif #ifdef CURSOR_BLINK struct timeval lastcursorchange; #endif @@ -1059,6 +1038,7 @@ unsigned char *v_buffer; /* pointer to physical buffer */ unsigned int v_buflen; /* size of area to write */ char *newfont[MAX_NFONTS]; + stringvec *argv, *envv; /* if != 0, will be freed on destroy time */ #ifdef KEYSYM_RESOURCE const unsigned char *Keysym_map[256]; #endif @@ -1176,6 +1156,8 @@ void scr_erase_screen (int mode); void scr_touch (bool refresh); void scr_expose (int x, int y, int width, int height, bool refresh); + void scr_remap_chars (); + void scr_remap_chars (text_t *tp, rend_t *rp); /* autoconvert */ @@ -1183,12 +1165,12 @@ void lookup_key (XKeyEvent &ev); unsigned int cmd_write (const unsigned char *str, unsigned int count); uint32_t cmd_getc (); - void mouse_report (const XButtonEvent &ev); - void button_press (const XButtonEvent &ev); - void button_release (const XButtonEvent &ev); + void mouse_report (XButtonEvent &ev); + void button_press (XButtonEvent &ev); + void button_release (XButtonEvent &ev); int check_our_parents (); #ifdef PRINTPIPE - FILE * popen_printer (); + FILE *popen_printer (); int pclose_printer (FILE *stream); #endif void process_print_pipe (); @@ -1215,8 +1197,8 @@ void privileges (int mode); void privileged_utmp (char action); void privileged_ttydev (char action); - void change_font (int init, const char *fontname); - void font_up_down (int n, int direction); + bool change_font (const char *fontname); + bool font_up_down (int n, int direction); void set_title (const char *str); void set_iconName (const char *str); void set_window_color (int idx, const char *color); @@ -1230,19 +1212,19 @@ int action_dispatch (action_t *action); void menuarrow_free (char name); void menuarrow_add (char *string); - char * menu_find_base (menu_t **menu, char *path); - menu_t * menu_delete (menu_t *menu); - menu_t * menu_add (menu_t *parent, char *path); + char *menu_find_base (menu_t **menu, char *path); + menu_t *menu_delete (menu_t *menu); + menu_t *menu_add (menu_t *parent, char *path); void drawbox_menubar (int x, int len, int state); void drawtriangle (int x, int y, int state); void drawbox_menuitem (int y, int state); void menu_show (); - void menu_display (void (*update) (rxvt_t *)); + void menu_display (void (rxvt_term::*update) ()); void menu_hide_all (); void menu_hide (); void menu_clear (menu_t *menu); void menubar_clear (); - bar_t * menubar_find (const char *name); + bar_t *menubar_find (const char *name); int menubar_push (const char *name); void menubar_remove (const char *name); void menubar_dump (FILE *fp); @@ -1251,9 +1233,9 @@ void draw_Arrows (int name, int state); void menubar_expose (); int menubar_mapping (int map); - int menu_select (XButtonEvent *ev); - void menubar_select (XButtonEvent *ev); - void menubar_control (XButtonEvent *ev); + int menu_select (XButtonEvent &ev); + void menubar_select (XButtonEvent &ev); + void menubar_control (XButtonEvent &ev); void map_menuBar (int map); #endif