kwin/plugins/screencast/screencastmanager.h
Vlad Zahorodnii c766e5da6d Introduce infrastructure for compositor extensions
The scripting api is not suitable for implementing all features that
should not be implemented in libkwin. For example, the krunner
integration or screencasting are the things that don't belong to be
compiled right into kwin and yet we don't have any other choice.

This change introduces a quick and dirty plugin infrastructure that
can be used to implement things such as colord integration, krunner
integration, etc.
2020-11-24 15:50:33 +00:00

38 lines
1,015 B
C++

/*
SPDX-FileCopyrightText: 2018-2020 Red Hat Inc
SPDX-FileCopyrightText: 2020 Aleix Pol Gonzalez <aleixpol@kde.org>
SPDX-FileContributor: Jan Grulich <jgrulich@redhat.com>
SPDX-License-Identifier: LGPL-2.0-or-later
*/
#pragma once
#include "plugin.h"
#include <KWaylandServer/screencast_v1_interface.h>
namespace KWin
{
class PipeWireStream;
class ScreencastManager : public Plugin
{
Q_OBJECT
public:
explicit ScreencastManager(QObject *parent = nullptr);
void streamWindow(KWaylandServer::ScreencastStreamV1Interface *stream, const QString &winid);
void streamOutput(KWaylandServer::ScreencastStreamV1Interface *stream,
KWaylandServer::OutputInterface *output,
KWaylandServer::ScreencastV1Interface::CursorMode mode);
private:
void integrateStreams(KWaylandServer::ScreencastStreamV1Interface *waylandStream, PipeWireStream *pipewireStream);
KWaylandServer::ScreencastV1Interface *m_screencast;
};
} // namespace KWin