1 /********************************************************************
2 Gallium-Quartz KWin client
4 Copyright (C) 2005 Sandro Giessl <sandro@giessl.com>
6 Karol Szwed <gallium@kde.org>
9 Based on the KDE default client.
11 Includes mini titlebars for ToolWindow Support.
12 Button positions are now customizable.
14 This program is free software; you can redistribute it and/or modify
15 it under the terms of the GNU General Public License as published by
16 the Free Software Foundation; either version 2 of the License, or
17 (at your option) any later version.
19 This program is distributed in the hope that it will be useful,
20 but WITHOUT ANY WARRANTY; without even the implied warranty of
21 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 GNU General Public License for more details.
24 You should have received a copy of the GNU General Public License
25 along with this program. If not, see <http://www.gnu.org/licenses/>.
26 *********************************************************************/
28 #ifndef __KDEGALLIUM_QUARTZ_H
29 #define __KDEGALLIUM_QUARTZ_H
32 #include "../../lib/kcommondecoration.h"
33 #include "../../lib/kdecorationfactory.h"
40 class QuartzHandler
: public QObject
, public KDecorationFactory
47 virtual KDecoration
* createDecoration( KDecorationBridge
* );
48 virtual bool reset(unsigned long changed
);
49 virtual bool supports( Ability ability
) const;
50 virtual QList
< BorderSize
> borderSizes() const;
56 void drawBlocks(QPixmap
* pi
, QPixmap
&p
, const QColor
&c1
, const QColor
&c2
);
60 class QuartzButton
: public KCommonDecorationButton
63 QuartzButton(ButtonType type
, QuartzClient
*parent
, const char *name
);
65 void setBitmap(const unsigned char *bitmap
);
67 void reset(unsigned long changed
);
70 void paintEvent(QPaintEvent
*);
71 void drawButton(QPainter
*p
);
77 class QuartzClient
: public KCommonDecoration
80 QuartzClient(KDecorationBridge
* bridge
, KDecorationFactory
* factory
);
83 virtual QString
visibleName() const;
84 virtual QString
defaultButtonsLeft() const;
85 virtual QString
defaultButtonsRight() const;
86 virtual bool decorationBehaviour(DecorationBehaviour behaviour
) const;
87 virtual int layoutMetric(LayoutMetric lm
, bool respectWindowState
= true, const KCommonDecorationButton
* = 0) const;
88 virtual KCommonDecorationButton
*createButton(ButtonType type
);
93 virtual void reset( unsigned long changed
);
94 void paintEvent( QPaintEvent
* );
97 int titleHeight
, borderSize
;
105 // kate: space-indent off; tab-width 4;