1 /* Plastik KWin window decoration
2 Copyright (C) 2003-2005 Sandro Giessl <sandro@giessl.com>
4 based on the window decoration "Web":
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 PLASTIKCLIENT_H
24 #define PLASTIKCLIENT_H
26 #include <kcommondecoration.h>
30 namespace KWinPlastik
{
33 class PlastikClient
: public KCommonDecoration
36 PlastikClient(KDecorationBridge
* bridge
, KDecorationFactory
* factory
);
39 virtual QString
visibleName() const;
40 virtual bool decorationBehaviour(DecorationBehaviour behaviour
) const;
41 virtual int layoutMetric(LayoutMetric lm
, bool respectWindowState
= true, const KCommonDecorationButton
* = 0) const;
42 virtual QRegion
cornerShape(WindowCorner corner
);
43 virtual KCommonDecorationButton
*createButton(ButtonType type
);
46 virtual void reset( unsigned long changed
);
48 virtual void paintEvent(QPaintEvent
*e
);
49 virtual void updateCaption();
51 const QPixmap
&getTitleBarTile(bool active
) const;
54 QRect
captionRect() const;
56 const QPixmap
&captionPixmap() const;
57 void clearCaptionPixmaps();
59 mutable QPixmap
*m_captionPixmaps
[2];
70 #endif // PLASTIKCLIENT_H