File indexing completed on 2024-05-19 16:35:32

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_interface.h"
0010 
0011 #include "qwayland-server-wayland.h"
0012 
0013 namespace KWaylandServer
0014 {
0015 class ClientConnection;
0016 
0017 class TouchInterfacePrivate : public QtWaylandServer::wl_touch
0018 {
0019 public:
0020     static TouchInterfacePrivate *get(TouchInterface *touch);
0021     TouchInterfacePrivate(TouchInterface *q, SeatInterface *seat);
0022 
0023     QList<Resource *> touchesForClient(ClientConnection *client) const;
0024     bool hasTouchesForClient(ClientConnection *client) const;
0025 
0026     TouchInterface *q;
0027     QPointer<SurfaceInterface> focusedSurface;
0028     SeatInterface *seat;
0029 
0030 protected:
0031     void touch_release(Resource *resource) override;
0032 };
0033 
0034 } // namespace KWaylandServer