File indexing completed on 2026-09-13 09:21:30
0001
0002
0003
0004 #ifndef QSCREEN_PLATFORM_H
0005 #define QSCREEN_PLATFORM_H
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #include <QtGui/qtguiglobal.h>
0017
0018 #include <QtCore/qnativeinterface.h>
0019 #include <QtGui/qguiapplication.h>
0020
0021 #if defined(Q_OS_WIN32)
0022 #include <QtGui/qwindowdefs_win.h>
0023 #endif
0024
0025 #if QT_CONFIG(wayland)
0026 struct wl_output;
0027 #endif
0028
0029 #if defined(Q_OS_MACOS)
0030 Q_FORWARD_DECLARE_OBJC_CLASS(NSScreen);
0031 #endif
0032
0033 QT_BEGIN_NAMESPACE
0034
0035 namespace QNativeInterface {
0036
0037 #if defined(Q_OS_WIN32) || defined(Q_QDOC)
0038 struct Q_GUI_EXPORT QWindowsScreen
0039 {
0040 QT_DECLARE_NATIVE_INTERFACE(QWindowsScreen, 1, QScreen)
0041 virtual HMONITOR handle() const = 0;
0042 };
0043 #endif
0044
0045 #if QT_CONFIG(wayland) || defined(Q_QDOC)
0046 struct Q_GUI_EXPORT QWaylandScreen
0047 {
0048 QT_DECLARE_NATIVE_INTERFACE(QWaylandScreen, 1, QScreen)
0049 virtual wl_output *output() const = 0;
0050 };
0051 #endif
0052
0053 #if defined(Q_OS_ANDROID) || defined(Q_QDOC)
0054 struct Q_GUI_EXPORT QAndroidScreen
0055 {
0056 QT_DECLARE_NATIVE_INTERFACE(QAndroidScreen, 1, QScreen)
0057 virtual int displayId() const = 0;
0058 };
0059 #endif
0060
0061 #if defined(Q_OS_MACOS) || defined(Q_QDOC)
0062 struct Q_GUI_EXPORT QCocoaScreen
0063 {
0064 QT_DECLARE_NATIVE_INTERFACE(QCocoaScreen, 1, QScreen)
0065 virtual NSScreen *nativeScreen() const = 0;
0066 };
0067 #endif
0068
0069 }
0070
0071 QT_END_NAMESPACE
0072
0073 #endif