--- rxvt-unicode/src/rxvt.h 2007/06/18 12:53:26 1.274 +++ rxvt-unicode/src/rxvt.h 2007/10/11 16:01:26 1.307 @@ -79,14 +79,10 @@ # include #undef min #undef max -#elif defined(XPM_BACKGROUND) -# ifdef XPM_INC_X11 -# include -# else -# include -# endif #endif +#include "background.h" + #ifndef STDIN_FILENO # define STDIN_FILENO 0 # define STDOUT_FILENO 1 @@ -107,9 +103,6 @@ ***************************************************************************** */ // main.C -RETSIGTYPE rxvt_Child_signal (int sig) NOTHROW; -RETSIGTYPE rxvt_Exit_signal (int sig) NOTHROW; -void rxvt_clean_exit () NOTHROW; void * rxvt_malloc (size_t size); void * rxvt_calloc (size_t number, size_t size); void * rxvt_realloc (void *ptr, size_t size); @@ -119,24 +112,19 @@ wchar_t * rxvt_mbstowcs (const char *str, int len = -1); char * rxvt_wcstoutf8 (const wchar_t *str, int len = -1); wchar_t * rxvt_utf8towcs (const char *str, int len = -1); -char * rxvt_strdup_cpp (const char *str); #define rxvt_strdup(s) ((s) ? strdup(s) : 0) -char * rxvt_r_basename (const char *str) NOTHROW; +char * rxvt_basename (const char *str) NOTHROW; void rxvt_vlog (const char *fmt, va_list arg_ptr) NOTHROW; void rxvt_log (const char *fmt,...) NOTHROW; void rxvt_warn (const char *fmt,...) NOTHROW; void rxvt_fatal (const char *fmt, ...) THROW ((class rxvt_failure_exception)) NORETURN; void rxvt_exit_failure () THROW ((class rxvt_failure_exception)) NORETURN; -int rxvt_Str_match (const char *s1, const char *s2) NOTHROW; -const char * rxvt_Str_skip_space (const char *str) NOTHROW; -char * rxvt_Str_trim (char *str) NOTHROW; -int rxvt_Str_escaped (char *str) NOTHROW; +char * rxvt_strtrim (char *str) NOTHROW; char ** rxvt_splitcommastring (const char *cs) NOTHROW; void rxvt_freecommastring (char **cs) NOTHROW; -char * rxvt_File_find (const char *file, const char *ext, const char *path) NOTHROW; ///////////////////////////////////////////////////////////////////////////// @@ -144,7 +132,7 @@ extern char **environ; extern char **rxvt_environ; // the original environ pointer -inline void set_environ (stringvec *envv) +static inline void set_environ (stringvec *envv) { #if ENABLE_PERL assert (envv); @@ -154,7 +142,7 @@ environ = (char **)envv->begin (); } -inline void set_environ (char **envv) +static inline void set_environ (char **envv) { #if ENABLE_PERL assert (envv); @@ -180,14 +168,6 @@ # undef KEEP_SCROLLCOLOR #endif -#ifdef XPM_BACKGROUND -typedef struct { - short w, h, x, y; - bool auto_resize ; - Pixmap pixmap; -} bgPixmap_t; -#endif - /* * the 'essential' information for reporting Mouse Events * pared down from XButtonEvent @@ -242,7 +222,7 @@ /* COLORTERM, TERM environment variables */ #define COLORTERMENV "rxvt" -#ifdef XPM_BACKGROUND +#ifdef BG_IMAGE_FROM_FILE # define COLORTERMENVFULL COLORTERMENV "-xpm" #else # define COLORTERMENVFULL COLORTERMENV @@ -569,7 +549,7 @@ Color_scroll, Color_trough, #endif -#if TINTING +#if ENABLE_TRANSPARENCY Color_tint, #endif #if OFF_FOCUS_FADING @@ -624,11 +604,6 @@ /* #define PrivMode_MouseX11Track (1LU<<20) */ #define PrivMode_mouse_report (PrivMode_MouseX10|PrivMode_MouseX11) -#define PrivMode(test,bit) \ - if (test) \ - priv_modes |= (bit); \ - else \ - priv_modes &= ~(bit) #ifdef ALLOW_132_MODE # define PrivMode_Default (PrivMode_Autowrap|PrivMode_ShiftKeys|PrivMode_VisibleCursor|PrivMode_132OK) @@ -760,12 +735,6 @@ #define scrollbar_size() (scrollBar.end - scrollBar.beg \ - scrollbar_minheight ()) -#ifdef XPM_BACKGROUND -# define XPMClearArea(a, b, c, d, e, f, g) XClearArea((a), (b), (c), (d), (e), (f), (g)) -#else -# define XPMClearArea(a, b, c, d, e, f, g) -#endif - typedef callback log_callback; typedef callback getfd_callback; @@ -901,11 +870,6 @@ struct mbstate mbstate; // current input multibyte state unsigned char want_refresh:1, -#ifdef TRANSPARENT - want_full_refresh:1, /* awaiting full screen refresh */ - am_transparent:1, /* is a transparent term */ - am_pixmap_trans:1, /* transparency w/known root pixmap */ -#endif current_screen:1, /* primary or secondary */ num_scr_allow:1, bypass_keystate:1, @@ -1010,25 +974,16 @@ /* ---------- */ Cursor leftptr_cursor; /* ---------- */ -#ifndef NO_BACKSPACE_KEY - const char *key_backspace; -#endif -#ifndef NO_DELETE_KEY - const char *key_delete; -#endif struct mouse_event MEvent; XComposeStatus compose; ttymode_t tio; row_col_t oldcursor; -#ifdef XPM_BACKGROUND +#ifdef HAVE_BG_PIXMAP bgPixmap_t bgPixmap; -#ifdef HAVE_AFTERIMAGE +#endif +#ifdef HAVE_AFTERIMAGE + ASVisual *asv; ASImageManager *asimman; - ASImage *original_asim; - struct { unsigned int width, height; } xpmAttr; /* all we need is width/height */ -#else - XpmAttributes xpmAttr; /* originally loaded pixmap and its scaling */ -#endif #endif #if ENABLE_OVERLAY @@ -1096,14 +1051,14 @@ XSelectInput (dpy, vt, vt_emask | vt_emask_perl | vt_emask_xim); } -#if TRANSPARENT || ENABLE_PERL +#if ENABLE_TRANSPARENCY || ENABLE_PERL void rootwin_cb (XEvent &xev); xevent_watcher rootwin_ev; #endif -#if TRANSPARENT - int check_our_parents (); - void check_our_parents_cb (time_watcher &w); - time_watcher check_our_parents_ev; +#ifdef HAVE_BG_PIXMAP + int update_background (); + void update_background_cb (time_watcher &w); + time_watcher update_background_ev; #endif void x_cb (XEvent &xev); @@ -1179,7 +1134,6 @@ void init_secondary (); const char **init_resources (int argc, const char *const *argv); - const char *x_resource (const char *name); void init_env (); void set_locale (const char *locale); void init_xlocale (); @@ -1264,6 +1218,8 @@ bool set_color (rxvt_color &color, const char *name); void alias_color (int dst, int src); void set_widthheight (unsigned int newwidth, unsigned int newheight); + void get_window_origin (int &x, int &y); + Pixmap get_pixmap_property (int prop_id); // screen.C @@ -1336,6 +1292,14 @@ options[opt >> 3] &= ~(1 << (opt & 7)); } + void PrivMode (int set, unsigned bit) NOTHROW + { + if (set) + priv_modes |= bit; + else + priv_modes &= ~bit; + } + 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; int scr_scroll_text (int row1, int row2, int count) NOTHROW; @@ -1448,22 +1412,7 @@ int parse_keysym (const char *str, const char *arg); void get_xdefaults (FILE *stream, const char *name); void extract_resources (); - // xpm.C - int scale_pixmap (const char *geom); - void resize_pixmap (); - Pixmap set_bgPixmap (const char *file); }; -/* - ***************************************************************************** - * PROTOTYPES - ***************************************************************************** - */ -#ifdef PROTOTYPES -# define __PROTO(p) p -#else -# define __PROTO(p) () -#endif - #endif /* _RXVT_H_ */