Files
RedBear-OS/local/recipes/kde/kwin/source/tests/fakeoutput.cpp
T
vasilito ff4ff35918 feat: track all source trees in git — full fork offline-first model
Red Bear OS is a full fork. All sources must be available from git clone
with zero network access. Removed gitignore rules that excluded fetched
source trees under recipes/*/source/, local/recipes/kde/*/source/,
local/recipes/qt/*/source/, and vendor source trees.

Build artifacts (target/, build/, source.tar, *.o, *.so) remain excluded.

127291 files added — kernel, relibc, base, bootloader, pkgar, all KDE/Qt
frameworks, mesa, wayland, DRM drivers, and every other recipe source.
2026-05-14 10:55:53 +01:00

95 lines
1.8 KiB
C++

/*
KWin - the KDE window manager
This file is part of the KDE project.
SPDX-FileCopyrightText: 2022 Xaver Hugl <xaver.hugl@gmail.com>
SPDX-License-Identifier: GPL-2.0-or-later
*/
#include "fakeoutput.h"
FakeOutput::FakeOutput()
{
setMode(QSize(1024, 720), 60000);
}
KWin::RenderLoop *FakeOutput::renderLoop() const
{
return nullptr;
}
void FakeOutput::setMode(QSize size, uint32_t refreshRate)
{
auto mode = std::make_shared<KWin::OutputMode>(size, refreshRate);
State state = m_state;
state.modes = {mode};
state.currentMode = mode;
setState(state);
}
void FakeOutput::setTransform(KWin::OutputTransform transform)
{
State state = m_state;
state.transform = transform;
setState(state);
}
void FakeOutput::moveTo(const QPoint &pos)
{
State state = m_state;
state.position = pos;
setState(state);
}
void FakeOutput::setScale(qreal scale)
{
State state = m_state;
state.scale = scale;
setState(state);
}
void FakeOutput::setSubPixel(SubPixel subPixel)
{
setInformation({
.subPixel = subPixel,
});
}
void FakeOutput::setDpmsSupported(bool supported)
{
setInformation({
.capabilities = supported ? Capability::Dpms : Capabilities(),
});
}
void FakeOutput::setPhysicalSize(QSize size)
{
setInformation({
.physicalSize = size,
});
}
void FakeOutput::setName(const QString &name)
{
Information info = m_information;
info.name = name;
setInformation(info);
}
void FakeOutput::setManufacturer(const QString &manufacturer)
{
Information info = m_information;
info.manufacturer = manufacturer;
setInformation(info);
}
void FakeOutput::setModel(const QString &model)
{
Information info = m_information;
info.model = model;
setInformation(info);
}
#include "moc_fakeoutput.cpp"