home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / SLAX 6.0.8 / slax-6.0.8.iso / slax / base / 006-devel.lzm / usr / include / kdeversion.h < prev    next >
Encoding:
C/C++ Source or Header  |  2008-08-19  |  2.6 KB  |  80 lines

  1. /* This file is part of the KDE libraries
  2.     Copyright (c) 2002-2005 KDE Team
  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 as published by the Free Software Foundation; either
  7.     version 2 of the License, or (at your option) any later version.
  8.  
  9.     This library is distributed in the hope that it will be useful,
  10.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  11.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  12.     Library General Public License for more details.
  13.  
  14.     You should have received a copy of the GNU Library General Public License
  15.     along with this library; see the file COPYING.LIB.  If not, write to
  16.     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  17.     Boston, MA 02110-1301, USA.
  18. */
  19.  
  20. #ifndef _KDE_VERSION_H_
  21. #define _KDE_VERSION_H_
  22.  
  23. #include "kdelibs_export.h"
  24.  
  25. #define KDE_VERSION_STRING "3.5.10"
  26. #define KDE_VERSION_MAJOR 3
  27. #define KDE_VERSION_MINOR 5
  28. #define KDE_VERSION_RELEASE 10
  29. #define KDE_MAKE_VERSION( a,b,c ) (((a) << 16) | ((b) << 8) | (c))
  30.  
  31. #define KDE_VERSION \
  32.   KDE_MAKE_VERSION(KDE_VERSION_MAJOR,KDE_VERSION_MINOR,KDE_VERSION_RELEASE)
  33.  
  34. #define KDE_IS_VERSION(a,b,c) ( KDE_VERSION >= KDE_MAKE_VERSION(a,b,c) )
  35.  
  36. /**
  37.  * Namespace for general KDE functions.
  38.  */
  39. namespace KDE
  40. {
  41.     /**
  42.      * Returns the encoded number of KDE's version, see the KDE_VERSION macro.
  43.      * In contrary to that macro this function returns the number of the actully
  44.      * installed KDE version, not the number of the KDE version that was
  45.      * installed when the program was compiled.
  46.      * @return the version number, encoded in a single uint
  47.      * @since 3.2
  48.      */
  49.     KDECORE_EXPORT unsigned int version();
  50.     /**
  51.      * Returns the major number of KDE's version, e.g.
  52.      * 3 for KDE 3.1.2. 
  53.      * @return the major version number
  54.      * @since 3.1
  55.      */
  56.     KDECORE_EXPORT unsigned int versionMajor();
  57.     /**
  58.      * Returns the minor number of KDE's version, e.g.
  59.      * 1 for KDE 3.1.2. 
  60.      * @return the minor version number
  61.      * @since 3.1
  62.      */
  63.     KDECORE_EXPORT unsigned int versionMinor();
  64.     /**
  65.      * Returns the release of KDE's version, e.g.
  66.      * 2 for KDE 3.1.2. 
  67.      * @return the release number
  68.      * @since 3.1
  69.      */
  70.     KDECORE_EXPORT unsigned int versionRelease();
  71.     /**
  72.      * Returns the KDE version as string, e.g. "3.1.2".
  73.      * @return the KDE version. You can keep the string forever
  74.      * @since 3.1
  75.      */
  76.     KDECORE_EXPORT const char *versionString();
  77. }
  78.  
  79. #endif // _KDE_VERSION_H_
  80.