• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdecore
 

tdecore

  • tdecore
tdeglobal.h
1/* This file is part of the KDE libraries
2 Copyright (C) 1999 Sirtaj Singh Kanq <taj@kde.org>
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License version 2 as published by the Free Software Foundation.
7
8 This library is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 Library General Public License for more details.
12
13 You should have received a copy of the GNU Library General Public License
14 along with this library; see the file COPYING.LIB. If not, write to
15 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16 Boston, MA 02110-1301, USA.
17*/
18#ifndef _TDEGLOBAL_H
19#define _TDEGLOBAL_H
20
21#include "tdelibs_export.h"
22#include <kinstance.h> // KDE4: class TDEInstance is enough here
23
24class KCharsets;
25class TDEConfig;
26class TDESharedConfig;
27class TDEIconLoader;
28#ifdef __TDE_HAVE_TDEHWLIB
29class TDEHardwareDevices;
30class TDEGlobalNetworkManager;
31#endif
32class TDELocale;
33class TDEStandardDirs;
34class KStaticDeleterBase;
35class KStaticDeleterList;
36class KStringDict;
37class TQString;
38
48class TDECORE_EXPORT TDEGlobal
49{
50public:
51
58 static TDEInstance *instance();
59
64 static TDEStandardDirs *dirs();
65
70 static TDEConfig *config();
71
76 static TDESharedConfig *sharedConfig();
77
82 static TDEIconLoader *iconLoader();
83
84#ifdef __TDE_HAVE_TDEHWLIB
89 static TDEHardwareDevices *hardwareDevices();
90
95 static TDEGlobalNetworkManager *networkManager();
96#endif
97
102 static TDELocale *locale();
103
108 static KCharsets *charsets();
109
127 static const TQString &staticQString(const char *str);
128
146 static const TQString &staticQString(const TQString &str);
147
154 static void registerStaticDeleter(KStaticDeleterBase *d);
155
162 static void unregisterStaticDeleter(KStaticDeleterBase *d);
163
170 static void deleteStaticDeleters();
171
172 //private:
173 static KStringDict *_stringDict;
174 static TDEInstance *_instance;
175 static TDELocale *_locale;
176 static KCharsets *_charsets;
177 static KStaticDeleterList *_staticDeleters;
178
185 static void setActiveInstance(TDEInstance *d);
186 static TDEInstance *activeInstance() { return _activeInstance; }
187
188 static TDEInstance *_activeInstance;
189};
190
195#define KMIN(a,b) kMin(a,b)
200#define KMAX(a,b) kMax(a,b)
205#define KABS(a) kAbs(a)
211#define KCLAMP(x,low,high) kClamp(x,low,high)
212
213// XXX KDE4: Make kMin, kMax and kClamp return "T" instead of "const T &"!
214template<class T>
215inline const T& kMin (const T& a, const T& b) { return a < b ? a : b; }
216
217template<class T>
218inline const T& kMax (const T& a, const T& b) { return b < a ? a : b; }
219
220template<class T>
221inline T kAbs (const T& a) { return a < 0 ? -a : a; }
222
223template<class T>
224inline const T& kClamp( const T& x, const T& low, const T& high )
225{
226 if ( x < low ) return low;
227 else if ( high < x ) return high;
228 else return x;
229}
230
237TDECORE_EXPORT int kasciistricmp( const char *str1, const char *str2 );
238
246TDECORE_EXPORT char* kasciitolower( char *str );
247
255TDECORE_EXPORT char* kasciitoupper( char *str );
256
257
272#endif // _TDEGLOBAL_H
273
KCharsets
Charset font and encoder/decoder handling.
Definition: kcharsets.h:44
KStaticDeleterBase
Static deleters are used to manage static resources.
Definition: kstaticdeleter.h:39
TDEConfig
Access KDE Configuration entries.
Definition: tdeconfig.h:44
TDEGlobal
Access to the KDE global objects.
Definition: tdeglobal.h:49
TDEIconLoader
Iconloader for KDE.
Definition: kiconloader.h:78
TDEInstance
Access to KDE global objects for use in shared libraries.
Definition: kinstance.h:48
TDELocale
TDELocale provides support for country specific stuff like the national language.
Definition: tdelocale.h:124
TDESharedConfig
TDEConfig variant using shared memory.
Definition: tdeconfig.h:274
TDEStandardDirs
Site-independent access to standard TDE directories.
Definition: tdestandarddirs.h:126

tdecore

Skip menu "tdecore"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

tdecore

Skip menu "tdecore"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdecore by doxygen 1.9.4
This website is maintained by Timothy Pearson.