1 | // Copyright (C) 2016 The Qt Company Ltd. |
2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
3 | |
4 | #ifndef QPLATFORMSCREEN_P_H |
5 | #define QPLATFORMSCREEN_P_H |
6 | |
7 | // |
8 | // W A R N I N G |
9 | // ------------- |
10 | // |
11 | // This file is not part of the Qt API. It exists purely as an |
12 | // implementation detail. This header file may change from version to |
13 | // version without notice, or even be removed. |
14 | // |
15 | // We mean it. |
16 | // |
17 | |
18 | #include <QtGui/private/qtguiglobal_p.h> |
19 | |
20 | #include <QtCore/qpointer.h> |
21 | #include <QtCore/qnativeinterface.h> |
22 | |
23 | QT_BEGIN_NAMESPACE |
24 | |
25 | class QScreen; |
26 | |
27 | class QPlatformScreenPrivate |
28 | { |
29 | public: |
30 | QPointer<QScreen> screen; |
31 | }; |
32 | |
33 | // ----------------- QNativeInterface ----------------- |
34 | |
35 | namespace QNativeInterface::Private { |
36 | |
37 | #if QT_CONFIG(xcb) || defined(Q_QDOC) |
38 | struct Q_GUI_EXPORT QXcbScreen |
39 | { |
40 | QT_DECLARE_NATIVE_INTERFACE(QXcbScreen, 1, QScreen) |
41 | virtual int virtualDesktopNumber() const = 0; |
42 | }; |
43 | #endif |
44 | |
45 | #if QT_CONFIG(vsp2) || defined(Q_QDOC) |
46 | struct Q_GUI_EXPORT QVsp2Screen |
47 | { |
48 | QT_DECLARE_NATIVE_INTERFACE(QVsp2Screen, 1, QScreen) |
49 | virtual int addLayer(int dmabufFd, const QSize &size, const QPoint &position, uint drmPixelFormat, uint bytesPerLine) = 0; |
50 | virtual void setLayerBuffer(int id, int dmabufFd) = 0; |
51 | virtual void setLayerPosition(int id, const QPoint &position) = 0; |
52 | virtual void setLayerAlpha(int id, qreal alpha) = 0; |
53 | virtual bool removeLayer(int id) = 0; |
54 | virtual void addBlendListener(void (*callback)()) = 0; |
55 | }; |
56 | #endif |
57 | |
58 | #if defined(Q_OS_WEBOS) || defined(Q_QDOC) |
59 | struct Q_GUI_EXPORT QWebOSScreen |
60 | { |
61 | QT_DECLARE_NATIVE_INTERFACE(QWebOSScreen, 1, QScreen) |
62 | virtual int addLayer(void *gbm_bo, const QRectF &geometry) = 0; |
63 | virtual void setLayerBuffer(int id, void *gbm_bo) = 0; |
64 | virtual void setLayerGeometry(int id, const QRectF &geometry) = 0; |
65 | virtual void setLayerAlpha(int id, qreal alpha) = 0; |
66 | virtual bool removeLayer(int id) = 0; |
67 | virtual void addFlipListener(void (*callback)()) = 0; |
68 | }; |
69 | #endif |
70 | } // QNativeInterface::Private |
71 | |
72 | QT_END_NAMESPACE |
73 | |
74 | #endif // QPLATFORMSCREEN_P_H |
75 | |