File indexing completed on 2024-05-19 05:32:46

0001 /*
0002     SPDX-FileCopyrightText: 2021 Vlad Zahorodnii <vlad.zahorodnii@kde.org>
0003 
0004     SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
0005 */
0006 
0007 #pragma once
0008 
0009 #include "touch.h"
0010 
0011 #include "qwayland-server-wayland.h"
0012 
0013 #include <QPointer>
0014 
0015 namespace KWin
0016 {
0017 class ClientConnection;
0018 
0019 class TouchInterfacePrivate : public QtWaylandServer::wl_touch
0020 {
0021 public:
0022     static TouchInterfacePrivate *get(TouchInterface *touch);
0023     TouchInterfacePrivate(TouchInterface *q, SeatInterface *seat);
0024 
0025     QList<Resource *> touchesForClient(ClientConnection *client) const;
0026     bool hasTouchesForClient(ClientConnection *client) const;
0027 
0028     TouchInterface *q;
0029     QPointer<SurfaceInterface> focusedSurface;
0030     SeatInterface *seat;
0031 
0032 protected:
0033     void touch_release(Resource *resource) override;
0034 };
0035 
0036 } // namespace KWin