File indexing completed on 2025-03-09 05:01:11
0001 /* 0002 KWin - the KDE window manager 0003 This file is part of the KDE project. 0004 0005 SPDX-FileCopyrightText: 2015 Martin Gräßlin <mgraesslin@kde.org> 0006 0007 SPDX-License-Identifier: GPL-2.0-or-later 0008 */ 0009 #pragma once 0010 #include "input.h" 0011 0012 #include <QElapsedTimer> 0013 #include <QObject> 0014 0015 #include <kwin_export.h> 0016 0017 namespace KWin 0018 { 0019 0020 class DrmBackend; 0021 0022 class KWIN_EXPORT DpmsInputEventFilter : public QObject, public InputEventFilter 0023 { 0024 Q_OBJECT 0025 public: 0026 DpmsInputEventFilter(); 0027 ~DpmsInputEventFilter() override; 0028 0029 bool pointerEvent(MouseEvent *event, quint32 nativeButton) override; 0030 bool wheelEvent(WheelEvent *event) override; 0031 bool keyEvent(KeyEvent *event) override; 0032 bool touchDown(qint32 id, const QPointF &pos, std::chrono::microseconds time) override; 0033 bool touchMotion(qint32 id, const QPointF &pos, std::chrono::microseconds time) override; 0034 bool touchUp(qint32 id, std::chrono::microseconds time) override; 0035 0036 private: 0037 void notify(); 0038 QElapsedTimer m_doubleTapTimer; 0039 QList<qint32> m_touchPoints; 0040 bool m_secondTap = false; 0041 bool m_enableDoubleTap; 0042 }; 0043 0044 }