Make a branch to make krunner Good Enough For Aaron™.
[kdebase/uwolfer.git] / workspace / kwin / clients / web / Web.h
blobfb6c136e5a1d76fbe6dafa35450ee8da700a8014
1 /*
2 'Web' kwin client
4 Copyright (C) 2005 Sandro Giessl <sandro@giessl.com>
5 Copyright (C) 2001 Rik Hemsley (rikkus) <rik@kde.org>
7 This program is free software; you can redistribute it and/or
8 modify it under the terms of the GNU General Public
9 License as published by the Free Software Foundation; either
10 version 2 of the License, or (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; see the file COPYING. If not, write to
19 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 Boston, MA 02110-1301, USA.
23 #ifndef KWIN_WEB_H
24 #define KWIN_WEB_H
26 #include "../../lib/kcommondecoration.h"
27 #include "../../lib/kdecorationfactory.h"
30 namespace Web
34 class WebClient : public KCommonDecoration
36 public:
38 WebClient(KDecorationBridge* bridge, KDecorationFactory* factory);
39 ~WebClient();
41 virtual QString visibleName() const;
42 virtual QString defaultButtonsLeft() const;
43 virtual QString defaultButtonsRight() const;
44 virtual bool decorationBehaviour(DecorationBehaviour behaviour) const;
45 virtual int layoutMetric(LayoutMetric lm, bool respectWindowState = true, const KCommonDecorationButton * = 0) const;
46 virtual KCommonDecorationButton *createButton(ButtonType type);
48 virtual void updateWindowShape();
50 virtual void init();
52 protected:
53 virtual void reset( unsigned long changed );
55 virtual void paintEvent(QPaintEvent *);
57 private:
59 int titleHeight_, borderSize_;
61 bool shape_;
63 QBitmap _buttonBitmap(ButtonType t) const;
66 class WebFactory : public QObject, public KDecorationFactory
68 Q_OBJECT
70 public:
72 WebFactory() {}
73 virtual ~WebFactory() {}
74 virtual KDecoration* createDecoration( KDecorationBridge* );
75 virtual bool reset( unsigned long changed );
76 virtual bool supports( Ability ability ) const;
77 virtual QList< BorderSize > borderSizes() const;
81 #endif
82 // vim:ts=2:sw=2:tw=78:set et:
83 // kate: indent-width 2; replace-tabs on; tab-width 2; space-indent on;