Changeset View
Changeset View
Standalone View
Standalone View
kcms/input/backends/x11/x11mousebackend.h
Show All 29 Lines | |||||
30 | public: | 30 | public: | ||
31 | X11MouseBackend(QObject *parent = nullptr); | 31 | X11MouseBackend(QObject *parent = nullptr); | ||
32 | ~X11MouseBackend(); | 32 | ~X11MouseBackend(); | ||
33 | 33 | | |||
34 | bool isValid() const override { return m_dpy != nullptr; } | 34 | bool isValid() const override { return m_dpy != nullptr; } | ||
35 | 35 | | |||
36 | void load() override; | 36 | void load() override; | ||
37 | bool supportScrollPolarity() override; | 37 | bool supportScrollPolarity() override; | ||
38 | QStringList supportedAccelerationProfiles() override; | ||||
39 | QString accelerationProfile() override; | ||||
38 | double accelRate() override; | 40 | double accelRate() override; | ||
39 | MouseHanded handed() override; | 41 | MouseHanded handed() override; | ||
40 | int threshold() override; | 42 | int threshold() override; | ||
41 | void apply(const MouseSettings & settings, bool force) override; | 43 | void apply(const MouseSettings & settings, bool force) override; | ||
42 | 44 | | |||
43 | QString currentCursorTheme() override; | 45 | QString currentCursorTheme() override; | ||
44 | void applyCursorTheme(const QString &name, int size) override; | 46 | void applyCursorTheme(const QString &name, int size) override; | ||
45 | 47 | | |||
46 | private: | 48 | private: | ||
47 | void initAtom(); | 49 | void initAtom(); | ||
48 | bool evdevApplyReverseScroll(int deviceid, bool reverse); | 50 | bool evdevApplyReverseScroll(int deviceid, bool reverse); | ||
51 | bool libinputApplyReverseScroll(int deviceid, bool reverse); | ||||
52 | void libinputApplyAccelerationProfile(int deviceid, QString profile); | ||||
53 | | ||||
54 | Atom m_libinputAccelProfileAvailableAtom; | ||||
55 | Atom m_libinputAccelProfileEnabledAtom; | ||||
56 | Atom m_libinputNaturalScrollAtom; | ||||
57 | | ||||
49 | Atom m_evdevWheelEmulationAtom; | 58 | Atom m_evdevWheelEmulationAtom; | ||
50 | Atom m_evdevScrollDistanceAtom; | 59 | Atom m_evdevScrollDistanceAtom; | ||
51 | Atom m_evdevWheelEmulationAxesAtom; | 60 | Atom m_evdevWheelEmulationAxesAtom; | ||
61 | | ||||
62 | Atom m_touchpadAtom; | ||||
52 | // We may still need to do something on non-X11 platform due to Xwayland. | 63 | // We may still need to do something on non-X11 platform due to Xwayland. | ||
53 | Display* m_dpy; | 64 | Display* m_dpy; | ||
54 | bool m_platformX11; | 65 | bool m_platformX11; | ||
55 | int m_numButtons = 1; | 66 | int m_numButtons = 1; | ||
56 | MouseHanded m_handed = MouseHanded::NotSupported; | 67 | MouseHanded m_handed = MouseHanded::NotSupported; | ||
57 | double m_accelRate = 1.0; | 68 | double m_accelRate = 1.0; | ||
58 | int m_threshold = 0; | 69 | int m_threshold = 0; | ||
59 | int m_middleButton = -1; | 70 | int m_middleButton = -1; | ||
71 | QStringList m_supportedAccelerationProfiles; | ||||
72 | QString m_accelerationProfile; | ||||
60 | }; | 73 | }; | ||
61 | 74 | | |||
62 | #endif // XLIBMOUSEBACKEND_H | 75 | #endif // XLIBMOUSEBACKEND_H |