Files
kdeconnect-kde-mirror/plugins/shareinputdevices/shareinputdevicesplugin.h
David Redondo 49ba224bcd 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.
2025-12-14 19:32:28 +01:00

32 lines
695 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 ShareInputDevicesPlugin : public KdeConnectPlugin
{
Q_OBJECT
public:
ShareInputDevicesPlugin(QObject *parent, const QVariantList &args);
void receivePacket(const NetworkPacket &np) override;
QString dbusPath() const override;
private:
Qt::Edge configuredEdge() const;
InputCaptureSession *m_inputCaptureSession;
QLine m_activatedBarrier;
};