kwin Library API Documentation

kdecoration_plugins_p.h

00001 /*****************************************************************
00002 This file is part of the KDE project.
00003 
00004 Copyright (C) 1999, 2000    Daniel M. Duley <mosfet@kde.org>
00005 Copyright (C) 2003 Lubos Lunak <l.lunak@kde.org>
00006 
00007 Permission is hereby granted, free of charge, to any person obtaining a
00008 copy of this software and associated documentation files (the "Software"),
00009 to deal in the Software without restriction, including without limitation
00010 the rights to use, copy, modify, merge, publish, distribute, sublicense,
00011 and/or sell copies of the Software, and to permit persons to whom the
00012 Software is furnished to do so, subject to the following conditions:
00013 
00014 The above copyright notice and this permission notice shall be included in
00015 all copies or substantial portions of the Software.
00016 
00017 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
00018 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
00019 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
00020 THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
00021 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
00022 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
00023 DEALINGS IN THE SOFTWARE.
00024 ******************************************************************/
00025 
00026 #ifndef KDECORATION_PLUGINS_H
00027 #define KDECORATION_PLUGINS_H
00028 
00029 //
00030 // This header file is internal. I mean it.
00031 // 
00032 
00033 #include <qcstring.h>
00034 #include <qstring.h>
00035 #include <qwidget.h>
00036 
00037 #include "kdecoration.h"
00038 
00039 class KLibrary;
00040 class KConfig;
00041 class KDecoration;
00042 class KDecorationBridge;
00043 class KDecorationFactory;
00044 
00045 class KDecorationPlugins
00046     : public KDecorationProvides
00047     {
00048     public:
00049         KDecorationPlugins( KConfig* cfg );
00050         virtual ~KDecorationPlugins();
00051         bool loadPlugin( QString name );
00052         void destroyPreviousPlugin();
00053         KDecorationFactory* factory();
00054         KDecoration* createDecoration( KDecorationBridge* );
00055         QString currentPlugin() { return pluginStr; }
00056         bool reset( unsigned long changed ); // returns true if decorations need to be recreated
00057     protected:
00058         virtual void error( const QString& error_msg );
00059         QCString defaultPlugin; // FRAME normalne protected?
00060     private:
00061         KDecorationFactory* (*create_ptr)();
00062         KLibrary *library;
00063         KDecorationFactory* fact;
00064         KLibrary *old_library;
00065         KDecorationFactory* old_fact;
00066         QString pluginStr;
00067         KConfig* config;
00068     };
00069 
00070 /*
00071 
00072  Plugins API:
00073     KDecorationFactory* create_factory(); - called once after loading
00074 
00075 */
00076 
00077 #endif
KDE Logo
This file is part of the documentation for kwin Library Version 3.2.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sun Apr 11 13:44:52 2004 by doxygen 1.3.6-20040222 written by Dimitri van Heesch, © 1997-2003