renamed XPM_BACKGROUND to BG_IMAGE_FROM_FILE
authorsasha <sasha>
Wed, 12 Sep 2007 21:06:07 +0000 (21:06 +0000)
committersasha <sasha>
Wed, 12 Sep 2007 21:06:07 +0000 (21:06 +0000)
config.h.in
configure
configure.ac
src/background.C
src/background.h
src/command.C
src/init.C
src/main.C
src/rsinc.h
src/rxvt.h
src/xdefaults.C

index 456cba1..16fc31d 100644 (file)
 /* 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 <X11/xpm.h> on a normal include path (be careful) */
 #undef XPM_INC_X11
index 39b508f..b937045 100755 (executable)
--- 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
index ad2b661..d02702e 100644 (file)
@@ -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
index 90e303e..baa2630 100644 (file)
  */
 
 #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 
index 6d59c34..698bae6 100644 (file)
@@ -9,10 +9,12 @@
 #  include <afterimage.h>
 #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);
index c0da9cd..516368c 100644 (file)
@@ -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, "?"))
           {
index fb8e0b6..0985b54 100644 (file)
@@ -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);
index 7350ffe..6b6d425 100644 (file)
@@ -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;
index 75692f1..97ac52c 100644 (file)
@@ -16,7 +16,7 @@
 #endif
   def (name)
   def (title)
-#ifdef XPM_BACKGROUND
+#ifdef BG_IMAGE_FROM_FILE
   def (path)
   def (backgroundPixmap)
 #endif
index 57963ce..5124298 100644 (file)
@@ -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
index 664dbc3..0c43139 100644 (file)
@@ -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,"