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
|
|
|
|
2022-04-22 09:27:33 +00:00
|
|
|
#include "kwin_export.h"
|
2015-03-25 12:31:38 +00:00
|
|
|
|
2021-02-12 23:53:06 +00:00
|
|
|
#include <QObject>
|
2022-08-01 21:29:02 +00:00
|
|
|
#include <memory>
|
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.
|
|
|
|
*/
|
2022-04-22 09:27:33 +00:00
|
|
|
class KWIN_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;
|
|
|
|
|
2022-07-21 22:04:53 +00:00
|
|
|
void sendDown(qint32 id, quint32 serial, const QPointF &localPos, SurfaceInterface *surface);
|
2021-02-12 23:53:06 +00:00
|
|
|
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);
|
2022-08-01 21:29:02 +00:00
|
|
|
std::unique_ptr<TouchInterfacePrivate> d;
|
2021-02-12 23:53:06 +00:00
|
|
|
|
2023-02-09 11:54:56 +00:00
|
|
|
friend class SeatInterfacePrivate;
|
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
|