| 1 | /* |
| 2 | Copyright (C) 2016-2018 Chih-Hsuan Yen <[email protected]> |
| 3 | |
| 4 | This program is free software; you can redistribute it and/or modify |
| 5 | it under the terms of the GNU General Public License as published by |
| 6 | the Free Software Foundation; either version 2 of the License, or |
| 7 | (at your option) any later version. |
| 8 | |
| 9 | This program 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 |
| 12 | GNU General Public License for more details. |
| 13 | |
| 14 | You should have received a copy of the GNU General Public License along |
| 15 | with this program; if not, write to the Free Software Foundation, Inc., |
| 16 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
| 17 | */ |
| 18 | |
| 19 | #ifndef TOUCHPADDEVICE_H |
| 20 | #define TOUCHPADDEVICE_Hcxx . . $ `lxqt-config-input/touchpaddevice.h:20:9`! |
| 21 | |
| 22 | #include <QList> |
| 23 | #include <QVariant> |
| 24 | |
| 25 | namespace LXQtcxx . . $ LXQt/ { |
| 26 | class Settingscxx . . $ LXQt/Settings#; |
| 27 | } |
| 28 | |
| 29 | enum ScrollingMethodcxx . . $ ScrollingMethod# |
| 30 | { |
| 31 | NONEcxx . . $ NONE. = 0, |
| 32 | TWO_FINGERcxx . . $ TWO_FINGER. = 1, |
| 33 | EDGEcxx . . $ EDGE. = 2, |
| 34 | BUTTONcxx . . $ BUTTON. = 4 |
| 35 | }; |
| 36 | |
| 37 | const char TAPPING_ENABLEDcxx . . $ TAPPING_ENABLED.[] = "tappingEnabled"; |
| 38 | const char NATURAL_SCROLLING_ENABLEDcxx . . $ NATURAL_SCROLLING_ENABLED.[] = "naturalScrollingEnabled"; |
| 39 | const char DISABLE_WHILE_TYPING_ENABLEDcxx . . $ DISABLE_WHILE_TYPING_ENABLED.[] = "disableWhileTypingEnabled"; |
| 40 | const char TAP_TO_DRAG_ENABLEDcxx . . $ TAP_TO_DRAG_ENABLED.[] = "tapToDragEnabled"; |
| 41 | const char DRAG_LOCK_ENABLEDcxx . . $ DRAG_LOCK_ENABLED.[] = "dragLockEnabled"; |
| 42 | const char SCROLLING_METHOD_ENABLEDcxx . . $ SCROLLING_METHOD_ENABLED.[] = "scrollingMethodEnabled"; |
| 43 | const char ACCELERATION_SPEEDcxx . . $ ACCELERATION_SPEED.[] = "accelSpeed"; |
| 44 | |
| 45 | class TouchpadDevicecxx . . $ TouchpadDevice# |
| 46 | { |
| 47 | public: |
| 48 | TouchpadDevicecxx . . $ TouchpadDevice#TouchpadDevice(49f6e7a06ebc5aa8).(): deviceidcxx . . $ TouchpadDevice#deviceid.(0) {} |
| 49 | |
| 50 | static QListcxx . . $ QList#<TouchpadDevicecxx . . $ TouchpadDevice#> enumerate_from_udevcxx . . $ TouchpadDevice#enumerate_from_udev(57a8605656cb840).(); |
| 51 | |
| 52 | const QStringcxx . . $ QString#& namecxx . . $ TouchpadDevice#name(a2fb7a6ce195d51).() const { return m_namecxx . . $ TouchpadDevice#m_name.; } |
| 53 | QStringcxx . . $ QString# escapedNamecxx . . $ TouchpadDevice#escapedName(6ef7b6c27b00b43d).() const; |
| 54 | auto xinputDrivercxx . . $ TouchpadDevice#xinputDriver(6ef7b6c27b00b43d).() const { return m_xinputDrivercxx . . $ TouchpadDevice#m_xinputDriver.; } |
| 55 | auto xinputDriverSupportedcxx . . $ TouchpadDevice#xinputDriverSupported(50ce9a9e25b4a850).() const { return m_xinputDrivercxx . . $ TouchpadDevice#m_xinputDriver. ==cxx . . $ `operator==`(5bc2975d2d751687). QStringLiteralcxx . . $ QtPrivate/("libinput"); } |
| 56 | |
| 57 | int tappingEnabledcxx . . $ TouchpadDevice#tappingEnabled(455f465bc33b4cdf).() const; |
| 58 | int naturalScrollingEnabledcxx . . $ TouchpadDevice#naturalScrollingEnabled(455f465bc33b4cdf).() const; |
| 59 | int disableWhileTypingEnabledcxx . . $ TouchpadDevice#disableWhileTypingEnabled(455f465bc33b4cdf).() const; |
| 60 | int tapToDragEnabledcxx . . $ TouchpadDevice#tapToDragEnabled(455f465bc33b4cdf).() const; |
| 61 | int dragLockEnabledcxx . . $ TouchpadDevice#dragLockEnabled(455f465bc33b4cdf).() const; |
| 62 | float accelSpeedcxx . . $ TouchpadDevice#accelSpeed(5036dfe8d4170af2).() const; |
| 63 | bool setTappingEnabledcxx . . $ TouchpadDevice#setTappingEnabled(962fae8be55e1d9).(bool enabled) const; |
| 64 | bool setNaturalScrollingEnabledcxx . . $ TouchpadDevice#setNaturalScrollingEnabled(962fae8be55e1d9).(bool enabled) const; |
| 65 | bool setDisableWhileTypingEnabledcxx . . $ TouchpadDevice#setDisableWhileTypingEnabled(962fae8be55e1d9).(bool enabled) const; |
| 66 | bool setTapToDragEnabledcxx . . $ TouchpadDevice#setTapToDragEnabled(962fae8be55e1d9).(bool enabled) const; |
| 67 | bool setDragLockEnabledcxx . . $ TouchpadDevice#setDragLockEnabled(962fae8be55e1d9).(bool enabled) const; |
| 68 | bool setAccelSpeedcxx . . $ TouchpadDevice#setAccelSpeed(e90e6f84f2737c0e).(float speed) const; |
| 69 | bool oldTappingEnabledcxx . . $ TouchpadDevice#oldTappingEnabled(50ce9a9e25b4a850).() const { return m_oldTappingEnabledcxx . . $ TouchpadDevice#m_oldTappingEnabled.; } |
| 70 | bool oldNaturalScrollingEnabledcxx . . $ TouchpadDevice#oldNaturalScrollingEnabled(50ce9a9e25b4a850).() const { return m_oldNaturalScrollingEnabledcxx . . $ TouchpadDevice#m_oldNaturalScrollingEnabled.; } |
| 71 | bool oldDisableWhileTypingEnabledcxx . . $ TouchpadDevice#oldDisableWhileTypingEnabled(50ce9a9e25b4a850).() const { return m_oldDisableWhileTypingEnabledcxx . . $ TouchpadDevice#m_oldDisableWhileTypingEnabled.; } |
| 72 | bool oldTapToDragEnabledcxx . . $ TouchpadDevice#oldTapToDragEnabled(50ce9a9e25b4a850).() const { return m_oldTapToDragEnabledcxx . . $ TouchpadDevice#m_oldTapToDragEnabled.; } |
| 73 | bool oldDragLockEnabledcxx . . $ TouchpadDevice#oldDragLockEnabled(50ce9a9e25b4a850).() const { return m_oldDragLockEnabledcxx . . $ TouchpadDevice#m_oldDragLockEnabled.; } |
| 74 | ScrollingMethodcxx . . $ ScrollingMethod# oldScrollingMethodEnabledcxx . . $ TouchpadDevice#oldScrollingMethodEnabled(50c8ae2b28bc471f).() const { return m_oldScrollingMethodEnabledcxx . . $ TouchpadDevice#m_oldScrollingMethodEnabled.; } |
| 75 | float oldAccelSpeedcxx . . $ TouchpadDevice#oldAccelSpeed(5036dfe8d4170af2).() const { return m_oldAccelSpeedcxx . . $ TouchpadDevice#m_oldAccelSpeed.; } |
| 76 | |
| 77 | int scrollMethodsAvailablecxx . . $ TouchpadDevice#scrollMethodsAvailable(455f465bc33b4cdf).() const; |
| 78 | ScrollingMethodcxx . . $ ScrollingMethod# scrollingMethodEnabledcxx . . $ TouchpadDevice#scrollingMethodEnabled(50c8ae2b28bc471f).() const; |
| 79 | bool setScrollingMethodEnabledcxx . . $ TouchpadDevice#setScrollingMethodEnabled(a50caec5ff2ea306).(ScrollingMethodcxx . . $ ScrollingMethod# method) const; |
| 80 | |
| 81 | static void loadSettingscxx . . $ TouchpadDevice#loadSettings(2f91e8a534a8b30b).(LXQtcxx . . $ LXQt/::Settingscxx . . $ LXQt/Settings#* settings); |
| 82 | void saveSettingscxx . . $ TouchpadDevice#saveSettings(1069b7f820f9075b).(LXQtcxx . . $ LXQt/::Settingscxx . . $ LXQt/Settings#* settings) const; |
| 83 | private: |
| 84 | QStringcxx . . $ QString# m_namecxx . . $ TouchpadDevice#m_name.; |
| 85 | QStringcxx . . $ QString# m_xinputDrivercxx . . $ TouchpadDevice#m_xinputDriver.; |
| 86 | QStringcxx . . $ QString# devnodecxx . . $ TouchpadDevice#devnode.; |
| 87 | int deviceidcxx . . $ TouchpadDevice#deviceid.; |
| 88 | |
| 89 | bool m_oldTappingEnabledcxx . . $ TouchpadDevice#m_oldTappingEnabled.; |
| 90 | bool m_oldNaturalScrollingEnabledcxx . . $ TouchpadDevice#m_oldNaturalScrollingEnabled.; |
| 91 | bool m_oldDisableWhileTypingEnabledcxx . . $ TouchpadDevice#m_oldDisableWhileTypingEnabled.; |
| 92 | bool m_oldTapToDragEnabledcxx . . $ TouchpadDevice#m_oldTapToDragEnabled.; |
| 93 | bool m_oldDragLockEnabledcxx . . $ TouchpadDevice#m_oldDragLockEnabled.; |
| 94 | float m_oldAccelSpeedcxx . . $ TouchpadDevice#m_oldAccelSpeed.; |
| 95 | ScrollingMethodcxx . . $ ScrollingMethod# m_oldScrollingMethodEnabledcxx . . $ TouchpadDevice#m_oldScrollingMethodEnabled.; |
| 96 | |
| 97 | QListcxx . . $ QList#<QVariantcxx . . $ QVariant#> get_xi2_propertycxx . . $ TouchpadDevice#get_xi2_property(35234f5305db3ce0).(const char* prop) const; |
| 98 | bool set_xi2_propertycxx . . $ TouchpadDevice#set_xi2_property(c6c6ad358ed83edf).(const char* prop, QListcxx . . $ QList#<QVariantcxx . . $ QVariant#> values) const; |
| 99 | bool find_xi2_devicecxx . . $ TouchpadDevice#find_xi2_device(c9857a73d68e59ba).(); |
| 100 | int featureEnabledcxx . . $ TouchpadDevice#featureEnabled(78f035161ffa9fe2).(const char* prop) const; |
| 101 | }; |
| 102 | |
| 103 | #endif |