Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qeglfskmsscreen_p.h
Go to the documentation of this file.
1// Copyright (C) 2015 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
2// Copyright (C) 2016 The Qt Company Ltd.
3// Copyright (C) 2016 Pelagicore AG
4// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
5
6#ifndef QEGLFSKMSSCREEN_H
7#define QEGLFSKMSSCREEN_H
8
9//
10// W A R N I N G
11// -------------
12//
13// This file is not part of the Qt API. It exists purely as an
14// implementation detail. This header file may change from version to
15// version without notice, or even be removed.
16//
17// We mean it.
18//
19
20#include "private/qeglfsscreen_p.h"
21#include <QtCore/QList>
22#include <QtCore/QMutex>
23
24#include <QtKmsSupport/private/qkmsdevice_p.h>
25#include <QtGui/private/qedidparser_p.h>
26
28
29class QEglFSKmsDevice;
31
32class Q_EGLFS_EXPORT QEglFSKmsScreen : public QEglFSScreen
33{
34public:
35 QEglFSKmsScreen(QEglFSKmsDevice *device, const QKmsOutput &output, bool headless = false);
36 ~QEglFSKmsScreen();
37
38 void setVirtualPosition(const QPoint &pos);
39
40 QRect rawGeometry() const override;
41
42 int depth() const override;
43 QImage::Format format() const override;
44
45 QSizeF physicalSize() const override;
46 QDpi logicalDpi() const override;
47 QDpi logicalBaseDpi() const override;
48 Qt::ScreenOrientation nativeOrientation() const override;
49 Qt::ScreenOrientation orientation() const override;
50
51 QString name() const override;
52
53 QString manufacturer() const override;
54 QString model() const override;
55 QString serialNumber() const override;
56
57 qreal refreshRate() const override;
58
59 QList<QPlatformScreen *> virtualSiblings() const override { return m_siblings; }
60 void setVirtualSiblings(QList<QPlatformScreen *> sl) { m_siblings = sl; }
61 void removeSibling(QPlatformScreen *screen);
62
63 QList<QPlatformScreen::Mode> modes() const override;
64
65 int currentMode() const override;
66 int preferredMode() const override;
67
68 QEglFSKmsDevice *device() const { return m_device; }
69
70 virtual void waitForFlip();
71
72 void updateOutput(QKmsOutput output);
73 QKmsOutput &output() { return m_output; }
74 void restoreMode();
75
76 SubpixelAntialiasingType subpixelAntialiasingTypeHint() const override;
77
78 QPlatformScreen::PowerState powerState() const override;
79 void setPowerState(QPlatformScreen::PowerState state) override;
80
81 bool isCursorOutOfRange() const { return m_cursorOutOfRange; }
82 void setCursorOutOfRange(bool b) { m_cursorOutOfRange = b; }
83
84 virtual void pageFlipped(unsigned int sequence, unsigned int tv_sec, unsigned int tv_usec);
85 static bool isScreenKnown(QEglFSKmsScreen *s);
86
87protected:
88 QEglFSKmsDevice *m_device;
89
90 QKmsOutput m_output;
91 QEdidParser m_edid;
92 QPoint m_pos;
93 bool m_cursorOutOfRange;
94
95 QList<QPlatformScreen *> m_siblings;
96
97 PowerState m_powerState;
98
99 QEglFSKmsInterruptHandler *m_interruptHandler;
100
101 bool m_headless;
102
103 static QSet<QEglFSKmsScreen *> s_screens;
104};
105
106QT_END_NAMESPACE
107
108#endif