File indexing completed on 2024-11-10 04:57:06
0001 /* 0002 KWin - the KDE window manager 0003 This file is part of the KDE project. 0004 0005 SPDX-FileCopyrightText: 2015 Martin Gräßlin <mgraesslin@kde.org> 0006 0007 SPDX-License-Identifier: GPL-2.0-or-later 0008 */ 0009 #pragma once 0010 0011 #include <qpa/qplatformscreen.h> 0012 0013 #include <QPointer> 0014 0015 namespace KWin 0016 { 0017 class Output; 0018 0019 namespace QPA 0020 { 0021 class Integration; 0022 class PlatformCursor; 0023 0024 class Screen : public QObject, public QPlatformScreen 0025 { 0026 Q_OBJECT 0027 0028 public: 0029 Screen(Output *output, Integration *integration); 0030 ~Screen() override; 0031 0032 QString name() const override; 0033 QRect geometry() const override; 0034 int depth() const override; 0035 QImage::Format format() const override; 0036 QSizeF physicalSize() const override; 0037 QPlatformCursor *cursor() const override; 0038 QDpi logicalDpi() const override; 0039 qreal devicePixelRatio() const override; 0040 QList<QPlatformScreen *> virtualSiblings() const override; 0041 0042 private Q_SLOTS: 0043 void handleGeometryChanged(); 0044 0045 private: 0046 QPointer<Output> m_output; 0047 std::unique_ptr<PlatformCursor> m_cursor; 0048 Integration *m_integration; 0049 }; 0050 0051 class PlaceholderScreen : public QPlatformPlaceholderScreen 0052 { 0053 public: 0054 QDpi logicalDpi() const override; 0055 }; 0056 0057 } 0058 }