Changeset View
Changeset View
Standalone View
Standalone View
libinput/connection.h
Show All 19 Lines | |||||
20 | #ifndef KWIN_LIBINPUT_CONNECTION_H | 20 | #ifndef KWIN_LIBINPUT_CONNECTION_H | ||
21 | #define KWIN_LIBINPUT_CONNECTION_H | 21 | #define KWIN_LIBINPUT_CONNECTION_H | ||
22 | 22 | | |||
23 | #include "../input.h" | 23 | #include "../input.h" | ||
24 | #include "../keyboard_input.h" | 24 | #include "../keyboard_input.h" | ||
25 | #include <kwinglobals.h> | 25 | #include <kwinglobals.h> | ||
26 | 26 | | |||
27 | #include <QObject> | 27 | #include <QObject> | ||
28 | #include <QPointer> | ||||
28 | #include <QSize> | 29 | #include <QSize> | ||
29 | #include <QMutex> | 30 | #include <QMutex> | ||
30 | #include <QVector> | 31 | #include <QVector> | ||
31 | #include <QStringList> | 32 | #include <QStringList> | ||
32 | 33 | | |||
33 | class QSocketNotifier; | 34 | class QSocketNotifier; | ||
34 | class QThread; | 35 | class QThread; | ||
35 | 36 | | |||
▲ Show 20 Lines • Show All 50 Lines • ▼ Show 20 Line(s) | 50 | public: | |||
86 | QVector<Device*> devices() const { | 87 | QVector<Device*> devices() const { | ||
87 | return m_devices; | 88 | return m_devices; | ||
88 | } | 89 | } | ||
89 | 90 | | |||
90 | QStringList devicesSysNames() const; | 91 | QStringList devicesSysNames() const; | ||
91 | 92 | | |||
92 | void updateLEDs(KWin::Xkb::LEDs leds); | 93 | void updateLEDs(KWin::Xkb::LEDs leds); | ||
93 | 94 | | |||
95 | static void createThread(); | ||||
96 | | ||||
94 | Q_SIGNALS: | 97 | Q_SIGNALS: | ||
95 | void keyChanged(quint32 key, KWin::InputRedirection::KeyboardKeyState, quint32 time, KWin::LibInput::Device *device); | 98 | void keyChanged(quint32 key, KWin::InputRedirection::KeyboardKeyState, quint32 time, KWin::LibInput::Device *device); | ||
96 | void pointerButtonChanged(quint32 button, KWin::InputRedirection::PointerButtonState state, quint32 time, KWin::LibInput::Device *device); | 99 | void pointerButtonChanged(quint32 button, KWin::InputRedirection::PointerButtonState state, quint32 time, KWin::LibInput::Device *device); | ||
97 | void pointerMotionAbsolute(QPointF orig, QPointF screen, quint32 time, KWin::LibInput::Device *device); | 100 | void pointerMotionAbsolute(QPointF orig, QPointF screen, quint32 time, KWin::LibInput::Device *device); | ||
98 | void pointerMotion(const QSizeF &delta, const QSizeF &deltaNonAccelerated, quint32 time, quint64 timeMicroseconds, KWin::LibInput::Device *device); | 101 | void pointerMotion(const QSizeF &delta, const QSizeF &deltaNonAccelerated, quint32 time, quint64 timeMicroseconds, KWin::LibInput::Device *device); | ||
99 | void pointerAxisChanged(KWin::InputRedirection::PointerAxis axis, qreal delta, quint32 time, KWin::LibInput::Device *device); | 102 | void pointerAxisChanged(KWin::InputRedirection::PointerAxis axis, qreal delta, quint32 time, KWin::LibInput::Device *device); | ||
100 | void touchFrame(KWin::LibInput::Device *device); | 103 | void touchFrame(KWin::LibInput::Device *device); | ||
101 | void touchCanceled(KWin::LibInput::Device *device); | 104 | void touchCanceled(KWin::LibInput::Device *device); | ||
▲ Show 20 Lines • Show All 42 Lines • ▼ Show 20 Line(s) | 131 | private: | |||
144 | QVector<Event*> m_eventQueue; | 147 | QVector<Event*> m_eventQueue; | ||
145 | bool wasSuspended = false; | 148 | bool wasSuspended = false; | ||
146 | QVector<Device*> m_devices; | 149 | QVector<Device*> m_devices; | ||
147 | KSharedConfigPtr m_config; | 150 | KSharedConfigPtr m_config; | ||
148 | bool m_touchpadsEnabled = true; | 151 | bool m_touchpadsEnabled = true; | ||
149 | Xkb::LEDs m_leds; | 152 | Xkb::LEDs m_leds; | ||
150 | 153 | | |||
151 | KWIN_SINGLETON(Connection) | 154 | KWIN_SINGLETON(Connection) | ||
152 | static QThread *s_thread; | 155 | static QPointer<QThread> s_thread; | ||
153 | }; | 156 | }; | ||
154 | 157 | | |||
155 | } | 158 | } | ||
156 | } | 159 | } | ||
157 | 160 | | |||
158 | #endif | 161 | #endif |