KWin
Loading...
Searching...
No Matches
src
placeholderoutput.cpp
Go to the documentation of this file.
1
/*
2
SPDX-FileCopyrightText: 2022 Vlad Zahorodnii <vlad.zahorodnii@kde.org>
3
4
SPDX-License-Identifier: GPL-2.0-or-later
5
*/
6
7
#include "
placeholderoutput.h
"
8
9
namespace
KWin
10
{
11
12
PlaceholderOutput::PlaceholderOutput
(
const
QSize &size, qreal scale)
13
{
14
auto
mode = std::make_shared<OutputMode>(size, 60000);
15
16
m_renderLoop = std::make_unique<RenderLoop>(
this
);
17
m_renderLoop->setRefreshRate(mode->refreshRate());
18
m_renderLoop->inhibit();
19
20
setState
(
State
{
21
.
scale
=
scale
,
22
.modes = {mode},
23
.currentMode = mode,
24
.enabled =
true
,
25
});
26
27
setInformation
(
Information
{
28
.
name
= QStringLiteral(
"Placeholder-1"
),
29
.placeholder =
true
,
30
});
31
}
32
33
PlaceholderOutput::~PlaceholderOutput
()
34
{
35
}
36
37
RenderLoop
*
PlaceholderOutput::renderLoop
()
const
38
{
39
return
m_renderLoop.get();
40
}
41
42
}
// namespace KWin
43
44
#include "moc_placeholderoutput.cpp"
KWin::Output::scale
qreal scale() const
Definition
output.cpp:455
KWin::Output::setInformation
void setInformation(const Information &information)
Definition
output.cpp:556
KWin::Output::setState
void setState(const State &state)
Definition
output.cpp:562
KWin::PlaceholderOutput::PlaceholderOutput
PlaceholderOutput(const QSize &size, qreal scale=1)
Definition
placeholderoutput.cpp:12
KWin::PlaceholderOutput::~PlaceholderOutput
~PlaceholderOutput() override
Definition
placeholderoutput.cpp:33
KWin::PlaceholderOutput::renderLoop
RenderLoop * renderLoop() const override
Definition
placeholderoutput.cpp:37
KWin::RenderLoop
Definition
renderloop.h:30
KWin
Definition
activation_test.cpp:20
placeholderoutput.h
KWin::Output::Information
Definition
output.h:427
KWin::Output::Information::name
QString name
Definition
output.h:428
KWin::Output::State
Definition
output.h:448
KWin::Output::State::scale
qreal scale
Definition
output.h:450
Generated on Sat Feb 17 2024 01:42:09 for KWin by
1.10.0