KWaylandServer

touch_interface.h
1 /*
2  SPDX-FileCopyrightText: 2015 Martin Gräßlin <[email protected]>
3  SPDX-FileCopyrightText: 2020 Adrien Faveraux <[email protected]>
4  SPDX-FileCopyrightText: 2021 Vlad Zahorodnii <[email protected]>
5 
6  SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
7 */
8 #pragma once
9 
10 #include <KWaylandServer/kwaylandserver_export.h>
11 
12 #include <QObject>
13 
14 namespace KWaylandServer
15 {
16 class SeatInterface;
17 class SurfaceInterface;
18 class TouchInterfacePrivate;
19 
20 /**
21  * The TouchInterface class repserents a touchscreen associated with a wl_seat. It
22  * corresponds to the Wayland interface @c wl_touch.
23  */
24 class KWAYLANDSERVER_EXPORT TouchInterface : public QObject
25 {
26  Q_OBJECT
27 
28 public:
29  ~TouchInterface() override;
30 
31  SurfaceInterface *focusedSurface() const;
32  void setFocusedSurface(SurfaceInterface *surface);
33 
34  void sendDown(qint32 id, quint32 serial, const QPointF &localPos);
35  void sendUp(qint32 id, quint32 serial);
36  void sendFrame();
37  void sendCancel();
38  void sendMotion(qint32 id, const QPointF &localPos);
39 
40 private:
41  explicit TouchInterface(SeatInterface *seat);
43 
44  friend class SeatInterface;
45  friend class TouchInterfacePrivate;
46 };
47 
48 } // namespace KWaylandServer
Represents a Seat on the Wayland Display.
The TouchInterface class repserents a touchscreen associated with a wl_seat.
Resource representing a wl_surface.
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Mon Oct 25 2021 23:08:44 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.