Changeset View
Changeset View
Standalone View
Standalone View
input.h
1 | /******************************************************************** | 1 | /******************************************************************** | ||
---|---|---|---|---|---|
2 | KWin - the KDE window manager | 2 | KWin - the KDE window manager | ||
3 | This file is part of the KDE project. | 3 | This file is part of the KDE project. | ||
4 | 4 | | |||
5 | Copyright (C) 2013 Martin Gräßlin <mgraesslin@kde.org> | 5 | Copyright (C) 2013 Martin Gräßlin <mgraesslin@kde.org> | ||
6 | Copyright (C) 2018 Roman Gilg <subdiff@gmail.com> | 6 | Copyright (C) 2018 Roman Gilg <subdiff@gmail.com> | ||
7 | Copyright (C) 2019 Vlad Zagorodniy <vladzzag@gmail.com> | ||||
7 | 8 | | |||
8 | This program is free software; you can redistribute it and/or modify | 9 | This program is free software; you can redistribute it and/or modify | ||
9 | it under the terms of the GNU General Public License as published by | 10 | it under the terms of the GNU General Public License as published by | ||
10 | the Free Software Foundation; either version 2 of the License, or | 11 | the Free Software Foundation; either version 2 of the License, or | ||
11 | (at your option) any later version. | 12 | (at your option) any later version. | ||
12 | 13 | | |||
13 | This program is distributed in the hope that it will be useful, | 14 | This program is distributed in the hope that it will be useful, | ||
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
▲ Show 20 Lines • Show All 59 Lines • ▼ Show 20 Line(s) | 74 | public: | |||
74 | enum PointerButtonState { | 75 | enum PointerButtonState { | ||
75 | PointerButtonReleased, | 76 | PointerButtonReleased, | ||
76 | PointerButtonPressed | 77 | PointerButtonPressed | ||
77 | }; | 78 | }; | ||
78 | enum PointerAxis { | 79 | enum PointerAxis { | ||
79 | PointerAxisVertical, | 80 | PointerAxisVertical, | ||
80 | PointerAxisHorizontal | 81 | PointerAxisHorizontal | ||
81 | }; | 82 | }; | ||
83 | enum PointerAxisSource { | ||||
84 | PointerAxisSourceUnknown, | ||||
85 | PointerAxisSourceWheel, | ||||
86 | PointerAxisSourceFinger, | ||||
87 | PointerAxisSourceContinuous, | ||||
88 | PointerAxisSourceWheelTilt | ||||
89 | }; | ||||
82 | enum KeyboardKeyState { | 90 | enum KeyboardKeyState { | ||
83 | KeyboardKeyReleased, | 91 | KeyboardKeyReleased, | ||
84 | KeyboardKeyPressed, | 92 | KeyboardKeyPressed, | ||
85 | KeyboardKeyAutoRepeat | 93 | KeyboardKeyAutoRepeat | ||
86 | }; | 94 | }; | ||
87 | virtual ~InputRedirection(); | 95 | virtual ~InputRedirection(); | ||
88 | void init(); | 96 | void init(); | ||
89 | 97 | | |||
Show All 27 Lines | |||||
117 | void processPointerMotion(const QPointF &pos, uint32_t time); | 125 | void processPointerMotion(const QPointF &pos, uint32_t time); | ||
118 | /** | 126 | /** | ||
119 | * @internal | 127 | * @internal | ||
120 | **/ | 128 | **/ | ||
121 | void processPointerButton(uint32_t button, PointerButtonState state, uint32_t time); | 129 | void processPointerButton(uint32_t button, PointerButtonState state, uint32_t time); | ||
122 | /** | 130 | /** | ||
123 | * @internal | 131 | * @internal | ||
124 | **/ | 132 | **/ | ||
125 | void processPointerAxis(PointerAxis axis, qreal delta, uint32_t time); | 133 | void processPointerAxis(PointerAxis axis, qreal delta, qint32 discreteDelta, PointerAxisSource source, uint32_t time); | ||
126 | /** | 134 | /** | ||
127 | * @internal | 135 | * @internal | ||
128 | **/ | 136 | **/ | ||
129 | void processKeyboardKey(uint32_t key, KeyboardKeyState state, uint32_t time); | 137 | void processKeyboardKey(uint32_t key, KeyboardKeyState state, uint32_t time); | ||
130 | /** | 138 | /** | ||
131 | * @internal | 139 | * @internal | ||
132 | **/ | 140 | **/ | ||
133 | void processKeyboardModifiers(uint32_t modsDepressed, uint32_t modsLatched, uint32_t modsLocked, uint32_t group); | 141 | void processKeyboardModifiers(uint32_t modsDepressed, uint32_t modsLatched, uint32_t modsLocked, uint32_t group); | ||
▲ Show 20 Lines • Show All 340 Lines • ▼ Show 20 Line(s) | 480 | void InputRedirection::registerShortcut(const QKeySequence &shortcut, QAction *action, T *receiver, Slot slot) { | |||
474 | connect(action, &QAction::triggered, receiver, slot); | 482 | connect(action, &QAction::triggered, receiver, slot); | ||
475 | } | 483 | } | ||
476 | 484 | | |||
477 | } // namespace KWin | 485 | } // namespace KWin | ||
478 | 486 | | |||
479 | Q_DECLARE_METATYPE(KWin::InputRedirection::KeyboardKeyState) | 487 | Q_DECLARE_METATYPE(KWin::InputRedirection::KeyboardKeyState) | ||
480 | Q_DECLARE_METATYPE(KWin::InputRedirection::PointerButtonState) | 488 | Q_DECLARE_METATYPE(KWin::InputRedirection::PointerButtonState) | ||
481 | Q_DECLARE_METATYPE(KWin::InputRedirection::PointerAxis) | 489 | Q_DECLARE_METATYPE(KWin::InputRedirection::PointerAxis) | ||
490 | Q_DECLARE_METATYPE(KWin::InputRedirection::PointerAxisSource) | ||||
482 | 491 | | |||
483 | #endif // KWIN_INPUT_H | 492 | #endif // KWIN_INPUT_H |