2020-08-02 22:22:19 +00:00
|
|
|
/*
|
|
|
|
KWin - the KDE window manager
|
|
|
|
This file is part of the KDE project.
|
2016-12-27 19:16:50 +00:00
|
|
|
|
2020-08-02 22:22:19 +00:00
|
|
|
SPDX-FileCopyrightText: 2016 Martin Gräßlin <mgraesslin@kde.org>
|
2016-12-27 19:16:50 +00:00
|
|
|
|
2020-08-02 22:22:19 +00:00
|
|
|
SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
*/
|
2016-12-27 19:16:50 +00:00
|
|
|
#include "input_event_spy.h"
|
|
|
|
#include "input.h"
|
|
|
|
|
2016-12-30 18:32:47 +00:00
|
|
|
#include <QPointF>
|
|
|
|
#include <QSizeF>
|
|
|
|
|
2016-12-27 19:16:50 +00:00
|
|
|
namespace KWin
|
|
|
|
{
|
|
|
|
|
|
|
|
InputEventSpy::InputEventSpy() = default;
|
|
|
|
|
|
|
|
InputEventSpy::~InputEventSpy()
|
|
|
|
{
|
|
|
|
if (input()) {
|
|
|
|
input()->uninstallInputEventSpy(this);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void InputEventSpy::pointerEvent(MouseEvent *event)
|
|
|
|
{
|
|
|
|
Q_UNUSED(event)
|
|
|
|
}
|
|
|
|
|
|
|
|
void InputEventSpy::wheelEvent(WheelEvent *event)
|
|
|
|
{
|
|
|
|
Q_UNUSED(event)
|
|
|
|
}
|
|
|
|
|
|
|
|
void InputEventSpy::keyEvent(KeyEvent *event)
|
|
|
|
{
|
|
|
|
Q_UNUSED(event)
|
|
|
|
}
|
|
|
|
|
2019-08-11 19:57:45 +00:00
|
|
|
void InputEventSpy::touchDown(qint32 id, const QPointF &point, quint32 time)
|
2016-12-27 19:16:50 +00:00
|
|
|
{
|
|
|
|
Q_UNUSED(id)
|
|
|
|
Q_UNUSED(point)
|
|
|
|
Q_UNUSED(time)
|
|
|
|
}
|
|
|
|
|
2019-08-11 19:57:45 +00:00
|
|
|
void InputEventSpy::touchMotion(qint32 id, const QPointF &point, quint32 time)
|
2016-12-27 19:16:50 +00:00
|
|
|
{
|
|
|
|
Q_UNUSED(id)
|
|
|
|
Q_UNUSED(point)
|
|
|
|
Q_UNUSED(time)
|
|
|
|
}
|
|
|
|
|
2019-08-11 19:57:45 +00:00
|
|
|
void InputEventSpy::touchUp(qint32 id, quint32 time)
|
2016-12-27 19:16:50 +00:00
|
|
|
{
|
|
|
|
Q_UNUSED(id)
|
|
|
|
Q_UNUSED(time)
|
|
|
|
}
|
|
|
|
|
|
|
|
void InputEventSpy::pinchGestureBegin(int fingerCount, quint32 time)
|
|
|
|
{
|
|
|
|
Q_UNUSED(fingerCount)
|
|
|
|
Q_UNUSED(time)
|
|
|
|
}
|
|
|
|
|
|
|
|
void InputEventSpy::pinchGestureUpdate(qreal scale, qreal angleDelta, const QSizeF &delta, quint32 time)
|
|
|
|
{
|
|
|
|
Q_UNUSED(scale)
|
|
|
|
Q_UNUSED(angleDelta)
|
|
|
|
Q_UNUSED(delta)
|
|
|
|
Q_UNUSED(time)
|
|
|
|
}
|
|
|
|
|
|
|
|
void InputEventSpy::pinchGestureEnd(quint32 time)
|
|
|
|
{
|
|
|
|
Q_UNUSED(time)
|
|
|
|
}
|
|
|
|
|
|
|
|
void InputEventSpy::pinchGestureCancelled(quint32 time)
|
|
|
|
{
|
|
|
|
Q_UNUSED(time)
|
|
|
|
}
|
|
|
|
|
|
|
|
void InputEventSpy::swipeGestureBegin(int fingerCount, quint32 time)
|
|
|
|
{
|
|
|
|
Q_UNUSED(fingerCount)
|
|
|
|
Q_UNUSED(time)
|
|
|
|
}
|
|
|
|
|
|
|
|
void InputEventSpy::swipeGestureUpdate(const QSizeF &delta, quint32 time)
|
|
|
|
{
|
|
|
|
Q_UNUSED(delta)
|
|
|
|
Q_UNUSED(time)
|
|
|
|
}
|
|
|
|
|
|
|
|
void InputEventSpy::swipeGestureEnd(quint32 time)
|
|
|
|
{
|
|
|
|
Q_UNUSED(time)
|
|
|
|
}
|
|
|
|
|
|
|
|
void InputEventSpy::swipeGestureCancelled(quint32 time)
|
|
|
|
{
|
|
|
|
Q_UNUSED(time)
|
|
|
|
}
|
|
|
|
|
2021-08-05 08:31:08 +00:00
|
|
|
void InputEventSpy::holdGestureBegin(int fingerCount, quint32 time)
|
|
|
|
{
|
|
|
|
Q_UNUSED(fingerCount)
|
|
|
|
Q_UNUSED(time)
|
|
|
|
}
|
|
|
|
|
|
|
|
void InputEventSpy::holdGestureEnd(quint32 time)
|
|
|
|
{
|
|
|
|
Q_UNUSED(time)
|
|
|
|
}
|
|
|
|
|
|
|
|
void InputEventSpy::holdGestureCancelled(quint32 time)
|
|
|
|
{
|
|
|
|
Q_UNUSED(time)
|
|
|
|
}
|
|
|
|
|
2017-12-27 19:25:36 +00:00
|
|
|
void InputEventSpy::switchEvent(SwitchEvent *event)
|
|
|
|
{
|
|
|
|
Q_UNUSED(event)
|
|
|
|
}
|
|
|
|
|
2020-03-17 14:21:35 +00:00
|
|
|
void InputEventSpy::tabletToolEvent(TabletEvent *event)
|
2019-12-01 17:51:15 +00:00
|
|
|
{
|
|
|
|
Q_UNUSED(event)
|
|
|
|
}
|
|
|
|
|
2020-11-20 01:28:05 +00:00
|
|
|
void InputEventSpy::tabletToolButtonEvent(uint button, bool pressed, const TabletToolId &tabletToolId)
|
2019-12-01 17:51:15 +00:00
|
|
|
{
|
2020-11-20 01:28:05 +00:00
|
|
|
Q_UNUSED(button)
|
|
|
|
Q_UNUSED(pressed)
|
|
|
|
Q_UNUSED(tabletToolId)
|
2019-12-01 17:51:15 +00:00
|
|
|
}
|
|
|
|
|
2020-12-22 16:34:10 +00:00
|
|
|
void InputEventSpy::tabletPadButtonEvent(uint button, bool pressed, const TabletPadId &tabletPadId)
|
2019-12-01 17:51:15 +00:00
|
|
|
{
|
2020-11-20 01:28:05 +00:00
|
|
|
Q_UNUSED(button)
|
|
|
|
Q_UNUSED(pressed)
|
2020-12-22 16:34:10 +00:00
|
|
|
Q_UNUSED(tabletPadId)
|
2019-12-01 17:51:15 +00:00
|
|
|
}
|
|
|
|
|
2020-12-22 16:34:10 +00:00
|
|
|
void InputEventSpy::tabletPadStripEvent(int number, int position, bool isFinger, const TabletPadId &tabletPadId)
|
2019-12-01 17:51:15 +00:00
|
|
|
{
|
|
|
|
Q_UNUSED(number)
|
|
|
|
Q_UNUSED(position)
|
|
|
|
Q_UNUSED(isFinger)
|
2020-12-22 16:34:10 +00:00
|
|
|
Q_UNUSED(tabletPadId)
|
2019-12-01 17:51:15 +00:00
|
|
|
}
|
|
|
|
|
2020-12-22 16:34:10 +00:00
|
|
|
void InputEventSpy::tabletPadRingEvent(int number, int position, bool isFinger, const TabletPadId &tabletPadId)
|
2019-12-01 17:51:15 +00:00
|
|
|
{
|
|
|
|
Q_UNUSED(number)
|
|
|
|
Q_UNUSED(position)
|
|
|
|
Q_UNUSED(isFinger)
|
2020-12-22 16:34:10 +00:00
|
|
|
Q_UNUSED(tabletPadId)
|
2019-12-01 17:51:15 +00:00
|
|
|
}
|
2016-12-27 19:16:50 +00:00
|
|
|
}
|