KWin
Loading...
Searching...
No Matches
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
8#include "utils/xcbutils.h"
10
11namespace KWin
12{
13
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
27 .name = QStringLiteral("Placeholder-0"),
28 });
29
31 .modes = {mode},
32 .currentMode = mode,
33 });
34}
35
37{
38 return m_backend->renderLoop();
39}
40
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"
void setInformation(const Information &information)
Definition output.cpp:556
void setState(const State &state)
Definition output.cpp:562
State m_state
Definition output.h:477
QSize pixelSize() const
Definition output.cpp:485
X11PlaceholderOutput(X11StandaloneBackend *backend, QObject *parent=nullptr)
QList< std::shared_ptr< OutputMode > > modes
Definition output.h:453