~ubuntu-branches/ubuntu/utopic/kde-workspace/utopic-proposed

« back to all changes in this revision

Viewing changes to kwin/libkdecorations/kdecoration_plugins_p.h

  • Committer: Bazaar Package Importer
  • Author(s): Michał Zając
  • Date: 2011-07-09 08:31:15 UTC
  • Revision ID: james.westby@ubuntu.com-20110709083115-ohyxn6z93mily9fc
Tags: upstream-4.6.90
Import upstream version 4.6.90

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*****************************************************************
 
2
This file is part of the KDE project.
 
3
 
 
4
Copyright (C) 1999, 2000    Daniel M. Duley <mosfet@kde.org>
 
5
Copyright (C) 2003 Lubos Lunak <l.lunak@kde.org>
 
6
 
 
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:
 
13
 
 
14
The above copyright notice and this permission notice shall be included in
 
15
all copies or substantial portions of the Software.
 
16
 
 
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
******************************************************************/
 
25
 
 
26
#ifndef KDECORATION_PLUGINS_H
 
27
#define KDECORATION_PLUGINS_H
 
28
 
 
29
//
 
30
// This header file is internal. I mean it.
 
31
//
 
32
 
 
33
// This private header is used by KWin core.
 
34
 
 
35
#include <QtGui/QWidget>
 
36
#include <ksharedconfig.h>
 
37
 
 
38
#include "kdecoration.h"
 
39
 
 
40
class KLibrary;
 
41
class KDecoration;
 
42
class KDecorationBridge;
 
43
class KDecorationFactory;
 
44
 
 
45
class KWIN_EXPORT KDecorationPlugins
 
46
    : public KDecorationProvides
 
47
{
 
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;
 
68
};
 
69
 
 
70
/*
 
71
 
 
72
 Plugins API:
 
73
    KDecorationFactory* create_factory(); - called once after loading
 
74
 
 
75
*/
 
76
 
 
77
/** @} */
 
78
 
 
79
#endif