--- rxvt-unicode/src/rxvt.h 2013/01/13 22:30:47 1.518 +++ rxvt-unicode/src/rxvt.h 2014/12/17 15:35:42 1.542 @@ -79,6 +79,7 @@ #if XRENDER && (HAVE_PIXBUF || ENABLE_TRANSPARENCY) # define HAVE_BG_PIXMAP 1 +# define HAVE_IMG 1 #endif #if HAVE_BG_PIXMAP @@ -177,6 +178,8 @@ void * rxvt_calloc (size_t number, size_t size); void * rxvt_realloc (void *ptr, size_t size); +KeySym rxvt_XKeycodeToKeysym (Display *dpy, KeyCode keycode, int index); + ///////////////////////////////////////////////////////////////////////////// // temporarily replace the process environment @@ -184,17 +187,6 @@ extern char **rxvt_environ; // the original environ pointer static inline void -set_environ (stringvec *envv) -{ -#if ENABLE_PERL - assert (envv); -#else - if (envv) -#endif - environ = (char **)envv->begin (); -} - -static inline void set_environ (char **envv) { #if ENABLE_PERL @@ -402,9 +394,9 @@ /* modes for rxvt_term::scr_page () - scroll page. used by scrollbar window */ enum page_dirn { - UP, - DN, - NO_DIR, + DN = -1, + NO_DIR = 0, + UP = 1, }; /* arguments for rxvt_term::scr_change_screen () */ @@ -651,6 +643,7 @@ #define PrivMode_BracketPaste (1UL<<22) #define PrivMode_ExtModeMouse (1UL<<23) // xterm pseudo-utf-8 hack #define PrivMode_ExtMouseRight (1UL<<24) // xterm pseudo-utf-8, but works in non-utf-8-locales +#define PrivMode_BlinkingCursor (1UL<<25) #define PrivMode_mouse_report (PrivMode_MouseX10|PrivMode_MouseX11|PrivMode_MouseBtnEvent|PrivMode_MouseAnyEvent) @@ -663,7 +656,7 @@ // do not change these constants lightly, there are many interdependencies #define IMBUFSIZ 128 // input modifier buffer sizes #define KBUFSZ 512 // size of keyboard mapping buffer -#define CBUFSIZ 2048 // size of command buffer +#define CBUFSIZ 32768 // size of command buffer (longest command sequence possible) #define CBUFCNT 8 // never call pty_fill/cmd_parse more than this often in a row #define UBUFSIZ 2048 // character buffer @@ -746,13 +739,6 @@ #define SET_STYLE(x,style) (((x) & ~RS_styleMask) | ((style) << RS_styleShift)) #define GET_ATTR(x) (((x) & RS_attrMask)) -// return attributes defining the background, encoding doesn't matter -// depends on RS_fgShift > RS_bgShift -#define GET_BGATTR(x) \ - (ecb_unlikely ((x) & RS_RVid) \ - ? (((x) & (RS_attrMask & ~RS_RVid)) \ - | (((x) & RS_fgMask) >> (RS_fgShift - RS_bgShift))) \ - : ((x) & (RS_attrMask | RS_bgMask))) #define SET_FGCOLOR(x,fg) (((x) & ~RS_fgMask) | ((fg) << RS_fgShift)) #define SET_BGCOLOR(x,bg) (((x) & ~RS_bgMask) | ((bg) << RS_bgShift)) #define SET_ATTR(x,a) (((x) & ~RS_attrMask) | (a)) @@ -871,9 +857,7 @@ struct compose_char { unicode_t c1, c2; // any chars != NOCHAR are valid - #if __cplusplus >= 201103L || ECB_GCC_VERSION(4,4) - compose_char () = default; - #endif + compose_char (unicode_t c1, unicode_t c2) : c1(c1), c2(c2) { } @@ -1145,7 +1129,6 @@ /* ---------- */ #ifdef SELECTION_SCROLLING int scroll_selection_lines; - enum page_dirn scroll_selection_dir; int selection_save_x, selection_save_y, selection_save_state; @@ -1164,6 +1147,8 @@ # ifdef POINTER_BLANK pointerBlankDelay, # endif + multiClickTime, + cursor_type, allowedxerror; /* ---------- */ unsigned int ModLevel3Mask, @@ -1200,8 +1185,6 @@ void render_root_image (); # endif - void tint_image (rxvt_img *img, rxvt_color &tint, bool tint_set, int shade); - ev_tstamp bg_valid_since; bool bg_window_size_sensitive (); @@ -1244,6 +1227,7 @@ char *v_buffer; /* pointer to physical buffer */ unsigned int v_buflen; /* size of area to write */ stringvec *argv, *envv; /* if != 0, will be freed at destroy time */ + char **env; #ifdef KEYSYM_RESOURCE keyboard_manager *keyboard; @@ -1336,13 +1320,15 @@ void pointer_unblank (); void tt_printf (const char *fmt,...); + void tt_write_ (const char *data, unsigned int len); void tt_write (const char *data, unsigned int len); + void tt_write_user_input (const char *data, unsigned int len); void pty_write (); void make_current () const // make this the "currently active" urxvt instance { SET_R (this); - set_environ (envv); + set_environ (env); rxvt_set_locale (locale); } @@ -1385,7 +1371,7 @@ #else void set_urgency (bool enable) { } #endif - void update_fade_color (unsigned int idx); + void update_fade_color (unsigned int idx, bool first_time = false); #ifdef PRINTPIPE FILE *popen_printer (); int pclose_printer (FILE *stream); @@ -1404,6 +1390,7 @@ int privcases (int mode, unsigned long bit); void process_terminal_mode (int mode, int priv, unsigned int nargs, const int *arg); void process_sgr_mode (unsigned int nargs, const int *arg); + void set_cursor_style (int style); // init.C void init (stringvec *argv, stringvec *envv); void init (int argc, const char *const *argv, const char *const *envv); @@ -1418,7 +1405,7 @@ int run_child (const char *const *argv); void color_aliases (int idx); void create_windows (int argc, const char *const *argv); - void get_colours (); + void get_colors (); void get_ourmods (); void set_icon (const char *file); // main.C @@ -1427,7 +1414,7 @@ ~rxvt_term (); void destroy (); void emergency_cleanup (); - void recolour_cursor (); + void recolor_cursor (); void resize_all_windows (unsigned int newwidth, unsigned int newheight, int ignoreparent); void window_calc (unsigned int newwidth, unsigned int newheight); bool set_fonts (); @@ -1487,6 +1474,7 @@ void scr_blank_line (line_t &l, unsigned int col, unsigned int width, rend_t efs) const NOTHROW; void scr_blank_screen_mem (line_t &l, rend_t efs) const NOTHROW; void scr_kill_char (line_t &l, int col) const NOTHROW; + void scr_set_char_rend (line_t &l, int col, rend_t rend); int scr_scroll_text (int row1, int row2, int count) NOTHROW; void copy_line (line_t &dst, line_t &src); void scr_reset (); @@ -1502,7 +1490,7 @@ #endif void scr_touch (bool refresh) NOTHROW; void scr_expose (int x, int y, int width, int height, bool refresh) NOTHROW; - void scr_recolour (bool refresh = true) NOTHROW; + void scr_recolor (bool refresh = true) NOTHROW; void scr_remap_chars () NOTHROW; void scr_remap_chars (line_t &l) NOTHROW; @@ -1537,7 +1525,11 @@ void scr_charset_choose (int set) NOTHROW; void scr_charset_set (int set, unsigned int ch) NOTHROW; void scr_move_to (int y, int len) NOTHROW; - bool scr_page (enum page_dirn direction, int nlines) NOTHROW; + bool scr_page (int nlines) NOTHROW; + bool scr_page (enum page_dirn direction, int nlines) NOTHROW + { + return scr_page (direction * nlines); + } bool scr_changeview (int new_view_start) NOTHROW; void scr_bell () NOTHROW; void scr_printscreen (int fullhist) NOTHROW; @@ -1547,6 +1539,7 @@ void scr_dump (int fd) NOTHROW; void selection_check (int check_more) NOTHROW; + void selection_changed () NOTHROW; /* sets want_refresh, corrects coordinates */ void selection_request (Time tm, int selnum = Sel_Primary) NOTHROW; void selection_clear (bool clipboard = false) NOTHROW; void selection_make (Time tm); @@ -1563,9 +1556,11 @@ // xdefaults.C void rxvt_usage (int type); const char **get_options (int argc, const char *const *argv); - int parse_keysym (const char *str, const char *arg); + int parse_keysym (const char *str, unsigned int &state); + int bind_action (const char *str, const char *arg); const char *x_resource (const char *name); void extract_resources (); + void enumerate_keysym_resources (void (*cb)(rxvt_term *, const char *, const char *)); void extract_keysym_resources (); };