2020-03-15 15:19:28 +00:00
|
|
|
/*
|
|
|
|
SPDX-FileCopyrightText: 2015 Martin Gräßlin <mgraesslin@kde.org>
|
|
|
|
|
|
|
|
SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
|
|
|
|
*/
|
2015-03-25 12:31:38 +00:00
|
|
|
#ifndef WAYLAND_SERVER_TOUCH_INTERFACE_H
|
|
|
|
#define WAYLAND_SERVER_TOUCH_INTERFACE_H
|
|
|
|
|
|
|
|
#include <KWayland/Server/kwaylandserver_export.h>
|
|
|
|
|
|
|
|
#include "resource.h"
|
|
|
|
|
|
|
|
namespace KWayland
|
|
|
|
{
|
|
|
|
namespace Server
|
|
|
|
{
|
|
|
|
|
|
|
|
class SeatInterface;
|
|
|
|
|
2015-09-09 11:49:58 +00:00
|
|
|
/**
|
|
|
|
* @brief Resource for the wl_touch interface.
|
|
|
|
*
|
|
|
|
**/
|
2015-03-25 12:31:38 +00:00
|
|
|
class KWAYLANDSERVER_EXPORT TouchInterface : public Resource
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
virtual ~TouchInterface();
|
|
|
|
|
|
|
|
private:
|
|
|
|
void down(qint32 id, quint32 serial, const QPointF &localPos);
|
|
|
|
void up(qint32 id, quint32 serial);
|
|
|
|
void frame();
|
|
|
|
void cancel();
|
|
|
|
void move(qint32 id, const QPointF &localPos);
|
|
|
|
friend class SeatInterface;
|
|
|
|
explicit TouchInterface(SeatInterface *parent, wl_resource *parentResource);
|
|
|
|
class Private;
|
|
|
|
Private *d_func() const;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Q_DECLARE_METATYPE(KWayland::Server::TouchInterface*)
|
|
|
|
|
|
|
|
#endif
|