Add QNativeInterface::Private::QWaylandScreen

Change-Id: Ib18c95fa64ab9176195f591e8ffd45177be510b9
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
bb10
David Redondo 2022-10-12 08:55:29 +02:00
parent e39ca06dbc
commit 17ab4045ca
3 changed files with 27 additions and 0 deletions

View File

@ -24,6 +24,10 @@
#include <qwindowdefs_win.h>
#endif
#if defined(Q_OS_UNIX)
struct wl_output;
#endif
QT_BEGIN_NAMESPACE
class QScreen;
@ -80,6 +84,14 @@ struct Q_GUI_EXPORT QWindowsScreen
};
#endif
#if defined(Q_OS_UNIX) || defined(Q_CLANG_QDOC)
struct Q_GUI_EXPORT QWaylandScreen
{
QT_DECLARE_NATIVE_INTERFACE(QWaylandScreen, 1, QScreen)
virtual wl_output *output() const = 0;
};
#endif
} // QNativeInterface::Private
QT_END_NAMESPACE

View File

@ -759,6 +759,10 @@ void *QScreen::resolveInterface(const char *name, int revision) const
QT_NATIVE_INTERFACE_RETURN_IF(QWindowsScreen, platformScreen);
#endif
#if defined(Q_OS_UNIX)
QT_NATIVE_INTERFACE_RETURN_IF(QWaylandScreen, platformScreen);
#endif
return nullptr;
}

View File

@ -258,6 +258,17 @@ QT_DEFINE_PRIVATE_NATIVE_INTERFACE(QEvdevKeyMapper);
QT_DEFINE_NATIVE_INTERFACE(QWaylandApplication);
/*!
\class QNativeInterface::Private::QWaylandScreen
\since 6.5
\internal
\brief Native interface to QPlatformScreen.
\inmodule QtGui
\ingroup native-interfaces
*/
QT_DEFINE_PRIVATE_NATIVE_INTERFACE(QWaylandScreen);
#endif // Q_OS_UNIX
QT_END_NAMESPACE