Make a branch to make krunner Good Enough For Aaron™.
[kdebase/uwolfer.git] / workspace / kwin / lib / kdecoration_plugins_p.h
blob91b7930a97d5e620a6696045bcb7cf709f2d92f5
1 /*****************************************************************
2 This file is part of the KDE project.
4 Copyright (C) 1999, 2000 Daniel M. Duley <mosfet@kde.org>
5 Copyright (C) 2003 Lubos Lunak <l.lunak@kde.org>
7 Permission is hereby granted, free of charge, to any person obtaining a
8 copy of this software and associated documentation files (the "Software"),
9 to deal in the Software without restriction, including without limitation
10 the rights to use, copy, modify, merge, publish, distribute, sublicense,
11 and/or sell copies of the Software, and to permit persons to whom the
12 Software is furnished to do so, subject to the following conditions:
14 The above copyright notice and this permission notice shall be included in
15 all copies or substantial portions of the Software.
17 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
20 THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
22 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23 DEALINGS IN THE SOFTWARE.
24 ******************************************************************/
26 #ifndef KDECORATION_PLUGINS_H
27 #define KDECORATION_PLUGINS_H
30 // This header file is internal. I mean it.
31 //
33 // This private header is used by KWin core.
35 #include <QtGui/QWidget>
36 #include <ksharedconfig.h>
38 #include "kdecoration.h"
40 class KLibrary;
41 class KDecoration;
42 class KDecorationBridge;
43 class KDecorationFactory;
45 class KWIN_EXPORT KDecorationPlugins
46 : public KDecorationProvides
48 public:
49 KDecorationPlugins(const KSharedConfigPtr &cfg);
50 virtual ~KDecorationPlugins();
51 bool loadPlugin( QString name );
52 void destroyPreviousPlugin();
53 KDecorationFactory* factory();
54 KDecoration* createDecoration( KDecorationBridge* );
55 QString currentPlugin();
56 bool reset( unsigned long changed ); // returns true if decorations need to be recreated
57 protected:
58 virtual void error( const QString& error_msg );
59 QString defaultPlugin; // FRAME normalne protected?
60 private:
61 KDecorationFactory* (*create_ptr)();
62 KLibrary *library;
63 KDecorationFactory* fact;
64 KLibrary *old_library;
65 KDecorationFactory* old_fact;
66 QString pluginStr;
67 KSharedConfigPtr config;
72 Plugins API:
73 KDecorationFactory* create_factory(); - called once after loading
77 /** @} */
79 #endif