kwin/src/wayland/touch_interface.h

50 lines
1.3 KiB
C
Raw Normal View History

/*
SPDX-FileCopyrightText: 2015 Martin Gräßlin <mgraesslin@kde.org>
SPDX-FileCopyrightText: 2020 Adrien Faveraux <ad1rie3@hotmail.fr>
SPDX-FileCopyrightText: 2021 Vlad Zahorodnii <vlad.zahorodnii@kde.org>
SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
*/
#pragma once
2020-04-29 14:56:38 +00:00
#include <KWaylandServer/kwaylandserver_export.h>
#include <QObject>
2020-04-29 14:56:38 +00:00
namespace KWaylandServer
{
class SeatInterface;
class SurfaceInterface;
class TouchInterfacePrivate;
2015-09-09 11:49:58 +00:00
/**
* The TouchInterface class repserents a touchscreen associated with a wl_seat. It
* corresponds to the Wayland interface @c wl_touch.
*/
class KWAYLANDSERVER_EXPORT TouchInterface : public QObject
{
Q_OBJECT
public:
~TouchInterface() override;
SurfaceInterface *focusedSurface() const;
void setFocusedSurface(SurfaceInterface *surface);
void sendDown(qint32 id, quint32 serial, const QPointF &localPos);
void sendUp(qint32 id, quint32 serial);
void sendFrame();
void sendCancel();
void sendMotion(qint32 id, const QPointF &localPos);
private:
explicit TouchInterface(SeatInterface *seat);
QScopedPointer<TouchInterfacePrivate> d;
friend class SeatInterface;
friend class TouchInterfacePrivate;
};
} // namespace KWaylandServer