From fed883e118e2bd6dfb5c5658bca694a58011f51a Mon Sep 17 00:00:00 2001 From: sasha Date: Wed, 12 Sep 2007 21:06:07 +0000 Subject: [PATCH] renamed XPM_BACKGROUND to BG_IMAGE_FROM_FILE --- config.h.in | 4 ++-- configure | 2 +- configure.ac | 2 +- src/background.C | 20 +++++++++++++++++--- src/background.h | 8 +++++--- src/command.C | 2 +- src/init.C | 12 ------------ src/main.C | 4 ++-- src/rsinc.h | 2 +- src/rxvt.h | 2 +- src/xdefaults.C | 5 +---- 11 files changed, 32 insertions(+), 31 deletions(-) diff --git a/config.h.in b/config.h.in index 456cba1f..16fc31dd 100644 --- a/config.h.in +++ b/config.h.in @@ -405,9 +405,9 @@ /* Define ONLY iff Xlib.h supports it */ #undef XLIB_ILLEGAL_ACCESS -/* Define if you want to have sexy-looking background pixmaps. Needs libXpm or +/* Define if you want to have sexy-looking background pixmaps. Needs libAfterImage */ -#undef XPM_BACKGROUND +#undef BG_IMAGE_FROM_FILE /* Define if you include on a normal include path (be careful) */ #undef XPM_INC_X11 diff --git a/configure b/configure index 39b508f4..b9370453 100755 --- a/configure +++ b/configure @@ -12731,7 +12731,7 @@ _ACEOF cat >>confdefs.h <<\_ACEOF -#define XPM_BACKGROUND 1 +#define BG_IMAGE_FROM_FILE 1 _ACEOF fi diff --git a/configure.ac b/configure.ac index ad2b6613..d02702e8 100644 --- a/configure.ac +++ b/configure.ac @@ -775,7 +775,7 @@ if test x$support_mouseslipwheel = xyes; then fi if test x$support_afterimage = xyes; then AC_DEFINE(HAVE_AFTERIMAGE, 1, Define if you want to use libAfterImage for image processing) - AC_DEFINE(XPM_BACKGROUND, 1, Define if you want to have sexy-looking background pixmaps. Needs libAfterImage) + AC_DEFINE(BG_IMAGE_FROM_FILE, 1, Define if you want to have sexy-looking background pixmaps. Needs libAfterImage) fi dnl if test x$support_afterstep = xyes; then diff --git a/src/background.C b/src/background.C index 90e303e7..baa2630f 100644 --- a/src/background.C +++ b/src/background.C @@ -89,10 +89,24 @@ */ #ifdef HAVE_BG_PIXMAP +bgPixmap_t::bgPixmap_t() +{ +#ifdef HAVE_AFTERIMAGE + original_asim = NULL; +#endif +#ifdef BG_IMAGE_FROM_FILE + h_scale = v_scale = 0; + h_align = v_align = 0; +#endif + flags = 0; + pixmap = None; +} + + bool bgPixmap_t::window_size_sensitive () { -# ifdef XPM_BACKGROUND +# ifdef BG_IMAGE_FROM_FILE # ifdef HAVE_AFTERIMAGE if (original_asim != NULL) # endif @@ -126,7 +140,7 @@ bool bgPixmap_t::need_client_side_rendering () return false; } -# ifdef XPM_BACKGROUND +# ifdef BG_IMAGE_FROM_FILE static inline bool check_set_scale_value (int geom_flags, int flag, unsigned int &scale, unsigned int new_value) { @@ -604,7 +618,7 @@ bgPixmap_t::set_file (const char *file) return false; } -# endif /* XPM_BACKGROUND */ +# endif /* BG_IMAGE_FROM_FILE */ # ifdef ENABLE_TRANSPARENCY bool diff --git a/src/background.h b/src/background.h index 6d59c346..698bae66 100644 --- a/src/background.h +++ b/src/background.h @@ -9,10 +9,12 @@ # include #endif -#if defined(XPM_BACKGROUND) || defined(ENABLE_TRANSPARENCY) +#if defined(BG_IMAGE_FROM_FILE) || defined(ENABLE_TRANSPARENCY) # define HAVE_BG_PIXMAP 1/* to simplify further usage */ struct bgPixmap_t { + bgPixmap_t(); + enum { geometrySet = (1UL<<0), propScale = (1UL<<1), @@ -41,7 +43,7 @@ struct bgPixmap_t { transpTransformations = (tintNeeded|blurNeeded) }; /* this flags are returned by make_transparency_pixmap if called */ -# ifdef XPM_BACKGROUND +# ifdef BG_IMAGE_FROM_FILE # ifdef HAVE_AFTERIMAGE ASImage *original_asim; bool render_asim (ASImage *background, ARGB32 background_tint); @@ -62,7 +64,7 @@ struct bgPixmap_t { }; bool set_file (const char *file); -# endif /* XPM_BACKGROUND */ +# endif /* BG_IMAGE_FROM_FILE */ rxvt_term *target; bool set_target (rxvt_term *new_target); diff --git a/src/command.C b/src/command.C index c0da9cd0..516368c5 100644 --- a/src/command.C +++ b/src/command.C @@ -3423,7 +3423,7 @@ rxvt_term::process_xterm_seq (int op, const char *str, char resp) break; #endif -#if XPM_BACKGROUND +#if BG_IMAGE_FROM_FILE case Rxvt_Pixmap: if (!strcmp (str, "?")) { diff --git a/src/init.C b/src/init.C index fb8e0b6d..0985b549 100644 --- a/src/init.C +++ b/src/init.C @@ -201,18 +201,6 @@ rxvt_term::init_vars () refresh_type = SLOW_REFRESH; oldcursor.row = oldcursor.col = -1; -#ifdef HAVE_BG_PIXMAP -#ifdef HAVE_AFTERIMAGE - bgPixmap.original_asim = NULL; -#endif - /* bgPixmap.w = bgPixmap.h = 0; */ -#ifdef XPM_BACKGROUND - bgPixmap.h_scale = bgPixmap.v_scale = 0; - bgPixmap.h_align = bgPixmap.v_align = 0; -#endif - bgPixmap.flags = 0; - bgPixmap.pixmap = None; -#endif last_bot = last_state = -1; set_option (Opt_scrollBar); diff --git a/src/main.C b/src/main.C index 7350ffe9..6b6d4257 100644 --- a/src/main.C +++ b/src/main.C @@ -529,7 +529,7 @@ rxvt_term::init (int argc, const char *const *argv, stringvec *envv) } #endif -#ifdef XPM_BACKGROUND +#ifdef BG_IMAGE_FROM_FILE if (rs[Rs_backgroundPixmap] != NULL) { const char *p = rs[Rs_backgroundPixmap]; @@ -1040,7 +1040,7 @@ rxvt_term::set_colorfgbg () if (pix_colors[Color_bg] == pix_colors[i]) { sprintf (bstr, "%d", (i - Color_Black)); -#ifdef XPM_BACKGROUND +#ifdef BG_IMAGE_FROM_FILE xpmb = "default;"; #endif break; diff --git a/src/rsinc.h b/src/rsinc.h index 75692f1a..97ac52c7 100644 --- a/src/rsinc.h +++ b/src/rsinc.h @@ -16,7 +16,7 @@ #endif def (name) def (title) -#ifdef XPM_BACKGROUND +#ifdef BG_IMAGE_FROM_FILE def (path) def (backgroundPixmap) #endif diff --git a/src/rxvt.h b/src/rxvt.h index 57963ce8..51242986 100644 --- a/src/rxvt.h +++ b/src/rxvt.h @@ -222,7 +222,7 @@ typedef struct _mwmhints { /* COLORTERM, TERM environment variables */ #define COLORTERMENV "rxvt" -#ifdef XPM_BACKGROUND +#ifdef BG_IMAGE_FROM_FILE # define COLORTERMENVFULL COLORTERMENV "-xpm" #else # define COLORTERMENVFULL COLORTERMENV diff --git a/src/xdefaults.C b/src/xdefaults.C index 664dbc30..0c431393 100644 --- a/src/xdefaults.C +++ b/src/xdefaults.C @@ -188,7 +188,7 @@ optList[] = { STRG (Rs_color + Color_pointer_fg, "pointerColor", "pr", "color", "pointer color"), STRG (Rs_color + Color_pointer_bg, "pointerColor2", "pr2", "color", "pointer bg color"), STRG (Rs_color + Color_border, "borderColor", "bd", "color", "border color"), -#ifdef XPM_BACKGROUND +#ifdef BG_IMAGE_FROM_FILE RSTRG (Rs_path, "path", "search path"), STRG (Rs_backgroundPixmap, "backgroundPixmap", "pixmap", "file[;geom]", "background pixmap"), #endif @@ -320,9 +320,6 @@ static const char optionsstring[] = "options: " #if OFF_FOCUS_FADING "fade," #endif -#if defined(XPM_BACKGROUND) - "XPM," -#endif #if defined(ENABLE_TRANSPARENCY) "transparent," "tint," -- 2.34.1