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// Qt-Security score:significant reason:default
6
7#ifndef QEGLFSKMSSCREEN_H
8#define QEGLFSKMSSCREEN_H
9
10//
11// W A R N I N G
12// -------------
13//
14// This file is not part of the Qt API. It exists purely as an
15// implementation detail. This header file may change from version to
16// version without notice, or even be removed.
17//
18// We mean it.
19//
20
21#include "private/qeglfsscreen_p.h"
22#include <QtCore/QList>
23#include <QtCore/QMutex>
24
25#include <QtKmsSupport/private/qkmsdevice_p.h>
26#include <QtGui/private/qedidparser_p.h>
27
29
30class QEglFSKmsDevice;
32
33class Q_EGLFS_EXPORT QEglFSKmsScreen : public QEglFSScreen
34{
35public:
36 QEglFSKmsScreen(QEglFSKmsDevice *device, const QKmsOutput &output, bool headless = false);
37 ~QEglFSKmsScreen();
38
39 void setVirtualPosition(const QPoint &pos);
40
41 QRect rawGeometry() const override;
42
43 int depth() const override;
44 QImage::Format format() const override;
45
46 QSizeF physicalSize() const override;
47 QDpi logicalDpi() const override;
48 QDpi logicalBaseDpi() const override;
49 Qt::ScreenOrientation nativeOrientation() const override;
50 Qt::ScreenOrientation orientation() const override;
51
52 QString name() const override;
53
54 QString manufacturer() const override;
55 QString model() const override;
56 QString serialNumber() const override;
57
58 qreal refreshRate() const override;
59
60 QList<QPlatformScreen *> virtualSiblings() const override { return m_siblings; }
61 void setVirtualSiblings(QList<QPlatformScreen *> sl) { m_siblings = sl; }
62 void removeSibling(QPlatformScreen *screen);
63
64 QList<QPlatformScreen::Mode> modes() const override;
65
66 int currentMode() const override;
67 int preferredMode() const override;
68
69 QEglFSKmsDevice *device() const { return m_device; }
70
71 virtual void waitForFlip();
72
73 void updateOutput(QKmsOutput output);
74 QKmsOutput &output() { return m_output; }
75 void restoreMode();
76
77 SubpixelAntialiasingType subpixelAntialiasingTypeHint() const override;
78
79 QPlatformScreen::PowerState powerState() const override;
80 void setPowerState(QPlatformScreen::PowerState state) override;
81
82 bool isCursorOutOfRange() const { return m_cursorOutOfRange; }
83 void setCursorOutOfRange(bool b) { m_cursorOutOfRange = b; }
84
85 virtual void pageFlipped(unsigned int sequence, unsigned int tv_sec, unsigned int tv_usec);
86 static bool isScreenKnown(QEglFSKmsScreen *s);
87
88protected:
89 QEglFSKmsDevice *m_device;
90
91 QKmsOutput m_output;
92 QEdidParser m_edid;
93 QPoint m_pos;
94 bool m_cursorOutOfRange;
95
96 QList<QPlatformScreen *> m_siblings;
97
98 PowerState m_powerState;
99
100 QEglFSKmsInterruptHandler *m_interruptHandler;
101
102 bool m_headless;
103};
104
105QT_END_NAMESPACE
106
107#endif
Combined button and popup list for selecting options.