KWin
Loading...
Searching...
No Matches
dpmsinputeventfilter.h
Go to the documentation of this file.
1/*
2 KWin - the KDE window manager
3 This file is part of the KDE project.
4
5 SPDX-FileCopyrightText: 2015 Martin Gräßlin <mgraesslin@kde.org>
6
7 SPDX-License-Identifier: GPL-2.0-or-later
8*/
9#pragma once
10#include "input.h"
11
12#include <QElapsedTimer>
13#include <QObject>
14
15#include <kwin_export.h>
16
17namespace KWin
18{
19
20class DrmBackend;
21
22class KWIN_EXPORT DpmsInputEventFilter : public QObject, public InputEventFilter
23{
24 Q_OBJECT
25public:
27 ~DpmsInputEventFilter() override;
28
29 bool pointerEvent(MouseEvent *event, quint32 nativeButton) override;
30 bool wheelEvent(WheelEvent *event) override;
31 bool keyEvent(KeyEvent *event) override;
32 bool touchDown(qint32 id, const QPointF &pos, std::chrono::microseconds time) override;
33 bool touchMotion(qint32 id, const QPointF &pos, std::chrono::microseconds time) override;
34 bool touchUp(qint32 id, std::chrono::microseconds time) override;
35
36private:
37 void notify();
38 QElapsedTimer m_doubleTapTimer;
39 QList<qint32> m_touchPoints;
40 bool m_secondTap = false;
41 bool m_enableDoubleTap;
42};
43
44}