KWin
Loading...
Searching...
No Matches
src
backends
x11
standalone
x11_standalone_placeholderoutput.cpp
Go to the documentation of this file.
1
/*
2
SPDX-FileCopyrightText: 2020 Vlad Zahorodnii <vlad.zahorodnii@kde.org>
3
4
SPDX-License-Identifier: GPL-2.0-or-later
5
*/
6
7
#include "
x11_standalone_placeholderoutput.h
"
8
#include "
utils/xcbutils.h
"
9
#include "
x11_standalone_backend.h
"
10
11
namespace
KWin
12
{
13
14
X11PlaceholderOutput::X11PlaceholderOutput
(
X11StandaloneBackend
*backend, QObject *parent)
15
:
Output
(parent)
16
, m_backend(backend)
17
{
18
QSize
pixelSize
;
19
xcb_screen_t *screen = Xcb::defaultScreen();
20
if
(screen) {
21
pixelSize
= QSize(screen->width_in_pixels, screen->height_in_pixels);
22
}
23
24
auto
mode = std::make_shared<OutputMode>(
pixelSize
, 60000);
25
26
setInformation
(
Information
{
27
.
name
= QStringLiteral(
"Placeholder-0"
),
28
});
29
30
setState
(
State
{
31
.
modes
= {mode},
32
.currentMode = mode,
33
});
34
}
35
36
RenderLoop
*
X11PlaceholderOutput::renderLoop
()
const
37
{
38
return
m_backend->
renderLoop
();
39
}
40
41
void
X11PlaceholderOutput::updateEnabled
(
bool
enabled)
42
{
43
State
next =
m_state
;
44
next.
enabled
= enabled;
45
setState
(next);
46
}
47
48
}
// namespace KWin
49
50
#include "moc_x11_standalone_placeholderoutput.cpp"
KWin::Output
Definition
output.h:132
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::Output::m_state
State m_state
Definition
output.h:477
KWin::Output::pixelSize
QSize pixelSize() const
Definition
output.cpp:485
KWin::RenderLoop
Definition
renderloop.h:30
KWin::X11PlaceholderOutput::X11PlaceholderOutput
X11PlaceholderOutput(X11StandaloneBackend *backend, QObject *parent=nullptr)
Definition
x11_standalone_placeholderoutput.cpp:14
KWin::X11PlaceholderOutput::updateEnabled
void updateEnabled(bool enabled)
Definition
x11_standalone_placeholderoutput.cpp:41
KWin::X11PlaceholderOutput::renderLoop
RenderLoop * renderLoop() const override
Definition
x11_standalone_placeholderoutput.cpp:36
KWin::X11StandaloneBackend
Definition
x11_standalone_backend.h:42
KWin::X11StandaloneBackend::renderLoop
RenderLoop * renderLoop() const
Definition
x11_standalone_backend.cpp:468
KWin
Definition
activation_test.cpp:20
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::modes
QList< std::shared_ptr< OutputMode > > modes
Definition
output.h:453
KWin::Output::State::enabled
bool enabled
Definition
output.h:457
x11_standalone_backend.h
x11_standalone_placeholderoutput.h
xcbutils.h
Generated on Sat Feb 17 2024 01:42:09 for KWin by
1.10.0