2020-03-15 15:19:28 +00:00
|
|
|
/*
|
|
|
|
SPDX-FileCopyrightText: 2015 Martin Gräßlin <mgraesslin@kde.org>
|
2021-02-12 23:53:06 +00:00
|
|
|
SPDX-FileCopyrightText: 2020 Adrien Faveraux <ad1rie3@hotmail.fr>
|
|
|
|
SPDX-FileCopyrightText: 2021 Vlad Zahorodnii <vlad.zahorodnii@kde.org>
|
2020-03-15 15:19:28 +00:00
|
|
|
|
|
|
|
SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
|
|
|
|
*/
|
2021-02-12 23:53:06 +00:00
|
|
|
#pragma once
|
2015-03-25 12:31:38 +00:00
|
|
|
|
2020-04-29 14:56:38 +00:00
|
|
|
#include <KWaylandServer/kwaylandserver_export.h>
|
2015-03-25 12:31:38 +00:00
|
|
|
|
2021-02-12 23:53:06 +00:00
|
|
|
#include <QObject>
|
2015-03-25 12:31:38 +00:00
|
|
|
|
2020-04-29 14:56:38 +00:00
|
|
|
namespace KWaylandServer
|
2015-03-25 12:31:38 +00:00
|
|
|
{
|
|
|
|
|
|
|
|
class SeatInterface;
|
2021-02-12 23:53:06 +00:00
|
|
|
class SurfaceInterface;
|
|
|
|
class TouchInterfacePrivate;
|
2015-03-25 12:31:38 +00:00
|
|
|
|
2015-09-09 11:49:58 +00:00
|
|
|
/**
|
2021-02-12 23:53:06 +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
|
2015-03-25 12:31:38 +00:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
2021-02-12 23:53:06 +00:00
|
|
|
|
2015-03-25 12:31:38 +00:00
|
|
|
public:
|
2021-02-12 23:53:06 +00:00
|
|
|
~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);
|
2015-03-25 12:31:38 +00:00
|
|
|
|
|
|
|
private:
|
2021-02-12 23:53:06 +00:00
|
|
|
explicit TouchInterface(SeatInterface *seat);
|
|
|
|
QScopedPointer<TouchInterfacePrivate> d;
|
|
|
|
|
2015-03-25 12:31:38 +00:00
|
|
|
friend class SeatInterface;
|
2021-02-12 23:53:06 +00:00
|
|
|
friend class TouchInterfacePrivate;
|
2015-03-25 12:31:38 +00:00
|
|
|
};
|
|
|
|
|
2021-02-12 23:53:06 +00:00
|
|
|
} // namespace KWaylandServer
|