summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/kernel/qplatformscreen_p.h12
-rw-r--r--src/gui/kernel/qscreen.cpp4
-rw-r--r--src/gui/platform/windows/qwindowsnativeinterface.cpp10
3 files changed, 26 insertions, 0 deletions
diff --git a/src/gui/kernel/qplatformscreen_p.h b/src/gui/kernel/qplatformscreen_p.h
index 2d3fb2d418..6c79978f79 100644
--- a/src/gui/kernel/qplatformscreen_p.h
+++ b/src/gui/kernel/qplatformscreen_p.h
@@ -20,6 +20,10 @@
#include <QtCore/qpointer.h>
#include <QtCore/qnativeinterface.h>
+#if defined(Q_OS_WIN32)
+#include <qwindowdefs_win.h>
+#endif
+
QT_BEGIN_NAMESPACE
class QScreen;
@@ -68,6 +72,14 @@ struct Q_GUI_EXPORT QWebOSScreen
};
#endif
+#if defined(Q_OS_WIN32) || defined(Q_CLANG_QDOC)
+struct Q_GUI_EXPORT QWindowsScreen
+{
+ QT_DECLARE_NATIVE_INTERFACE(QWindowsScreen, 1, QScreen)
+ virtual HMONITOR handle() const = 0;
+};
+#endif
+
} // QNativeInterface::Private
QT_END_NAMESPACE
diff --git a/src/gui/kernel/qscreen.cpp b/src/gui/kernel/qscreen.cpp
index ac33185900..1bc6042a1a 100644
--- a/src/gui/kernel/qscreen.cpp
+++ b/src/gui/kernel/qscreen.cpp
@@ -775,6 +775,10 @@ void *QScreen::resolveInterface(const char *name, int revision) const
QT_NATIVE_INTERFACE_RETURN_IF(QWebOSScreen, platformScreen);
#endif
+#if defined(Q_OS_WIN32)
+ QT_NATIVE_INTERFACE_RETURN_IF(QWindowsScreen, platformScreen);
+#endif
+
return nullptr;
}
diff --git a/src/gui/platform/windows/qwindowsnativeinterface.cpp b/src/gui/platform/windows/qwindowsnativeinterface.cpp
index e4339c9aa9..fe6f4e96dd 100644
--- a/src/gui/platform/windows/qwindowsnativeinterface.cpp
+++ b/src/gui/platform/windows/qwindowsnativeinterface.cpp
@@ -8,6 +8,7 @@
#include <qpa/qplatformintegration.h>
#include <qpa/qplatformwindow.h>
#include <qpa/qplatformwindow_p.h>
+#include <qpa/qplatformscreen_p.h>
QT_BEGIN_NAMESPACE
@@ -89,6 +90,15 @@ QOpenGLContext *QNativeInterface::QWGLContext::fromNative(HGLRC context, HWND wi
QT_DEFINE_PRIVATE_NATIVE_INTERFACE(QWindowsApplication);
/*!
+ \class QNativeInterface::Private::QWindowsScreen
+ \since 6.5
+ \internal
+ \brief Native interface to QScreen, to be retrieved from QPlatformIntegration.
+ \inmodule QtGui
+ \ingroup native-interfaces
+*/
+QT_DEFINE_PRIVATE_NATIVE_INTERFACE(QWindowsScreen);
+/*!
\enum QNativeInterface::Private::QWindowsApplication::TouchWindowTouchType
This enum represents the supported TouchWindow touch flags for registerTouchWindow().