Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qplatformscreen_p.h
Go to the documentation of this file.
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#if defined(Q_OS_WIN32)
24#include <qwindowdefs_win.h>
25#endif
26
27#if defined(Q_OS_UNIX)
28struct wl_output;
29#endif
30
32
33class QScreen;
34
36{
37public:
39};
40
41// ----------------- QNativeInterface -----------------
42
44
45#if QT_CONFIG(xcb) || defined(Q_QDOC)
46struct Q_GUI_EXPORT QXcbScreen
47{
49 virtual int virtualDesktopNumber() const = 0;
50};
51#endif
52
53#if QT_CONFIG(vsp2) || defined(Q_QDOC)
54struct Q_GUI_EXPORT QVsp2Screen
55{
57 virtual int addLayer(int dmabufFd, const QSize &size, const QPoint &position, uint drmPixelFormat, uint bytesPerLine) = 0;
58 virtual void setLayerBuffer(int id, int dmabufFd) = 0;
59 virtual void setLayerPosition(int id, const QPoint &position) = 0;
60 virtual void setLayerAlpha(int id, qreal alpha) = 0;
61 virtual bool removeLayer(int id) = 0;
62 virtual void addBlendListener(void (*callback)()) = 0;
63};
64#endif
65
66#if defined(Q_OS_WEBOS) || defined(Q_QDOC)
67struct Q_GUI_EXPORT QWebOSScreen
68{
69 QT_DECLARE_NATIVE_INTERFACE(QWebOSScreen, 1, QScreen)
70 virtual int addLayer(void *gbm_bo, const QRectF &geometry) = 0;
71 virtual void setLayerBuffer(int id, void *gbm_bo) = 0;
72 virtual void setLayerGeometry(int id, const QRectF &geometry) = 0;
73 virtual void setLayerAlpha(int id, qreal alpha) = 0;
74 virtual bool removeLayer(int id) = 0;
75 virtual void addFlipListener(void (*callback)()) = 0;
76};
77#endif
78
79#if defined(Q_OS_WIN32) || defined(Q_QDOC)
80struct Q_GUI_EXPORT QWindowsScreen
81{
83 virtual HMONITOR handle() const = 0;
84};
85#endif
86
87#if defined(Q_OS_UNIX) || defined(Q_CLANG_QDOC)
88struct Q_GUI_EXPORT QWaylandScreen
89{
90 QT_DECLARE_NATIVE_INTERFACE(QWaylandScreen, 1, QScreen)
91 virtual wl_output *output() const = 0;
92};
93#endif
94
95#if defined(Q_OS_ANDROID) || defined(Q_QDOC)
96struct Q_GUI_EXPORT QAndroidScreen
97{
98 QT_DECLARE_NATIVE_INTERFACE(QAndroidScreen, 1, QScreen)
99 virtual int displayId() const = 0;
100};
101#endif
102
103} // QNativeInterface::Private
104
106
107#endif // QPLATFORMSCREEN_P_H
QPointer< QScreen > screen
\inmodule QtCore\reentrant
Definition qpoint.h:23
\inmodule QtCore
Definition qpointer.h:18
\inmodule QtCore\reentrant
Definition qrect.h:483
The QScreen class is used to query screen properties. \inmodule QtGui.
Definition qscreen.h:32
\inmodule QtCore
Definition qsize.h:25
Windows screen.
Combined button and popup list for selecting options.
#define QT_DECLARE_NATIVE_INTERFACE(...)
GLuint64 GLenum void * handle
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLfloat GLfloat GLfloat alpha
Definition qopenglext.h:418
static qreal position(const QQuickItem *item, QQuickAnchors::Anchor anchorLine)
unsigned int uint
Definition qtypes.h:29
double qreal
Definition qtypes.h:92
QT_BEGIN_NAMESPACE typedef uchar * output