--- rxvt-unicode/src/rxvt.h 2012/11/30 07:02:12 1.510 +++ rxvt-unicode/src/rxvt.h 2014/08/21 15:58:29 1.535 @@ -77,8 +77,18 @@ # include #endif -#if defined(BG_IMAGE_FROM_FILE) || defined(ENABLE_TRANSPARENCY) +#if XRENDER && (HAVE_PIXBUF || ENABLE_TRANSPARENCY) # define HAVE_BG_PIXMAP 1 +# define HAVE_IMG 1 +#endif + +#if HAVE_BG_PIXMAP +# if HAVE_PIXBUF +# define BG_IMAGE_FROM_FILE 1 +# endif +# if ENABLE_TRANSPARENCY +# define BG_IMAGE_FROM_ROOT 1 +# endif #endif #include @@ -393,9 +403,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 () */ @@ -582,7 +592,7 @@ #ifdef RXVT_SCROLLBAR Color_trough, #endif -#if ENABLE_TRANSPARENCY +#if BG_IMAGE_FROM_ROOT Color_tint, #endif #if OFF_FOCUS_FADING @@ -654,7 +664,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 @@ -1136,7 +1146,6 @@ /* ---------- */ #ifdef SELECTION_SCROLLING int scroll_selection_lines; - enum page_dirn scroll_selection_dir; int selection_save_x, selection_save_y, selection_save_state; @@ -1155,6 +1164,8 @@ # ifdef POINTER_BLANK pointerBlankDelay, # endif + multiClickTime, + cursor_type, allowedxerror; /* ---------- */ unsigned int ModLevel3Mask, @@ -1174,52 +1185,41 @@ XComposeStatus compose; static struct termios def_tio; row_col_t oldcursor; + #ifdef HAVE_BG_PIXMAP void bg_init (); void bg_destroy (); - enum { - BG_IS_VALID = 1 << 0, - - BG_IS_TRANSPARENT = 1 << 1, - BG_NEEDS_REFRESH = 1 << 2, - BG_INHIBIT_RENDER = 1 << 3, - }; - - uint8_t bg_flags; - # if BG_IMAGE_FROM_FILE rxvt_image fimage; - void get_image_geometry (rxvt_image &image, int &w, int &h, int &x, int &y); - bool render_image (rxvt_image &image); + void render_image (rxvt_image &image); # endif -# if ENABLE_TRANSPARENCY +# if BG_IMAGE_FROM_ROOT rxvt_img *root_img; image_effects root_effects; - void bg_set_transparent () - { - bg_flags |= BG_IS_TRANSPARENT; - } - void bg_set_root_pixmap (); - bool render_root_image (); + void render_root_image (); # endif - void tint_image (rxvt_img *img, rxvt_color &tint, bool tint_set, int shade); - ev_tstamp bg_valid_since; - rxvt_img *bg_img; - bool bg_window_size_sensitive (); bool bg_window_position_sensitive (); void bg_render (); - void bg_invalidate () - { - bg_flags &= ~BG_IS_VALID; - } +#endif + +#ifdef HAVE_IMG + enum { + BG_IS_TRANSPARENT = 1 << 1, + BG_NEEDS_REFRESH = 1 << 2, + BG_INHIBIT_RENDER = 1 << 3, + }; + + uint8_t bg_flags; + + rxvt_img *bg_img; #endif #if ENABLE_OVERLAY @@ -1283,7 +1283,7 @@ XSelectInput (dpy, vt, vt_emask | vt_emask_perl | vt_emask_xim | vt_emask_mouse); } -#if ENABLE_TRANSPARENCY || ENABLE_PERL +#if BG_IMAGE_FROM_ROOT || ENABLE_PERL void rootwin_cb (XEvent &xev); xevent_watcher rootwin_ev; #endif @@ -1336,7 +1336,9 @@ 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 @@ -1404,6 +1406,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); @@ -1487,7 +1490,9 @@ 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 (); void scr_release () NOTHROW; void scr_clear (bool really = false) NOTHROW; @@ -1536,7 +1541,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; @@ -1546,6 +1555,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); @@ -1562,9 +1572,10 @@ // 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 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 (); };