From 233d788cf3be327f9241d051c76853d67917b221 Mon Sep 17 00:00:00 2001 From: pcg Date: Mon, 29 Mar 2004 21:02:10 +0000 Subject: [PATCH] *** empty log message *** --- README.configure | 2 ++ autoconf/config.h.in | 3 +++ autoconf/configure.in | 11 +++++++++++ doc/yodl/rxvt-options.yo | 4 +++- doc/yodl/rxvt-resources.yo | 4 +++- reconf | 2 +- src/rxvtcolor.C | 17 +++++++++++++++++ src/rxvtcolor.h | 11 +++++++++++ 8 files changed, 51 insertions(+), 3 deletions(-) diff --git a/README.configure b/README.configure index 8207a2f3..ca74520a 100644 --- a/README.configure +++ b/README.configure @@ -73,6 +73,8 @@ report when a combination doesn't work, so it cnya be fixed. Marc Lehmann --enable-transparency add support for inheriting parent backgrounds thus giving a fake transparency to the term +--enable-tinting + add support for tinting of transparent backgrounds. --enable-menubar add support for our menu bar system (this interacts badly with dynamic locale switching currently) diff --git a/autoconf/config.h.in b/autoconf/config.h.in index 4e4142f4..d5368d89 100644 --- a/autoconf/config.h.in +++ b/autoconf/config.h.in @@ -388,6 +388,9 @@ /* Define to 1 if you can safely include both and . */ #undef TIME_WITH_SYS_TIME +/* Define if you want your background to be tinted */ +#undef TINTING + /* Define if you want your background to use the parent window background */ #undef TRANSPARENT diff --git a/autoconf/configure.in b/autoconf/configure.in index 3839e089..18f4d5c0 100644 --- a/autoconf/configure.in +++ b/autoconf/configure.in @@ -62,6 +62,7 @@ support_addstrings=no support_frills=no support_linespace=no support_inheritpixmap=no +support_tinting=no support_keepscrolling=no support_selectionscrolling=no support_menubar=no @@ -103,6 +104,7 @@ AC_ARG_ENABLE(everything, support_frills=yes support_linespace=yes support_inheritpixmap=yes + support_tinting=yes support_keepscrolling=yes support_selectionscrolling=yes support_lastlog=yes @@ -174,6 +176,12 @@ AC_ARG_ENABLE(transparency, support_inheritpixmap=$enableval fi]) +AC_ARG_ENABLE(tinting, + [ --enable-tinting enable tinting of transparent bg], + [if test x$enableval = xyes -o x$enableval = xno; then + support_tinting=$enableval + fi]) + AC_ARG_ENABLE(menubar, [ --enable-menubar enable menubar], [if test x$enableval = xyes -o x$enableval = xno; then @@ -1152,6 +1160,9 @@ AC_CHECK_LIB(xpg4, setlocale, [LIBS="$LIBS -lxpg4"]) dnl# -------------------------------------------------------------------------- dnl# now add and remove other stuff dnl# -------------------------------------------------------------------------- +if test x$support_tinting = xyes; then + AC_DEFINE(TINTING, 1, Define if you want your background to be tinted) +fi if test x$support_inheritpixmap = xyes; then AC_DEFINE(TRANSPARENT, 1, Define if you want your background to use the parent window background) fi diff --git a/doc/yodl/rxvt-options.yo b/doc/yodl/rxvt-options.yo index 9c6fb7ba..e740a57e 100644 --- a/doc/yodl/rxvt-options.yo +++ b/doc/yodl/rxvt-options.yo @@ -1,4 +1,4 @@ -COMMENT(-- $Id: rxvt-options.yo,v 1.8 2004-03-29 16:52:06 pcg Exp $ --) +COMMENT(-- $Id: rxvt-options.yo,v 1.9 2004-03-29 21:02:11 pcg Exp $ --) COMMENT(----------------------------------------------------------------------) manpageoptions() @@ -39,6 +39,8 @@ startdit() Turn on/off inheriting parent window's pixmap. Alternative form is bf(-tr); resource bf(inheritPixmap). + dit(bf(-tint) em(colour)) + Tint the transparent background pixmap with the given colour. dit(bf(-bg) em(colour)) Window background colour; resource bf(background). diff --git a/doc/yodl/rxvt-resources.yo b/doc/yodl/rxvt-resources.yo index ed3d2e30..d66ed373 100644 --- a/doc/yodl/rxvt-resources.yo +++ b/doc/yodl/rxvt-resources.yo @@ -1,4 +1,4 @@ -COMMENT(-- $Id: rxvt-resources.yo,v 1.8 2004-03-29 16:52:06 pcg Exp $ --) +COMMENT(-- $Id: rxvt-resources.yo,v 1.9 2004-03-29 21:02:11 pcg Exp $ --) COMMENT(----------------------------------------------------------------------) manpagesection(RESOURCES (available also as long-options)) @@ -72,6 +72,8 @@ startdit() bf(True): make the background inherit the parent windows' pixmap, giving artificial transparency. bf(False): do not inherit the parent windows' pixmap. + dit(bf(tintColor) em(colour)) + Tint the transparent background pixmap with the given colour. dit(bf(scrollColor:) em(colour)) Use the specified colour for the scrollbar [default #B2B2B2]. dit(bf(troughColor:) em(colour)) diff --git a/reconf b/reconf index 8b79b72e..6ce82725 100755 --- a/reconf +++ b/reconf @@ -8,7 +8,7 @@ --with-term=rxvt --enable-keepscrolling --enable-xft \ --with-name=rxvt --enable-selectionscrolling \ --enable-frills --enable-swapscreen --enable-transparency \ - --with-codesets=eu,jp --enable-menubar \ + --with-codesets=eu,jp --enable-menubar --enable-tinting \ --enable-cursor-blink --enable-pointer-blank --enable-text-blink \ --enable-plain-scroll --enable-combining \ "$@" diff --git a/src/rxvtcolor.C b/src/rxvtcolor.C index 7b91847f..5dce8345 100644 --- a/src/rxvtcolor.C +++ b/src/rxvtcolor.C @@ -5,6 +5,23 @@ #include #include +class byteorder byteorder; + +byteorder::byteorder () +{ + union { + uint32_t u; + uint8_t b[4]; + } w; + + w.b[0] = 0x11; + w.b[1] = 0x22; + w.b[2] = 0x33; + w.b[3] = 0x44; + + e = w.u; +} + refcounted::refcounted (const char *id) { this->id = STRDUP (id); diff --git a/src/rxvtcolor.h b/src/rxvtcolor.h index 5f33aa79..7baa96ed 100644 --- a/src/rxvtcolor.h +++ b/src/rxvtcolor.h @@ -14,6 +14,17 @@ #include "callback.h" +extern class byteorder { + uint32_t e; +public: + byteorder (); + + bool big_endian () { return e == 0x11223344; }; + bool network () { return e == 0x11223344; }; + bool little_endian () { return e == 0x44332211; }; + bool vax () { return e == 0x44332211; }; +} byteorder; + struct rxvt_term; struct im_watcher; -- 2.34.1