--- rxvt-unicode/src/rxvt.h 2007/08/26 16:55:58 1.297 +++ rxvt-unicode/src/rxvt.h 2007/10/11 16:01:26 1.307 @@ -81,6 +81,8 @@ #undef max #endif +#include "background.h" + #ifndef STDIN_FILENO # define STDIN_FILENO 0 # define STDOUT_FILENO 1 @@ -113,17 +115,14 @@ #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; @@ -133,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); @@ -143,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); @@ -169,99 +168,6 @@ # undef KEEP_SCROLLCOLOR #endif -#if defined(XPM_BACKGROUND) || defined(ENABLE_TRANSPARENCY) -# define HAVE_BG_PIXMAP 1/* to simplify further usage */ -struct bgPixmap_t { - - enum { - geometrySet = (1UL<<0), - propScale = (1UL<<1), - geometryFlags = (geometrySet|propScale), - - tintSet = (1UL<<8), - tintNeeded = (1UL<<9), - tintWholesome = (1UL<<10), - tintServerSide = (1UL<<11), - tintFlags = (tintSet|tintServerSide|tintNeeded|tintWholesome), - blurNeeded = (1UL<<12), - - isTransparent = (1UL<<16), - isInvalid = (1UL<<17) - }; - - unsigned long flags; - - enum { - transpPmapTiled = (1UL<<0), - transpPmapTinted = tintNeeded, - transpPmapBlured = blurNeeded, - transpTransformations = (tintNeeded|blurNeeded) - }; /* this flags are returned by make_transparency_pixmap if called */ - -# ifdef XPM_BACKGROUND -# ifdef HAVE_AFTERIMAGE - ASImage *original_asim; - bool render_asim (ASImage *background, ARGB32 background_tint); -# endif - - enum { defaultScale = 100, defaultAlign = 50 }; - - unsigned int h_scale, v_scale;/* percents of the window size */ - int h_align, v_align; /* percents of the window size: - 0 - left align, 50 - center, 100 - right */ - void unset_geometry () { flags = flags & ~geometryFlags; }; - bool set_geometry (const char *geom); - void set_defaultGeometry () - { - h_scale = v_scale = defaultScale; - h_align = v_align = defaultAlign; - flags |= geometrySet; - }; - - bool set_file (const char *file); -# endif /* XPM_BACKGROUND */ - - rxvt_term *target; - bool set_target (rxvt_term *new_target); - -# ifdef ENABLE_TRANSPARENCY - int root_depth; /* obtained when target is set */ - Pixmap root_pixmap; /* current root pixmap set */ - rxvt_color tint; - int shade; - int h_blurRadius, v_blurRadius; - - bool set_transparent (); - bool set_blur_radius (const char *geom); - bool set_tint (rxvt_color &new_tint); - bool unset_tint (); - bool set_shade (const char *shade_str); - bool set_root_pixmap (); - - unsigned long make_transparency_pixmap ();/* returns combination of the transpTransformations flags */ -# endif - double invalid_since; - - Pixmap pixmap; - unsigned int pmap_width, pmap_height; - unsigned int pmap_depth; - - bool window_size_sensitive (); - bool need_client_side_rendering (); - void apply (); - bool render (); - void invalidate () { - if (!(flags & isInvalid)) - { - flags |= isInvalid; - invalid_since = NOW; - } - }; -}; -#else -# undef HAVE_BG_PIXMAP -#endif - /* * the 'essential' information for reporting Mouse Events * pared down from XButtonEvent @@ -316,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 @@ -964,9 +870,6 @@ struct mbstate mbstate; // current input multibyte state unsigned char want_refresh:1, -#ifdef ENABLE_TRANSPARENCY - want_full_refresh:1, /* awaiting full screen refresh */ -#endif current_screen:1, /* primary or secondary */ num_scr_allow:1, bypass_keystate:1, @@ -1071,12 +974,6 @@ /* ---------- */ 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; @@ -1237,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 (); @@ -1322,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 @@ -1514,9 +1412,6 @@ int parse_keysym (const char *str, const char *arg); void get_xdefaults (FILE *stream, const char *name); void extract_resources (); - // xpm.C - void get_window_origin (int &x, int &y); - Pixmap get_pixmap_property (int prop_id); }; #endif /* _RXVT_H_ */