File indexing completed on 2024-03-03 15:13:02

0001 /*
0002     SPDX-FileCopyrightText: 2008 Carlo Segato <brandon.ml@gmail.com>
0003 
0004     SPDX-License-Identifier: LGPL-2.1-or-later
0005 */
0006 
0007 #ifndef _KKEYSERVER_WIN_H
0008 #define _KKEYSERVER_WIN_H
0009 
0010 #include <QtGlobal>
0011 #include <kwindowsystem_export.h>
0012 
0013 namespace KKeyServer
0014 {
0015 /**
0016  * Extracts the modifiers from the given Qt key and
0017  * converts them in a mask of Windows modifiers.
0018  * @param keyQt the qt key code
0019  * @param mod if successful, the modifiers will be written here
0020  * @return true if successful, false otherwise
0021  */
0022 KWINDOWSYSTEM_EXPORT bool keyQtToModWin(int keyQt, uint *mod);
0023 
0024 KWINDOWSYSTEM_EXPORT bool modWinToKeyQt(uint mod, int *keyQt);
0025 
0026 /**
0027  * Extracts the symbol from the given Qt key and
0028  * converts it to a Windows symbol.
0029  * @param keyQt the qt key code
0030  * @param sym if successful, the symbol will be written here
0031  * @return true if successful, false otherwise
0032  */
0033 KWINDOWSYSTEM_EXPORT bool keyQtToCodeWin(int keyQt, uint *sym);
0034 
0035 KWINDOWSYSTEM_EXPORT bool codeWinToKeyQt(uint sym, int *keyQt);
0036 }
0037 
0038 #endif