--- rxvt-unicode/src/rxvt.h 2007/08/09 22:08:21 1.290 +++ rxvt-unicode/src/rxvt.h 2007/09/12 21:06:08 1.306 @@ -81,6 +81,8 @@ #undef max #endif +#include "background.h" + #ifndef STDIN_FILENO # define STDIN_FILENO 0 # define STDOUT_FILENO 1 @@ -101,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); @@ -116,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; @@ -136,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); @@ -146,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); @@ -172,58 +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 { -# define bgPmap_geometrySet (1UL<<0) -# define bgPmap_propScale (1UL<<1) -# define bgPmap_geometryFlags (bgPmap_geometrySet|bgPmap_propScale) - -# define bgPmap_Transparent (1UL<<16) - unsigned long flags; - -# ifdef XPM_BACKGROUND -# ifdef HAVE_AFTERIMAGE - ASImage *original_asim; - bool render_asim (ASImage *background, ARGB32 background_tint); -# endif - -#define bgPmap_defaultScale 100 -#define bgPmap_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 */ - bool handle_geometry (const char *geom); - void set_defaultGeometry () - { - h_scale = v_scale = bgPmap_defaultScale; - h_align = v_align = bgPmap_defaultAlign; - flags |= bgPmap_geometrySet; - }; - -# 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 */ - bool make_transparency_pixmap (); -# endif - - Pixmap pixmap; - unsigned int pmap_width, pmap_height; - unsigned int pmap_depth; - - bool window_size_sensitive (); - void apply_background (); - -}; -#else -# undef HAVE_BG_PIXMAP -#endif - /* * the 'essential' information for reporting Mouse Events * pared down from XButtonEvent @@ -278,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 @@ -660,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) @@ -931,11 +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 */ - 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, @@ -1040,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; @@ -1127,10 +1055,10 @@ void rootwin_cb (XEvent &xev); xevent_watcher rootwin_ev; #endif -#if ENABLE_TRANSPARENCY - 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); @@ -1291,6 +1219,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 @@ -1363,6 +1293,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; @@ -1475,24 +1413,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 (); - void set_bgPixmap (const char *file); - void get_window_origin (int &x, int &y); - Pixmap get_pixmap_property (int prop_id); }; -/* - ***************************************************************************** - * PROTOTYPES - ***************************************************************************** - */ -#ifdef PROTOTYPES -# define __PROTO(p) p -#else -# define __PROTO(p) () -#endif - #endif /* _RXVT_H_ */