not quite so much needs to be delayed to the init() function
[personal-kdebase.git] / workspace / kwin / lib / kdecorationfactory.cpp
blob90de5b233e2c09057994670960c86bf1e779a6fe
1 /*****************************************************************
2 This file is part of the KDE project.
4 Copyright (C) 2003 Lubos Lunak <l.lunak@kde.org>
6 Permission is hereby granted, free of charge, to any person obtaining a
7 copy of this software and associated documentation files (the "Software"),
8 to deal in the Software without restriction, including without limitation
9 the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 and/or sell copies of the Software, and to permit persons to whom the
11 Software is furnished to do so, subject to the following conditions:
13 The above copyright notice and this permission notice shall be included in
14 all copies or substantial portions of the Software.
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 DEALINGS IN THE SOFTWARE.
23 ******************************************************************/
25 #include "kdecorationfactory.h"
27 #include <assert.h>
29 #include "kdecorationbridge.h"
31 KDecorationFactory::KDecorationFactory()
35 KDecorationFactory::~KDecorationFactory()
37 assert( _decorations.count() == 0 );
40 bool KDecorationFactory::reset( unsigned long )
42 return true;
45 void KDecorationFactory::checkRequirements( KDecorationProvides* )
49 QList< KDecorationDefines::BorderSize > KDecorationFactory::borderSizes() const
51 return QList< BorderSize >() << BorderNormal;
54 bool KDecorationFactory::exists( const KDecoration* deco ) const
56 return _decorations.contains( const_cast< KDecoration* >( deco ));
59 void KDecorationFactory::addDecoration( KDecoration* deco )
61 _decorations.append( deco );
64 void KDecorationFactory::removeDecoration( KDecoration* deco )
66 _decorations.removeAll( deco );
69 void KDecorationFactory::resetDecorations( unsigned long changed )
71 for( QList< KDecoration* >::ConstIterator it = _decorations.constBegin();
72 it != _decorations.constEnd();
73 ++it )
74 (*it)->reset( changed );
77 NET::WindowType KDecorationFactory::windowType( unsigned long supported_types, KDecorationBridge* bridge ) const
79 return bridge->windowType( supported_types );
82 QList< QList<QImage> > KDecorationFactoryUnstable::shadowTextures()
84 return QList< QList<QImage> >();
87 int KDecorationFactoryUnstable::shadowTextureList( ShadowType type ) const
89 Q_UNUSED( type );
90 return -1;
93 QList<QRect> KDecorationFactoryUnstable::shadowQuads( ShadowType type, QSize size ) const
95 Q_UNUSED( type );
96 Q_UNUSED( size );
97 return QList<QRect>();
100 double KDecorationFactoryUnstable::shadowOpacity( ShadowType type ) const
102 Q_UNUSED( type );
103 return 1.0;
106 double KDecorationFactoryUnstable::shadowBrightness( ShadowType type ) const
108 Q_UNUSED( type );
109 return 1.0;
112 double KDecorationFactoryUnstable::shadowSaturation( ShadowType type ) const
114 Q_UNUSED( type );
115 return 1.0;