From 9ad48cd5acf4c1035c865fc4b9bf669c393b736a Mon Sep 17 00:00:00 2001 From: fluxgen Date: Sun, 18 Aug 2002 09:47:03 +0000 Subject: license and handleEvent fix --- util/bsetroot.cc | 29 ++++++++++++++++++++++++++--- util/bsetroot.hh | 40 ++++++++++++++++++++++++++++++++-------- 2 files changed, 58 insertions(+), 11 deletions(-) diff --git a/util/bsetroot.cc b/util/bsetroot.cc index eef21a7..be7b69a 100644 --- a/util/bsetroot.cc +++ b/util/bsetroot.cc @@ -1,6 +1,29 @@ +// Copyright (c) 2002 Henrik Kinnunen (fluxgen@linuxmail.org) +// Copyright (c) 1997 - 2000 Brad Hughes +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the "Software"), +// to deal in the Software without restriction, including without limitation +// the rights to use, copy, modify, merge, publish, distribute, sublicense, +// and/or sell copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + +// $Id: bsetroot.cc,v 1.8 2002/08/18 09:47:03 fluxgen Exp $ + #include "bsetroot.hh" #include "../src/i18n.hh" +#include "../src/Image.hh" #ifdef HAVE_CONFIG_H # include "../config.h" @@ -81,7 +104,7 @@ bsetroot::bsetroot(int argc, char **argv, char *dpy_name) usage(); } - if ((mod + sol + grd) != True) { + if ((mod + sol + grd) != true) { fprintf(stderr, I18n::instance()-> getMessage( @@ -107,7 +130,7 @@ bsetroot::bsetroot(int argc, char **argv, char *dpy_name) } -bsetroot::~bsetroot(void) { +bsetroot::~bsetroot() { XKillClient(display, AllTemporary); if (pixmaps) { // should always be true @@ -181,7 +204,7 @@ void bsetroot::setRootAtoms(Pixmap pixmap, int screen) { //-------------- solid -------------------- // draws pixmaps with a single color //----------------------------------------- -void bsetroot::solid(void) { +void bsetroot::solid() { register int screen = 0; pixmaps = new Pixmap[getNumberOfScreens()]; diff --git a/util/bsetroot.hh b/util/bsetroot.hh index 41d298b..d2f005b 100644 --- a/util/bsetroot.hh +++ b/util/bsetroot.hh @@ -1,22 +1,48 @@ +// Copyright (c) 2002 Henrik Kinnunen (fluxgen@linuxmail.org) +// Copyright (c) 1997 - 2000 Brad Hughes +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the "Software"), +// to deal in the Software without restriction, including without limitation +// the rights to use, copy, modify, merge, publish, distribute, sublicense, +// and/or sell copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + +// $Id: bsetroot.hh,v 1.4 2002/08/18 09:47:03 fluxgen Exp $ + #ifndef BSETROOT_HH #define BSETROOT_HH #include "../src/BaseDisplay.hh" -#include "../src/Image.hh" + +class BImageControl; class bsetroot : public BaseDisplay { public: - bsetroot(int, char **, char * = 0); - ~bsetroot(void); + bsetroot(int argc, char **argv, char * dpy_name= 0); + ~bsetroot(); - inline virtual Bool handleSignal(int) { return False; } + inline virtual bool handleSignal(int num) { return False; } - void gradient(void); + void gradient(); void modula(int, int); - void solid(void); + void solid(); void usage(int = 0); void setRootAtoms(Pixmap pixmap, int screen); +protected: + void handleEvent(XEvent *xe) { } + private: BImageControl **img_ctrl; Pixmap *pixmaps; @@ -24,8 +50,6 @@ private: char *fore, *back, *grad; Display *display; int num_screens; -protected: - inline virtual void process_event(XEvent *) { } }; -- cgit v0.11.2