File indexing completed on 2024-04-28 11:36:08

0001 /* This file is part of the KDE libraries
0002    Copyright (C) 2007 Christian Ehrlicher <ch.ehrlicher@gmx.de>
0003 
0004    This library is free software; you can redistribute it and/or
0005    modify it under the terms of the GNU Library General Public
0006    License version 2 as published by the Free Software Foundation.
0007 
0008    This library is distributed in the hope that it will be useful,
0009    but WITHOUT ANY WARRANTY; without even the implied warranty of
0010    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0011    Library General Public License for more details.
0012 
0013    You should have received a copy of the GNU Library General Public License
0014    along with this library; see the file COPYING.LIB.  If not, write to
0015    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
0016    Boston, MA 02110-1301, USA.
0017 */
0018 
0019 #ifndef KKERNEL_WIN_H
0020 #define KKERNEL_WIN_H
0021 
0022 #include <QString>
0023 
0024 #ifdef Q_OS_WIN
0025 
0026 #include <windows.h>
0027 #include <kdelibs4support_export.h>
0028 
0029 /**
0030  * @short Windows-specific functions needed in kdecore
0031  * @author Christian Ehrlicher <ch.ehrlicher@gmx.de>
0032  *
0033  * This file provides some Windows-specific functions which
0034  * Qt do not provide access to.
0035 */
0036 
0037 /**
0038  \return a value from MS Windows native registry for shell folder \a folder.
0039 */
0040 KDELIBS4SUPPORT_DEPRECATED_EXPORT QString getWin32ShellFoldersPath(const QString &folder);
0041 
0042 /**
0043  Shows native MS Windows file property dialog for a file \a fileName.
0044  Return true on success. Only works for local absolute paths.
0045  Used by KPropertiesDialog, if possible.
0046 */
0047 KDELIBS4SUPPORT_DEPRECATED_EXPORT bool showWin32FilePropertyDialog(const QString &fileName);
0048 
0049 /**
0050  \return two-letter locale name (like "en" or "pl") taken from MS Windows native registry.
0051  Useful when we don't want to rely on KSyCoCa.
0052  Used e.g. by kbuildsycoca application.
0053 */
0054 KDELIBS4SUPPORT_DEPRECATED_EXPORT QByteArray getWin32LocaleName();
0055 
0056 /**
0057  \return true when the file is an executable on windows.
0058 */
0059 KDELIBS4SUPPORT_DEPRECATED_EXPORT bool isExecutable(const QString &filename);
0060 
0061 /**
0062  \return a value from MS Windows native registry.
0063 */
0064 QString getWin32RegistryValue(HKEY key, const QString &subKey, const QString &item, bool *ok = 0);
0065 
0066 #endif  // Q_OS_WIN
0067 #endif  // KKERNEL_WIN_H