Plasma-workspace

screencasting.h
1/*
2 SPDX-FileCopyrightText: 2020 Aleix Pol Gonzalez <aleixpol@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
5*/
6
7#pragma once
8
9#include <QObject>
10#include <memory>
11
12class ScreencastingPrivate;
13class ScreencastingStreamPrivate;
14class ScreencastingStream : public QObject
15{
17public:
18 ScreencastingStream(QObject *parent);
19 ~ScreencastingStream() override;
20
21 quint32 nodeId() const;
22
24 void created(quint32 nodeid);
25 void failed(const QString &error);
26 void closed();
27
28private:
29 friend class Screencasting;
30 std::unique_ptr<ScreencastingStreamPrivate> d;
31};
32
33class Screencasting : public QObject
34{
36public:
37 explicit Screencasting(QObject *parent = nullptr);
38 ~Screencasting() override;
39
40 enum CursorMode {
41 Hidden = 1,
42 Embedded = 2,
43 Metadata = 4,
44 };
45 Q_ENUM(CursorMode)
46
47 ScreencastingStream *createOutputStream(const QString &outputName, CursorMode mode);
48 ScreencastingStream *createWindowStream(const QString &uuid, CursorMode mode);
49
50 void destroy();
51
53 void initialized();
54 void removed();
55 void sourcesChanged();
56
57private:
58 std::unique_ptr<ScreencastingPrivate> d;
59};
Q_ENUM(...)
Q_OBJECTQ_OBJECT
Q_SIGNALSQ_SIGNALS
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:17:42 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.