QWaylandCompositorExtensionTemplate is a convenience class for subclassing QWaylandCompositorExtension. More...
| Header: | #include <QWaylandCompositorExtensionTemplate>
|
| CMake: | find_package(Qt6 REQUIRED COMPONENTS WaylandCompositor)target_link_libraries(mytarget PRIVATE Qt6::WaylandCompositor)
|
| qmake: | QT += waylandcompositor
|
| Inherits: | QWaylandCompositorExtension |
| Inherited By: | QWaylandIdleInhibitManagerV1, QWaylandIviApplication, QWaylandPresentationTime, QWaylandQtTextInputMethodManager, QWaylandTextInputManager, QWaylandViewporter, QWaylandXdgDecorationManagerV1, and QWaylandXdgOutputManagerV1 |
| T * | findIn(QWaylandObject *container) |
QWaylandCompositorExtensionTemplate is a template class which inherits QWaylandCompositorExtension and is convenience for building custom Wayland extensions with Qt.
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:
wl_interface pointer for the qtwaylandscanner-generated base class.Typically, a new extension will dual-inherit QWaylandCompositorExtensionTemplate and the class generated by qtwaylandscanner.
QWaylandCompositorExtensionTemplate should be parameterized with the subclass itself:
class MyExtension
: public QWaylandCompositorExtensionTemplate<MyExtension>
, QtWaylandServer::my_extensionIn this example, MyExtension is an implementation of the generated interface my_extension.
See also Custom Shell.
[static] T *QWaylandCompositorExtensionTemplate::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.
© The Qt Company Ltd
Licensed under the GNU Free Documentation License, Version 1.3.
https://doc.qt.io/qt-6.9/qwaylandcompositorextensiontemplate.html