kdeconnect-kde/plugins/shareinputdevicesremote/shareinputdevicesremoteplugin.h
David Redondo e58c1a1415 Add shareinptudevices plugin
This plugin provides synergy-like behavior of sharing input devices
between machines by moving the cursor seamlessly between them.
To this end this uses the InputCapture Portal to be notified when
the cursor moves 'out of the screen'. For forwarding input
the existing mousepad infrastructure is used.
On the other side a tiny hidden plugin listens to mouse events to
track when input should pass back to source machine.
2024-07-03 12:08:03 +02:00

32 lines
706 B
C++

/**
* SPDX-FileCopyrightText: 2024 David Redondo <kde@david-redondo.de>
*
* SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
*/
#pragma once
#include <QLine>
#include <QObject>
#include <QPointF>
#include <core/kdeconnectplugin.h>
class InputCaptureSession;
class QScreen;
class ShareInputDevicesRemotePlugin : public KdeConnectPlugin
{
Q_OBJECT
public:
ShareInputDevicesRemotePlugin(QObject *parent, const QVariantList &args);
void receivePacket(const NetworkPacket &np) override;
QString dbusPath() const override;
private:
QScreen *m_enterScreen;
Qt::Edge m_enterEdge;
QPointF m_enterPosition;
QPointF m_currentPosition;
};