File indexing completed on 2024-05-19 05:31:36

0001 /*
0002     SPDX-FileCopyrightText: 2022 Vlad Zahorodnii <vlad.zahorodnii@kde.org>
0003 
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #include "outputlayer.h"
0008 
0009 namespace KWin
0010 {
0011 
0012 OutputLayer::OutputLayer(QObject *parent)
0013     : QObject(parent)
0014 {
0015 }
0016 
0017 qreal OutputLayer::scale() const
0018 {
0019     return m_scale;
0020 }
0021 
0022 void OutputLayer::setScale(qreal scale)
0023 {
0024     m_scale = scale;
0025 }
0026 
0027 QPointF OutputLayer::hotspot() const
0028 {
0029     return m_hotspot;
0030 }
0031 
0032 void OutputLayer::setHotspot(const QPointF &hotspot)
0033 {
0034     m_hotspot = hotspot;
0035 }
0036 
0037 QSizeF OutputLayer::size() const
0038 {
0039     return m_size;
0040 }
0041 
0042 void OutputLayer::setSize(const QSizeF &size)
0043 {
0044     m_size = size;
0045 }
0046 
0047 std::optional<QSize> OutputLayer::fixedSize() const
0048 {
0049     return std::nullopt;
0050 }
0051 
0052 QRegion OutputLayer::repaints() const
0053 {
0054     return m_repaints;
0055 }
0056 
0057 void OutputLayer::addRepaint(const QRegion &region)
0058 {
0059     m_repaints += region;
0060 }
0061 
0062 void OutputLayer::resetRepaints()
0063 {
0064     m_repaints = QRegion();
0065 }
0066 
0067 bool OutputLayer::needsRepaint() const
0068 {
0069     return !m_repaints.isEmpty();
0070 }
0071 
0072 bool OutputLayer::scanout(SurfaceItem *surfaceItem)
0073 {
0074     return false;
0075 }
0076 
0077 void OutputLayer::setPosition(const QPointF &position)
0078 {
0079     m_position = position;
0080 }
0081 
0082 QPointF OutputLayer::position() const
0083 {
0084     return m_position;
0085 }
0086 
0087 void OutputLayer::setEnabled(bool enable)
0088 {
0089     m_enabled = enable;
0090 }
0091 
0092 bool OutputLayer::isEnabled() const
0093 {
0094     return m_enabled;
0095 }
0096 
0097 } // namespace KWin
0098 
0099 #include "moc_outputlayer.cpp"