diff options
author | David Redondo <[email protected]> | 2022-10-11 16:16:39 +0200 |
---|---|---|
committer | David Redondo <[email protected]> | 2022-10-25 12:52:05 +0200 |
commit | bb18767af181447bcbaf2d6dd51c94880a4eebce (patch) | |
tree | ee194121dea5e19c60eff0d809c097a13c5e683d /src/gui/platform/unix/qunixnativeinterface.cpp | |
parent | 3b9330cd405a0b4c75f1a8bcd836e184fdf38e06 (diff) |
Add QNativeInterface::QWaylandApplication
This exposes the same objects that were ere available through
QPlatformNativeInterface except egldisplay for which we may find
a better place.
[ChangeLog][QtWaylandClient][QGuiApplication] Add
QNativeInterface::QWaylandApplication
that allows to access central native wayland objects.
Task-number: QTBUG-94729
Change-Id: I8611522a4c9bddec3afbb5f183ffa68565f61f68
Reviewed-by: Aleix Pol Gonzalez <[email protected]>
Diffstat (limited to 'src/gui/platform/unix/qunixnativeinterface.cpp')
-rw-r--r-- | src/gui/platform/unix/qunixnativeinterface.cpp | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/src/gui/platform/unix/qunixnativeinterface.cpp b/src/gui/platform/unix/qunixnativeinterface.cpp index 60a96932e69..7d60d325c7e 100644 --- a/src/gui/platform/unix/qunixnativeinterface.cpp +++ b/src/gui/platform/unix/qunixnativeinterface.cpp @@ -215,4 +215,49 @@ QT_DEFINE_PRIVATE_NATIVE_INTERFACE(QEvdevKeyMapper); #endif // QT_CONFIG(evdev) +#if defined(Q_OS_UNIX) + +/*! + \class QNativeInterface::QWaylandApplication + \since 6.5 + \brief Native interface to a Wayland application. + + Accessed through QGuiApplication::nativeInterface(). + \inmodule QtGui + \ingroup native-interfaces + \ingroup native-interfaces-qguiapplication +*/ +/*! + \fn wl_display *QNativeInterface::QWaylandApplication::display() const + \return the wl_display that the application is using. +*/ +/*! + \fn wl_compositor *QNativeInterface::QWaylandApplication::compositor() const + \return the wl_compositor that the application is using. +*/ +/*! + \fn wl_keyboard *QNativeInterface::QWaylandApplication::keyboard() const + \return the wl_keyboard belonging to seat() if available. +*/ +/*! + \fn wl_pointer *QNativeInterface::QWaylandApplication::pointer() const + \return the wl_pointer belonging to seat() if available. +*/ +/*! + \fn wl_touch *QNativeInterface::QWaylandApplication::touch() const + \return the wl_touch belonging to seat() if available. +*/ +/*! + \fn uint *QNativeInterface::QWaylandApplication::lastInputSerial() const + \return the serial of the last input event on any seat. +*/ +/*! + \fn wl_seat *QNativeInterface::QWaylandApplication::lastInputSeat() const + \return the seat on which the last input event happened. +*/ + +QT_DEFINE_NATIVE_INTERFACE(QWaylandApplication); + +#endif // Q_OS_UNIX + QT_END_NAMESPACE |