Debian Codegraph @

src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmdevice_p.h

raw
1 // Copyright (C) 2015 Pier Luigi Fiorini <[email protected]>
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 QEGLFSKMSGBMDEVICE_H
7 #define QEGLFSKMSGBMDEVICE_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 "qeglfskmsgbmcursor_p.h"
21 #include <private/qeglfskmsdevice_p.h>
22 #include <private/qeglfskmseventreader_p.h>
23
24 #include <gbm.h>
25
26 QT_BEGIN_NAMESPACE
27
28 class QEglFSKmsScreen;
29
30 class Q_EGLFS_EXPORT QEglFSKmsGbmDevice: public QEglFSKmsDevice
31 {
32 public:
33 QEglFSKmsGbmDevice(QKmsScreenConfig *screenConfig, const QString &path);
34
35 bool open() override;
36 void close() override;
37
38 void *nativeDisplay() const override;
39 gbm_device *gbmDevice() const;
40
41 QPlatformCursor *globalCursor() const;
42 void destroyGlobalCursor();
43 void createGlobalCursor(QEglFSKmsGbmScreen *screen);
44
45 QPlatformScreen *createScreen(const QKmsOutput &output) override;
46 QPlatformScreen *createHeadlessScreen() override;
47 void registerScreenCloning(QPlatformScreen *screen,
48 QPlatformScreen *screenThisScreenClones,
49 const QList<QPlatformScreen *> &screensCloningThisScreen) override;
50 void registerScreen(QPlatformScreen *screen,
51 bool isPrimary,
52 const QPoint &virtualPos,
53 const QList<QPlatformScreen *> &virtualSiblings) override;
54
55 bool usesEventReader() const;
56 QEglFSKmsEventReader *eventReader() { return &m_eventReader; }
57
58 private:
59 Q_DISABLE_COPY(QEglFSKmsGbmDevice)
60
61 gbm_device *m_gbm_device;
62 QEglFSKmsEventReader m_eventReader;
63 QEglFSKmsGbmCursor *m_globalCursor;
64 };
65
66 QT_END_NAMESPACE
67
68 #endif // QEGLFSKMSGBMDEVICE_H