QWaylandShellSurfaceTemplate Class
template <typename T> class QWaylandShellSurfaceTemplateQWaylandShellSurfaceTemplate is a convenience class for creating custom shell surface classes. More...
Header: | #include <QWaylandShellSurfaceTemplate> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS WaylandCompositor) target_link_libraries(mytarget PRIVATE Qt6::WaylandCompositor) |
qmake: | QT += waylandcompositor |
Inherits: | QWaylandShellSurface |
Inherited By: | QWaylandIviSurface, QWaylandWlShellSurface, and QWaylandXdgSurface |
Static Public Members
T * | findIn(QWaylandObject *container) |
Detailed Description
QWaylandShellSurfaceTemplate is a template class which inherits from QWaylandShellSurface and is convenience for building custom shell extensions.
It provides the connection between Qt Wayland Compositor and the class generated by qtwaylandscanner
, based on the XML description of the extension protocol.
It provides two specific pieces of convenience:
- A reimplementation of QWaylandCompositorExtension::extensionInterface() which returns the
wl_interface
pointer for the qtwaylandscanner-generated base class. - A static findIn() function which searches for an instance of the extension in a provided container, and returns this if it is found.
The same usage pattern applies as for QWaylandCompositorExtensionTemplate.
See also Custom Shell.
Member Function Documentation
[static]
T *QWaylandShellSurfaceTemplate::findIn(QWaylandObject *container)
If any instance of the interface has been registered with container, this is returned. Otherwise null is returned. The look-up is based on the generated interfaceName()
which matches the interface name in the protocol description.
© 2024 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.