fix logic
[personal-kdelibs.git] / khtml / khtml_global.h
blobfd484cbcf23aaf99f99cf39f2a5ef38517e79db7
1 /* This file is part of the KDE project
3 * Copyright (C) 2000 Simon Hausmann <hausmann@kde.org>
4 * Copyright (C) 2007 David Faure <faure@kde.org>
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details.
16 * You should have received a copy of the GNU Library General Public License
17 * along with this library; see the file COPYING.LIB. If not, write to
18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 * Boston, MA 02110-1301, USA.
22 #ifndef KHTML_GLOBAL_H
23 #define KHTML_GLOBAL_H
25 #include <khtml_export.h>
27 #include <kparts/historyprovider.h>
28 #include <kurl.h>
30 class KComponentData;
31 class KIconLoader;
32 class KAboutData;
33 class HistoryProvider;
34 class KHTMLSettings;
35 class KHTMLPart;
37 namespace DOM
39 class DocumentImpl;
42 /**
43 * @internal
44 * Exported for khtml test programs, but not installed
46 class KHTML_EXPORT KHTMLGlobal
48 friend class KHTMLViewPrivate;
50 public:
51 KHTMLGlobal();
52 ~KHTMLGlobal();
54 static void registerPart( KHTMLPart *part );
55 static void deregisterPart( KHTMLPart *part );
57 static void registerDocumentImpl( DOM::DocumentImpl *doc );
58 static void deregisterDocumentImpl( DOM::DocumentImpl *doc );
60 static const KComponentData &componentData();
61 static KIconLoader *iconLoader();
63 static KHTMLSettings *defaultHTMLSettings();
65 // list of visited URLs
66 static KParts::HistoryProvider *vLinks() {
67 return KParts::HistoryProvider::self();
70 // Called when khtml part is unloaded
71 static void finalCheck();
73 private:
74 static void ref();
75 static void deref();
76 private:
77 static unsigned long s_refcnt;
78 static KHTMLGlobal *s_self;
79 static KComponentData *s_componentData;
80 static KIconLoader *s_iconLoader;
81 static KAboutData *s_about;
82 static KHTMLSettings *s_settings;
85 #endif