├── .cmake.conf ├── .gitreview ├── .tag ├── CMakeLists.txt ├── LICENSES ├── BSD-3-Clause.txt ├── GFDL-1.3-no-invariants-only.txt ├── GPL-2.0-only.txt ├── GPL-3.0-only.txt ├── LGPL-3.0-only.txt ├── LicenseRef-Qt-Commercial.txt ├── MIT.txt └── Qt-GPL-exception-1.0.txt ├── README ├── REUSE.toml ├── cmake ├── FindWaylandkms.cmake └── QtWaylandSetup.cmake ├── coin ├── axivion │ ├── ci_config_linux.json │ └── start_analysis.sh ├── module_config.yaml └── qt-installer-package-config.json ├── configure.cmake ├── dependencies.yaml ├── dist ├── REUSE.toml ├── changes-5.10.0 ├── changes-5.10.1 ├── changes-5.11.0 ├── changes-5.11.1 ├── changes-5.11.2 ├── changes-5.11.3 ├── changes-5.12.0 ├── changes-5.12.1 ├── changes-5.12.10 ├── changes-5.12.2 ├── changes-5.12.3 ├── changes-5.12.4 ├── changes-5.12.5 ├── changes-5.13.0 ├── changes-5.13.1 ├── changes-5.13.2 ├── changes-5.14.0 ├── changes-5.14.1 ├── changes-5.14.2 ├── changes-5.15.0 ├── changes-5.15.1 ├── changes-5.15.2 ├── changes-5.5.0 ├── changes-5.6.2 ├── changes-5.6.3 ├── changes-5.7.0 ├── changes-5.7.1 ├── changes-5.8.0 ├── changes-5.9.0 ├── changes-5.9.1 ├── changes-5.9.2 ├── changes-5.9.3 ├── changes-5.9.4 ├── changes-5.9.5 ├── changes-5.9.6 └── changes-6.0.0 ├── examples ├── CMakeLists.txt ├── examples.pro └── wayland │ ├── CMakeLists.txt │ ├── custom-extension │ ├── CMakeLists.txt │ ├── client-common │ │ ├── customextension.cpp │ │ └── customextension.h │ ├── compositor │ │ ├── CMakeLists.txt │ │ ├── compositor.pro │ │ ├── compositor.qrc │ │ ├── customextension.cpp │ │ ├── customextension.h │ │ ├── images │ │ │ └── background.png │ │ ├── main.cpp │ │ └── qml │ │ │ ├── CompositorScreen.qml │ │ │ └── main.qml │ ├── cpp-client │ │ ├── CMakeLists.txt │ │ ├── cpp-client.pro │ │ └── main.cpp │ ├── custom-extension.pro │ ├── doc │ │ ├── images │ │ │ └── custom-extension.png │ │ └── src │ │ │ └── custom-extension.qdoc │ ├── protocol │ │ └── custom.xml │ └── qml-client │ │ ├── CMakeLists.txt │ │ ├── main.cpp │ │ ├── main.qml │ │ ├── qml-client.pro │ │ └── qml.qrc │ ├── custom-shell │ ├── CMakeLists.txt │ ├── client-plugin │ │ ├── CMakeLists.txt │ │ ├── client-plugin.pro │ │ ├── example-shell.json │ │ ├── exampleshellintegration.cpp │ │ ├── exampleshellintegration.h │ │ ├── examplesurface.cpp │ │ ├── examplesurface.h │ │ └── main.cpp │ ├── compositor │ │ ├── CMakeLists.txt │ │ ├── compositor.pro │ │ ├── compositor.qrc │ │ ├── exampleshell.cpp │ │ ├── exampleshell.h │ │ ├── exampleshellintegration.cpp │ │ ├── exampleshellintegration.h │ │ ├── images │ │ │ └── background.png │ │ ├── main.cpp │ │ └── qml │ │ │ └── main.qml │ ├── custom-shell.pro │ ├── doc │ │ ├── images │ │ │ └── custom-shell.jpg │ │ └── src │ │ │ └── custom-shell.qdoc │ └── protocol │ │ └── example-shell.xml │ ├── fancy-compositor │ ├── CMakeLists.txt │ ├── doc │ │ └── src │ │ │ └── fancy-compositor.qdoc │ ├── fancy-compositor.pro │ ├── fancy-compositor.qrc │ ├── images │ │ └── background.jpg │ ├── main.cpp │ └── qml │ │ ├── Chrome.qml │ │ ├── CompositorScreen.qml │ │ ├── Keyboard.qml │ │ └── main.qml │ ├── ivi-compositor │ ├── CMakeLists.txt │ ├── doc │ │ ├── images │ │ │ ├── ivi-compositor-1.png │ │ │ ├── ivi-compositor-2.png │ │ │ └── ivi-compositor-3.png │ │ └── src │ │ │ └── ivi-compositor.qdoc │ ├── ivi-compositor.pro │ ├── ivi-compositor.qrc │ ├── main.cpp │ └── main.qml │ ├── minimal-cpp │ ├── CMakeLists.txt │ ├── README │ ├── compositor.cpp │ ├── compositor.h │ ├── doc │ │ ├── images │ │ │ └── minimal-cpp.jpg │ │ └── src │ │ │ └── minimal-cpp.qdoc │ ├── main.cpp │ ├── minimal-cpp.pro │ ├── window.cpp │ └── window.h │ ├── minimal-qml │ ├── CMakeLists.txt │ ├── doc │ │ ├── images │ │ │ └── minimal-qml.png │ │ └── src │ │ │ └── minimal-qml.qdoc │ ├── main.cpp │ ├── main.qml │ ├── minimal-qml.pro │ └── minimal-qml.qrc │ ├── multi-output │ ├── CMakeLists.txt │ ├── doc │ │ ├── images │ │ │ └── multi-output.jpg │ │ └── src │ │ │ └── multi-output.qdoc │ ├── images │ │ └── background.jpg │ ├── main.cpp │ ├── multi-output.pro │ ├── multi-output.qrc │ └── qml │ │ ├── GridScreen.qml │ │ ├── ShellChrome.qml │ │ ├── ShellScreen.qml │ │ └── main.qml │ ├── multi-screen │ ├── CMakeLists.txt │ ├── doc │ │ ├── images │ │ │ └── multi-screen.jpg │ │ └── src │ │ │ └── multi-screen.qdoc │ ├── main.cpp │ ├── multi-screen.pro │ ├── multi-screen.qrc │ └── qml │ │ ├── Chrome.qml │ │ ├── CompositorScreen.qml │ │ └── main.qml │ ├── overview-compositor │ ├── CMakeLists.txt │ ├── doc │ │ ├── images │ │ │ └── overview-compositor.jpg │ │ └── src │ │ │ └── overview-compositor.qdoc │ ├── main.cpp │ ├── main.qml │ ├── overview-compositor.pro │ └── overview-compositor.qrc │ ├── qtshell │ ├── CMakeLists.txt │ ├── doc │ │ ├── images │ │ │ └── qtshell.jpg │ │ └── src │ │ │ └── qtshell.qdoc │ ├── images │ │ └── background.jpg │ ├── main.cpp │ ├── qml │ │ ├── Chrome.qml │ │ ├── CompositorScreen.qml │ │ └── main.qml │ ├── qtshell.pro │ └── qtshell.qrc │ ├── server-side-decoration │ ├── CMakeLists.txt │ ├── doc │ │ ├── images │ │ │ └── server-side-decoration.png │ │ └── src │ │ │ └── server-side-decoration.qdoc │ ├── main.cpp │ ├── main.qml │ ├── server-side-decoration.pro │ └── server-side-decoration.qrc │ ├── spanning-screens │ ├── CMakeLists.txt │ ├── doc │ │ ├── images │ │ │ └── spanning-screens.jpg │ │ └── src │ │ │ └── spanning-screens.qdoc │ ├── main.cpp │ ├── main.qml │ ├── spanning-screens.pro │ └── spanning-screens.qrc │ └── wayland.pro ├── features └── wayland-scanner-client-wayland-protocol-include.prf ├── licenseRule.json ├── qt_cmdline.cmake ├── src ├── 3rdparty │ └── protocol │ │ └── ivi │ │ ├── MIT.txt │ │ ├── REUSE.toml │ │ ├── ivi-application.xml │ │ ├── ivi-controller.xml │ │ └── qt_attribution.json ├── CMakeLists.txt ├── client │ ├── CMakeLists.txt │ └── configure.cmake ├── compositor │ ├── CMakeLists.txt │ ├── compat │ │ └── removed_api.cpp │ ├── compositor_api │ │ ├── qwaylandbufferref.cpp │ │ ├── qwaylandbufferref.h │ │ ├── qwaylandclient.cpp │ │ ├── qwaylandclient.h │ │ ├── qwaylandcompositor.cpp │ │ ├── qwaylandcompositor.h │ │ ├── qwaylandcompositor_p.h │ │ ├── qwaylandcompositorquickextensions.cpp │ │ ├── qwaylandcompositorquickextensions_p.h │ │ ├── qwaylanddestroylistener.cpp │ │ ├── qwaylanddestroylistener.h │ │ ├── qwaylanddestroylistener_p.h │ │ ├── qwaylanddrag.cpp │ │ ├── qwaylanddrag.h │ │ ├── qwaylandinputmethodcontrol.cpp │ │ ├── qwaylandinputmethodcontrol.h │ │ ├── qwaylandinputmethodcontrol_p.h │ │ ├── qwaylandkeyboard.cpp │ │ ├── qwaylandkeyboard.h │ │ ├── qwaylandkeyboard_p.h │ │ ├── qwaylandkeymap.cpp │ │ ├── qwaylandkeymap.h │ │ ├── qwaylandkeymap_p.h │ │ ├── qwaylandmousetracker.cpp │ │ ├── qwaylandmousetracker_p.h │ │ ├── qwaylandoutput.cpp │ │ ├── qwaylandoutput.h │ │ ├── qwaylandoutput_p.h │ │ ├── qwaylandoutputmode.cpp │ │ ├── qwaylandoutputmode.h │ │ ├── qwaylandoutputmode_p.h │ │ ├── qwaylandpointer.cpp │ │ ├── qwaylandpointer.h │ │ ├── qwaylandpointer_p.h │ │ ├── qwaylandquickchildren.h │ │ ├── qwaylandquickcompositor.cpp │ │ ├── qwaylandquickcompositor.h │ │ ├── qwaylandquickhardwarelayer.cpp │ │ ├── qwaylandquickhardwarelayer_p.h │ │ ├── qwaylandquickitem.cpp │ │ ├── qwaylandquickitem.h │ │ ├── qwaylandquickitem_p.h │ │ ├── qwaylandquickoutput.cpp │ │ ├── qwaylandquickoutput.h │ │ ├── qwaylandquicksurface.cpp │ │ ├── qwaylandquicksurface.h │ │ ├── qwaylandquicksurface_p.h │ │ ├── qwaylandresource.cpp │ │ ├── qwaylandresource.h │ │ ├── qwaylandseat.cpp │ │ ├── qwaylandseat.h │ │ ├── qwaylandseat_p.h │ │ ├── qwaylandsurface.cpp │ │ ├── qwaylandsurface.h │ │ ├── qwaylandsurface_p.h │ │ ├── qwaylandsurfacegrabber.cpp │ │ ├── qwaylandsurfacegrabber.h │ │ ├── qwaylandtouch.cpp │ │ ├── qwaylandtouch.h │ │ ├── qwaylandtouch_p.h │ │ ├── qwaylandview.cpp │ │ ├── qwaylandview.h │ │ └── qwaylandview_p.h │ ├── configure.cmake │ ├── doc │ │ ├── qtwaylandcompositor.qdocconf │ │ └── src │ │ │ ├── cmake │ │ │ └── qt_generate_wayland_protocol_server_sources.qdoc │ │ │ ├── qt6-changes.qdoc │ │ │ ├── qtwaylandcompositor-cpp.qdoc │ │ │ ├── qtwaylandcompositor-examples.qdoc │ │ │ ├── qtwaylandcompositor-overview.qdoc │ │ │ ├── qtwaylandcompositor-qmltypes.qdoc │ │ │ ├── qtwaylandcompositor-shellextensions.qdoc │ │ │ └── qtwaylandcompositor-toc.qdoc │ ├── extensions │ │ ├── qwaylandidleinhibitv1.cpp │ │ ├── qwaylandidleinhibitv1.h │ │ ├── qwaylandidleinhibitv1_p.h │ │ ├── qwaylandiviapplication.cpp │ │ ├── qwaylandiviapplication.h │ │ ├── qwaylandiviapplication_p.h │ │ ├── qwaylandivisurface.cpp │ │ ├── qwaylandivisurface.h │ │ ├── qwaylandivisurface_p.h │ │ ├── qwaylandivisurfaceintegration.cpp │ │ ├── qwaylandivisurfaceintegration_p.h │ │ ├── qwaylandpresentationtime.cpp │ │ ├── qwaylandpresentationtime_p.h │ │ ├── qwaylandpresentationtime_p_p.h │ │ ├── qwaylandqttextinputmethod.cpp │ │ ├── qwaylandqttextinputmethod.h │ │ ├── qwaylandqttextinputmethod_p.h │ │ ├── qwaylandqttextinputmethodmanager.cpp │ │ ├── qwaylandqttextinputmethodmanager.h │ │ ├── qwaylandqttextinputmethodmanager_p.h │ │ ├── qwaylandqtwindowmanager.cpp │ │ ├── qwaylandqtwindowmanager.h │ │ ├── qwaylandqtwindowmanager_p.h │ │ ├── qwaylandquickshellintegration.cpp │ │ ├── qwaylandquickshellintegration.h │ │ ├── qwaylandquickshellsurfaceitem.cpp │ │ ├── qwaylandquickshellsurfaceitem.h │ │ ├── qwaylandquickshellsurfaceitem_p.h │ │ ├── qwaylandquickxdgoutputv1.cpp │ │ ├── qwaylandquickxdgoutputv1.h │ │ ├── qwaylandshell.cpp │ │ ├── qwaylandshell.h │ │ ├── qwaylandshell_p.h │ │ ├── qwaylandshellsurface.cpp │ │ ├── qwaylandshellsurface.h │ │ ├── qwaylandshellsurface_p.h │ │ ├── qwaylandtextinput.cpp │ │ ├── qwaylandtextinput.h │ │ ├── qwaylandtextinput_p.h │ │ ├── qwaylandtextinputmanager.cpp │ │ ├── qwaylandtextinputmanager.h │ │ ├── qwaylandtextinputmanager_p.h │ │ ├── qwaylandtextinputmanagerv3.cpp │ │ ├── qwaylandtextinputmanagerv3.h │ │ ├── qwaylandtextinputmanagerv3_p.h │ │ ├── qwaylandtextinputv3.cpp │ │ ├── qwaylandtextinputv3.h │ │ ├── qwaylandtextinputv3_p.h │ │ ├── qwaylandviewporter.cpp │ │ ├── qwaylandviewporter.h │ │ ├── qwaylandviewporter_p.h │ │ ├── qwaylandwlshell.cpp │ │ ├── qwaylandwlshell.h │ │ ├── qwaylandwlshell_p.h │ │ ├── qwaylandwlshellintegration.cpp │ │ ├── qwaylandwlshellintegration_p.h │ │ ├── qwaylandxdgdecorationv1.cpp │ │ ├── qwaylandxdgdecorationv1.h │ │ ├── qwaylandxdgdecorationv1_p.h │ │ ├── qwaylandxdgdialogv1.cpp │ │ ├── qwaylandxdgdialogv1_p.h │ │ ├── qwaylandxdgoutputv1.cpp │ │ ├── qwaylandxdgoutputv1.h │ │ ├── qwaylandxdgoutputv1_p.h │ │ ├── qwaylandxdgshell.cpp │ │ ├── qwaylandxdgshell.h │ │ ├── qwaylandxdgshell_p.h │ │ ├── qwaylandxdgshellintegration.cpp │ │ ├── qwaylandxdgshellintegration_p.h │ │ ├── qwltexturesharingextension.cpp │ │ └── qwltexturesharingextension_p.h │ ├── global │ │ ├── qtwaylandcompositorglobal.h │ │ ├── qtwaylandcompositorglobal_p.h │ │ ├── qtwaylandqmlinclude.h │ │ ├── qwaylandcompositorextension.cpp │ │ ├── qwaylandcompositorextension.h │ │ ├── qwaylandcompositorextension_p.h │ │ ├── qwaylandquickextension.cpp │ │ ├── qwaylandquickextension.h │ │ ├── qwaylandquickextension.qdoc │ │ └── qwaylandutils_p.h │ ├── hardware_integration │ │ ├── qwlclientbufferintegration.cpp │ │ ├── qwlclientbufferintegration_p.h │ │ ├── qwlclientbufferintegrationfactory.cpp │ │ ├── qwlclientbufferintegrationfactory_p.h │ │ ├── qwlclientbufferintegrationplugin.cpp │ │ ├── qwlclientbufferintegrationplugin_p.h │ │ ├── qwlhardwarelayerintegration.cpp │ │ ├── qwlhardwarelayerintegration_p.h │ │ ├── qwlhardwarelayerintegrationfactory.cpp │ │ ├── qwlhardwarelayerintegrationfactory_p.h │ │ ├── qwlhardwarelayerintegrationplugin.cpp │ │ ├── qwlhardwarelayerintegrationplugin_p.h │ │ ├── qwlhwintegration.cpp │ │ ├── qwlhwintegration_p.h │ │ ├── qwlserverbufferintegration.cpp │ │ ├── qwlserverbufferintegration_p.h │ │ ├── qwlserverbufferintegrationfactory.cpp │ │ ├── qwlserverbufferintegrationfactory_p.h │ │ ├── qwlserverbufferintegrationplugin.cpp │ │ ├── qwlserverbufferintegrationplugin_p.h │ │ ├── qwltextureorphanage.cpp │ │ └── qwltextureorphanage_p.h │ ├── qmlfiles │ │ ├── WaylandCursorItem.qml │ │ └── WaylandOutputWindow.qml │ ├── qt_cmdline.cmake │ ├── shaders │ │ ├── compile │ │ ├── surface.vert │ │ ├── surface.vert.qsb │ │ ├── surface_oes_external.frag │ │ ├── surface_rgba.frag │ │ ├── surface_rgba.frag.qsb │ │ ├── surface_rgbx.frag │ │ ├── surface_rgbx.frag.qsb │ │ ├── surface_y_u_v.frag │ │ ├── surface_y_u_v.frag.qsb │ │ ├── surface_y_uv.frag │ │ ├── surface_y_uv.frag.qsb │ │ ├── surface_y_xuxv.frag │ │ └── surface_y_xuxv.frag.qsb │ └── wayland_wrapper │ │ ├── qwlbuffermanager.cpp │ │ ├── qwlbuffermanager_p.h │ │ ├── qwlclientbuffer.cpp │ │ ├── qwlclientbuffer_p.h │ │ ├── qwldatadevice.cpp │ │ ├── qwldatadevice_p.h │ │ ├── qwldatadevicemanager.cpp │ │ ├── qwldatadevicemanager_p.h │ │ ├── qwldataoffer.cpp │ │ ├── qwldataoffer_p.h │ │ ├── qwldatasource.cpp │ │ ├── qwldatasource_p.h │ │ ├── qwlregion.cpp │ │ └── qwlregion_p.h ├── configure.cmake ├── extensions │ ├── README.md │ ├── REUSE.toml │ └── qt-shell-unstable-v1.xml ├── global │ └── README ├── hardwareintegration │ ├── CMakeLists.txt │ └── compositor │ │ ├── CMakeLists.txt │ │ ├── brcm-egl │ │ ├── brcmbuffer.cpp │ │ ├── brcmbuffer.h │ │ ├── brcmeglintegration.cpp │ │ └── brcmeglintegration.h │ │ ├── dmabuf-server │ │ ├── dmabufserverbufferintegration.cpp │ │ └── dmabufserverbufferintegration.h │ │ ├── drm-egl-server │ │ ├── drmeglserverbufferintegration.cpp │ │ └── drmeglserverbufferintegration.h │ │ ├── hardwarelayer │ │ └── vsp2 │ │ │ ├── vsp2hardwarelayerintegration.cpp │ │ │ └── vsp2hardwarelayerintegration.h │ │ ├── libhybris-egl-server │ │ ├── libhybriseglserverbufferintegration.cpp │ │ └── libhybriseglserverbufferintegration.h │ │ ├── linux-dmabuf-unstable-v1 │ │ ├── linuxdmabuf.cpp │ │ ├── linuxdmabuf.h │ │ ├── linuxdmabufclientbufferintegration.cpp │ │ └── linuxdmabufclientbufferintegration.h │ │ ├── shm-emulation-server │ │ ├── shmserverbufferintegration.cpp │ │ └── shmserverbufferintegration.h │ │ ├── vulkan-server │ │ ├── vulkanserverbufferintegration.cpp │ │ ├── vulkanserverbufferintegration.h │ │ ├── vulkanwrapper.cpp │ │ └── vulkanwrapper.h │ │ ├── wayland-egl │ │ ├── CMakeLists.txt │ │ ├── waylandeglclientbufferintegration.cpp │ │ └── waylandeglclientbufferintegration_p.h │ │ └── wayland-eglstream-controller │ │ ├── waylandeglstreamcontroller.cpp │ │ ├── waylandeglstreamcontroller.h │ │ ├── waylandeglstreamintegration.cpp │ │ └── waylandeglstreamintegration.h ├── imports │ ├── CMakeLists.txt │ ├── compositor-extensions │ │ ├── CMakeLists.txt │ │ ├── iviapplication │ │ │ ├── CMakeLists.txt │ │ │ ├── qwaylandcompositoriviapplicationforeign.cpp │ │ │ └── qwaylandcompositoriviapplicationforeign_p.h │ │ ├── presentationtime │ │ │ ├── CMakeLists.txt │ │ │ ├── qwaylandcompositorpresentationtimeforeign.cpp │ │ │ └── qwaylandcompositorpresentationtimeforeign_p.h │ │ ├── qtshell │ │ │ ├── CMakeLists.txt │ │ │ ├── qwaylandqtshell.cpp │ │ │ ├── qwaylandqtshell.h │ │ │ ├── qwaylandqtshell.qdoc │ │ │ ├── qwaylandqtshell_p.h │ │ │ ├── qwaylandqtshellchrome.cpp │ │ │ ├── qwaylandqtshellchrome.h │ │ │ ├── qwaylandqtshellchrome_p.h │ │ │ ├── qwaylandqtshellintegration.cpp │ │ │ └── qwaylandqtshellintegration_p.h │ │ ├── wlshell │ │ │ ├── CMakeLists.txt │ │ │ ├── qwaylandcompositorwlshell.cpp │ │ │ └── qwaylandcompositorwlshell_p.h │ │ └── xdgshell │ │ │ ├── CMakeLists.txt │ │ │ ├── qwaylandcompositorxdgshell.cpp │ │ │ └── qwaylandcompositorxdgshell_p.h │ ├── texture-sharing-extension │ │ ├── CMakeLists.txt │ │ └── plugin.cpp │ └── texture-sharing │ │ ├── CMakeLists.txt │ │ ├── plugin.cpp │ │ ├── sharedtextureprovider.cpp │ │ ├── sharedtextureprovider_p.h │ │ ├── texturesharingextension.cpp │ │ └── texturesharingextension_p.h ├── plugins │ ├── CMakeLists.txt │ ├── decorations │ │ ├── CMakeLists.txt │ │ └── adwaita │ │ │ ├── CMakeLists.txt │ │ │ ├── adwaita.json │ │ │ ├── main.cpp │ │ │ ├── qwaylandadwaitadecoration.cpp │ │ │ └── qwaylandadwaitadecoration_p.h │ ├── hardwareintegration │ │ ├── CMakeLists.txt │ │ └── compositor │ │ │ ├── CMakeLists.txt │ │ │ ├── brcm-egl │ │ │ ├── CMakeLists.txt │ │ │ ├── brcm-egl.json │ │ │ └── main.cpp │ │ │ ├── dmabuf-server │ │ │ ├── CMakeLists.txt │ │ │ ├── dmabuf-server.json │ │ │ └── main.cpp │ │ │ ├── drm-egl-server │ │ │ ├── CMakeLists.txt │ │ │ ├── drm-egl-server.json │ │ │ └── main.cpp │ │ │ ├── hardwarelayer │ │ │ ├── CMakeLists.txt │ │ │ └── vsp2 │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── main.cpp │ │ │ │ └── vsp2.json │ │ │ ├── libhybris-egl-server │ │ │ ├── CMakeLists.txt │ │ │ ├── libhybris-egl-server.json │ │ │ └── main.cpp │ │ │ ├── linux-dmabuf-unstable-v1 │ │ │ ├── CMakeLists.txt │ │ │ ├── linux-dmabuf-unstable-v1.json │ │ │ └── main.cpp │ │ │ ├── shm-emulation-server │ │ │ ├── CMakeLists.txt │ │ │ ├── main.cpp │ │ │ └── shm-emulation-server.json │ │ │ ├── vulkan-server │ │ │ ├── CMakeLists.txt │ │ │ ├── main.cpp │ │ │ └── vulkan-server.json │ │ │ ├── wayland-egl │ │ │ ├── CMakeLists.txt │ │ │ ├── main.cpp │ │ │ └── wayland-egl.json │ │ │ └── wayland-eglstream-controller │ │ │ ├── CMakeLists.txt │ │ │ ├── main.cpp │ │ │ └── wayland-eglstream-controller.json │ └── shellintegration │ │ ├── CMakeLists.txt │ │ ├── ivi-shell │ │ ├── CMakeLists.txt │ │ ├── README │ │ ├── ivi-shell.json │ │ ├── main.cpp │ │ ├── qwaylandivishellintegration.cpp │ │ ├── qwaylandivishellintegration.h │ │ ├── qwaylandivisurface.cpp │ │ └── qwaylandivisurface_p.h │ │ └── qt-shell │ │ ├── CMakeLists.txt │ │ ├── main.cpp │ │ ├── qt-shell.json │ │ ├── qwaylandqtshellintegration.cpp │ │ ├── qwaylandqtshellintegration.h │ │ ├── qwaylandqtsurface.cpp │ │ └── qwaylandqtsurface_p.h ├── qt_cmdline.cmake └── shared │ ├── qwaylandinputmethodeventbuilder.cpp │ ├── qwaylandinputmethodeventbuilder_p.h │ ├── qwaylandmimehelper.cpp │ ├── qwaylandmimehelper_p.h │ └── qwaylandsharedmemoryformathelper_p.h └── tests ├── CMakeLists.txt ├── auto ├── CMakeLists.txt ├── client │ ├── CMakeLists.txt │ ├── iviapplication │ │ ├── CMakeLists.txt │ │ └── tst_iviapplication.cpp │ └── shared │ │ ├── CMakeLists.txt │ │ ├── corecompositor.cpp │ │ ├── corecompositor.h │ │ ├── coreprotocol.cpp │ │ ├── coreprotocol.h │ │ ├── datadevice.cpp │ │ ├── datadevice.h │ │ ├── fractionalscalev1.cpp │ │ ├── fractionalscalev1.h │ │ ├── fullscreenshellv1.cpp │ │ ├── fullscreenshellv1.h │ │ ├── iviapplication.cpp │ │ ├── iviapplication.h │ │ ├── mockcompositor.cpp │ │ ├── mockcompositor.h │ │ ├── qttextinput.cpp │ │ ├── qttextinput.h │ │ ├── textinput.cpp │ │ ├── textinput.h │ │ ├── viewport.cpp │ │ ├── viewport.h │ │ ├── xdgdialog.cpp │ │ ├── xdgdialog.h │ │ ├── xdgoutputv1.cpp │ │ ├── xdgoutputv1.h │ │ ├── xdgshell.cpp │ │ └── xdgshell.h └── compositor │ ├── CMakeLists.txt │ └── compositor │ ├── CMakeLists.txt │ ├── mockclient.cpp │ ├── mockclient.h │ ├── mockkeyboard.cpp │ ├── mockkeyboard.h │ ├── mockpointer.cpp │ ├── mockpointer.h │ ├── mockseat.cpp │ ├── mockseat.h │ ├── mockxdgoutputv1.cpp │ ├── mockxdgoutputv1.h │ ├── testcompositor.cpp │ ├── testcompositor.h │ ├── testkeyboardgrabber.cpp │ ├── testkeyboardgrabber.h │ ├── testseat.cpp │ ├── testseat.h │ └── tst_compositor.cpp └── manual ├── CMakeLists.txt ├── hwlayer-compositor ├── CMakeLists.txt ├── hwlayer-compositor.pro ├── hwlayer-compositor.qrc ├── main.cpp └── main.qml ├── import-qml-modules ├── CMakeLists.txt ├── Main.qml └── main.cpp ├── keymap └── keymapcompositor.qml ├── qmlclient ├── CMakeLists.txt ├── main.cpp ├── main.qml ├── qml.qrc └── qmlclient.pro ├── qt-shell ├── CMakeLists.txt ├── images │ └── background.jpg ├── main.cpp ├── qml │ ├── Chrome.qml │ ├── CompositorScreen.qml │ ├── HandleHandler.qml │ ├── Keyboard.qml │ └── main.qml ├── qt-shell.pro └── qt-shell.qrc ├── scaling-compositor ├── CMakeLists.txt ├── main.cpp ├── main.qml ├── qml.qrc └── scaling-compositor.pro ├── server-buffer ├── CMakeLists.txt ├── README ├── compositor │ ├── CMakeLists.txt │ ├── compositor.pro │ ├── compositor.qrc │ ├── images │ │ ├── Siberischer_tiger_de_edit02.jpg │ │ ├── Siberischer_tiger_de_edit02.txt │ │ └── background.png │ ├── main.cpp │ ├── qml │ │ └── main.qml │ ├── sharebufferextension.cpp │ └── sharebufferextension.h ├── cpp-client │ ├── CMakeLists.txt │ ├── cpp-client.pro │ ├── main.cpp │ ├── sharebufferextension.cpp │ └── sharebufferextension.h ├── server-buffer.pro └── share-buffer.xml ├── subsurface ├── CMakeLists.txt ├── child.qml ├── main.cpp ├── main.qml ├── qml.qrc ├── shmwindow.cpp ├── shmwindow.h └── subsurface.pro ├── texture-sharing-2 ├── CMakeLists.txt ├── README ├── custom-compositor │ ├── CMakeLists.txt │ ├── compositor.qrc │ ├── custom-compositor.pro │ ├── images │ │ ├── background.png │ │ ├── car.ktx │ │ ├── qt4.astc │ │ └── qt_logo.png │ ├── main.cpp │ └── qml │ │ └── main.qml ├── minimal-compositor.qml ├── qml-client │ ├── CMakeLists.txt │ ├── main.cpp │ ├── main.qml │ ├── qml-client.pro │ └── qml-client.qrc └── texture-sharing.pro ├── texture-sharing └── cpp-client │ ├── CMakeLists.txt │ ├── cpp-client.pro │ └── main.cpp └── wip-cpp-compositor ├── CMakeLists.txt ├── README.md ├── compositor.cpp ├── compositor.h ├── main.cpp ├── window.cpp ├── window.h └── wip-cpp-compositor.pro /.cmake.conf: -------------------------------------------------------------------------------- 1 | set(QT_REPO_MODULE_VERSION "6.10.0") 2 | set(QT_REPO_MODULE_PRERELEASE_VERSION_SEGMENT "alpha1") 3 | set(QT_EXTRA_INTERNAL_TARGET_DEFINES "QT_NO_AS_CONST=1") 4 | list(APPEND QT_EXTRA_INTERNAL_TARGET_DEFINES "QT_NO_FOREACH=1") 5 | list(APPEND QT_EXTRA_INTERNAL_TARGET_DEFINES "QT_NO_CONTEXTLESS_CONNECT=1") 6 | -------------------------------------------------------------------------------- /.gitreview: -------------------------------------------------------------------------------- 1 | [gerrit] 2 | host=codereview.qt-project.org 3 | project=qt/qtwayland 4 | defaultbranch=dev 5 | -------------------------------------------------------------------------------- /.tag: -------------------------------------------------------------------------------- 1 | 07f81efabf8192c991efacb61cdd867f936751ac 2 | -------------------------------------------------------------------------------- /LICENSES/LicenseRef-Qt-Commercial.txt: -------------------------------------------------------------------------------- 1 | Licensees holding valid commercial Qt licenses may use this software in 2 | accordance with the the terms contained in a written agreement between 3 | you and The Qt Company. Alternatively, the terms and conditions that were 4 | accepted by the licensee when buying and/or downloading the 5 | software do apply. 6 | 7 | For the latest licensing terms and conditions, see https://www.qt.io/terms-conditions. 8 | For further information use the contact form at https://www.qt.io/contact-us. 9 | -------------------------------------------------------------------------------- /LICENSES/MIT.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | MIT License 4 | 5 | Copyright (c) 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 8 | 9 | The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software. 10 | 11 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 12 | -------------------------------------------------------------------------------- /LICENSES/Qt-GPL-exception-1.0.txt: -------------------------------------------------------------------------------- 1 | The Qt Company GPL Exception 1.0 2 | 3 | Exception 1: 4 | 5 | As a special exception you may create a larger work which contains the 6 | output of this application and distribute that work under terms of your 7 | choice, so long as the work is not otherwise derived from or based on 8 | this application and so long as the work does not in itself generate 9 | output that contains the output from this application in its original 10 | or modified form. 11 | 12 | Exception 2: 13 | 14 | As a special exception, you have permission to combine this application 15 | with Plugins licensed under the terms of your choice, to produce an 16 | executable, and to copy and distribute the resulting executable under 17 | the terms of your choice. However, the executable must be accompanied 18 | by a prominent notice offering all users of the executable the entire 19 | source code to this application, excluding the source code of the 20 | independent modules, but including any changes you have made to this 21 | application, under the terms of this license. 22 | 23 | -------------------------------------------------------------------------------- /cmake/FindWaylandkms.cmake: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022 The Qt Company Ltd. 2 | # SPDX-License-Identifier: BSD-3-Clause 3 | 4 | if (TARGET PkgConfig::Waylandkms) 5 | set(Waylandkms_FOUND 1) 6 | return() 7 | endif() 8 | 9 | find_package(PkgConfig QUIET) 10 | 11 | pkg_check_modules(Waylandkms wayland-kms IMPORTED_TARGET) 12 | 13 | if (NOT TARGET PkgConfig::Waylandkms) 14 | set(Waylandkms_FOUND 0) 15 | endif() 16 | -------------------------------------------------------------------------------- /cmake/QtWaylandSetup.cmake: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2025 The Qt Company Ltd. 2 | # SPDX-License-Identifier: BSD-3-Clause 3 | 4 | function(qt_internal_get_wayland_protocols_dir out_var) 5 | if(QT_SUPERBUILD AND NOT QT_INTERNAL_BUILD_STANDALONE_PARTS) 6 | set(qtbase_wayland_protocols_dir 7 | "${QT_BUILD_DIR}/${INSTALL_SHAREDIR}/qt6/wayland/protocols/") 8 | else() 9 | set(qtbase_wayland_protocols_dir 10 | "${QT_BUILD_INTERNALS_RELOCATABLE_INSTALL_PREFIX}/${QT6_INSTALL_SHAREDIR}/qt6/wayland/protocols/") 11 | endif() 12 | set(${out_var} "${qtbase_wayland_protocols_dir}" PARENT_SCOPE) 13 | endfunction() 14 | 15 | function(qt_internal_get_wayland_extensions_dir out_var) 16 | if(QT_SUPERBUILD AND NOT QT_INTERNAL_BUILD_STANDALONE_PARTS) 17 | set(qtbase_wayland_extensions_dir 18 | "${QT_BUILD_DIR}/${INSTALL_SHAREDIR}/qt6/wayland/extensions/") 19 | else() 20 | set(qtbase_wayland_extensions_dir 21 | "${QT_BUILD_INTERNALS_RELOCATABLE_INSTALL_PREFIX}/${QT6_INSTALL_SHAREDIR}/qt6/wayland/extensions/") 22 | endif() 23 | set(${out_var} "${qtbase_wayland_extensions_dir}" PARENT_SCOPE) 24 | endfunction() 25 | -------------------------------------------------------------------------------- /coin/axivion/ci_config_linux.json: -------------------------------------------------------------------------------- 1 | { 2 | "Project": { 3 | "BuildSystemIntegration": { 4 | "child_order": [ 5 | "LinkLibraries" 6 | ] 7 | }, 8 | "LinkLibraries": { 9 | "_active": true, 10 | "_copy_from": "AxivionLinker", 11 | "input_files": [ 12 | "$(splitpath:TARGET_NAME)" 13 | ], 14 | "ir": "$(env:IRNAME)", 15 | "plugin_files": [ 16 | "$(splitpath:PLUGINS)" 17 | ] 18 | } 19 | }, 20 | "_Format": "1.0", 21 | "_Version": "7.6.2", 22 | "_VersionNum": [ 23 | 7, 24 | 6, 25 | 2, 26 | 12725 27 | ] 28 | } 29 | -------------------------------------------------------------------------------- /coin/module_config.yaml: -------------------------------------------------------------------------------- 1 | version: 2 2 | accept_configuration: 3 | condition: property 4 | property: features 5 | not_contains_value: Disable 6 | 7 | instructions: 8 | Build: 9 | - type: EnvironmentVariable 10 | variableName: VERIFY_SOURCE_SBOM 11 | variableValue: "ON" 12 | - !include "{{qt/qtbase}}/coin_module_build_template_v2.yaml" 13 | 14 | Test: 15 | - type: Group 16 | instructions: 17 | - !include "{{qt/qtbase}}/coin_module_test_template_v3.yaml" 18 | - !include "{{qt/qtbase}}/coin_module_test_docs.yaml" 19 | disable_if: 20 | condition: or 21 | conditions: 22 | - condition: property 23 | property: host.os 24 | in_values: ["Windows", "MacOS"] 25 | - condition: property 26 | property: target.os 27 | in_values: ["QNX", "IOS", "Android", "WebAssembly"] 28 | -------------------------------------------------------------------------------- /coin/qt-installer-package-config.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1", 3 | "module-split": { 4 | "qtwayland-compositor": [ 5 | "**/*compositor*", 6 | "**/*Compositor*/**/*", 7 | "**/*Compositor*", 8 | "**/wayland-graphics-integration-server/*", 9 | "**/wayland-hardware-layer-integration/*", 10 | "**/QmlPlugins/Qt6WaylandTextureSharing*.cmake" 11 | ] 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /configure.cmake: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022 The Qt Company Ltd. 2 | # SPDX-License-Identifier: BSD-3-Clause 3 | 4 | 5 | 6 | #### Inputs 7 | 8 | 9 | 10 | #### Libraries 11 | 12 | 13 | 14 | #### Tests 15 | 16 | 17 | 18 | #### Features 19 | 20 | 21 | qt_extra_definition("QT_VERSION_STR" "\"${PROJECT_VERSION}\"" PUBLIC) 22 | qt_extra_definition("QT_VERSION_MAJOR" ${PROJECT_VERSION_MAJOR} PUBLIC) 23 | qt_extra_definition("QT_VERSION_MINOR" ${PROJECT_VERSION_MINOR} PUBLIC) 24 | qt_extra_definition("QT_VERSION_PATCH" ${PROJECT_VERSION_PATCH} PUBLIC) 25 | -------------------------------------------------------------------------------- /dependencies.yaml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | ../qtbase: 3 | ref: a867a16ef0a29f9b8b7196d0959e980ee17d7876 4 | required: true 5 | ../qtdeclarative: 6 | ref: fa4568622cc19e5a876238d6cfca2e95936f8bdd 7 | required: false 8 | ../qtsvg: 9 | ref: a1e089cb66f3d1aaa8629fc6ba95b60f30c9165b 10 | required: false 11 | -------------------------------------------------------------------------------- /dist/REUSE.toml: -------------------------------------------------------------------------------- 1 | version = 1 2 | 3 | [[annotations]] 4 | path = ["*"] 5 | precedence = "override" 6 | comment = "Licensed as documentation." 7 | SPDX-FileCopyrightText = "Copyright (C) 2024 The Qt Company Ltd." 8 | SPDX-License-Identifier = "LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only" 9 | -------------------------------------------------------------------------------- /dist/changes-5.12.2: -------------------------------------------------------------------------------- 1 | Qt 5.12.2 is a bug-fix release. It maintains both forward and backward 2 | compatibility (source and binary) with Qt 5.12.0 through 5.12.1. 3 | 4 | For more details, refer to the online documentation included in this 5 | distribution. The documentation is also available online: 6 | 7 | https://doc.qt.io/qt-5/index.html 8 | 9 | The Qt version 5.12 series is binary compatible with the 5.11.x series. 10 | Applications compiled for 5.11 will continue to run with 5.12. 11 | 12 | Some of the changes listed in this file include issue tracking numbers 13 | corresponding to tasks in the Qt Bug Tracker: 14 | 15 | https://bugreports.qt.io/ 16 | 17 | Each of these identifiers can be entered in the bug tracker to obtain more 18 | information about a particular change. 19 | 20 | **************************************************************************** 21 | * QPA plugin * 22 | **************************************************************************** 23 | 24 | - [QTBUG-73524] Fixed a crash that sometimes happened when switching popups. 25 | -------------------------------------------------------------------------------- /dist/changes-5.14.2: -------------------------------------------------------------------------------- 1 | Qt 5.14.2 is a bug-fix release. It maintains both forward and backward 2 | compatibility (source and binary) with Qt 5.14.0 through 5.14.1. 3 | 4 | For more details, refer to the online documentation included in this 5 | distribution. The documentation is also available online: 6 | 7 | https://doc.qt.io/qt-5/index.html 8 | 9 | The Qt version 5.14 series is binary compatible with the 5.13.x series. 10 | Applications compiled for 5.13 will continue to run with 5.14. 11 | 12 | Some of the changes listed in this file include issue tracking numbers 13 | corresponding to tasks in the Qt Bug Tracker: 14 | 15 | https://bugreports.qt.io/ 16 | 17 | Each of these identifiers can be entered in the bug tracker to obtain more 18 | information about a particular change. 19 | 20 | - This release contains only minor code improvements. 21 | -------------------------------------------------------------------------------- /dist/changes-5.9.6: -------------------------------------------------------------------------------- 1 | Qt 5.9.6 is a bug-fix release. It maintains both forward and backward 2 | compatibility (source and binary) with Qt 5.9.0 through 5.9.5. 3 | 4 | For more details, refer to the online documentation included in this 5 | distribution. The documentation is also available online: 6 | 7 | http://doc.qt.io/qt-5/index.html 8 | 9 | The Qt version 5.9 series is binary compatible with the 5.8.x series. 10 | Applications compiled for 5.8 will continue to run with 5.9. 11 | 12 | Some of the changes listed in this file include issue tracking numbers 13 | corresponding to tasks in the Qt Bug Tracker: 14 | 15 | https://bugreports.qt.io/ 16 | 17 | Each of these identifiers can be entered in the bug tracker to obtain more 18 | information about a particular change. 19 | 20 | **************************************************************************** 21 | * Qt 5.9.6 Changes * 22 | **************************************************************************** 23 | 24 | QPA plugin 25 | ---------- 26 | 27 | - [QTBUG-63411] Fixed a crash when calling setVisible for EGL windows twice 28 | within one slot. 29 | - [QTBUG-67150] Fixed a crash when a popup was shown without any input 30 | events happening first. 31 | -------------------------------------------------------------------------------- /dist/changes-6.0.0: -------------------------------------------------------------------------------- 1 | Qt 6.0.0 is a new major version release of Qt. It is not binary compatible with 2 | earlier Qt releases. 3 | 4 | The goal has been to retain as much source compatibility with Qt 5.15 as 5 | possible, but some changes were inevitable to make Qt a better framework. 6 | 7 | To make it easier to port to Qt 6.0, we have created a porting guide to 8 | summarize those changes and provide guidance to handle them. In the guide, you 9 | can find links to articles about changes that may affect your application and 10 | help you transition from Qt 5.15 to Qt 6.0: 11 | 12 | https://doc.qt.io/qt-6/portingguide.html 13 | 14 | For more details refer to the online documentation of Qt 6.0: 15 | 16 | https://doc.qt.io/qt-6/index.html 17 | 18 | -------------------------------------------------------------------------------- /examples/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022 The Qt Company Ltd. 2 | # SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause 3 | 4 | qt_examples_build_begin(EXTERNAL_BUILD) 5 | 6 | add_subdirectory(wayland) 7 | 8 | qt_examples_build_end() 9 | -------------------------------------------------------------------------------- /examples/examples.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = subdirs 2 | SUBDIRS += wayland 3 | -------------------------------------------------------------------------------- /examples/wayland/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022 The Qt Company Ltd. 2 | # SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause 3 | 4 | if(QT_FEATURE_wayland_server) 5 | if(QT_FEATURE_opengl) 6 | qt_internal_add_example(minimal-cpp) 7 | endif() 8 | if(TARGET Qt::Quick) 9 | qt_internal_add_example(minimal-qml) 10 | qt_internal_add_example(spanning-screens) 11 | qt_internal_add_example(fancy-compositor) 12 | qt_internal_add_example(multi-output) 13 | qt_internal_add_example(multi-screen) 14 | qt_internal_add_example(overview-compositor) 15 | qt_internal_add_example(ivi-compositor) 16 | qt_internal_add_example(server-side-decoration) 17 | qt_internal_add_example(qtshell) 18 | endif() 19 | if(TARGET Qt::Quick AND TARGET Qt::WaylandClient) 20 | qt_internal_add_example(custom-extension) 21 | qt_internal_add_example(custom-shell) 22 | endif() 23 | endif() 24 | -------------------------------------------------------------------------------- /examples/wayland/custom-extension/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022 The Qt Company Ltd. 2 | # SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause 3 | 4 | cmake_minimum_required(VERSION 3.16) 5 | project(custom-extension) 6 | 7 | add_subdirectory(qml-client) 8 | add_subdirectory(compositor) 9 | add_subdirectory(cpp-client) 10 | -------------------------------------------------------------------------------- /examples/wayland/custom-extension/compositor/compositor.pro: -------------------------------------------------------------------------------- 1 | QT += core gui qml 2 | 3 | QT += waylandcompositor 4 | 5 | CONFIG += qmltypes 6 | QML_IMPORT_NAME = io.qt.examples.customextension 7 | QML_IMPORT_MAJOR_VERSION = 1 8 | 9 | CONFIG += wayland-scanner 10 | CONFIG += c++11 11 | SOURCES += \ 12 | main.cpp \ 13 | customextension.cpp 14 | 15 | OTHER_FILES = \ 16 | qml/main.qml \ 17 | qml/CompositorScreen.qml \ 18 | images/background.jpg 19 | 20 | WAYLANDSERVERSOURCES += \ 21 | ../protocol/custom.xml 22 | 23 | RESOURCES += compositor.qrc 24 | 25 | TARGET = custom-extension-compositor 26 | 27 | HEADERS += \ 28 | customextension.h 29 | 30 | target.path = $$[QT_INSTALL_EXAMPLES]/wayland/custom-extension/compositor 31 | INSTALLS += target 32 | -------------------------------------------------------------------------------- /examples/wayland/custom-extension/compositor/compositor.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | images/background.png 4 | qml/main.qml 5 | qml/CompositorScreen.qml 6 | 7 | 8 | -------------------------------------------------------------------------------- /examples/wayland/custom-extension/compositor/images/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qt/qtwayland/07f81efabf8192c991efacb61cdd867f936751ac/examples/wayland/custom-extension/compositor/images/background.png -------------------------------------------------------------------------------- /examples/wayland/custom-extension/compositor/main.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2017 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | #include 10 | #include 11 | 12 | #include "customextension.h" 13 | 14 | int main(int argc, char *argv[]) 15 | { 16 | // ShareOpenGLContexts is needed for using the threaded renderer 17 | // on Nvidia EGLStreams 18 | QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts, true); 19 | QGuiApplication app(argc, argv); 20 | QQmlApplicationEngine appEngine(QUrl("qrc:///qml/main.qml")); 21 | 22 | return app.exec(); 23 | } 24 | -------------------------------------------------------------------------------- /examples/wayland/custom-extension/cpp-client/cpp-client.pro: -------------------------------------------------------------------------------- 1 | QT += waylandclient gui-private 2 | CONFIG += wayland-scanner 3 | 4 | WAYLANDCLIENTSOURCES += ../protocol/custom.xml 5 | 6 | SOURCES += main.cpp \ 7 | ../client-common/customextension.cpp 8 | 9 | HEADERS += \ 10 | ../client-common/customextension.h 11 | 12 | TARGET = custom-extension-cpp-client 13 | 14 | target.path = $$[QT_INSTALL_EXAMPLES]/wayland/custom-extension/cpp-client 15 | INSTALLS += target 16 | -------------------------------------------------------------------------------- /examples/wayland/custom-extension/custom-extension.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE=subdirs 2 | 3 | SUBDIRS += qml-client 4 | SUBDIRS += compositor 5 | SUBDIRS += cpp-client 6 | 7 | OTHER_FILES += protocol/custom.xml 8 | -------------------------------------------------------------------------------- /examples/wayland/custom-extension/doc/images/custom-extension.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qt/qtwayland/07f81efabf8192c991efacb61cdd867f936751ac/examples/wayland/custom-extension/doc/images/custom-extension.png -------------------------------------------------------------------------------- /examples/wayland/custom-extension/qml-client/main.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2017 Erik Larsson. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | #include "../client-common/customextension.h" 9 | 10 | int main(int argc, char *argv[]) 11 | { 12 | QGuiApplication app(argc, argv); 13 | 14 | QQmlApplicationEngine engine; 15 | engine.load(QUrl(QStringLiteral("qrc:/main.qml"))); 16 | 17 | return app.exec(); 18 | } 19 | 20 | -------------------------------------------------------------------------------- /examples/wayland/custom-extension/qml-client/qml-client.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = app 2 | QT += qml quick waylandclient gui-private 3 | CONFIG += wayland-scanner 4 | 5 | CONFIG += qmltypes 6 | QML_IMPORT_NAME = io.qt.examples.customextension 7 | QML_IMPORT_MAJOR_VERSION = 1 8 | 9 | INCLUDEPATH += $$PWD/../client-common 10 | 11 | WAYLANDCLIENTSOURCES += ../protocol/custom.xml 12 | 13 | SOURCES += main.cpp \ 14 | ../client-common/customextension.cpp 15 | 16 | HEADERS += \ 17 | ../client-common/customextension.h 18 | 19 | TARGET = custom-extension-qml-client 20 | 21 | RESOURCES += qml.qrc 22 | 23 | target.path = $$[QT_INSTALL_EXAMPLES]/wayland/custom-extension/qml-client 24 | INSTALLS += target 25 | 26 | 27 | -------------------------------------------------------------------------------- /examples/wayland/custom-extension/qml-client/qml.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | main.qml 4 | 5 | 6 | -------------------------------------------------------------------------------- /examples/wayland/custom-shell/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.16) 2 | project(custom-shell) 3 | 4 | add_subdirectory(client-plugin) 5 | add_subdirectory(compositor) 6 | -------------------------------------------------------------------------------- /examples/wayland/custom-shell/client-plugin/client-plugin.pro: -------------------------------------------------------------------------------- 1 | QT += gui-private waylandclient-private 2 | CONFIG += plugin wayland-scanner 3 | TEMPLATE = lib 4 | 5 | QMAKE_USE += wayland-client 6 | 7 | qtConfig(xkbcommon): \ 8 | QMAKE_USE += xkbcommon 9 | 10 | WAYLANDCLIENTSOURCES += \ 11 | ../protocol/example-shell.xml 12 | 13 | HEADERS += \ 14 | exampleshellintegration.h \ 15 | examplesurface.h 16 | 17 | SOURCES += \ 18 | main.cpp \ 19 | exampleshellintegration.cpp \ 20 | examplesurface.cpp 21 | 22 | OTHER_FILES += \ 23 | example-shell.json 24 | 25 | DESTDIR = ../plugins/wayland-shell-integration 26 | TARGET = $$qtLibraryTarget(exampleshellplugin) 27 | 28 | ### Everything below this line is just to make the example work inside the Qt source tree. 29 | ### Do not include the following lines in your own code. 30 | 31 | target.path = $$[QT_INSTALL_EXAMPLES]/wayland/customshell/plugins/wayland-shell-integration 32 | INSTALLS += target 33 | CONFIG += install_ok 34 | -------------------------------------------------------------------------------- /examples/wayland/custom-shell/client-plugin/example-shell.json: -------------------------------------------------------------------------------- 1 | { 2 | "Keys":[ "example-shell" ] 3 | } 4 | -------------------------------------------------------------------------------- /examples/wayland/custom-shell/client-plugin/exampleshellintegration.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause 3 | 4 | #include "exampleshellintegration.h" 5 | #include "examplesurface.h" 6 | 7 | //! [constructor] 8 | ExampleShellIntegration::ExampleShellIntegration() 9 | : QWaylandShellIntegrationTemplate(/* Supported protocol version */ 1) 10 | { 11 | } 12 | //! [constructor] 13 | 14 | //! [createShellSurface] 15 | QWaylandShellSurface *ExampleShellIntegration::createShellSurface(QWaylandWindow *window) 16 | { 17 | if (!isActive()) 18 | return nullptr; 19 | auto *surface = surface_create(wlSurfaceForWindow(window)); 20 | return new ExampleShellSurface(surface, window); 21 | } 22 | //! [createShellSurface] 23 | -------------------------------------------------------------------------------- /examples/wayland/custom-shell/client-plugin/exampleshellintegration.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause 3 | 4 | #ifndef EXAMPLESHELLINTEGRATION_H 5 | #define EXAMPLESHELLINTEGRATION_H 6 | #include 7 | #include "qwayland-example-shell.h" 8 | 9 | using namespace QtWaylandClient; 10 | 11 | //! [shell-integration] 12 | class Q_WAYLANDCLIENT_EXPORT ExampleShellIntegration 13 | : public QWaylandShellIntegrationTemplate 14 | , public QtWayland::qt_example_shell 15 | { 16 | public: 17 | ExampleShellIntegration(); 18 | 19 | QWaylandShellSurface *createShellSurface(QWaylandWindow *window) override; 20 | }; 21 | //! [shell-integration] 22 | 23 | #endif // EXAMPLESHELLINTEGRATION_H 24 | -------------------------------------------------------------------------------- /examples/wayland/custom-shell/client-plugin/main.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause 3 | 4 | #include "exampleshellintegration.h" 5 | 6 | //! [include] 7 | #include 8 | //! [include] 9 | 10 | #include "qwayland-example-shell.h" 11 | 12 | using namespace QtWaylandClient; 13 | 14 | //! [plugin] 15 | class QWaylandExampleShellIntegrationPlugin : public QWaylandShellIntegrationPlugin 16 | { 17 | Q_OBJECT 18 | Q_PLUGIN_METADATA(IID QWaylandShellIntegrationFactoryInterface_iid FILE "example-shell.json") 19 | 20 | public: 21 | QWaylandShellIntegration *create(const QString &key, const QStringList ¶mList) override; 22 | }; 23 | 24 | QWaylandShellIntegration *QWaylandExampleShellIntegrationPlugin::create(const QString &key, const QStringList ¶mList) 25 | { 26 | Q_UNUSED(key); 27 | Q_UNUSED(paramList); 28 | return new ExampleShellIntegration(); 29 | } 30 | //! [plugin] 31 | 32 | #include "main.moc" 33 | -------------------------------------------------------------------------------- /examples/wayland/custom-shell/compositor/compositor.pro: -------------------------------------------------------------------------------- 1 | QT += core gui qml 2 | 3 | QT += waylandcompositor 4 | 5 | CONFIG += wayland-scanner 6 | CONFIG += c++11 7 | SOURCES += \ 8 | main.cpp \ 9 | exampleshell.cpp \ 10 | exampleshellintegration.cpp \ 11 | 12 | HEADERS += \ 13 | exampleshell.h \ 14 | exampleshellintegration.h 15 | 16 | OTHER_FILES = \ 17 | qml/main.qml \ 18 | images/background.jpg 19 | 20 | WAYLANDSERVERSOURCES += \ 21 | ../protocol/example-shell.xml 22 | 23 | RESOURCES += compositor.qrc 24 | 25 | TARGET = custom-shell-compositor 26 | 27 | 28 | target.path = $$[QT_INSTALL_EXAMPLES]/wayland/custom-shell/compositor 29 | INSTALLS += target 30 | -------------------------------------------------------------------------------- /examples/wayland/custom-shell/compositor/compositor.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | images/background.png 4 | qml/main.qml 5 | 6 | 7 | -------------------------------------------------------------------------------- /examples/wayland/custom-shell/compositor/exampleshellintegration.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause 3 | 4 | #include "exampleshellintegration.h" 5 | 6 | #include 7 | #include 8 | #include 9 | #include "exampleshell.h" 10 | 11 | 12 | ExampleShellIntegration::ExampleShellIntegration(QWaylandQuickShellSurfaceItem *item) 13 | : QWaylandQuickShellIntegration(item) 14 | , m_item(item) 15 | , m_shellSurface(qobject_cast(item->shellSurface())) 16 | { 17 | m_item->setSurface(m_shellSurface->surface()); 18 | connect(m_shellSurface, &ExampleShellSurface::destroyed, this, &ExampleShellIntegration::handleExampleShellSurfaceDestroyed); 19 | } 20 | 21 | ExampleShellIntegration::~ExampleShellIntegration() 22 | { 23 | m_item->setSurface(nullptr); 24 | } 25 | 26 | void ExampleShellIntegration::handleExampleShellSurfaceDestroyed() 27 | { 28 | m_shellSurface = nullptr; 29 | } 30 | -------------------------------------------------------------------------------- /examples/wayland/custom-shell/compositor/exampleshellintegration.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause 3 | 4 | #ifndef EXAMPLESHELLINTEGRATION_H 5 | #define EXAMPLESHELLINTEGRATION_H 6 | 7 | #include "exampleshell.h" 8 | #include 9 | #include 10 | 11 | class ExampleShellIntegration : public QWaylandQuickShellIntegration 12 | { 13 | Q_OBJECT 14 | public: 15 | ExampleShellIntegration(QWaylandQuickShellSurfaceItem *item); 16 | ~ExampleShellIntegration() override; 17 | 18 | private slots: 19 | void handleExampleShellSurfaceDestroyed(); 20 | 21 | private: 22 | QWaylandQuickShellSurfaceItem *m_item = nullptr; 23 | ExampleShellSurface *m_shellSurface = nullptr; 24 | }; 25 | 26 | #endif // EXAMPLESHELLINTEGRATION_H 27 | -------------------------------------------------------------------------------- /examples/wayland/custom-shell/compositor/images/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qt/qtwayland/07f81efabf8192c991efacb61cdd867f936751ac/examples/wayland/custom-shell/compositor/images/background.png -------------------------------------------------------------------------------- /examples/wayland/custom-shell/compositor/main.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | #include 10 | #include 11 | 12 | #include "exampleshell.h" 13 | 14 | static void registerTypes() 15 | { 16 | qmlRegisterType("io.qt.examples", 1, 0, "ExampleShell"); 17 | } 18 | 19 | int main(int argc, char *argv[]) 20 | { 21 | // ShareOpenGLContexts is needed for using the threaded renderer 22 | // on Nvidia EGLStreams 23 | QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts, true); 24 | QGuiApplication app(argc, argv); 25 | registerTypes(); 26 | QQmlApplicationEngine appEngine(QUrl("qrc:///qml/main.qml")); 27 | 28 | return app.exec(); 29 | } 30 | -------------------------------------------------------------------------------- /examples/wayland/custom-shell/custom-shell.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE=subdirs 2 | 3 | SUBDIRS += compositor client-plugin 4 | 5 | OTHER_FILES += protocol/example-shell.xml 6 | -------------------------------------------------------------------------------- /examples/wayland/custom-shell/doc/images/custom-shell.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qt/qtwayland/07f81efabf8192c991efacb61cdd867f936751ac/examples/wayland/custom-shell/doc/images/custom-shell.jpg -------------------------------------------------------------------------------- /examples/wayland/custom-shell/protocol/example-shell.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Copyright (C) 2021 The Qt Company Ltd. 5 | SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /examples/wayland/fancy-compositor/fancy-compositor.pro: -------------------------------------------------------------------------------- 1 | QT += gui qml 2 | 3 | SOURCES += \ 4 | main.cpp 5 | 6 | OTHER_FILES = \ 7 | qml/main.qml \ 8 | qml/CompositorScreen.qml \ 9 | qml/Chrome.qml \ 10 | qml/Keyboard.qml \ 11 | images/background.jpg \ 12 | 13 | RESOURCES += fancy-compositor.qrc 14 | 15 | target.path = $$[QT_INSTALL_EXAMPLES]/wayland/fancy-compositor 16 | sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS fancy-compositor.pro 17 | sources.path = $$[QT_INSTALL_EXAMPLES]/wayland/fancy-compositor 18 | INSTALLS += target sources 19 | -------------------------------------------------------------------------------- /examples/wayland/fancy-compositor/fancy-compositor.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | images/background.jpg 4 | qml/main.qml 5 | qml/CompositorScreen.qml 6 | qml/Chrome.qml 7 | qml/Keyboard.qml 8 | 9 | 10 | -------------------------------------------------------------------------------- /examples/wayland/fancy-compositor/images/background.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qt/qtwayland/07f81efabf8192c991efacb61cdd867f936751ac/examples/wayland/fancy-compositor/images/background.jpg -------------------------------------------------------------------------------- /examples/wayland/fancy-compositor/main.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2017 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause 3 | 4 | #include 5 | #include 6 | 7 | #include 8 | 9 | #include 10 | 11 | int main(int argc, char *argv[]) 12 | { 13 | // ShareOpenGLContexts is needed for using the threaded renderer 14 | // on Nvidia EGLStreams 15 | QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts, true); 16 | QGuiApplication app(argc, argv); 17 | 18 | QQmlApplicationEngine appEngine(QUrl("qrc:///qml/main.qml")); 19 | 20 | return app.exec(); 21 | } 22 | -------------------------------------------------------------------------------- /examples/wayland/fancy-compositor/qml/Keyboard.qml: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2017 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause 3 | 4 | // ![keyboard] 5 | import QtQuick 6 | import QtQuick.VirtualKeyboard 7 | 8 | InputPanel { 9 | visible: active 10 | y: active ? parent.height - height : parent.height 11 | anchors.left: parent.left 12 | anchors.right: parent.right 13 | } 14 | // ![keyboard] 15 | 16 | -------------------------------------------------------------------------------- /examples/wayland/ivi-compositor/doc/images/ivi-compositor-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qt/qtwayland/07f81efabf8192c991efacb61cdd867f936751ac/examples/wayland/ivi-compositor/doc/images/ivi-compositor-1.png -------------------------------------------------------------------------------- /examples/wayland/ivi-compositor/doc/images/ivi-compositor-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qt/qtwayland/07f81efabf8192c991efacb61cdd867f936751ac/examples/wayland/ivi-compositor/doc/images/ivi-compositor-2.png -------------------------------------------------------------------------------- /examples/wayland/ivi-compositor/doc/images/ivi-compositor-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qt/qtwayland/07f81efabf8192c991efacb61cdd867f936751ac/examples/wayland/ivi-compositor/doc/images/ivi-compositor-3.png -------------------------------------------------------------------------------- /examples/wayland/ivi-compositor/ivi-compositor.pro: -------------------------------------------------------------------------------- 1 | QT += gui qml 2 | 3 | SOURCES += \ 4 | main.cpp 5 | 6 | OTHER_FILES = \ 7 | main.qml 8 | 9 | RESOURCES += ivi-compositor.qrc 10 | 11 | target.path = $$[QT_INSTALL_EXAMPLES]/wayland/ivi-compositor 12 | sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS ivi-compositor.pro 13 | sources.path = $$[QT_INSTALL_EXAMPLES]/wayland/ivi-compositor 14 | INSTALLS += target sources 15 | -------------------------------------------------------------------------------- /examples/wayland/ivi-compositor/ivi-compositor.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | main.qml 4 | 5 | 6 | -------------------------------------------------------------------------------- /examples/wayland/ivi-compositor/main.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2017 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause 3 | 4 | #include 5 | #include 6 | 7 | #include 8 | 9 | #include 10 | 11 | int main(int argc, char *argv[]) 12 | { 13 | // ShareOpenGLContexts is needed for using the threaded renderer 14 | // on Nvidia EGLStreams 15 | QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts, true); 16 | QGuiApplication app(argc, argv); 17 | 18 | QQmlApplicationEngine appEngine(QUrl("qrc:///main.qml")); 19 | 20 | return app.exec(); 21 | } 22 | -------------------------------------------------------------------------------- /examples/wayland/minimal-cpp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022 The Qt Company Ltd. 2 | # SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause 3 | 4 | cmake_minimum_required(VERSION 3.16) 5 | project(minimal-cpp LANGUAGES CXX) 6 | 7 | set(CMAKE_AUTOMOC ON) 8 | 9 | if(NOT DEFINED INSTALL_EXAMPLESDIR) 10 | set(INSTALL_EXAMPLESDIR "examples") 11 | endif() 12 | 13 | set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/wayland/minimal-cpp") 14 | 15 | find_package(Qt6 REQUIRED COMPONENTS Core Gui WaylandCompositor) 16 | 17 | qt_add_executable(minimal-cpp 18 | compositor.cpp compositor.h 19 | main.cpp 20 | window.cpp window.h 21 | ) 22 | 23 | set_target_properties(minimal-cpp PROPERTIES 24 | WIN32_EXECUTABLE TRUE 25 | MACOSX_BUNDLE TRUE 26 | ) 27 | 28 | target_include_directories(minimal-cpp PUBLIC 29 | ../../include 30 | ) 31 | 32 | target_link_libraries(minimal-cpp PUBLIC 33 | # Remove: L 34 | #../../lib 35 | Qt::Core 36 | Qt::Gui 37 | Qt::WaylandCompositor 38 | ) 39 | 40 | install(TARGETS minimal-cpp 41 | RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" 42 | BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" 43 | LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" 44 | ) 45 | -------------------------------------------------------------------------------- /examples/wayland/minimal-cpp/README: -------------------------------------------------------------------------------- 1 | A minimal example showing what is required to get a C++ based compositor up 2 | and running. Input events are not delivered to clients, to avoid the logic 3 | for finding the correct window and map the coordinates. This example uses the 4 | IVI-application shell protocol, positioning windows based on the ivi_id. 5 | 6 | -------------------------------------------------------------------------------- /examples/wayland/minimal-cpp/doc/images/minimal-cpp.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qt/qtwayland/07f81efabf8192c991efacb61cdd867f936751ac/examples/wayland/minimal-cpp/doc/images/minimal-cpp.jpg -------------------------------------------------------------------------------- /examples/wayland/minimal-cpp/main.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2017 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause 3 | 4 | #include 5 | #include "window.h" 6 | #include "compositor.h" 7 | 8 | int main(int argc, char *argv[]) 9 | { 10 | QGuiApplication app(argc, argv); 11 | 12 | Window window; 13 | window.resize(800,600); 14 | Compositor compositor(&window); 15 | window.show(); 16 | 17 | return app.exec(); 18 | } 19 | -------------------------------------------------------------------------------- /examples/wayland/minimal-cpp/minimal-cpp.pro: -------------------------------------------------------------------------------- 1 | QT += gui waylandcompositor 2 | 3 | LIBS += -L ../../lib 4 | 5 | HEADERS += \ 6 | compositor.h \ 7 | window.h 8 | 9 | SOURCES += main.cpp \ 10 | compositor.cpp \ 11 | window.cpp 12 | 13 | # to make QtWaylandCompositor/... style includes working without installing 14 | INCLUDEPATH += $$PWD/../../include 15 | 16 | 17 | target.path = $$[QT_INSTALL_EXAMPLES]/wayland/minimal-cpp 18 | sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS minimal-cpp.pro 19 | sources.path = $$[QT_INSTALL_EXAMPLES]/wayland/minimal-cpp 20 | INSTALLS += target sources 21 | -------------------------------------------------------------------------------- /examples/wayland/minimal-cpp/window.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2017 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause 3 | 4 | #ifndef WINDOW_H 5 | #define WINDOW_H 6 | 7 | #include 8 | #include 9 | 10 | QT_BEGIN_NAMESPACE 11 | 12 | class Compositor; 13 | 14 | class Window : public QOpenGLWindow 15 | { 16 | Q_OBJECT 17 | public: 18 | Window(); 19 | void setCompositor(Compositor *comp); 20 | 21 | signals: 22 | void glReady(); 23 | 24 | protected: 25 | void initializeGL() override; 26 | void paintGL() override; 27 | void mousePressEvent(QMouseEvent *event) override; 28 | void mouseReleaseEvent(QMouseEvent *event) override; 29 | void mouseMoveEvent(QMouseEvent *event) override; 30 | void wheelEvent(QWheelEvent *) override; 31 | 32 | void keyPressEvent(QKeyEvent *e) override; 33 | void keyReleaseEvent(QKeyEvent *e) override; 34 | 35 | private: 36 | QOpenGLTextureBlitter m_textureBlitter; 37 | Compositor *m_compositor = nullptr; 38 | }; 39 | 40 | QT_END_NAMESPACE 41 | 42 | #endif //WINDOW_H 43 | -------------------------------------------------------------------------------- /examples/wayland/minimal-qml/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022 The Qt Company Ltd. 2 | # SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause 3 | 4 | cmake_minimum_required(VERSION 3.16) 5 | project(minimal-qml LANGUAGES CXX) 6 | 7 | set(CMAKE_AUTOMOC ON) 8 | 9 | if(NOT DEFINED INSTALL_EXAMPLESDIR) 10 | set(INSTALL_EXAMPLESDIR "examples") 11 | endif() 12 | 13 | set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/wayland/minimal-qml") 14 | 15 | find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml) 16 | 17 | qt_add_executable(minimal-qml 18 | main.cpp 19 | ) 20 | 21 | set_target_properties(minimal-qml PROPERTIES 22 | WIN32_EXECUTABLE TRUE 23 | MACOSX_BUNDLE TRUE 24 | ) 25 | 26 | target_link_libraries(minimal-qml PUBLIC 27 | Qt::Core 28 | Qt::Gui 29 | Qt::Qml 30 | ) 31 | 32 | # Resources: 33 | set(minimal-qml_resource_files 34 | "main.qml" 35 | ) 36 | 37 | qt6_add_resources(minimal-qml "minimal-qml" 38 | PREFIX 39 | "/" 40 | FILES 41 | ${minimal-qml_resource_files} 42 | ) 43 | 44 | install(TARGETS minimal-qml 45 | RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" 46 | BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" 47 | LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" 48 | ) 49 | -------------------------------------------------------------------------------- /examples/wayland/minimal-qml/doc/images/minimal-qml.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qt/qtwayland/07f81efabf8192c991efacb61cdd867f936751ac/examples/wayland/minimal-qml/doc/images/minimal-qml.png -------------------------------------------------------------------------------- /examples/wayland/minimal-qml/main.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2017 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause 3 | 4 | #include 5 | #include 6 | 7 | #include 8 | 9 | #include 10 | 11 | int main(int argc, char *argv[]) 12 | { 13 | // ShareOpenGLContexts is needed for using the threaded renderer 14 | // on Nvidia EGLStreams 15 | QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts, true); 16 | QGuiApplication app(argc, argv); 17 | 18 | QQmlApplicationEngine appEngine(QUrl("qrc:///main.qml")); 19 | 20 | return app.exec(); 21 | } 22 | -------------------------------------------------------------------------------- /examples/wayland/minimal-qml/minimal-qml.pro: -------------------------------------------------------------------------------- 1 | QT += gui qml 2 | 3 | SOURCES += \ 4 | main.cpp 5 | 6 | OTHER_FILES = \ 7 | main.qml 8 | 9 | RESOURCES += minimal-qml.qrc 10 | 11 | target.path = $$[QT_INSTALL_EXAMPLES]/wayland/minimal-qml 12 | sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS minimal-qml.pro 13 | sources.path = $$[QT_INSTALL_EXAMPLES]/wayland/minimal-qml 14 | INSTALLS += target sources 15 | -------------------------------------------------------------------------------- /examples/wayland/minimal-qml/minimal-qml.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | main.qml 4 | 5 | 6 | -------------------------------------------------------------------------------- /examples/wayland/multi-output/doc/images/multi-output.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qt/qtwayland/07f81efabf8192c991efacb61cdd867f936751ac/examples/wayland/multi-output/doc/images/multi-output.jpg -------------------------------------------------------------------------------- /examples/wayland/multi-output/images/background.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qt/qtwayland/07f81efabf8192c991efacb61cdd867f936751ac/examples/wayland/multi-output/images/background.jpg -------------------------------------------------------------------------------- /examples/wayland/multi-output/main.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2017 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause 3 | 4 | #include 5 | #include 6 | 7 | #include 8 | 9 | #include 10 | 11 | int main(int argc, char *argv[]) 12 | { 13 | // AA_ShareOpenGLContexts is required for compositors with multiple outputs 14 | QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts, true); 15 | QGuiApplication app(argc, argv); 16 | 17 | QQmlApplicationEngine appEngine(QUrl("qrc:///qml/main.qml")); 18 | 19 | return app.exec(); 20 | } 21 | -------------------------------------------------------------------------------- /examples/wayland/multi-output/multi-output.pro: -------------------------------------------------------------------------------- 1 | QT += core gui qml 2 | 3 | SOURCES += \ 4 | main.cpp 5 | 6 | OTHER_FILES = \ 7 | qml/main.qml \ 8 | qml/GridScreen.qml \ 9 | qml/ShellScreen.qml \ 10 | qml/ShellChrome.qml \ 11 | images/background.jpg \ 12 | 13 | RESOURCES += multi-output.qrc 14 | 15 | target.path = $$[QT_INSTALL_EXAMPLES]/wayland/multi-output 16 | INSTALLS += target 17 | -------------------------------------------------------------------------------- /examples/wayland/multi-output/multi-output.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | images/background.jpg 4 | qml/main.qml 5 | qml/GridScreen.qml 6 | qml/ShellScreen.qml 7 | qml/ShellChrome.qml 8 | 9 | 10 | -------------------------------------------------------------------------------- /examples/wayland/multi-output/qml/ShellChrome.qml: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2017 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause 3 | 4 | import QtQuick 5 | import QtWayland.Compositor 6 | 7 | ShellSurfaceItem { 8 | id: rootChrome 9 | 10 | onSurfaceDestroyed: { 11 | bufferLocked = true; 12 | destroyAnimation.start(); 13 | } 14 | 15 | SequentialAnimation { 16 | id: destroyAnimation 17 | ParallelAnimation { 18 | NumberAnimation { target: scaleTransform; property: "yScale"; to: 2/height; duration: 150 } 19 | NumberAnimation { target: scaleTransform; property: "xScale"; to: 0.4; duration: 150 } 20 | } 21 | NumberAnimation { target: scaleTransform; property: "xScale"; to: 0; duration: 150 } 22 | ScriptAction { script: { rootChrome.destroy(); } } 23 | } 24 | 25 | transform: [ 26 | Scale { 27 | id:scaleTransform 28 | origin.x: rootChrome.width / 2 29 | origin.y: rootChrome.height / 2 30 | 31 | } 32 | ] 33 | } 34 | -------------------------------------------------------------------------------- /examples/wayland/multi-screen/doc/images/multi-screen.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qt/qtwayland/07f81efabf8192c991efacb61cdd867f936751ac/examples/wayland/multi-screen/doc/images/multi-screen.jpg -------------------------------------------------------------------------------- /examples/wayland/multi-screen/main.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2017 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause 3 | 4 | #include 5 | #include 6 | 7 | #include 8 | 9 | #include 10 | 11 | int main(int argc, char *argv[]) 12 | { 13 | // AA_ShareOpenGLContexts is required for compositors with multiple outputs 14 | //! [share context] 15 | QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts, true); 16 | //! [share context] 17 | QGuiApplication app(argc, argv); 18 | 19 | QQmlApplicationEngine appEngine(QUrl("qrc:///qml/main.qml")); 20 | 21 | return app.exec(); 22 | } 23 | -------------------------------------------------------------------------------- /examples/wayland/multi-screen/multi-screen.pro: -------------------------------------------------------------------------------- 1 | QT += gui qml 2 | 3 | SOURCES += \ 4 | main.cpp 5 | 6 | OTHER_FILES = \ 7 | qml/main.qml \ 8 | 9 | RESOURCES += multi-screen.qrc 10 | 11 | target.path = $$[QT_INSTALL_EXAMPLES]/wayland/multi-screen 12 | sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS multi-screen.pro 13 | sources.path = $$[QT_INSTALL_EXAMPLES]/wayland/multi-screen 14 | INSTALLS += target sources 15 | 16 | DISTFILES += \ 17 | qml/CompositorScreen.qml \ 18 | qml/Chrome.qml 19 | -------------------------------------------------------------------------------- /examples/wayland/multi-screen/multi-screen.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | qml/main.qml 4 | qml/CompositorScreen.qml 5 | qml/Chrome.qml 6 | 7 | 8 | -------------------------------------------------------------------------------- /examples/wayland/overview-compositor/doc/images/overview-compositor.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qt/qtwayland/07f81efabf8192c991efacb61cdd867f936751ac/examples/wayland/overview-compositor/doc/images/overview-compositor.jpg -------------------------------------------------------------------------------- /examples/wayland/overview-compositor/main.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2017 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause 3 | 4 | #include 5 | #include 6 | 7 | #include 8 | 9 | #include 10 | 11 | int main(int argc, char *argv[]) 12 | { 13 | QGuiApplication app(argc, argv); 14 | 15 | QQmlApplicationEngine appEngine(QUrl("qrc:///main.qml")); 16 | 17 | return app.exec(); 18 | } 19 | -------------------------------------------------------------------------------- /examples/wayland/overview-compositor/overview-compositor.pro: -------------------------------------------------------------------------------- 1 | QT += gui qml 2 | 3 | SOURCES += \ 4 | main.cpp 5 | 6 | OTHER_FILES = \ 7 | main.qml 8 | 9 | RESOURCES += overview-compositor.qrc 10 | 11 | target.path = $$[QT_INSTALL_EXAMPLES]/wayland/overview-compositor 12 | sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS overview-compositor.pro 13 | sources.path = $$[QT_INSTALL_EXAMPLES]/wayland/overview-compositor 14 | INSTALLS += target sources 15 | -------------------------------------------------------------------------------- /examples/wayland/overview-compositor/overview-compositor.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | main.qml 4 | 5 | 6 | -------------------------------------------------------------------------------- /examples/wayland/qtshell/doc/images/qtshell.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qt/qtwayland/07f81efabf8192c991efacb61cdd867f936751ac/examples/wayland/qtshell/doc/images/qtshell.jpg -------------------------------------------------------------------------------- /examples/wayland/qtshell/images/background.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qt/qtwayland/07f81efabf8192c991efacb61cdd867f936751ac/examples/wayland/qtshell/images/background.jpg -------------------------------------------------------------------------------- /examples/wayland/qtshell/main.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause 3 | 4 | #include 5 | #include 6 | 7 | #include 8 | 9 | #include 10 | 11 | int main(int argc, char *argv[]) 12 | { 13 | // ShareOpenGLContexts is needed for using the threaded renderer 14 | // on Nvidia EGLStreams 15 | QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts, true); 16 | QGuiApplication app(argc, argv); 17 | 18 | QQmlApplicationEngine appEngine(QUrl("qrc:///qml/main.qml")); 19 | 20 | return app.exec(); 21 | } 22 | -------------------------------------------------------------------------------- /examples/wayland/qtshell/qml/main.qml: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause 3 | 4 | import QtQuick 5 | import QtWayland.Compositor 6 | import QtWayland.Compositor.QtShell 7 | 8 | WaylandCompositor { 9 | id: waylandCompositor 10 | 11 | CompositorScreen { id: screen; compositor: waylandCompositor } 12 | 13 | // Shell surface extension. Needed to provide a window concept for Wayland clients. 14 | // I.e. requests and events for maximization, minimization, resizing, closing etc. 15 | 16 | //! [shell] 17 | QtShell { 18 | onQtShellSurfaceCreated: (qtShellSurface) => screen.handleShellSurface(qtShellSurface) 19 | } 20 | //! [shell] 21 | } 22 | -------------------------------------------------------------------------------- /examples/wayland/qtshell/qtshell.pro: -------------------------------------------------------------------------------- 1 | QT += gui qml quick quick-private 2 | 3 | SOURCES += \ 4 | main.cpp 5 | 6 | OTHER_FILES = \ 7 | qml/main.qml \ 8 | qml/CompositorScreen.qml \ 9 | qml/Chrome.qml \ 10 | images/background.jpg \ 11 | 12 | RESOURCES += qtshell.qrc 13 | 14 | target.path = $$[QT_INSTALL_EXAMPLES]/wayland/qtshell 15 | sources.path = $$[QT_INSTALL_EXAMPLES]/wayland/qtshell 16 | INSTALLS += target sources 17 | -------------------------------------------------------------------------------- /examples/wayland/qtshell/qtshell.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | images/background.jpg 4 | qml/main.qml 5 | qml/CompositorScreen.qml 6 | qml/Chrome.qml 7 | 8 | 9 | -------------------------------------------------------------------------------- /examples/wayland/server-side-decoration/doc/images/server-side-decoration.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qt/qtwayland/07f81efabf8192c991efacb61cdd867f936751ac/examples/wayland/server-side-decoration/doc/images/server-side-decoration.png -------------------------------------------------------------------------------- /examples/wayland/server-side-decoration/main.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2018 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause 3 | 4 | #include 5 | #include 6 | 7 | #include 8 | 9 | #include 10 | 11 | int main(int argc, char *argv[]) 12 | { 13 | // ShareOpenGLContexts is needed for using the threaded renderer 14 | // on Nvidia EGLStreams 15 | QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts, true); 16 | QGuiApplication app(argc, argv); 17 | 18 | QQmlApplicationEngine appEngine(QUrl("qrc:///main.qml")); 19 | 20 | return app.exec(); 21 | } 22 | -------------------------------------------------------------------------------- /examples/wayland/server-side-decoration/server-side-decoration.pro: -------------------------------------------------------------------------------- 1 | QT += gui qml 2 | 3 | SOURCES += \ 4 | main.cpp 5 | 6 | OTHER_FILES = \ 7 | main.qml 8 | 9 | RESOURCES += server-side-decoration.qrc 10 | 11 | target.path = $$[QT_INSTALL_EXAMPLES]/wayland/server-side-decoration 12 | sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS server-side-decoration.pro 13 | sources.path = $$[QT_INSTALL_EXAMPLES]/wayland/server-side-decoration 14 | INSTALLS += target sources 15 | -------------------------------------------------------------------------------- /examples/wayland/server-side-decoration/server-side-decoration.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | main.qml 4 | 5 | 6 | -------------------------------------------------------------------------------- /examples/wayland/spanning-screens/doc/images/spanning-screens.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qt/qtwayland/07f81efabf8192c991efacb61cdd867f936751ac/examples/wayland/spanning-screens/doc/images/spanning-screens.jpg -------------------------------------------------------------------------------- /examples/wayland/spanning-screens/main.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2017 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause 3 | 4 | #include 5 | #include 6 | 7 | #include 8 | 9 | #include 10 | 11 | int main(int argc, char *argv[]) 12 | { 13 | // AA_ShareOpenGLContexts is required for compositors with multiple outputs 14 | QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts, true); 15 | QGuiApplication app(argc, argv); 16 | 17 | QQmlApplicationEngine appEngine(QUrl("qrc:///main.qml")); 18 | 19 | return app.exec(); 20 | } 21 | -------------------------------------------------------------------------------- /examples/wayland/spanning-screens/spanning-screens.pro: -------------------------------------------------------------------------------- 1 | QT += gui qml 2 | 3 | SOURCES += \ 4 | main.cpp 5 | 6 | OTHER_FILES = \ 7 | main.qml 8 | 9 | RESOURCES += spanning-screens.qrc 10 | 11 | target.path = $$[QT_INSTALL_EXAMPLES]/wayland/spanning-screens 12 | sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS spanning-screens.pro 13 | sources.path = $$[QT_INSTALL_EXAMPLES]/wayland/spanning-screens 14 | INSTALLS += target sources 15 | -------------------------------------------------------------------------------- /examples/wayland/spanning-screens/spanning-screens.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | main.qml 4 | 5 | 6 | -------------------------------------------------------------------------------- /examples/wayland/wayland.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE=subdirs 2 | 3 | !qtHaveModule(waylandcompositor): \ 4 | return() 5 | 6 | qtConfig(opengl) { 7 | SUBDIRS += \ 8 | minimal-cpp 9 | } 10 | 11 | qtHaveModule(quick) { 12 | SUBDIRS += minimal-qml 13 | SUBDIRS += spanning-screens 14 | SUBDIRS += fancy-compositor 15 | SUBDIRS += multi-output 16 | SUBDIRS += multi-screen 17 | SUBDIRS += overview-compositor 18 | SUBDIRS += ivi-compositor 19 | SUBDIRS += server-side-decoration 20 | SUBDIRS += qtshell 21 | qtHaveModule(waylandclient) { 22 | SUBDIRS += \ 23 | custom-extension \ 24 | custom-shell 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /qt_cmdline.cmake: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022 The Qt Company Ltd. 2 | # SPDX-License-Identifier: BSD-3-Clause 3 | 4 | qt_commandline_subconfig(src) 5 | qt_commandline_subconfig(src/compositor) 6 | -------------------------------------------------------------------------------- /src/3rdparty/protocol/ivi/MIT.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | MIT License 4 | 5 | Copyright (c) 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 8 | 9 | The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software. 10 | 11 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 12 | -------------------------------------------------------------------------------- /src/3rdparty/protocol/ivi/REUSE.toml: -------------------------------------------------------------------------------- 1 | version = 1 2 | 3 | [[annotations]] 4 | path = ["MIT.txt", 5 | "ivi-controller.xml", 6 | "ivi-application.xml"] 7 | precedence = "closest" 8 | SPDX-FileCopyrightText = "Copyright (C) 2013 DENSO CORPORATION\nCopyright (c) 2013 BMW Car IT GmbH" 9 | SPDX-License-Identifier = "MIT" 10 | -------------------------------------------------------------------------------- /src/3rdparty/protocol/ivi/qt_attribution.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "Id": "wayland-ivi-extension-protocol", 4 | "Name": "Wayland IVI Extension Protocol", 5 | "QDocModule": "qtwaylandcompositor", 6 | "QtUsage": "Used in the Qt Wayland Compositor, and the Qt Wayland platform plugin.", 7 | "Files": "ivi-controller.xml ivi-application.xml", 8 | 9 | "Description": "\"Wayland IVI Extension\" is forked from IVI Layer Management to define a common set of APIs by wayland style protocol and provide reference implementation which can be loaded on Weston.", 10 | "Homepage": "https://at.projects.genivi.org/wiki/display/WIE/Wayland+IVI+Extension+Home", 11 | "Version": "1.9.1", 12 | "DownloadLocation": "https://github.com/GENIVI/wayland-ivi-extension/releases/tag/1.9.1", 13 | "LicenseId": "MIT", 14 | "License": "MIT License", 15 | "LicenseFile": "MIT.txt", 16 | "Copyright": "Copyright (C) 2013 DENSO CORPORATION\nCopyright (c) 2013 BMW Car IT GmbH" 17 | } 18 | ] 19 | -------------------------------------------------------------------------------- /src/client/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | qt_internal_add_module(WaylandClientFeaturesPrivate 2 | INTERNAL_MODULE 3 | HEADER_MODULE 4 | NO_GENERATE_CPP_EXPORTS 5 | NO_MODULE_HEADERS 6 | NO_ADDITIONAL_TARGET_INFO 7 | ) 8 | -------------------------------------------------------------------------------- /src/compositor/compat/removed_api.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #define QT_WAYLANDCOMPOSITOR_BUILD_REMOVED_API 5 | 6 | #include "qtwaylandcompositorglobal.h" 7 | 8 | QT_USE_NAMESPACE 9 | 10 | #if QT_WAYLANDCOMPOSITOR_REMOVED_SINCE(6, 3) 11 | 12 | #include "qwaylandbufferref.h" 13 | 14 | bool QWaylandBufferRef::operator==(const QWaylandBufferRef &other) 15 | { 16 | return std::as_const(*this) == other; 17 | } 18 | 19 | bool QWaylandBufferRef::operator!=(const QWaylandBufferRef &other) 20 | { 21 | return std::as_const(*this) != other; 22 | } 23 | 24 | #endif // QT_WAYLANDCOMPOSITOR_REMOVED_SINCE(6, 3) 25 | 26 | #if QT_WAYLANDCOMPOSITOR_REMOVED_SINCE(6, 4) 27 | 28 | // #include "qotherheader.h" 29 | // // implement removed functions from qotherheader.h 30 | // order alphabetically 31 | 32 | #endif // QT_WAYLANDCOMPOSITOR_REMOVED_SINCE(6, 4) 33 | -------------------------------------------------------------------------------- /src/compositor/compositor_api/qwaylandcompositorquickextensions.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #include "qwaylandcompositorquickextensions_p.h" 5 | 6 | QT_BEGIN_NAMESPACE 7 | 8 | QT_END_NAMESPACE 9 | 10 | #include "moc_qwaylandcompositorquickextensions_p.cpp" 11 | -------------------------------------------------------------------------------- /src/compositor/compositor_api/qwaylanddestroylistener.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2017 Jolla Ltd, author: 2 | // Copyright (C) 2017 The Qt Company Ltd. 3 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 4 | 5 | #ifndef QWAYLANDDESTROYLISTENER_H 6 | #define QWAYLANDDESTROYLISTENER_H 7 | 8 | #include 9 | #include 10 | 11 | struct wl_resource; 12 | 13 | QT_BEGIN_NAMESPACE 14 | 15 | class QWaylandDestroyListenerPrivate; 16 | 17 | class Q_WAYLANDCOMPOSITOR_EXPORT QWaylandDestroyListener : public QObject 18 | { 19 | Q_OBJECT 20 | Q_DECLARE_PRIVATE(QWaylandDestroyListener) 21 | public: 22 | QWaylandDestroyListener(QObject *parent = nullptr); 23 | void listenForDestruction(struct wl_resource *resource); 24 | void reset(); 25 | 26 | Q_SIGNALS: 27 | void fired(void *data); 28 | 29 | }; 30 | 31 | QT_END_NAMESPACE 32 | 33 | #endif /*QWAYLANDDESTROYLISTENER_H*/ 34 | -------------------------------------------------------------------------------- /src/compositor/compositor_api/qwaylanddestroylistener_p.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2017 Jolla Ltd, author: 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #ifndef QTWAYLAND_QWLLISTENER_H 5 | #define QTWAYLAND_QWLLISTENER_H 6 | 7 | // 8 | // W A R N I N G 9 | // ------------- 10 | // 11 | // This file is not part of the Qt API. It exists purely as an 12 | // implementation detail. This header file may change from version to 13 | // version without notice, or even be removed. 14 | // 15 | // We mean it. 16 | // 17 | 18 | #include 19 | 20 | #include 21 | 22 | #include 23 | 24 | QT_BEGIN_NAMESPACE 25 | 26 | class QWaylandDestroyListenerPrivate : public QObjectPrivate 27 | { 28 | public: 29 | Q_DECLARE_PUBLIC(QWaylandDestroyListener) 30 | 31 | QWaylandDestroyListenerPrivate(); 32 | 33 | static void handler(wl_listener *listener, void *data); 34 | 35 | struct Listener { 36 | wl_listener listener; 37 | QWaylandDestroyListenerPrivate *parent = nullptr; 38 | }; 39 | Listener listener; 40 | }; 41 | 42 | QT_END_NAMESPACE 43 | 44 | #endif 45 | -------------------------------------------------------------------------------- /src/compositor/compositor_api/qwaylandkeymap_p.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2017 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #ifndef QWAYLANDKEYMAP_P_H 5 | #define QWAYLANDKEYMAP_P_H 6 | 7 | // 8 | // W A R N I N G 9 | // ------------- 10 | // 11 | // This file is not part of the Qt API. It exists purely as an 12 | // implementation detail. This header file may change from version to 13 | // version without notice, or even be removed. 14 | // 15 | // We mean it. 16 | // 17 | 18 | #include 19 | #include 20 | 21 | QT_BEGIN_NAMESPACE 22 | 23 | class Q_WAYLANDCOMPOSITOR_EXPORT QWaylandKeymapPrivate : public QObjectPrivate 24 | { 25 | Q_DECLARE_PUBLIC(QWaylandKeymap) 26 | public: 27 | QWaylandKeymapPrivate(const QString &layout, const QString &variant, const QString &options, 28 | const QString &model, const QString &rules); 29 | 30 | QString m_layout; 31 | QString m_variant; 32 | QString m_options; 33 | QString m_rules; 34 | QString m_model; 35 | }; 36 | 37 | QT_END_NAMESPACE 38 | 39 | #endif // QWAYLANDKEYMAP_P_H 40 | -------------------------------------------------------------------------------- /src/compositor/compositor_api/qwaylandoutputmode_p.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2017 Pier Luigi Fiorini 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #ifndef QWAYLANDOUTPUTMODE_P_H 5 | #define QWAYLANDOUTPUTMODE_P_H 6 | 7 | #include 8 | #include 9 | 10 | // 11 | // W A R N I N G 12 | // ------------- 13 | // 14 | // This file is not part of the Qt API. It exists purely as an 15 | // implementation detail. This header file may change from version to 16 | // version without notice, or even be removed. 17 | // 18 | // We mean it. 19 | // 20 | 21 | QT_BEGIN_NAMESPACE 22 | 23 | class Q_WAYLANDCOMPOSITOR_EXPORT QWaylandOutputModePrivate 24 | { 25 | public: 26 | QWaylandOutputModePrivate() {} 27 | 28 | QSize size; 29 | int refreshRate = 60000; 30 | }; 31 | 32 | QT_END_NAMESPACE 33 | 34 | #endif // QWAYLANDOUTPUTMODE_P_H 35 | -------------------------------------------------------------------------------- /src/compositor/compositor_api/qwaylandquickcompositor.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2017 Jolla Ltd, author: 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #ifndef QWAYLANDQUICKCOMPOSITOR_H 5 | #define QWAYLANDQUICKCOMPOSITOR_H 6 | 7 | #include 8 | #include 9 | 10 | QT_REQUIRE_CONFIG(wayland_compositor_quick); 11 | 12 | QT_BEGIN_NAMESPACE 13 | 14 | class QQuickWindow; 15 | class QWaylandQuickCompositorPrivate; 16 | class QWaylandView; 17 | 18 | class Q_WAYLANDCOMPOSITOR_EXPORT QWaylandQuickCompositor : public QWaylandCompositor, public QQmlParserStatus 19 | { 20 | Q_INTERFACES(QQmlParserStatus) 21 | Q_OBJECT 22 | public: 23 | QWaylandQuickCompositor(QObject *parent = nullptr); 24 | void create() override; 25 | 26 | void grabSurface(QWaylandSurfaceGrabber *grabber, const QWaylandBufferRef &buffer) override; 27 | 28 | protected: 29 | void classBegin() override; 30 | void componentComplete() override; 31 | }; 32 | 33 | QT_END_NAMESPACE 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /src/compositor/compositor_api/qwaylandquicksurface_p.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #ifndef QWAYLANDQUICKSURFACE_P_H 5 | #define QWAYLANDQUICKSURFACE_P_H 6 | 7 | // 8 | // W A R N I N G 9 | // ------------- 10 | // 11 | // This file is not part of the Qt API. It exists purely as an 12 | // implementation detail. This header file may change from version to 13 | // version without notice, or even be removed. 14 | // 15 | // We mean it. 16 | // 17 | 18 | #include 19 | 20 | QT_BEGIN_NAMESPACE 21 | 22 | class Q_WAYLANDCOMPOSITOR_EXPORT QWaylandQuickSurfacePrivate : public QWaylandSurfacePrivate 23 | { 24 | Q_DECLARE_PUBLIC(QWaylandQuickSurface) 25 | public: 26 | QWaylandQuickSurfacePrivate() 27 | { 28 | } 29 | 30 | ~QWaylandQuickSurfacePrivate() override 31 | { 32 | } 33 | 34 | bool useTextureAlpha = true; 35 | bool clientRenderingEnabled = true; 36 | }; 37 | 38 | QT_END_NAMESPACE 39 | 40 | #endif // QWAYLANDQUICKSURFACE_P_H 41 | -------------------------------------------------------------------------------- /src/compositor/compositor_api/qwaylandresource.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2017 Klarälvdalens Datakonsult AB (KDAB). 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #ifndef QWAYLANDRESOURCE_H 5 | #define QWAYLANDRESOURCE_H 6 | 7 | #include 8 | #include 9 | #include 10 | 11 | struct wl_resource; 12 | 13 | QT_BEGIN_NAMESPACE 14 | 15 | class Q_WAYLANDCOMPOSITOR_EXPORT QWaylandResource 16 | { 17 | Q_GADGET 18 | QML_NAMED_ELEMENT(waylandresource) 19 | QML_UNCREATABLE("") 20 | QML_ADDED_IN_VERSION(1, 0) 21 | public: 22 | QWaylandResource(); 23 | explicit QWaylandResource(wl_resource *resource); 24 | 25 | wl_resource *resource() const { return m_resource; } 26 | 27 | private: 28 | wl_resource *m_resource = nullptr; 29 | }; 30 | 31 | QT_END_NAMESPACE 32 | 33 | Q_DECLARE_METATYPE(QWaylandResource) 34 | 35 | #endif /*QWAYLANDRESOURCE_H*/ 36 | -------------------------------------------------------------------------------- /src/compositor/compositor_api/qwaylandsurfacegrabber.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2017 Klarälvdalens Datakonsult AB (KDAB). 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #ifndef QWAYLANDSURFACEGRABBER_H 5 | #define QWAYLANDSURFACEGRABBER_H 6 | 7 | #include 8 | #include 9 | 10 | QT_BEGIN_NAMESPACE 11 | 12 | class QWaylandSurface; 13 | class QWaylandSurfaceGrabberPrivate; 14 | 15 | class Q_WAYLANDCOMPOSITOR_EXPORT QWaylandSurfaceGrabber : public QObject 16 | { 17 | Q_OBJECT 18 | Q_DECLARE_PRIVATE(QWaylandSurfaceGrabber) 19 | public: 20 | enum Error { 21 | InvalidSurface, 22 | NoBufferAttached, 23 | UnknownBufferType, 24 | RendererNotReady, 25 | }; 26 | Q_ENUM(Error) 27 | explicit QWaylandSurfaceGrabber(QWaylandSurface *surface, QObject *parent = nullptr); 28 | 29 | QWaylandSurface *surface() const; 30 | void grab(); 31 | 32 | Q_SIGNALS: 33 | void success(const QImage &image); 34 | void failed(Error error); 35 | }; 36 | 37 | QT_END_NAMESPACE 38 | 39 | #endif // QWAYLANDSURFACEGRABBER_H 40 | -------------------------------------------------------------------------------- /src/compositor/doc/src/qtwaylandcompositor-cpp.qdoc: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2017 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only 3 | 4 | /*! 5 | \module QtWaylandCompositor 6 | \title Qt Wayland Compositor C++ Classes 7 | \ingroup modules 8 | \qtcmakepackage WaylandCompositor 9 | \qtvariable waylandcompositor 10 | 11 | \brief Provides C++ classes for writing custom Wayland display servers. 12 | 13 | \section1 Using the Module 14 | 15 | \include {module-use.qdocinc} {using the c++ api} {WaylandCompositor} 16 | 17 | \section2 Building with CMake 18 | 19 | \include {module-use.qdocinc} {building with cmake} {WaylandCompositor} 20 | 21 | \section2 Building with qmake 22 | 23 | \include {module-use.qdocinc} {building_with_qmake} {waylandcompositor} 24 | 25 | For more information about using these classes in your application, 26 | see the \l{Qt Wayland Compositor} documentation. 27 | */ 28 | -------------------------------------------------------------------------------- /src/compositor/doc/src/qtwaylandcompositor-examples.qdoc: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2017 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only 3 | 4 | /*! 5 | \group qtwaylandcompositor-examples 6 | \title Qt Wayland Compositor Examples 7 | \brief Examples for the Qt Wayland Compositor module 8 | 9 | These are the Qt Wayland Compositor examples. 10 | 11 | */ 12 | 13 | -------------------------------------------------------------------------------- /src/compositor/doc/src/qtwaylandcompositor-qmltypes.qdoc: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2017 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only 3 | 4 | /*! 5 | \qmlmodule QtWayland.Compositor 6 | \title Qt Wayland Compositor QML Types 7 | \ingroup qmlmodules 8 | \brief Provides QML types for writing custom Wayland display servers. 9 | 10 | The Qt Wayland module provides QML types that can be used to create custom 11 | display servers supporting the Wayland protocol. 12 | 13 | The QML types can be imported into your application using the following 14 | import statement: 15 | 16 | \section1 Using the Module 17 | 18 | \include {module-use.qdocinc} {using the c++ api} {WaylandCompositor} 19 | 20 | \section2 Building with CMake 21 | 22 | \include {module-use.qdocinc} {building with cmake} {WaylandCompositor} 23 | 24 | \section2 Building with qmake 25 | 26 | \include {module-use.qdocinc} {building_with_qmake} {waylandcompositor} 27 | 28 | \section2 QML import 29 | 30 | \qml 31 | import QtWayland.Compositor 32 | \endqml 33 | 34 | For more information about using these types in your application, 35 | see the \l{Qt Wayland Compositor} documentation. 36 | */ 37 | -------------------------------------------------------------------------------- /src/compositor/doc/src/qtwaylandcompositor-toc.qdoc: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2024 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only 3 | 4 | /*! 5 | \page qtwaylandcompositor-toc.html 6 | \title Qt Wayland Compositor module topics 7 | 8 | The following list has links to all the individual topics (HTML files) 9 | in the Qt Wayland Compositor module. 10 | 11 | \list 12 | \li \l {Shell Extensions - Qt Wayland Compositor}{Shell Extensions} 13 | \li \l {Porting to Qt 6 - Qt Wayland Compositor}{Upgrading from Qt 5} 14 | \endlist 15 | 16 | */ 17 | -------------------------------------------------------------------------------- /src/compositor/extensions/qwaylandidleinhibitv1.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2019 Pier Luigi Fiorini 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #ifndef QWAYLANDIDLEINHIBITV1_H 5 | #define QWAYLANDIDLEINHIBITV1_H 6 | 7 | #include 8 | 9 | QT_BEGIN_NAMESPACE 10 | 11 | class QWaylandIdleInhibitManagerV1Private; 12 | 13 | class Q_WAYLANDCOMPOSITOR_EXPORT QWaylandIdleInhibitManagerV1 : public QWaylandCompositorExtensionTemplate 14 | { 15 | Q_OBJECT 16 | Q_DECLARE_PRIVATE(QWaylandIdleInhibitManagerV1) 17 | public: 18 | QWaylandIdleInhibitManagerV1(); 19 | explicit QWaylandIdleInhibitManagerV1(QWaylandCompositor *compositor); 20 | ~QWaylandIdleInhibitManagerV1(); 21 | 22 | void initialize() override; 23 | 24 | static const struct wl_interface *interface(); 25 | }; 26 | 27 | QT_END_NAMESPACE 28 | 29 | #endif // QWAYLANDIDLEINHIBITV1_H 30 | -------------------------------------------------------------------------------- /src/compositor/extensions/qwaylandivisurfaceintegration.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2017 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #include "qwaylandivisurfaceintegration_p.h" 5 | 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | QT_BEGIN_NAMESPACE 12 | 13 | namespace QtWayland { 14 | 15 | IviSurfaceIntegration::IviSurfaceIntegration(QWaylandQuickShellSurfaceItem *item) 16 | : QWaylandQuickShellIntegration(item) 17 | , m_item(item) 18 | , m_shellSurface(qobject_cast(item->shellSurface())) 19 | { 20 | m_item->setSurface(m_shellSurface->surface()); 21 | connect(m_shellSurface, &QWaylandIviSurface::destroyed, this, &IviSurfaceIntegration::handleIviSurfaceDestroyed); 22 | } 23 | 24 | IviSurfaceIntegration::~IviSurfaceIntegration() 25 | { 26 | m_item->setSurface(nullptr); 27 | } 28 | 29 | void IviSurfaceIntegration::handleIviSurfaceDestroyed() 30 | { 31 | m_shellSurface = nullptr; 32 | } 33 | 34 | } 35 | 36 | QT_END_NAMESPACE 37 | 38 | #include "moc_qwaylandivisurfaceintegration_p.cpp" 39 | -------------------------------------------------------------------------------- /src/compositor/extensions/qwaylandqttextinputmethodmanager.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2020 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #ifndef QWAYLANDQTTEXTINPUTMETHODMANAGER_H 5 | #define QWAYLANDQTTEXTINPUTMETHODMANAGER_H 6 | 7 | #include 8 | 9 | #include 10 | 11 | QT_BEGIN_NAMESPACE 12 | 13 | class QWaylandQtTextInputMethodManagerPrivate; 14 | 15 | class Q_WAYLANDCOMPOSITOR_EXPORT QWaylandQtTextInputMethodManager : public QWaylandCompositorExtensionTemplate 16 | { 17 | Q_OBJECT 18 | Q_DECLARE_PRIVATE(QWaylandQtTextInputMethodManager) 19 | public: 20 | QWaylandQtTextInputMethodManager(); 21 | QWaylandQtTextInputMethodManager(QWaylandCompositor *compositor); 22 | 23 | void initialize() override; 24 | 25 | static const struct wl_interface *interface(); 26 | static QByteArray interfaceName(); 27 | }; 28 | 29 | QT_END_NAMESPACE 30 | 31 | #endif // QWAYLANDQTTEXTINPUTMETHODMANAGER_H 32 | -------------------------------------------------------------------------------- /src/compositor/extensions/qwaylandquickshellintegration.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2017 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #ifndef QWAYLANDQUICKSHELLINTEGRATION_H 5 | #define QWAYLANDQUICKSHELLINTEGRATION_H 6 | 7 | #include 8 | #include 9 | 10 | QT_REQUIRE_CONFIG(wayland_compositor_quick); 11 | 12 | QT_BEGIN_NAMESPACE 13 | 14 | class Q_WAYLANDCOMPOSITOR_EXPORT QWaylandQuickShellIntegration : public QObject 15 | { 16 | Q_OBJECT 17 | public: 18 | QWaylandQuickShellIntegration(QObject *parent = nullptr); 19 | ~QWaylandQuickShellIntegration() override; 20 | }; 21 | 22 | QT_END_NAMESPACE 23 | 24 | #endif // QWAYLANDQUICKSHELLINTEGRATION_H 25 | -------------------------------------------------------------------------------- /src/compositor/extensions/qwaylandquickxdgoutputv1.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2019 Pier Luigi Fiorini 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #ifndef QWAYLANDQUICKXDGOUTPUT_V1 5 | #define QWAYLANDQUICKXDGOUTPUT_V1 6 | 7 | #include 8 | #include 9 | #include 10 | 11 | QT_REQUIRE_CONFIG(wayland_compositor_quick); 12 | 13 | QT_BEGIN_NAMESPACE 14 | 15 | class Q_WAYLANDCOMPOSITOR_EXPORT QWaylandQuickXdgOutputV1 16 | : public QWaylandXdgOutputV1 17 | , public QQmlParserStatus 18 | { 19 | Q_OBJECT 20 | Q_INTERFACES(QQmlParserStatus) 21 | public: 22 | explicit QWaylandQuickXdgOutputV1(); 23 | 24 | protected: 25 | void classBegin() override {} 26 | void componentComplete() override; 27 | }; 28 | 29 | QT_END_NAMESPACE 30 | 31 | #endif // QWAYLANDQUICKXDGOUTPUT_V1 32 | -------------------------------------------------------------------------------- /src/compositor/extensions/qwaylandshell_p.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2017 Pier Luigi Fiorini 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #ifndef QWAYLANDSHELL_P_H 5 | #define QWAYLANDSHELL_P_H 6 | 7 | #include 8 | #include 9 | 10 | // 11 | // W A R N I N G 12 | // ------------- 13 | // 14 | // This file is not part of the Qt API. It exists purely as an 15 | // implementation detail. This header file may change from version to 16 | // version without notice, or even be removed. 17 | // 18 | // We mean it. 19 | // 20 | 21 | QT_BEGIN_NAMESPACE 22 | 23 | class Q_WAYLANDCOMPOSITOR_EXPORT QWaylandShellPrivate : public QWaylandCompositorExtensionPrivate 24 | { 25 | Q_DECLARE_PUBLIC(QWaylandShell) 26 | public: 27 | QWaylandShellPrivate(); 28 | 29 | QWaylandShell::FocusPolicy focusPolicy = QWaylandShell::AutomaticFocus; 30 | }; 31 | 32 | QT_END_NAMESPACE 33 | 34 | #endif // QWAYLANDSHELL_P_H 35 | -------------------------------------------------------------------------------- /src/compositor/extensions/qwaylandshellsurface_p.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2024 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #ifndef QWAYLANDSHELLSURFACE_P_H 5 | #define QWAYLANDSHELLSURFACE_P_H 6 | 7 | #include 8 | #include "qwaylandshellsurface.h" 9 | 10 | // 11 | // W A R N I N G 12 | // ------------- 13 | // 14 | // This file is not part of the Qt API. It exists purely as an 15 | // implementation detail. This header file may change from version to 16 | // version without notice, or even be removed. 17 | // 18 | // We mean it. 19 | // 20 | 21 | QT_BEGIN_NAMESPACE 22 | 23 | class Q_WAYLANDCOMPOSITOR_EXPORT QWaylandShellSurfacePrivate : public QWaylandCompositorExtensionPrivate 24 | { 25 | Q_DECLARE_PUBLIC(QWaylandShellSurface) 26 | public: 27 | bool modal = false; 28 | }; 29 | 30 | QT_END_NAMESPACE 31 | 32 | #endif // QWAYLANDSHELLSURFACE_P_H 33 | -------------------------------------------------------------------------------- /src/compositor/extensions/qwaylandtextinputmanager.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2017 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #ifndef QWAYLANDTEXTINPUTMANAGER_H 5 | #define QWAYLANDTEXTINPUTMANAGER_H 6 | 7 | #include 8 | 9 | #include 10 | 11 | QT_BEGIN_NAMESPACE 12 | 13 | class QWaylandTextInputManagerPrivate; 14 | 15 | class Q_WAYLANDCOMPOSITOR_EXPORT QWaylandTextInputManager : public QWaylandCompositorExtensionTemplate 16 | { 17 | Q_OBJECT 18 | Q_DECLARE_PRIVATE(QWaylandTextInputManager) 19 | public: 20 | QWaylandTextInputManager(); 21 | QWaylandTextInputManager(QWaylandCompositor *compositor); 22 | 23 | void initialize() override; 24 | 25 | static const struct wl_interface *interface(); 26 | static QByteArray interfaceName(); 27 | }; 28 | 29 | QT_END_NAMESPACE 30 | 31 | #endif // QWAYLANDTEXTINPUTMANAGER_H 32 | -------------------------------------------------------------------------------- /src/compositor/extensions/qwaylandtextinputmanagerv3.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #ifndef QWAYLANDTEXTINPUTMANAGERV3_H 5 | #define QWAYLANDTEXTINPUTMANAGERV3_H 6 | 7 | #include 8 | 9 | #include 10 | 11 | QT_BEGIN_NAMESPACE 12 | 13 | class QWaylandTextInputManagerV3Private; 14 | 15 | class Q_WAYLANDCOMPOSITOR_EXPORT QWaylandTextInputManagerV3 : public QWaylandCompositorExtensionTemplate 16 | { 17 | Q_OBJECT 18 | Q_DECLARE_PRIVATE(QWaylandTextInputManagerV3) 19 | public: 20 | QWaylandTextInputManagerV3(); 21 | explicit QWaylandTextInputManagerV3(QWaylandCompositor *compositor); 22 | ~QWaylandTextInputManagerV3() override; 23 | 24 | void initialize() override; 25 | 26 | static const struct wl_interface *interface(); 27 | static QByteArray interfaceName(); 28 | }; 29 | 30 | QT_END_NAMESPACE 31 | 32 | #endif // QWAYLANDTEXTINPUTMANAGERV3_H 33 | -------------------------------------------------------------------------------- /src/compositor/extensions/qwaylandviewporter.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2018 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #ifndef QWAYLANDVIEWPORTER_H 5 | #define QWAYLANDVIEWPORTER_H 6 | 7 | #include 8 | 9 | QT_BEGIN_NAMESPACE 10 | 11 | class QWaylandViewporterPrivate; 12 | 13 | class Q_WAYLANDCOMPOSITOR_EXPORT QWaylandViewporter 14 | : public QWaylandCompositorExtensionTemplate 15 | { 16 | Q_OBJECT 17 | Q_DECLARE_PRIVATE(QWaylandViewporter) 18 | 19 | public: 20 | explicit QWaylandViewporter(); 21 | explicit QWaylandViewporter(QWaylandCompositor *compositor); 22 | 23 | void initialize() override; 24 | 25 | static const struct wl_interface *interface(); 26 | }; 27 | 28 | QT_END_NAMESPACE 29 | 30 | #endif // QWAYLANDVIEWPORTER_H 31 | -------------------------------------------------------------------------------- /src/compositor/global/qtwaylandcompositorglobal.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2016 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #ifndef QWAYLANDCOMPOSITORGLOBAL_H 5 | #define QWAYLANDCOMPOSITORGLOBAL_H 6 | 7 | #include 8 | #include 9 | #include 10 | 11 | #endif // QWAYLANDCOMPOSITORGLOBAL_H 12 | 13 | -------------------------------------------------------------------------------- /src/compositor/global/qtwaylandcompositorglobal_p.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2016 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #ifndef QWAYLANDCOMPOSITORGLOBAL_P_H 5 | #define QWAYLANDCOMPOSITORGLOBAL_P_H 6 | 7 | // 8 | // W A R N I N G 9 | // ------------- 10 | // 11 | // This file is not part of the Qt API. It exists purely as an 12 | // implementation detail. This header file may change from version to 13 | // version without notice, or even be removed. 14 | // 15 | // We mean it. 16 | // 17 | 18 | #include 19 | #include 20 | #include 21 | #include 22 | 23 | QT_BEGIN_NAMESPACE 24 | 25 | #if QT_CONFIG(wayland_compositor_quick) 26 | void Q_WAYLANDCOMPOSITOR_EXPORT qml_register_types_QtWayland_Compositor(); 27 | #endif 28 | 29 | QT_END_NAMESPACE 30 | 31 | #endif // QWAYLANDCOMPOSITORGLOBAL_P_H 32 | 33 | -------------------------------------------------------------------------------- /src/compositor/global/qtwaylandqmlinclude.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2020 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #ifndef QTWAYLANDQMLINCLUDE_H 5 | #define QTWAYLANDQMLINCLUDE_H 6 | 7 | // 8 | // W A R N I N G 9 | // ------------- 10 | // 11 | // This file is not part of the Qt API. It exists purely as an 12 | // implementation detail. This header file may change from version to 13 | // version without notice, or even be removed. 14 | // 15 | // We mean it. 16 | // 17 | #include 18 | #include 19 | 20 | #if QT_CONFIG(wayland_compositor_quick) 21 | #include 22 | #else 23 | #define QML_NAMED_ELEMENT(x) 24 | #define QML_UNCREATABLE(x) 25 | #define QML_ADDED_IN_VERSION(x, y) 26 | #endif 27 | 28 | QT_BEGIN_NAMESPACE 29 | QT_END_NAMESPACE 30 | 31 | #endif // QTWAYLANDQMLINCLUDE_H 32 | -------------------------------------------------------------------------------- /src/compositor/global/qwaylandcompositorextension_p.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2017 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #ifndef QWAYLANDEXTENSION_P_H 5 | #define QWAYLANDEXTENSION_P_H 6 | 7 | // 8 | // W A R N I N G 9 | // ------------- 10 | // 11 | // This file is not part of the Qt API. It exists purely as an 12 | // implementation detail. This header file may change from version to 13 | // version without notice, or even be removed. 14 | // 15 | // We mean it. 16 | // 17 | 18 | #include 19 | 20 | #include 21 | 22 | QT_BEGIN_NAMESPACE 23 | 24 | class Q_WAYLANDCOMPOSITOR_EXPORT QWaylandCompositorExtensionPrivate : public QObjectPrivate 25 | { 26 | Q_DECLARE_PUBLIC(QWaylandCompositorExtension) 27 | 28 | public: 29 | QWaylandCompositorExtensionPrivate() 30 | { 31 | } 32 | 33 | static QWaylandCompositorExtensionPrivate *get(QWaylandCompositorExtension *extension) { return extension->d_func(); } 34 | 35 | QWaylandObject *extension_container = nullptr; 36 | bool initialized = false; 37 | }; 38 | 39 | QT_END_NAMESPACE 40 | 41 | #endif /*QWAYLANDEXTENSION_P_H*/ 42 | -------------------------------------------------------------------------------- /src/compositor/global/qwaylandquickextension.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #include "qwaylandquickextension.h" 5 | 6 | QT_REQUIRE_CONFIG(wayland_compositor_quick); 7 | 8 | QT_BEGIN_NAMESPACE 9 | 10 | QT_END_NAMESPACE 11 | 12 | #include "moc_qwaylandquickextension.cpp" 13 | -------------------------------------------------------------------------------- /src/compositor/global/qwaylandutils_p.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2018 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #ifndef QWAYLANDUTILS_P_H 5 | #define QWAYLANDUTILS_P_H 6 | 7 | // 8 | // W A R N I N G 9 | // ------------- 10 | // 11 | // This file is not part of the Qt API. It exists purely as an 12 | // implementation detail. This header file may change from version to 13 | // version without notice, or even be removed. 14 | // 15 | // We mean it. 16 | // 17 | 18 | #include 19 | 20 | struct wl_resource; 21 | 22 | QT_BEGIN_NAMESPACE 23 | 24 | namespace QtWayland { 25 | 26 | template 27 | return_type fromResource(struct ::wl_resource *resource) { 28 | if (auto *r = std::remove_pointer::type::Resource::fromResource(resource)) 29 | return static_cast(r->object()); 30 | return nullptr; 31 | } 32 | 33 | } // namespace QtWayland 34 | 35 | QT_END_NAMESPACE 36 | 37 | #endif // QWAYLANDUTILS_P_H 38 | -------------------------------------------------------------------------------- /src/compositor/hardware_integration/qwlclientbufferintegration.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2017 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #include "qwlclientbufferintegration_p.h" 5 | 6 | QT_BEGIN_NAMESPACE 7 | 8 | namespace QtWayland { 9 | 10 | ClientBufferIntegration::ClientBufferIntegration() 11 | { 12 | } 13 | 14 | } 15 | 16 | QT_END_NAMESPACE 17 | -------------------------------------------------------------------------------- /src/compositor/hardware_integration/qwlclientbufferintegrationfactory.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2017 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #include "qwlclientbufferintegrationfactory_p.h" 5 | #include "qwlclientbufferintegrationplugin_p.h" 6 | #include "qwlclientbufferintegration_p.h" 7 | #include 8 | #include 9 | #include 10 | 11 | QT_BEGIN_NAMESPACE 12 | 13 | namespace QtWayland { 14 | 15 | Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, qwbifiLoader, 16 | (QtWaylandClientBufferIntegrationFactoryInterface_iid, QLatin1String("/wayland-graphics-integration-server"), Qt::CaseInsensitive)) 17 | 18 | QStringList ClientBufferIntegrationFactory::keys() 19 | { 20 | return qwbifiLoader->keyMap().values(); 21 | } 22 | 23 | ClientBufferIntegration *ClientBufferIntegrationFactory::create(const QString &name, const QStringList &args) 24 | { 25 | return qLoadPlugin(qwbifiLoader(), name, args); 26 | } 27 | 28 | } 29 | 30 | QT_END_NAMESPACE 31 | -------------------------------------------------------------------------------- /src/compositor/hardware_integration/qwlclientbufferintegrationfactory_p.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2019 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #ifndef QWAYLANDCLIENTBUFFERINTEGRATIONFACTORY_H 5 | #define QWAYLANDCLIENTBUFFERINTEGRATIONFACTORY_H 6 | 7 | // 8 | // W A R N I N G 9 | // ------------- 10 | // 11 | // This file is not part of the Qt API. It exists purely as an 12 | // implementation detail. This header file may change from version to 13 | // version without notice, or even be removed. 14 | // 15 | // We mean it. 16 | // 17 | 18 | #include 19 | #include 20 | #include 21 | 22 | QT_BEGIN_NAMESPACE 23 | 24 | namespace QtWayland { 25 | 26 | class ClientBufferIntegration; 27 | 28 | class Q_WAYLANDCOMPOSITOR_EXPORT ClientBufferIntegrationFactory 29 | { 30 | public: 31 | static QStringList keys(); 32 | static ClientBufferIntegration *create(const QString &name, const QStringList &args); 33 | }; 34 | 35 | } 36 | 37 | QT_END_NAMESPACE 38 | 39 | #endif // QWAYLANDCLIENTBUFFERINTEGRATIONFACTORY_H 40 | -------------------------------------------------------------------------------- /src/compositor/hardware_integration/qwlclientbufferintegrationplugin.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2017 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #include "qwlclientbufferintegrationplugin_p.h" 5 | 6 | QT_BEGIN_NAMESPACE 7 | 8 | namespace QtWayland { 9 | 10 | ClientBufferIntegrationPlugin::ClientBufferIntegrationPlugin(QObject *parent) : 11 | QObject(parent) 12 | { 13 | } 14 | 15 | ClientBufferIntegrationPlugin::~ClientBufferIntegrationPlugin() 16 | { 17 | } 18 | 19 | } 20 | 21 | QT_END_NAMESPACE 22 | 23 | #include "moc_qwlclientbufferintegrationplugin_p.cpp" 24 | -------------------------------------------------------------------------------- /src/compositor/hardware_integration/qwlhardwarelayerintegration.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2018 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #include "qwlhardwarelayerintegration_p.h" 5 | 6 | QT_BEGIN_NAMESPACE 7 | 8 | namespace QtWayland { 9 | 10 | } 11 | 12 | QT_END_NAMESPACE 13 | 14 | #include "moc_qwlhardwarelayerintegration_p.cpp" 15 | -------------------------------------------------------------------------------- /src/compositor/hardware_integration/qwlhardwarelayerintegrationfactory.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2018 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #include "qwlhardwarelayerintegrationfactory_p.h" 5 | #include "qwlhardwarelayerintegrationplugin_p.h" 6 | #include "qwlhardwarelayerintegration_p.h" 7 | 8 | #include 9 | #include 10 | #include 11 | 12 | QT_BEGIN_NAMESPACE 13 | 14 | namespace QtWayland { 15 | 16 | Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, qwhlifLoader, 17 | (QtWaylandHardwareLayerIntegrationFactoryInterface_iid, QLatin1String("/wayland-hardware-layer-integration"), Qt::CaseInsensitive)) 18 | 19 | QStringList HardwareLayerIntegrationFactory::keys() 20 | { 21 | return qwhlifLoader->keyMap().values(); 22 | } 23 | 24 | HardwareLayerIntegration *HardwareLayerIntegrationFactory::create(const QString &name, const QStringList &args) 25 | { 26 | return qLoadPlugin(qwhlifLoader(), name, args); 27 | } 28 | 29 | } 30 | 31 | QT_END_NAMESPACE 32 | -------------------------------------------------------------------------------- /src/compositor/hardware_integration/qwlhardwarelayerintegrationfactory_p.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2018 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #ifndef QWAYLANDHARDWARELAYERINTEGRATIONFACTORY_H 5 | #define QWAYLANDHARDWARELAYERINTEGRATIONFACTORY_H 6 | 7 | // 8 | // W A R N I N G 9 | // ------------- 10 | // 11 | // This file is not part of the Qt API. It exists purely as an 12 | // implementation detail. This header file may change from version to 13 | // version without notice, or even be removed. 14 | // 15 | // We mean it. 16 | // 17 | 18 | #include 19 | #include 20 | #include 21 | 22 | QT_BEGIN_NAMESPACE 23 | 24 | namespace QtWayland { 25 | 26 | class HardwareLayerIntegration; 27 | 28 | class Q_WAYLANDCOMPOSITOR_EXPORT HardwareLayerIntegrationFactory 29 | { 30 | public: 31 | static QStringList keys(); 32 | static HardwareLayerIntegration *create(const QString &name, const QStringList &args); 33 | }; 34 | 35 | } 36 | 37 | QT_END_NAMESPACE 38 | 39 | #endif // QWAYLANDHARDWARELAYERINTEGRATIONFACTORY_H 40 | -------------------------------------------------------------------------------- /src/compositor/hardware_integration/qwlhardwarelayerintegrationplugin.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2018 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #include "qwlhardwarelayerintegrationplugin_p.h" 5 | 6 | QT_BEGIN_NAMESPACE 7 | 8 | namespace QtWayland { 9 | 10 | HardwareLayerIntegrationPlugin::HardwareLayerIntegrationPlugin(QObject *parent) : 11 | QObject(parent) 12 | { 13 | } 14 | 15 | HardwareLayerIntegrationPlugin::~HardwareLayerIntegrationPlugin() 16 | { 17 | } 18 | 19 | } 20 | 21 | QT_END_NAMESPACE 22 | 23 | #include "moc_qwlhardwarelayerintegrationplugin_p.cpp" 24 | -------------------------------------------------------------------------------- /src/compositor/hardware_integration/qwlserverbufferintegration.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2017 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #include "qwlserverbufferintegration_p.h" 5 | 6 | QT_BEGIN_NAMESPACE 7 | 8 | namespace QtWayland { 9 | 10 | ServerBuffer::ServerBuffer(const QSize &size, ServerBuffer::Format format) 11 | : m_size(size) 12 | , m_format(format) 13 | { } 14 | ServerBuffer::~ServerBuffer() 15 | { } 16 | 17 | 18 | bool ServerBuffer::isYInverted() const 19 | { 20 | return false; 21 | } 22 | 23 | QSize ServerBuffer::size() const 24 | { return m_size; } 25 | 26 | ServerBuffer::Format ServerBuffer::format() const 27 | { return m_format; } 28 | 29 | ServerBufferIntegration::ServerBufferIntegration() 30 | { } 31 | 32 | ServerBufferIntegration::~ServerBufferIntegration() 33 | { } 34 | 35 | bool ServerBufferIntegration::initializeHardware(QWaylandCompositor *compositor) 36 | { 37 | Q_UNUSED(compositor); 38 | return true; 39 | } 40 | 41 | } 42 | 43 | QT_END_NAMESPACE 44 | -------------------------------------------------------------------------------- /src/compositor/hardware_integration/qwlserverbufferintegrationfactory.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2017 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #include "qwlserverbufferintegrationfactory_p.h" 5 | #include "qwlserverbufferintegrationplugin_p.h" 6 | #include "qwlserverbufferintegration_p.h" 7 | #include 8 | #include 9 | #include 10 | 11 | QT_BEGIN_NAMESPACE 12 | 13 | namespace QtWayland { 14 | 15 | Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, qwsbifLoader, 16 | (QtWaylandServerBufferIntegrationFactoryInterface_iid, QLatin1String("/wayland-graphics-integration-server"), Qt::CaseInsensitive)) 17 | 18 | QStringList ServerBufferIntegrationFactory::keys() 19 | { 20 | return qwsbifLoader->keyMap().values(); 21 | } 22 | 23 | ServerBufferIntegration *ServerBufferIntegrationFactory::create(const QString &name, const QStringList &args) 24 | { 25 | return qLoadPlugin(qwsbifLoader(), name, args); 26 | } 27 | 28 | } 29 | 30 | QT_END_NAMESPACE 31 | -------------------------------------------------------------------------------- /src/compositor/hardware_integration/qwlserverbufferintegrationfactory_p.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2019 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #ifndef QWAYLANDSERVERBUFFERINTEGRATIONFACTORY_H 5 | #define QWAYLANDSERVERBUFFERINTEGRATIONFACTORY_H 6 | 7 | // 8 | // W A R N I N G 9 | // ------------- 10 | // 11 | // This file is not part of the Qt API. It exists purely as an 12 | // implementation detail. This header file may change from version to 13 | // version without notice, or even be removed. 14 | // 15 | // We mean it. 16 | // 17 | 18 | #include 19 | #include 20 | #include 21 | 22 | QT_BEGIN_NAMESPACE 23 | 24 | namespace QtWayland { 25 | 26 | class ServerBufferIntegration; 27 | 28 | class Q_WAYLANDCOMPOSITOR_EXPORT ServerBufferIntegrationFactory 29 | { 30 | public: 31 | static QStringList keys(); 32 | static ServerBufferIntegration *create(const QString &name, const QStringList &args); 33 | }; 34 | 35 | } 36 | 37 | QT_END_NAMESPACE 38 | 39 | #endif //QWAYLANDSERVERBUFFERINTEGRATIONFACTORY_H 40 | 41 | -------------------------------------------------------------------------------- /src/compositor/hardware_integration/qwlserverbufferintegrationplugin.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2017 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #include "qwlserverbufferintegrationplugin_p.h" 5 | 6 | QT_BEGIN_NAMESPACE 7 | 8 | namespace QtWayland { 9 | 10 | ServerBufferIntegrationPlugin::ServerBufferIntegrationPlugin(QObject *parent) : 11 | QObject(parent) 12 | { 13 | } 14 | 15 | ServerBufferIntegrationPlugin::~ServerBufferIntegrationPlugin() 16 | { 17 | } 18 | 19 | } 20 | 21 | QT_END_NAMESPACE 22 | 23 | #include "moc_qwlserverbufferintegrationplugin_p.cpp" 24 | 25 | -------------------------------------------------------------------------------- /src/compositor/qmlfiles/WaylandOutputWindow.qml: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2017 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | import QtQuick 5 | 6 | Window { 7 | id: window 8 | property QtObject compositor 9 | property QtObject output 10 | property bool automaticFrameCallback: false 11 | 12 | Component.onCompleted: { 13 | if (!compositor) { 14 | console.warn("WaylandOutputWindow initiated without compositor. This leads to undefined behavior"); 15 | return; 16 | } 17 | output = compositor.addOutput(window); 18 | output.automaticFrameCallbacks = window.automaticFrameCallback; 19 | } 20 | } 21 | 22 | -------------------------------------------------------------------------------- /src/compositor/qt_cmdline.cmake: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qt/qtwayland/07f81efabf8192c991efacb61cdd867f936751ac/src/compositor/qt_cmdline.cmake -------------------------------------------------------------------------------- /src/compositor/shaders/compile: -------------------------------------------------------------------------------- 1 | qsb -b --glsl "100 es,120,150" -o surface.vert.qsb surface.vert 2 | qsb --glsl "100 es,120,150" -o surface_rgba.frag.qsb surface_rgba.frag 3 | qsb --glsl "100 es,120,150" -o surface_rgbx.frag.qsb surface_rgbx.frag 4 | qsb --glsl "100 es,120,150" -o surface_y_uv.frag.qsb surface_y_uv.frag 5 | qsb --glsl "100 es,120,150" -o surface_y_u_v.frag.qsb surface_y_u_v.frag 6 | qsb --glsl "100 es,120,150" -o surface_y_xuxv.frag.qsb surface_y_xuxv.frag 7 | 8 | # Cannot be precompiled and is handled separately: 9 | # surface_oes_external.frag 10 | -------------------------------------------------------------------------------- /src/compositor/shaders/surface.vert: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2023 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #version 440 5 | 6 | layout(location = 0) in vec2 qt_VertexPosition; 7 | layout(location = 1) in vec2 qt_VertexTexCoord; 8 | layout(location = 0) out vec2 v_texcoord; 9 | 10 | layout(std140, binding = 0) uniform buf { 11 | mat4 qt_Matrix; 12 | float qt_Opacity; 13 | }; 14 | 15 | out gl_PerVertex { vec4 gl_Position; }; 16 | 17 | void main() 18 | { 19 | gl_Position = qt_Matrix * vec4(qt_VertexPosition, 0.0, 1.0); 20 | v_texcoord = qt_VertexTexCoord; 21 | } 22 | -------------------------------------------------------------------------------- /src/compositor/shaders/surface.vert.qsb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qt/qtwayland/07f81efabf8192c991efacb61cdd867f936751ac/src/compositor/shaders/surface.vert.qsb -------------------------------------------------------------------------------- /src/compositor/shaders/surface_oes_external.frag: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2023 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | // This shader stump cannot be precompiled and is compiled at run-time. 5 | // Appropriate target preamble added when it is loaded. 6 | 7 | varying vec2 v_texcoord; 8 | struct buf { 9 | mat4 qt_Matrix; 10 | float qt_Opacity; 11 | }; 12 | uniform buf ubuf; 13 | uniform samplerExternalOES tex0; 14 | 15 | void main() 16 | { 17 | gl_FragColor = ubuf.qt_Opacity * texture2D(tex0, v_texcoord); 18 | } 19 | -------------------------------------------------------------------------------- /src/compositor/shaders/surface_rgba.frag: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2023 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #version 440 5 | 6 | layout(location = 0) in vec2 v_texcoord; 7 | layout(location = 0) out vec4 fragColor; 8 | 9 | layout(std140, binding = 0) uniform buf { 10 | mat4 qt_Matrix; 11 | float qt_Opacity; 12 | }; 13 | 14 | layout(binding = 1) uniform sampler2D tex0; 15 | 16 | void main() 17 | { 18 | fragColor = qt_Opacity * texture(tex0, v_texcoord); 19 | } 20 | -------------------------------------------------------------------------------- /src/compositor/shaders/surface_rgba.frag.qsb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qt/qtwayland/07f81efabf8192c991efacb61cdd867f936751ac/src/compositor/shaders/surface_rgba.frag.qsb -------------------------------------------------------------------------------- /src/compositor/shaders/surface_rgbx.frag: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2023 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #version 440 5 | 6 | layout(location = 0) in vec2 v_texcoord; 7 | layout(location = 0) out vec4 fragColor; 8 | 9 | layout(std140, binding = 0) uniform buf { 10 | mat4 qt_Matrix; 11 | float qt_Opacity; 12 | }; 13 | 14 | layout(binding = 1) uniform sampler2D tex0; 15 | 16 | void main() 17 | { 18 | fragColor.rgb = qt_Opacity * texture(tex0, v_texcoord).rgb; 19 | fragColor.a = qt_Opacity; 20 | } 21 | -------------------------------------------------------------------------------- /src/compositor/shaders/surface_rgbx.frag.qsb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qt/qtwayland/07f81efabf8192c991efacb61cdd867f936751ac/src/compositor/shaders/surface_rgbx.frag.qsb -------------------------------------------------------------------------------- /src/compositor/shaders/surface_y_u_v.frag: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2023 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #version 440 5 | 6 | layout(location = 0) in vec2 v_texcoord; 7 | layout(location = 0) out vec4 fragColor; 8 | 9 | layout(std140, binding = 0) uniform buf { 10 | mat4 qt_Matrix; 11 | float qt_Opacity; 12 | }; 13 | 14 | layout(binding = 1) uniform sampler2D tex0; 15 | layout(binding = 2) uniform sampler2D tex1; 16 | layout(binding = 3) uniform sampler2D tex2; 17 | 18 | void main() 19 | { 20 | float y = 1.16438356 * (texture(tex0, v_texcoord).x - 0.0625); 21 | float u = texture(tex1, v_texcoord).x - 0.5; 22 | float v = texture(tex2, v_texcoord).x - 0.5; 23 | y *= qt_Opacity; 24 | u *= qt_Opacity; 25 | v *= qt_Opacity; 26 | fragColor.r = y + 1.59602678 * v; 27 | fragColor.g = y - 0.39176229 * u - 0.81296764 * v; 28 | fragColor.b = y + 2.01723214 * u; 29 | fragColor.a = qt_Opacity; 30 | } 31 | -------------------------------------------------------------------------------- /src/compositor/shaders/surface_y_u_v.frag.qsb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qt/qtwayland/07f81efabf8192c991efacb61cdd867f936751ac/src/compositor/shaders/surface_y_u_v.frag.qsb -------------------------------------------------------------------------------- /src/compositor/shaders/surface_y_uv.frag: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2023 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #version 440 5 | 6 | layout(location = 0) in vec2 v_texcoord; 7 | layout(location = 0) out vec4 fragColor; 8 | 9 | layout(std140, binding = 0) uniform buf { 10 | mat4 qt_Matrix; 11 | float qt_Opacity; 12 | }; 13 | 14 | layout(binding = 1) uniform sampler2D tex0; 15 | layout(binding = 2) uniform sampler2D tex1; 16 | 17 | void main() 18 | { 19 | float y = 1.16438356 * (texture(tex0, v_texcoord).x - 0.0625); 20 | float u = texture(tex1, v_texcoord).r - 0.5; 21 | float v = texture(tex1, v_texcoord).g - 0.5; 22 | y *= qt_Opacity; 23 | u *= qt_Opacity; 24 | v *= qt_Opacity; 25 | fragColor.r = y + 1.59602678 * v; 26 | fragColor.g = y - 0.39176229 * u - 0.81296764 * v; 27 | fragColor.b = y + 2.01723214 * u; 28 | fragColor.a = qt_Opacity; 29 | } 30 | -------------------------------------------------------------------------------- /src/compositor/shaders/surface_y_uv.frag.qsb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qt/qtwayland/07f81efabf8192c991efacb61cdd867f936751ac/src/compositor/shaders/surface_y_uv.frag.qsb -------------------------------------------------------------------------------- /src/compositor/shaders/surface_y_xuxv.frag: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2023 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #version 440 5 | 6 | layout(location = 0) in vec2 v_texcoord; 7 | layout(location = 0) out vec4 fragColor; 8 | 9 | layout(std140, binding = 0) uniform buf { 10 | mat4 qt_Matrix; 11 | float qt_Opacity; 12 | }; 13 | 14 | layout(binding = 1) uniform sampler2D tex0; 15 | layout(binding = 2) uniform sampler2D tex1; 16 | 17 | void main() 18 | { 19 | float y = 1.16438356 * (texture(tex0, v_texcoord).x - 0.0625); 20 | float u = texture(tex1, v_texcoord).g - 0.5; 21 | float v = texture(tex1, v_texcoord).a - 0.5; 22 | y *= qt_Opacity; 23 | u *= qt_Opacity; 24 | v *= qt_Opacity; 25 | fragColor.r = y + 1.59602678 * v; 26 | fragColor.g = y - 0.39176229 * u - 0.81296764 * v; 27 | fragColor.b = y + 2.01723214 * u; 28 | fragColor.a = qt_Opacity; 29 | } 30 | -------------------------------------------------------------------------------- /src/compositor/shaders/surface_y_xuxv.frag.qsb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qt/qtwayland/07f81efabf8192c991efacb61cdd867f936751ac/src/compositor/shaders/surface_y_xuxv.frag.qsb -------------------------------------------------------------------------------- /src/compositor/wayland_wrapper/qwlregion.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2017 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #include "qwlregion_p.h" 5 | 6 | #include 7 | 8 | QT_BEGIN_NAMESPACE 9 | 10 | namespace QtWayland { 11 | 12 | Region::Region(struct wl_client *client, uint32_t id) 13 | : QtWaylandServer::wl_region(client, id, 1) 14 | { 15 | } 16 | 17 | Region::~Region() 18 | { 19 | } 20 | 21 | Region *Region::fromResource(struct ::wl_resource *resource) 22 | { 23 | return QtWayland::fromResource(resource); 24 | } 25 | 26 | void Region::region_destroy_resource(Resource *) 27 | { 28 | delete this; 29 | } 30 | 31 | void Region::region_destroy(Resource *resource) 32 | { 33 | wl_resource_destroy(resource->handle); 34 | } 35 | 36 | void Region::region_add(Resource *, int32_t x, int32_t y, int32_t w, int32_t h) 37 | { 38 | m_region += QRect(x, y, w, h); 39 | } 40 | 41 | void Region::region_subtract(Resource *, int32_t x, int32_t y, int32_t w, int32_t h) 42 | { 43 | m_region -= QRect(x, y, w, h); 44 | } 45 | 46 | } 47 | 48 | QT_END_NAMESPACE 49 | -------------------------------------------------------------------------------- /src/extensions/REUSE.toml: -------------------------------------------------------------------------------- 1 | version = 1 2 | 3 | [[annotations]] 4 | path = "qt-text-input-method-unstable-v1.xml" 5 | precedence = "closest" 6 | comment = "License is in full text in file. Should it be changed?" 7 | SPDX-FileCopyrightText = "Copyright © 2020 The Qt Company Ltd." 8 | SPDX-License-Identifier = "MIT" 9 | -------------------------------------------------------------------------------- /src/global/README: -------------------------------------------------------------------------------- 1 | The WaylandGlobalPrivate module is a module that contains configure 2 | features, shared by the modules of the qtwayland repository. 3 | 4 | The actual definition of this module is in src/CMakeLists.txt, 5 | because we need to have the qt_find_package calls in a directory scope 6 | above src/client and src/compositor. 7 | 8 | This file here mostly exists to make the otherwise empty src/global 9 | directory known to git. 10 | -------------------------------------------------------------------------------- /src/hardwareintegration/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022 The Qt Company Ltd. 2 | # SPDX-License-Identifier: BSD-3-Clause 3 | 4 | if(TARGET Qt::WaylandCompositor) 5 | add_subdirectory(compositor) 6 | endif() 7 | -------------------------------------------------------------------------------- /src/hardwareintegration/compositor/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022 The Qt Company Ltd. 2 | # SPDX-License-Identifier: BSD-3-Clause 3 | 4 | # Generated from compositor.pro. 5 | 6 | if(QT_FEATURE_wayland_egl) 7 | add_subdirectory(wayland-egl) 8 | endif() 9 | -------------------------------------------------------------------------------- /src/hardwareintegration/compositor/brcm-egl/brcmbuffer.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2017 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #include "brcmbuffer.h" 5 | 6 | #include 7 | 8 | #include 9 | 10 | QT_BEGIN_NAMESPACE 11 | 12 | BrcmBuffer::BrcmBuffer(struct ::wl_client *client, uint32_t id, const QSize &size, EGLint *data, size_t count) 13 | : QtWaylandServer::wl_buffer(client, id, 1) 14 | , m_handle(count) 15 | , m_size(size) 16 | { 17 | for (size_t i = 0; i < count; ++i) 18 | m_handle[i] = data[i]; 19 | } 20 | 21 | BrcmBuffer::~BrcmBuffer() 22 | { 23 | static PFNEGLDESTROYGLOBALIMAGEBRCMPROC eglDestroyGlobalImage = 24 | (PFNEGLDESTROYGLOBALIMAGEBRCMPROC) eglGetProcAddress("eglDestroyGlobalImageBRCM"); 25 | eglDestroyGlobalImage(handle()); 26 | } 27 | 28 | void BrcmBuffer::buffer_destroy_resource(Resource *) 29 | { 30 | delete this; 31 | } 32 | 33 | void BrcmBuffer::buffer_destroy(Resource *resource) 34 | { 35 | wl_resource_destroy(resource->handle); 36 | } 37 | 38 | QT_END_NAMESPACE 39 | -------------------------------------------------------------------------------- /src/hardwareintegration/compositor/vulkan-server/vulkanwrapper.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2019 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #ifndef VULKANWRAPPER_H 5 | #define VULKANWRAPPER_H 6 | 7 | #include 8 | 9 | QT_BEGIN_NAMESPACE 10 | 11 | class VulkanWrapper; 12 | struct VulkanImageWrapper; 13 | class VulkanWrapperPrivate; 14 | 15 | class QOpenGLContext; 16 | class QImage; 17 | 18 | class VulkanWrapper 19 | { 20 | public: 21 | VulkanWrapper(QOpenGLContext *glContext); 22 | 23 | VulkanImageWrapper *createTextureImage(const QImage &img); 24 | VulkanImageWrapper *createTextureImageFromData(const uchar *pixels, uint bufferSize, const QSize &size, uint glInternalFormat); 25 | int getImageInfo(const VulkanImageWrapper *imgWrapper, int *memSize, int *w = nullptr, int *h = nullptr); 26 | void freeTextureImage(VulkanImageWrapper *imageWrapper); 27 | 28 | private: 29 | VulkanWrapperPrivate *d_ptr; 30 | }; 31 | 32 | QT_END_NAMESPACE 33 | 34 | #endif // VULKANWRAPPER_H 35 | -------------------------------------------------------------------------------- /src/hardwareintegration/compositor/wayland-egl/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022 The Qt Company Ltd. 2 | # SPDX-License-Identifier: BSD-3-Clause 3 | 4 | ##################################################################### 5 | ## WaylandEglCompositorHwIntegrationPrivate Module: 6 | ##################################################################### 7 | qt_find_package(EGL) # special case 8 | 9 | qt_internal_add_module(WaylandEglCompositorHwIntegrationPrivate 10 | CONFIG_MODULE_NAME wayland_egl_compositor_hw_integration 11 | INTERNAL_MODULE 12 | SOURCES 13 | waylandeglclientbufferintegration.cpp waylandeglclientbufferintegration_p.h 14 | INCLUDE_DIRECTORIES 15 | ${CMAKE_CURRENT_SOURCE_DIR} 16 | LIBRARIES 17 | EGL::EGL 18 | Wayland::Egl 19 | Wayland::Server 20 | PUBLIC_LIBRARIES 21 | Qt::Core 22 | Qt::Gui 23 | Qt::WaylandCompositorPrivate 24 | NO_GENERATE_CPP_EXPORTS 25 | ) 26 | 27 | qt_internal_extend_target(WaylandEglCompositorHwIntegrationPrivate CONDITION NOT QT_FEATURE_egl_x11 28 | DEFINES 29 | QT_EGL_NO_X11 30 | ) 31 | -------------------------------------------------------------------------------- /src/hardwareintegration/compositor/wayland-eglstream-controller/waylandeglstreamcontroller.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2019 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #include "waylandeglstreamcontroller.h" 5 | #include "waylandeglstreamintegration.h" 6 | 7 | #include 8 | 9 | #include 10 | 11 | QT_BEGIN_NAMESPACE 12 | 13 | 14 | 15 | WaylandEglStreamController::WaylandEglStreamController(wl_display *display, WaylandEglStreamClientBufferIntegration *clientBufferIntegration) 16 | : wl_eglstream_controller(display, 1 /*version*/) 17 | , m_clientBufferIntegration(clientBufferIntegration) 18 | { 19 | } 20 | 21 | void WaylandEglStreamController::eglstream_controller_attach_eglstream_consumer(Resource *resource, struct ::wl_resource *wl_surface, struct ::wl_resource *wl_buffer) 22 | { 23 | Q_UNUSED(resource); 24 | m_clientBufferIntegration->attachEglStreamConsumer(wl_surface, wl_buffer); 25 | } 26 | 27 | QT_END_NAMESPACE 28 | -------------------------------------------------------------------------------- /src/imports/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022 The Qt Company Ltd. 2 | # SPDX-License-Identifier: BSD-3-Clause 3 | 4 | # Generated from imports.pro. 5 | 6 | if(TARGET Qt::Quick AND TARGET Qt::WaylandCompositor) 7 | add_subdirectory(compositor-extensions) 8 | endif() 9 | if(QT_FEATURE_opengl AND TARGET Qt::Quick AND TARGET Qt::WaylandClient AND TARGET Qt::WaylandCompositor) 10 | add_subdirectory(texture-sharing) 11 | add_subdirectory(texture-sharing-extension) 12 | endif() 13 | -------------------------------------------------------------------------------- /src/imports/compositor-extensions/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022 The Qt Company Ltd. 2 | # SPDX-License-Identifier: BSD-3-Clause 3 | 4 | # Generated from compositor-extensions.pro. 5 | 6 | add_subdirectory(xdgshell) 7 | add_subdirectory(iviapplication) 8 | add_subdirectory(wlshell) 9 | add_subdirectory(qtshell) 10 | add_subdirectory(presentationtime) 11 | -------------------------------------------------------------------------------- /src/imports/compositor-extensions/iviapplication/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022 The Qt Company Ltd. 2 | # SPDX-License-Identifier: BSD-3-Clause 3 | 4 | # Generated from iviapplication.pro. 5 | 6 | ##################################################################### 7 | ## qwaylandcompositoriviapplicationplugin Plugin: 8 | ##################################################################### 9 | 10 | qt_internal_add_qml_module(WaylandCompositorIviapplication 11 | URI "QtWayland.Compositor.IviApplication" 12 | VERSION "${PROJECT_VERSION}" 13 | SOURCES 14 | qwaylandcompositoriviapplicationforeign.cpp qwaylandcompositoriviapplicationforeign_p.h 15 | LIBRARIES 16 | Qt::Core 17 | Qt::Gui 18 | Qt::WaylandCompositor 19 | NO_GENERATE_CPP_EXPORTS 20 | PAST_MAJOR_VERSIONS 1 21 | ) 22 | 23 | qt_internal_add_autogen_sync_header_dependencies(WaylandCompositorIviapplication WaylandCompositor) 24 | 25 | #### Keys ignored in scope 1:.:.:iviapplication.pro:: 26 | # CXX_MODULE = "qml" 27 | # QML_IMPORT_VERSION = "$$QT_VERSION" 28 | # TARGETPATH = "QtWayland/Compositor/IviApplication" 29 | -------------------------------------------------------------------------------- /src/imports/compositor-extensions/iviapplication/qwaylandcompositoriviapplicationforeign.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2020 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #include "qwaylandcompositoriviapplicationforeign_p.h" 5 | 6 | QT_BEGIN_NAMESPACE 7 | 8 | /*! 9 | \qmlmodule QtWayland.Compositor.IviApplication 10 | \title Qt Wayland IviApplication Extension 11 | \ingroup qmlmodules 12 | \brief Provides a Qt API for the IviApplication shell extension. 13 | 14 | \section2 Summary 15 | IviApplication is a shell extension suitable for lightweight compositors, 16 | for example in In-Vehicle Infotainment (IVI) systems. 17 | 18 | IviApplication corresponds to the Wayland \c ivi_application interface. 19 | 20 | \section2 Usage 21 | To use this module, import it like this: 22 | \qml 23 | import QtWayland.Compositor.IviApplication 24 | \endqml 25 | */ 26 | 27 | QT_END_NAMESPACE 28 | 29 | #include "moc_qwaylandcompositoriviapplicationforeign_p.cpp" 30 | -------------------------------------------------------------------------------- /src/imports/compositor-extensions/iviapplication/qwaylandcompositoriviapplicationforeign_p.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2020 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #ifndef QWAYLANDCOMPOSITORIVIAPPLICATIONFOREIGN_H 5 | #define QWAYLANDCOMPOSITORIVIAPPLICATIONFOREIGN_H 6 | 7 | // 8 | // W A R N I N G 9 | // ------------- 10 | // 11 | // This file is not part of the Qt API. It exists purely as an 12 | // implementation detail. This header file may change from version to 13 | // version without notice, or even be removed. 14 | // 15 | // We mean it. 16 | // 17 | 18 | #include 19 | #include 20 | 21 | #include 22 | #include 23 | #include 24 | 25 | QT_BEGIN_NAMESPACE 26 | 27 | Q_COMPOSITOR_DECLARE_QUICK_EXTENSION_NAMED_ELEMENT(QWaylandIviApplication, IviApplication, 1, 0) 28 | 29 | struct QWaylandIviSurfaceForeign { 30 | Q_GADGET 31 | QML_FOREIGN(QWaylandIviSurface) 32 | QML_NAMED_ELEMENT(IviSurface) 33 | QML_ADDED_IN_VERSION(1, 0) 34 | }; 35 | 36 | 37 | QT_END_NAMESPACE 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /src/imports/compositor-extensions/presentationtime/qwaylandcompositorpresentationtimeforeign.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021 LG Electronics Inc. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #include "qwaylandcompositorpresentationtimeforeign_p.h" 5 | 6 | QT_BEGIN_NAMESPACE 7 | 8 | /*! 9 | \qmlmodule QtWayland.Compositor.PresentationTime 10 | \title Qt Wayland Presentation Time Extension 11 | \ingroup qmlmodules 12 | \since 6.3 13 | \brief Provides tracking the timing when a frame is presented on screen. 14 | 15 | \section2 Summary 16 | The PresentationTime extension provides a way to track rendering timing 17 | for a surface. Client can request feedbacks associated with a surface, 18 | then compositor send events for the feedback with the time when the surface 19 | is presented on-screen. 20 | 21 | PresentationTime corresponds to the Wayland \c wp_presentation interface. 22 | 23 | \section2 Usage 24 | To use this module, import it like this: 25 | \qml 26 | import QtWayland.Compositor.PresentationTime 27 | \endqml 28 | */ 29 | 30 | QT_END_NAMESPACE 31 | 32 | #include "moc_qwaylandcompositorpresentationtimeforeign_p.cpp" 33 | -------------------------------------------------------------------------------- /src/imports/compositor-extensions/presentationtime/qwaylandcompositorpresentationtimeforeign_p.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021 LG Electronics Inc. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #ifndef QWAYLANDCOMPOSITORPRESENTATIONTIMEFOREIGN_H 5 | #define QWAYLANDCOMPOSITORPRESENTATIONTIMEFOREIGN_H 6 | 7 | // 8 | // W A R N I N G 9 | // ------------- 10 | // 11 | // This file is not part of the Qt API. It exists purely as an 12 | // implementation detail. This header file may change from version to 13 | // version without notice, or even be removed. 14 | // 15 | // We mean it. 16 | // 17 | 18 | #include 19 | #include 20 | 21 | #include 22 | #include 23 | 24 | QT_BEGIN_NAMESPACE 25 | 26 | Q_COMPOSITOR_DECLARE_QUICK_EXTENSION_NAMED_ELEMENT(QWaylandPresentationTime, PresentationTime, 1, 0) 27 | 28 | QT_END_NAMESPACE 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /src/imports/compositor-extensions/qtshell/qwaylandqtshell.qdoc: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2024 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only 3 | 4 | /*! 5 | \qmlmodule QtWayland.Compositor.QtShell 6 | \title Qt Wayland Qt Shell Extension 7 | \ingroup qmlmodules 8 | \since 6.3 9 | \brief Provides a shell extension for Qt applications running on a Qt Wayland Compositor. 10 | \section2 Summary 11 | The QtShell extension provides a way to associate an QtShellSurface with a regular Wayland 12 | surface. The QtShell extension is written to support the window management features which are 13 | supported by Qt. It may be suitable on a platform where both the compositor and client 14 | applications are written with Qt, and where applications are trusted not to abuse features such 15 | as manual window positioning and "bring-to-front". 16 | For other use cases, consider using IviApplication or XdgShell instead. 17 | \section2 Usage 18 | To use this module, import it like this: 19 | \qml 20 | import QtWayland.Compositor.IviApplication 21 | \endqml 22 | */ 23 | -------------------------------------------------------------------------------- /src/imports/compositor-extensions/qtshell/qwaylandqtshellintegration.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #include "qwaylandqtshellintegration_p.h" 5 | 6 | #include 7 | #include 8 | #include 9 | #include "qwaylandqtshell.h" 10 | 11 | QT_BEGIN_NAMESPACE 12 | 13 | namespace QtWayland { 14 | 15 | QtShellIntegration::QtShellIntegration(QWaylandQuickShellSurfaceItem *item) 16 | : QWaylandQuickShellIntegration(item) 17 | , m_item(item) 18 | , m_shellSurface(qobject_cast(item->shellSurface())) 19 | { 20 | m_item->setSurface(m_shellSurface->surface()); 21 | connect(m_shellSurface, &QWaylandQtShellSurface::destroyed, 22 | this, &QtShellIntegration::handleQtShellSurfaceDestroyed); 23 | } 24 | 25 | QtShellIntegration::~QtShellIntegration() 26 | { 27 | m_item->setSurface(nullptr); 28 | } 29 | 30 | void QtShellIntegration::handleQtShellSurfaceDestroyed() 31 | { 32 | m_shellSurface = nullptr; 33 | } 34 | 35 | } 36 | 37 | QT_END_NAMESPACE 38 | 39 | #include "moc_qwaylandqtshellintegration_p.cpp" 40 | -------------------------------------------------------------------------------- /src/imports/compositor-extensions/qtshell/qwaylandqtshellintegration_p.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #ifndef QWAYLANDQTSHELLINTEGRATION_H 5 | #define QWAYLANDQTSHELLINTEGRATION_H 6 | 7 | #include 8 | 9 | #include "qwaylandqtshell.h" 10 | 11 | QT_BEGIN_NAMESPACE 12 | 13 | // 14 | // W A R N I N G 15 | // ------------- 16 | // 17 | // This file is not part of the Qt API. It exists purely as an 18 | // implementation detail. This header file may change from version to 19 | // version without notice, or even be removed. 20 | // 21 | // We mean it. 22 | // 23 | 24 | namespace QtWayland { 25 | 26 | class QtShellIntegration : public QWaylandQuickShellIntegration 27 | { 28 | Q_OBJECT 29 | public: 30 | QtShellIntegration(QWaylandQuickShellSurfaceItem *item); 31 | ~QtShellIntegration() override; 32 | 33 | private Q_SLOTS: 34 | void handleQtShellSurfaceDestroyed(); 35 | 36 | private: 37 | QWaylandQuickShellSurfaceItem *m_item = nullptr; 38 | QWaylandQtShellSurface *m_shellSurface = nullptr; 39 | }; 40 | 41 | } 42 | 43 | QT_END_NAMESPACE 44 | 45 | #endif // QWAYLANDQTSHELLINTEGRATION_H 46 | -------------------------------------------------------------------------------- /src/imports/compositor-extensions/wlshell/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022 The Qt Company Ltd. 2 | # SPDX-License-Identifier: BSD-3-Clause 3 | 4 | qt_internal_add_qml_module(WaylandCompositorWLShell 5 | URI "QtWayland.Compositor.WlShell" 6 | VERSION "${PROJECT_VERSION}" 7 | SOURCES 8 | qwaylandcompositorwlshell_p.h qwaylandcompositorwlshell.cpp 9 | LIBRARIES 10 | Qt::Core 11 | Qt::Gui 12 | Qt::WaylandCompositor 13 | NO_GENERATE_CPP_EXPORTS 14 | PAST_MAJOR_VERSIONS 1 15 | ) 16 | 17 | qt_internal_add_autogen_sync_header_dependencies(WaylandCompositorWLShell WaylandCompositor) 18 | -------------------------------------------------------------------------------- /src/imports/compositor-extensions/wlshell/qwaylandcompositorwlshell.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2023 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #include "qwaylandcompositorwlshell_p.h" 5 | 6 | QT_BEGIN_NAMESPACE 7 | 8 | /*! 9 | \qmlmodule QtWayland.Compositor.WlShell 10 | \title Qt Wayland WlShell extension 11 | \ingroup qmlmodules 12 | \brief Provides a Qt API for the WlShell extension. 13 | 14 | \section2 Summary 15 | WlShell is a shell extension providing window system features typical to 16 | desktop systems. It is superseded by XdgShell and exists in Qt mainly 17 | for backwards compatibility with older applications. 18 | 19 | WlShell corresponds to the Wayland interface \c wl_shell. 20 | 21 | \section2 Usage 22 | To use this module, import it like this: 23 | \qml 24 | import QtWayland.Compositor.WlShell 25 | \endqml 26 | */ 27 | 28 | QT_END_NAMESPACE 29 | 30 | #include "moc_qwaylandcompositorwlshell_p.cpp" 31 | -------------------------------------------------------------------------------- /src/imports/compositor-extensions/wlshell/qwaylandcompositorwlshell_p.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2023 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #ifndef QWAYLANDWLSHELLFOREIGN_H 5 | #define QWAYLANDWLSHELLFOREIGN_H 6 | 7 | // 8 | // W A R N I N G 9 | // ------------- 10 | // 11 | // This file is not part of the Qt API. It exists purely as an 12 | // implementation detail. This header file may change from version to 13 | // version without notice, or even be removed. 14 | // 15 | // We mean it. 16 | // 17 | 18 | #include 19 | #include 20 | 21 | #include 22 | #include 23 | 24 | QT_BEGIN_NAMESPACE 25 | 26 | Q_COMPOSITOR_DECLARE_QUICK_EXTENSION_NAMED_ELEMENT(QWaylandWlShell, WlShell, 1, 0) 27 | 28 | struct QWaylandWlShellForeign { 29 | Q_GADGET 30 | QML_FOREIGN(QWaylandWlShell) 31 | QML_NAMED_ELEMENT(WlShellSurface) 32 | QML_ADDED_IN_VERSION(1, 0) 33 | }; 34 | 35 | QT_END_NAMESPACE 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /src/imports/compositor-extensions/xdgshell/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022 The Qt Company Ltd. 2 | # SPDX-License-Identifier: BSD-3-Clause 3 | 4 | qt_internal_add_qml_module(WaylandCompositorXdgShell 5 | URI "QtWayland.Compositor.XdgShell" 6 | VERSION "${PROJECT_VERSION}" 7 | SOURCES 8 | qwaylandcompositorxdgshell_p.h 9 | qwaylandcompositorxdgshell.cpp 10 | LIBRARIES 11 | Qt::Core 12 | Qt::Gui 13 | Qt::WaylandCompositor 14 | NO_GENERATE_CPP_EXPORTS 15 | PAST_MAJOR_VERSIONS 1 16 | ) 17 | 18 | qt_internal_add_autogen_sync_header_dependencies(WaylandCompositorXdgShell WaylandCompositor) 19 | -------------------------------------------------------------------------------- /src/imports/compositor-extensions/xdgshell/qwaylandcompositorxdgshell.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2023 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #include "qwaylandcompositorxdgshell_p.h" 5 | 6 | QT_BEGIN_NAMESPACE 7 | /*! 8 | \qmlmodule QtWayland.Compositor.XdgShell 9 | \title Qt Wayland XdgShell Extension 10 | \ingroup qmlmodules 11 | \brief Provides a Qt API for the XdgShell shell extension. 12 | 13 | \section2 Summary 14 | XdgShell is a shell extension providing window system features typical to 15 | desktop systems. 16 | 17 | XdgShell corresponds to the Wayland interface, \c xdg_shell. 18 | 19 | \section2 Usage 20 | To use this module, import it like this: 21 | \qml 22 | import QtWayland.Compositor.XdgShell 23 | \endqml 24 | */ 25 | QT_END_NAMESPACE 26 | 27 | #include "moc_qwaylandcompositorxdgshell_p.cpp" 28 | -------------------------------------------------------------------------------- /src/plugins/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022 The Qt Company Ltd. 2 | # SPDX-License-Identifier: BSD-3-Clause 3 | 4 | # Generated from plugins.pro. 5 | 6 | add_subdirectory(hardwareintegration) 7 | if(TARGET Qt::WaylandClient) 8 | add_subdirectory(decorations) 9 | add_subdirectory(shellintegration) 10 | endif() 11 | -------------------------------------------------------------------------------- /src/plugins/decorations/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022 The Qt Company Ltd. 2 | # SPDX-License-Identifier: BSD-3-Clause 3 | 4 | # Generated from decorations.pro. 5 | if (QT_FEATURE_wayland_decoration_adwaita) 6 | add_subdirectory(adwaita) 7 | endif() 8 | -------------------------------------------------------------------------------- /src/plugins/decorations/adwaita/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2023 The Qt Company Ltd. 2 | # SPDX-License-Identifier: BSD-3-Clause 3 | 4 | ##################################################################### 5 | ## QWaylandAdwaitaDecorationPlugin Plugin: 6 | ##################################################################### 7 | 8 | qt_internal_add_plugin(QWaylandAdwaitaDecorationPlugin 9 | OUTPUT_NAME adwaita 10 | PLUGIN_TYPE wayland-decoration-client 11 | SOURCES 12 | main.cpp 13 | qwaylandadwaitadecoration.cpp 14 | LIBRARIES 15 | Qt::Core 16 | Qt::DBus 17 | Qt::Gui 18 | Qt::Svg 19 | Qt::WaylandClientPrivate 20 | Wayland::Client 21 | QT_LICENSE_ID QT_COMMERCIAL_OR_LGPL3 22 | ) 23 | 24 | #### Keys ignored in scope 1:.:.:bradient.pro:: 25 | # OTHER_FILES = "bradient.json" 26 | 27 | -------------------------------------------------------------------------------- /src/plugins/decorations/adwaita/adwaita.json: -------------------------------------------------------------------------------- 1 | { 2 | "Keys": [ "adwaita", "gnome" ] 3 | } 4 | -------------------------------------------------------------------------------- /src/plugins/decorations/adwaita/main.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2023 Jan Grulich 2 | // Copyright (C) 2023 The Qt Company Ltd. 3 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only 4 | 5 | #include 6 | 7 | #include "qwaylandadwaitadecoration_p.h" 8 | 9 | QT_BEGIN_NAMESPACE 10 | 11 | using namespace Qt::StringLiterals; 12 | 13 | namespace QtWaylandClient { 14 | 15 | class QWaylandAdwaitaDecorationPlugin : public QWaylandDecorationPlugin 16 | { 17 | Q_OBJECT 18 | Q_PLUGIN_METADATA(IID QWaylandDecorationFactoryInterface_iid FILE "adwaita.json") 19 | public: 20 | QWaylandAbstractDecoration *create(const QString &key, const QStringList ¶ms) override; 21 | }; 22 | 23 | QWaylandAbstractDecoration *QWaylandAdwaitaDecorationPlugin::create(const QString &key, const QStringList ¶ms) 24 | { 25 | Q_UNUSED(params); 26 | if (!key.compare("adwaita"_L1, Qt::CaseInsensitive) || 27 | !key.compare("gnome"_L1, Qt::CaseInsensitive)) 28 | return new QWaylandAdwaitaDecoration(); 29 | return nullptr; 30 | } 31 | 32 | } 33 | 34 | QT_END_NAMESPACE 35 | 36 | #include "main.moc" 37 | -------------------------------------------------------------------------------- /src/plugins/hardwareintegration/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022 The Qt Company Ltd. 2 | # SPDX-License-Identifier: BSD-3-Clause 3 | 4 | # Generated from hardwareintegration.pro. 5 | 6 | # When doing unity build, we get symbol collisions with macros defined 7 | # in X11.h, and Xlib.h 8 | set(CMAKE_UNITY_BUILD OFF) 9 | 10 | if(TARGET Qt::WaylandCompositor) 11 | add_subdirectory(compositor) 12 | endif() 13 | 14 | set(CMAKE_UNITY_BUILD ${QT_UNITY_BUILD}) 15 | -------------------------------------------------------------------------------- /src/plugins/hardwareintegration/compositor/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022 The Qt Company Ltd. 2 | # SPDX-License-Identifier: BSD-3-Clause 3 | 4 | # Generated from compositor.pro. 5 | 6 | add_subdirectory(hardwarelayer) 7 | if(QT_FEATURE_wayland_dmabuf_client_buffer) 8 | add_subdirectory(linux-dmabuf-unstable-v1) 9 | endif() 10 | if(QT_FEATURE_wayland_egl) 11 | add_subdirectory(wayland-egl) 12 | add_subdirectory(wayland-eglstream-controller) 13 | endif() 14 | if(QT_FEATURE_wayland_brcm) 15 | add_subdirectory(brcm-egl) 16 | endif() 17 | if(QT_FEATURE_wayland_drm_egl_server_buffer) 18 | add_subdirectory(drm-egl-server) 19 | endif() 20 | if(QT_FEATURE_wayland_libhybris_egl_server_buffer) 21 | add_subdirectory(libhybris-egl-server) 22 | endif() 23 | if(QT_FEATURE_wayland_shm_emulation_server_buffer) 24 | add_subdirectory(shm-emulation-server) 25 | endif() 26 | if(QT_FEATURE_wayland_dmabuf_server_buffer) 27 | add_subdirectory(dmabuf-server) 28 | endif() 29 | if(QT_FEATURE_wayland_vulkan_server_buffer) 30 | add_subdirectory(vulkan-server) 31 | endif() 32 | -------------------------------------------------------------------------------- /src/plugins/hardwareintegration/compositor/brcm-egl/brcm-egl.json: -------------------------------------------------------------------------------- 1 | { 2 | "Keys": [ "brcm" ] 3 | } 4 | -------------------------------------------------------------------------------- /src/plugins/hardwareintegration/compositor/brcm-egl/main.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2016 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #include 5 | #include "brcmeglintegration.h" 6 | 7 | QT_BEGIN_NAMESPACE 8 | 9 | class QWaylandBrcmClientBufferIntegrationPlugin : public QtWayland::ClientBufferIntegrationPlugin 10 | { 11 | Q_OBJECT 12 | Q_PLUGIN_METADATA(IID QtWaylandClientBufferIntegrationFactoryInterface_iid FILE "brcm-egl.json") 13 | public: 14 | QtWayland::ClientBufferIntegration *create(const QString&, const QStringList&) override; 15 | }; 16 | 17 | QtWayland::ClientBufferIntegration *QWaylandBrcmClientBufferIntegrationPlugin::create(const QString& system, const QStringList& paramList) 18 | { 19 | Q_UNUSED(paramList); 20 | Q_UNUSED(system); 21 | return new BrcmEglIntegration(); 22 | } 23 | 24 | QT_END_NAMESPACE 25 | 26 | #include "main.moc" 27 | -------------------------------------------------------------------------------- /src/plugins/hardwareintegration/compositor/dmabuf-server/dmabuf-server.json: -------------------------------------------------------------------------------- 1 | { 2 | "Keys": [ "dmabuf-server" ] 3 | } 4 | -------------------------------------------------------------------------------- /src/plugins/hardwareintegration/compositor/dmabuf-server/main.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2018 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #include 5 | #include "dmabufserverbufferintegration.h" 6 | 7 | QT_BEGIN_NAMESPACE 8 | 9 | class DmaBufServerBufferIntegrationPlugin : public QtWayland::ServerBufferIntegrationPlugin 10 | { 11 | Q_OBJECT 12 | Q_PLUGIN_METADATA(IID QtWaylandServerBufferIntegrationFactoryInterface_iid FILE "dmabuf-server.json") 13 | public: 14 | QtWayland::ServerBufferIntegration *create(const QString&, const QStringList&) override; 15 | }; 16 | 17 | QtWayland::ServerBufferIntegration *DmaBufServerBufferIntegrationPlugin::create(const QString& system, const QStringList& paramList) 18 | { 19 | Q_UNUSED(paramList); 20 | Q_UNUSED(system); 21 | return new DmaBufServerBufferIntegration(); 22 | } 23 | 24 | QT_END_NAMESPACE 25 | 26 | #include "main.moc" 27 | -------------------------------------------------------------------------------- /src/plugins/hardwareintegration/compositor/drm-egl-server/drm-egl-server.json: -------------------------------------------------------------------------------- 1 | { 2 | "Keys": [ "drm-egl-server" ] 3 | } 4 | -------------------------------------------------------------------------------- /src/plugins/hardwareintegration/compositor/drm-egl-server/main.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2016 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #include 5 | #include "drmeglserverbufferintegration.h" 6 | 7 | QT_BEGIN_NAMESPACE 8 | 9 | class DrmEglServerBufferIntegrationPlugin : public QtWayland::ServerBufferIntegrationPlugin 10 | { 11 | Q_OBJECT 12 | Q_PLUGIN_METADATA(IID QtWaylandServerBufferIntegrationFactoryInterface_iid FILE "drm-egl-server.json") 13 | public: 14 | QtWayland::ServerBufferIntegration *create(const QString&, const QStringList&) override; 15 | }; 16 | 17 | QtWayland::ServerBufferIntegration *DrmEglServerBufferIntegrationPlugin::create(const QString& system, const QStringList& paramList) 18 | { 19 | Q_UNUSED(paramList); 20 | Q_UNUSED(system); 21 | return new DrmEglServerBufferIntegration(); 22 | } 23 | 24 | QT_END_NAMESPACE 25 | 26 | #include "main.moc" 27 | -------------------------------------------------------------------------------- /src/plugins/hardwareintegration/compositor/hardwarelayer/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022 The Qt Company Ltd. 2 | # SPDX-License-Identifier: BSD-3-Clause 3 | 4 | # Generated from hardwarelayer.pro. 5 | 6 | if(QT_FEATURE_wayland_layer_integration_vsp2) 7 | add_subdirectory(vsp2) 8 | endif() 9 | -------------------------------------------------------------------------------- /src/plugins/hardwareintegration/compositor/hardwarelayer/vsp2/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022 The Qt Company Ltd. 2 | # SPDX-License-Identifier: BSD-3-Clause 3 | 4 | # Generated from vsp2.pro. 5 | 6 | ##################################################################### 7 | ## Vsp2HardwareLayerIntegrationPlugin Plugin: 8 | ##################################################################### 9 | 10 | qt_internal_add_plugin(Vsp2HardwareLayerIntegrationPlugin 11 | OUTPUT_NAME qt-wayland-compositor-vsp2 12 | PLUGIN_TYPE wayland-hardware-layer-integration 13 | SOURCES 14 | ../../../../../hardwareintegration/compositor/hardwarelayer/vsp2/vsp2hardwarelayerintegration.cpp ../../../../../hardwareintegration/compositor/hardwarelayer/vsp2/vsp2hardwarelayerintegration.h 15 | main.cpp 16 | INCLUDE_DIRECTORIES 17 | ../../../../../hardwareintegration/compositor/hardwarelayer/vsp2 18 | LIBRARIES 19 | PkgConfig::Waylandkms 20 | Wayland::Server 21 | PUBLIC_LIBRARIES 22 | Qt::CorePrivate 23 | Qt::GuiPrivate 24 | Qt::WaylandCompositor 25 | Qt::WaylandCompositorPrivate 26 | ) 27 | 28 | #### Keys ignored in scope 1:.:.:vsp2.pro:: 29 | # OTHER_FILES = "vsp2.json" 30 | -------------------------------------------------------------------------------- /src/plugins/hardwareintegration/compositor/hardwarelayer/vsp2/main.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2018 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #include 5 | #include "vsp2hardwarelayerintegration.h" 6 | 7 | QT_BEGIN_NAMESPACE 8 | 9 | class Vsp2HardwareLayerIntegrationPlugin : public QtWayland::HardwareLayerIntegrationPlugin 10 | { 11 | Q_OBJECT 12 | Q_PLUGIN_METADATA(IID QtWaylandHardwareLayerIntegrationFactoryInterface_iid FILE "vsp2.json") 13 | public: 14 | QtWayland::HardwareLayerIntegration *create(const QString&, const QStringList&) override; 15 | }; 16 | 17 | QtWayland::HardwareLayerIntegration *Vsp2HardwareLayerIntegrationPlugin::create(const QString& system, const QStringList& paramList) 18 | { 19 | Q_UNUSED(paramList); 20 | Q_UNUSED(system); 21 | return new Vsp2HardwareLayerIntegration(); 22 | } 23 | 24 | QT_END_NAMESPACE 25 | 26 | #include "main.moc" 27 | -------------------------------------------------------------------------------- /src/plugins/hardwareintegration/compositor/hardwarelayer/vsp2/vsp2.json: -------------------------------------------------------------------------------- 1 | { 2 | "Keys": [ "vsp2" ] 3 | } 4 | -------------------------------------------------------------------------------- /src/plugins/hardwareintegration/compositor/libhybris-egl-server/libhybris-egl-server.json: -------------------------------------------------------------------------------- 1 | { 2 | "Keys": [ "libhybris-egl-server" ] 3 | } 4 | -------------------------------------------------------------------------------- /src/plugins/hardwareintegration/compositor/libhybris-egl-server/main.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2016 Jolla Ltd, author: 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #include 5 | #include 6 | #include "libhybriseglserverbufferintegration.h" 7 | 8 | QT_BEGIN_NAMESPACE 9 | 10 | class LibHybrisEglServerBufferIntegrationPlugin : public QtWayland::ServerBufferIntegrationPlugin 11 | { 12 | Q_OBJECT 13 | Q_PLUGIN_METADATA(IID QtWaylandServerBufferIntegrationFactoryInterface_iid FILE "libhybris-egl-server.json") 14 | public: 15 | QtWayland::ServerBufferIntegration *create(const QString&, const QStringList&); 16 | }; 17 | 18 | QtWayland::ServerBufferIntegration *LibHybrisEglServerBufferIntegrationPlugin::create(const QString& system, const QStringList& paramList) 19 | { 20 | Q_UNUSED(paramList); 21 | Q_UNUSED(system); 22 | return new LibHybrisEglServerBufferIntegration(); 23 | } 24 | 25 | QT_END_NAMESPACE 26 | 27 | #include "main.moc" 28 | -------------------------------------------------------------------------------- /src/plugins/hardwareintegration/compositor/linux-dmabuf-unstable-v1/linux-dmabuf-unstable-v1.json: -------------------------------------------------------------------------------- 1 | { 2 | "Keys": [ "linux-dmabuf-unstable-v1" ] 3 | } 4 | -------------------------------------------------------------------------------- /src/plugins/hardwareintegration/compositor/linux-dmabuf-unstable-v1/main.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2018 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #include 5 | #include 6 | #include "linuxdmabufclientbufferintegration.h" 7 | 8 | QT_BEGIN_NAMESPACE 9 | 10 | class QWaylandDmabufClientBufferIntegrationPlugin : public QtWayland::ClientBufferIntegrationPlugin 11 | { 12 | Q_OBJECT 13 | Q_PLUGIN_METADATA(IID QtWaylandClientBufferIntegrationFactoryInterface_iid FILE "linux-dmabuf-unstable-v1.json") 14 | public: 15 | QtWayland::ClientBufferIntegration *create(const QString& key, const QStringList& paramList) override; 16 | }; 17 | 18 | QtWayland::ClientBufferIntegration *QWaylandDmabufClientBufferIntegrationPlugin::create(const QString& key, const QStringList& paramList) 19 | { 20 | Q_UNUSED(paramList); 21 | Q_UNUSED(key); 22 | return new LinuxDmabufClientBufferIntegration(); 23 | } 24 | 25 | QT_END_NAMESPACE 26 | 27 | #include "main.moc" 28 | -------------------------------------------------------------------------------- /src/plugins/hardwareintegration/compositor/shm-emulation-server/main.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2017 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #include 5 | #include "shmserverbufferintegration.h" 6 | 7 | QT_BEGIN_NAMESPACE 8 | 9 | class ShmServerBufferIntegrationPlugin : public QtWayland::ServerBufferIntegrationPlugin 10 | { 11 | Q_OBJECT 12 | Q_PLUGIN_METADATA(IID QtWaylandServerBufferIntegrationFactoryInterface_iid FILE "shm-emulation-server.json") 13 | public: 14 | QtWayland::ServerBufferIntegration *create(const QString&, const QStringList&) override; 15 | }; 16 | 17 | QtWayland::ServerBufferIntegration *ShmServerBufferIntegrationPlugin::create(const QString& system, const QStringList& paramList) 18 | { 19 | Q_UNUSED(paramList); 20 | Q_UNUSED(system); 21 | return new ShmServerBufferIntegration(); 22 | } 23 | 24 | QT_END_NAMESPACE 25 | 26 | #include "main.moc" 27 | -------------------------------------------------------------------------------- /src/plugins/hardwareintegration/compositor/shm-emulation-server/shm-emulation-server.json: -------------------------------------------------------------------------------- 1 | { 2 | "Keys": [ "shm-emulation-server" ] 3 | } 4 | -------------------------------------------------------------------------------- /src/plugins/hardwareintegration/compositor/vulkan-server/main.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2019 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #include 5 | #include "vulkanserverbufferintegration.h" 6 | 7 | QT_BEGIN_NAMESPACE 8 | 9 | class VulkanServerBufferIntegrationPlugin : public QtWayland::ServerBufferIntegrationPlugin 10 | { 11 | Q_OBJECT 12 | Q_PLUGIN_METADATA(IID QtWaylandServerBufferIntegrationFactoryInterface_iid FILE "vulkan-server.json") 13 | public: 14 | QtWayland::ServerBufferIntegration *create(const QString&, const QStringList&) override; 15 | }; 16 | 17 | QtWayland::ServerBufferIntegration *VulkanServerBufferIntegrationPlugin::create(const QString& key, const QStringList& paramList) 18 | { 19 | Q_UNUSED(paramList); 20 | Q_UNUSED(key); 21 | return new VulkanServerBufferIntegration(); 22 | } 23 | 24 | QT_END_NAMESPACE 25 | 26 | #include "main.moc" 27 | -------------------------------------------------------------------------------- /src/plugins/hardwareintegration/compositor/vulkan-server/vulkan-server.json: -------------------------------------------------------------------------------- 1 | { 2 | "Keys": [ "vulkan-server" ] 3 | } 4 | -------------------------------------------------------------------------------- /src/plugins/hardwareintegration/compositor/wayland-egl/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022 The Qt Company Ltd. 2 | # SPDX-License-Identifier: BSD-3-Clause 3 | 4 | # Generated from wayland-egl.pro. 5 | 6 | ##################################################################### 7 | ## QWaylandEglClientBufferIntegrationPlugin Plugin: 8 | ##################################################################### 9 | qt_find_package(EGL) # special case 10 | 11 | qt_internal_add_plugin(QWaylandEglClientBufferIntegrationPlugin 12 | OUTPUT_NAME qt-wayland-compositor-wayland-egl 13 | PLUGIN_TYPE wayland-graphics-integration-server 14 | SOURCES 15 | main.cpp 16 | LIBRARIES 17 | Qt::CorePrivate 18 | Qt::GuiPrivate 19 | Qt::WaylandCompositor 20 | Qt::WaylandCompositorPrivate 21 | Qt::WaylandEglCompositorHwIntegrationPrivate 22 | ) 23 | 24 | #### Keys ignored in scope 1:.:.:wayland-egl.pro:: 25 | # OTHER_FILES = "wayland-egl.json" 26 | -------------------------------------------------------------------------------- /src/plugins/hardwareintegration/compositor/wayland-egl/main.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2016 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | QT_BEGIN_NAMESPACE 9 | 10 | class QWaylandEglClientBufferIntegrationPlugin : public QtWayland::ClientBufferIntegrationPlugin 11 | { 12 | Q_OBJECT 13 | Q_PLUGIN_METADATA(IID QtWaylandClientBufferIntegrationFactoryInterface_iid FILE "wayland-egl.json") 14 | public: 15 | QtWayland::ClientBufferIntegration *create(const QString&, const QStringList&) override; 16 | }; 17 | 18 | QtWayland::ClientBufferIntegration *QWaylandEglClientBufferIntegrationPlugin::create(const QString& system, const QStringList& paramList) 19 | { 20 | Q_UNUSED(paramList); 21 | Q_UNUSED(system); 22 | return new WaylandEglClientBufferIntegration(); 23 | } 24 | 25 | QT_END_NAMESPACE 26 | 27 | #include "main.moc" 28 | -------------------------------------------------------------------------------- /src/plugins/hardwareintegration/compositor/wayland-egl/wayland-egl.json: -------------------------------------------------------------------------------- 1 | { 2 | "Keys": [ "wayland-egl" ] 3 | } 4 | -------------------------------------------------------------------------------- /src/plugins/hardwareintegration/compositor/wayland-eglstream-controller/main.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2019 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #include 5 | #include 6 | #include "waylandeglstreamintegration.h" 7 | 8 | QT_BEGIN_NAMESPACE 9 | 10 | class QWaylandEglStreamClientBufferIntegrationPlugin : public QtWayland::ClientBufferIntegrationPlugin 11 | { 12 | Q_OBJECT 13 | Q_PLUGIN_METADATA(IID QtWaylandClientBufferIntegrationFactoryInterface_iid FILE "wayland-eglstream-controller.json") 14 | public: 15 | QtWayland::ClientBufferIntegration *create(const QString& key, const QStringList& paramList) override; 16 | }; 17 | 18 | QtWayland::ClientBufferIntegration *QWaylandEglStreamClientBufferIntegrationPlugin::create(const QString& key, const QStringList& paramList) 19 | { 20 | Q_UNUSED(paramList); 21 | Q_UNUSED(key); 22 | return new WaylandEglStreamClientBufferIntegration(); 23 | } 24 | 25 | QT_END_NAMESPACE 26 | 27 | #include "main.moc" 28 | -------------------------------------------------------------------------------- /src/plugins/hardwareintegration/compositor/wayland-eglstream-controller/wayland-eglstream-controller.json: -------------------------------------------------------------------------------- 1 | { 2 | "Keys": [ "wayland-eglstream-controller" ] 3 | } 4 | -------------------------------------------------------------------------------- /src/plugins/shellintegration/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022 The Qt Company Ltd. 2 | # SPDX-License-Identifier: BSD-3-Clause 3 | 4 | # Generated from shellintegration.pro. 5 | 6 | if(QT_FEATURE_wayland_client_ivi_shell) 7 | add_subdirectory(ivi-shell) 8 | endif() 9 | if(QT_FEATURE_wayland_client_qt_shell) 10 | add_subdirectory(qt-shell) 11 | endif() 12 | -------------------------------------------------------------------------------- /src/plugins/shellintegration/ivi-shell/ivi-shell.json: -------------------------------------------------------------------------------- 1 | { 2 | "Keys":[ "ivi-shell" ] 3 | } 4 | -------------------------------------------------------------------------------- /src/plugins/shellintegration/ivi-shell/main.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2017 ITAGE Corporation, author: 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only 3 | 4 | #include 5 | #include "qwaylandivishellintegration.h" 6 | 7 | QT_BEGIN_NAMESPACE 8 | 9 | namespace QtWaylandClient { 10 | 11 | class QWaylandIviShellIntegrationPlugin : public QWaylandShellIntegrationPlugin 12 | { 13 | Q_OBJECT 14 | Q_PLUGIN_METADATA(IID QWaylandShellIntegrationFactoryInterface_iid FILE "ivi-shell.json") 15 | 16 | public: 17 | QWaylandShellIntegration *create(const QString &key, const QStringList ¶mList) override; 18 | }; 19 | 20 | QWaylandShellIntegration *QWaylandIviShellIntegrationPlugin::create(const QString &key, const QStringList ¶mList) 21 | { 22 | Q_UNUSED(key); 23 | Q_UNUSED(paramList); 24 | return new QWaylandIviShellIntegration(); 25 | } 26 | 27 | } 28 | 29 | QT_END_NAMESPACE 30 | 31 | #include "main.moc" 32 | -------------------------------------------------------------------------------- /src/plugins/shellintegration/qt-shell/main.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only 3 | 4 | #include 5 | #include "qwaylandqtshellintegration.h" 6 | 7 | QT_BEGIN_NAMESPACE 8 | 9 | namespace QtWaylandClient { 10 | 11 | class QWaylandQtShellIntegrationPlugin : public QWaylandShellIntegrationPlugin 12 | { 13 | Q_OBJECT 14 | Q_PLUGIN_METADATA(IID QWaylandShellIntegrationFactoryInterface_iid FILE "qt-shell.json") 15 | 16 | public: 17 | QWaylandShellIntegration *create(const QString &key, const QStringList ¶mList) override; 18 | }; 19 | 20 | QWaylandShellIntegration *QWaylandQtShellIntegrationPlugin::create(const QString &key, const QStringList ¶mList) 21 | { 22 | Q_UNUSED(key); 23 | Q_UNUSED(paramList); 24 | return new QWaylandQtShellIntegration(); 25 | } 26 | 27 | } 28 | 29 | QT_END_NAMESPACE 30 | 31 | #include "main.moc" 32 | -------------------------------------------------------------------------------- /src/plugins/shellintegration/qt-shell/qt-shell.json: -------------------------------------------------------------------------------- 1 | { 2 | "Keys":[ "qt-shell" ] 3 | } 4 | -------------------------------------------------------------------------------- /src/plugins/shellintegration/qt-shell/qwaylandqtshellintegration.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only 3 | 4 | #include "qwaylandqtshellintegration.h" 5 | 6 | #include 7 | #include 8 | 9 | #include 10 | #include 11 | 12 | #include "qwaylandqtsurface_p.h" 13 | 14 | #include 15 | 16 | #include 17 | 18 | QT_BEGIN_NAMESPACE 19 | 20 | namespace QtWaylandClient { 21 | 22 | QWaylandQtShellIntegration::QWaylandQtShellIntegration() 23 | : QWaylandShellIntegrationTemplate(1) 24 | { 25 | QWaylandWindow::fixedToplevelPositions = false; 26 | } 27 | 28 | QWaylandShellSurface *QWaylandQtShellIntegration::createShellSurface(QWaylandWindow *window) 29 | { 30 | auto *surface = surface_create(wlSurfaceForWindow(window)); 31 | return new QWaylandQtSurface(surface, window); 32 | } 33 | 34 | } 35 | 36 | QT_END_NAMESPACE 37 | -------------------------------------------------------------------------------- /src/plugins/shellintegration/qt-shell/qwaylandqtshellintegration.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only 3 | 4 | #ifndef QWAYLANDQTINTEGRATION_H 5 | #define QWAYLANDQTINTEGRATION_H 6 | 7 | #include 8 | 9 | #include 10 | #include 11 | #include "qwayland-qt-shell-unstable-v1.h" 12 | 13 | QT_BEGIN_NAMESPACE 14 | 15 | namespace QtWaylandClient { 16 | 17 | class QWaylandWindow; 18 | class QWaylandDisplay; 19 | 20 | 21 | class Q_WAYLANDCLIENT_EXPORT QWaylandQtShellIntegration 22 | : public QWaylandShellIntegrationTemplate 23 | , public QtWayland::zqt_shell_v1 24 | { 25 | public: 26 | QWaylandQtShellIntegration(); 27 | 28 | QWaylandShellSurface *createShellSurface(QWaylandWindow *window) override; 29 | }; 30 | 31 | } 32 | 33 | QT_END_NAMESPACE 34 | 35 | #endif // QWAYLANDQTINTEGRATION_H 36 | -------------------------------------------------------------------------------- /src/qt_cmdline.cmake: -------------------------------------------------------------------------------- 1 | qt_commandline_option(wayland-text-input-v4-wip TYPE boolean) 2 | -------------------------------------------------------------------------------- /src/shared/qwaylandmimehelper_p.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2016 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only 3 | 4 | #ifndef QWAYLANDMIMEHELPER_H 5 | #define QWAYLANDMIMEHELPER_H 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | 12 | QT_BEGIN_NAMESPACE 13 | 14 | class QWaylandMimeHelper 15 | { 16 | public: 17 | static QByteArray getByteArray(QMimeData *mimeData, const QString &mimeType); 18 | }; 19 | 20 | QT_END_NAMESPACE 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /tests/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022 The Qt Company Ltd. 2 | # SPDX-License-Identifier: BSD-3-Clause 3 | 4 | # Generated from tests.pro. 5 | 6 | # special case begin 7 | # TODO: Prepare for removal, once Platform brings in Threads. 8 | if(NOT TARGET Threads::Threads) 9 | qt_find_package(Threads REQUIRED) 10 | endif() 11 | # special case end 12 | 13 | if(QT_BUILD_STANDALONE_TESTS) 14 | # Add qt_find_package calls for extra dependencies that need to be found when building 15 | # the standalone tests here. 16 | # special case begin 17 | qt_find_package(Qt6 ${PROJECT_VERSION} OPTIONAL_COMPONENTS WaylandCompositor WaylandClient) 18 | 19 | if (NOT Qt6WaylandScannerTools_FOUND) 20 | message(WARNING "QtWaylandTests is missing required components, nothing will be built. \ 21 | Although this could be considered an error, the configuration will still pass as coin (Qt's \ 22 | continuous integration system) will fail the build if configure fails, but will still try to \ 23 | configure the module on targets that are missing dependencies.") 24 | return() 25 | endif() 26 | # special case end 27 | endif() 28 | qt_build_tests() 29 | -------------------------------------------------------------------------------- /tests/auto/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022 The Qt Company Ltd. 2 | # SPDX-License-Identifier: BSD-3-Clause 3 | 4 | # Generated from auto.pro. 5 | 6 | if(TARGET Qt::WaylandClient) 7 | add_subdirectory(client) 8 | endif() 9 | if(TARGET Qt::WaylandCompositor) 10 | add_subdirectory(compositor) 11 | endif() 12 | -------------------------------------------------------------------------------- /tests/auto/client/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022 The Qt Company Ltd. 2 | # SPDX-License-Identifier: BSD-3-Clause 3 | 4 | # Generated from client.pro. 5 | 6 | add_subdirectory(shared) 7 | 8 | # webOS has a modified version of QtWayland and does not support e.g. multiple window creation 9 | # in a single client, attempting to do so will cause a segmentation fault 10 | if (NOT WEBOS) 11 | add_subdirectory(iviapplication) 12 | endif() 13 | -------------------------------------------------------------------------------- /tests/auto/client/iviapplication/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022 The Qt Company Ltd. 2 | # SPDX-License-Identifier: BSD-3-Clause 3 | 4 | # Generated from iviapplication.pro. 5 | 6 | ##################################################################### 7 | ## tst_client_iviapplication Test: 8 | ##################################################################### 9 | 10 | qt_internal_add_test(tst_client_iviapplication 11 | SOURCES 12 | tst_iviapplication.cpp 13 | LIBRARIES 14 | SharedWaylandClientTest 15 | ) 16 | -------------------------------------------------------------------------------- /tests/auto/client/shared/fullscreenshellv1.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021 David Edmundson 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #include "fullscreenshellv1.h" 5 | 6 | namespace MockCompositor { 7 | 8 | FullScreenShellV1::FullScreenShellV1(CoreCompositor *compositor) 9 | { 10 | init(compositor->m_display, 1); 11 | } 12 | 13 | void FullScreenShellV1::zwp_fullscreen_shell_v1_present_surface(Resource *resource, struct ::wl_resource *surface, uint32_t method, struct ::wl_resource *output) 14 | { 15 | Q_UNUSED(resource); 16 | Q_UNUSED(method); 17 | Q_UNUSED(output); 18 | 19 | m_surfaces.append(fromResource(surface)); 20 | } 21 | 22 | } // namespace MockCompositor 23 | -------------------------------------------------------------------------------- /tests/auto/client/shared/fullscreenshellv1.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021 David Edmundson 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #ifndef MOCKCOMPOSITOR_FULLSCREENSHELLV1_H 5 | #define MOCKCOMPOSITOR_FULLSCREENSHELLV1_H 6 | 7 | #include "coreprotocol.h" 8 | #include 9 | 10 | #include 11 | 12 | namespace MockCompositor { 13 | 14 | class Surface; 15 | class FullScreenShellV1; 16 | 17 | class FullScreenShellV1 : public Global, public QtWaylandServer::zwp_fullscreen_shell_v1 18 | { 19 | Q_OBJECT 20 | public: 21 | explicit FullScreenShellV1(CoreCompositor *compositor); 22 | 23 | QList surfaces() const { return m_surfaces; } 24 | 25 | protected: 26 | void zwp_fullscreen_shell_v1_present_surface(Resource *resource, struct ::wl_resource *surface, uint32_t method, struct ::wl_resource *output) override; 27 | 28 | private: 29 | QList m_surfaces; 30 | }; 31 | 32 | } // namespace MockCompositor 33 | 34 | #endif // MOCKCOMPOSITOR_FULLSCREENSHELLV1_H 35 | -------------------------------------------------------------------------------- /tests/auto/client/shared/qttextinput.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #include "qttextinput.h" 5 | 6 | namespace MockCompositor { 7 | 8 | QtTextInputManager::QtTextInputManager(CoreCompositor *compositor) 9 | { 10 | init(compositor->m_display, 1); 11 | } 12 | 13 | void QtTextInputManager::text_input_method_manager_v1_get_text_input_method(Resource *resource, uint32_t id, wl_resource *seatResource) 14 | { 15 | Q_UNUSED(resource); 16 | Q_UNUSED(id); 17 | Q_UNUSED(seatResource); 18 | } 19 | 20 | } // namespace MockCompositor 21 | -------------------------------------------------------------------------------- /tests/auto/client/shared/qttextinput.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #ifndef MOCKCOMPOSITOR_QTTEXTINPUT_H 5 | #define MOCKCOMPOSITOR_QTTEXTINPUT_H 6 | 7 | #include "coreprotocol.h" 8 | #include 9 | 10 | #include 11 | 12 | namespace MockCompositor { 13 | 14 | class QtTextInputManager : public Global, public QtWaylandServer::qt_text_input_method_manager_v1 15 | { 16 | Q_OBJECT 17 | public: 18 | QtTextInputManager(CoreCompositor *compositor); 19 | 20 | protected: 21 | void text_input_method_manager_v1_get_text_input_method(Resource *resource, uint32_t id, struct ::wl_resource *seatResource) override; 22 | }; 23 | 24 | } // namespace MockCompositor 25 | 26 | #endif // MOCKCOMPOSITOR_QTTEXTINPUT_H 27 | -------------------------------------------------------------------------------- /tests/auto/client/shared/textinput.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2019 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #include "textinput.h" 5 | 6 | namespace MockCompositor { 7 | 8 | TextInputManager::TextInputManager(CoreCompositor *compositor) 9 | { 10 | init(compositor->m_display, 1); 11 | } 12 | 13 | void TextInputManager::zwp_text_input_manager_v2_get_text_input(Resource *resource, uint32_t id, wl_resource *seatResource) 14 | { 15 | Q_UNUSED(seatResource); 16 | add(resource->client(), id, resource->version()); 17 | } 18 | 19 | } // namespace MockCompositor 20 | -------------------------------------------------------------------------------- /tests/auto/client/shared/textinput.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2019 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #ifndef MOCKCOMPOSITOR_TEXTINPUT_H 5 | #define MOCKCOMPOSITOR_TEXTINPUT_H 6 | 7 | #include "coreprotocol.h" 8 | #include 9 | 10 | #include 11 | 12 | namespace MockCompositor { 13 | 14 | class TextInputManager : public Global, public QtWaylandServer::zwp_text_input_manager_v2 15 | { 16 | Q_OBJECT 17 | public: 18 | TextInputManager(CoreCompositor *compositor); 19 | 20 | protected: 21 | void zwp_text_input_manager_v2_get_text_input(Resource *resource, uint32_t id, struct ::wl_resource *seatResource) override; 22 | }; 23 | 24 | } // namespace MockCompositor 25 | 26 | #endif // MOCKCOMPOSITOR_TEXTINPUT_H 27 | -------------------------------------------------------------------------------- /tests/auto/compositor/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022 The Qt Company Ltd. 2 | # SPDX-License-Identifier: BSD-3-Clause 3 | 4 | # Generated from compositor.pro. 5 | 6 | add_subdirectory(compositor) 7 | -------------------------------------------------------------------------------- /tests/auto/compositor/compositor/mockkeyboard.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2018 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #ifndef MOCKKEYBOARD_H 5 | #define MOCKKEYBOARD_H 6 | 7 | #include 8 | #include "wayland-wayland-client-protocol.h" 9 | 10 | class MockKeyboard : public QObject 11 | { 12 | Q_OBJECT 13 | 14 | public: 15 | explicit MockKeyboard(wl_seat *seat); 16 | ~MockKeyboard() override; 17 | 18 | wl_keyboard *m_keyboard = nullptr; 19 | wl_surface *m_enteredSurface = nullptr; 20 | uint m_lastKeyCode = 0; 21 | uint m_lastKeyState = 0; 22 | uint m_group = 0; 23 | }; 24 | 25 | #endif // MOCKKEYBOARD_H 26 | -------------------------------------------------------------------------------- /tests/auto/compositor/compositor/mockpointer.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2017 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #ifndef MOCKPOINTER_H 5 | #define MOCKPOINTER_H 6 | 7 | #include 8 | #include "wayland-wayland-client-protocol.h" 9 | 10 | class MockPointer : public QObject 11 | { 12 | Q_OBJECT 13 | 14 | public: 15 | MockPointer(wl_seat *seat); 16 | ~MockPointer() override; 17 | 18 | wl_pointer *m_pointer = nullptr; 19 | wl_surface *m_enteredSurface = nullptr; 20 | }; 21 | 22 | #endif // MOCKPOINTER_H 23 | -------------------------------------------------------------------------------- /tests/auto/compositor/compositor/mockseat.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2016 LG Electronics Ltd., author: 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #include "mockseat.h" 5 | 6 | MockSeat::MockSeat(wl_seat *seat) 7 | : m_seat(seat) 8 | , m_pointer(new MockPointer(seat)) 9 | , m_keyboard(new MockKeyboard(seat)) 10 | { 11 | } 12 | 13 | MockSeat::~MockSeat() 14 | { 15 | wl_seat_destroy(m_seat); 16 | } 17 | -------------------------------------------------------------------------------- /tests/auto/compositor/compositor/mockseat.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2016 LG Electronics Ltd., author: 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | #ifndef MOCKSEAT 4 | #define MOCKSEAT 5 | 6 | #include "mockpointer.h" 7 | #include "mockkeyboard.h" 8 | 9 | #include 10 | #include "wayland-wayland-client-protocol.h" 11 | 12 | class MockSeat : public QObject 13 | { 14 | Q_OBJECT 15 | 16 | public: 17 | MockSeat(wl_seat *seat); 18 | ~MockSeat() override; 19 | MockPointer *pointer() const { return m_pointer.data(); } 20 | MockKeyboard *keyboard() const { return m_keyboard.data(); } 21 | 22 | wl_seat *m_seat = nullptr; 23 | 24 | private: 25 | QScopedPointer m_pointer; 26 | QScopedPointer m_keyboard; 27 | }; 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /tests/auto/compositor/compositor/mockxdgoutputv1.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2019 Pier Luigi Fiorini 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #ifndef MOCKXDGOUTPUTV1_H 5 | #define MOCKXDGOUTPUTV1_H 6 | 7 | #include 8 | #include 9 | #include 10 | 11 | #include "qwayland-xdg-output-unstable-v1.h" 12 | 13 | class MockXdgOutputV1 : public QtWayland::zxdg_output_v1 14 | { 15 | public: 16 | explicit MockXdgOutputV1(struct ::zxdg_output_v1 *object); 17 | ~MockXdgOutputV1(); 18 | 19 | QString name; 20 | QString description; 21 | QPoint logicalPosition; 22 | QSize logicalSize; 23 | 24 | struct { 25 | QString name; 26 | QString description; 27 | QPoint logicalPosition; 28 | QSize logicalSize; 29 | } pending; 30 | 31 | protected: 32 | void zxdg_output_v1_logical_position(int32_t x, int32_t y) override; 33 | void zxdg_output_v1_logical_size(int32_t width, int32_t height) override; 34 | void zxdg_output_v1_done() override; 35 | void zxdg_output_v1_name(const QString &name) override; 36 | void zxdg_output_v1_description(const QString &description) override; 37 | }; 38 | 39 | #endif // MOCKXDGOUTPUTV1_H 40 | -------------------------------------------------------------------------------- /tests/auto/compositor/compositor/testcompositor.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2016 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #include "qwaylandcompositor.h" 5 | #include "qwaylandsurface.h" 6 | #include "qwaylandwlshell.h" 7 | 8 | class TestCompositor : public QWaylandCompositor 9 | { 10 | Q_OBJECT 11 | public: 12 | TestCompositor(bool createInputDev = false); 13 | void create() override; 14 | void flushClients(); 15 | 16 | public slots: 17 | void onSurfaceCreated(QWaylandSurface *surface); 18 | void onSurfaceAboutToBeDestroyed(QWaylandSurface *surface); 19 | 20 | protected: 21 | QWaylandSeat *createSeat() override; 22 | QWaylandKeyboard *createKeyboardDevice(QWaylandSeat *seat) override; 23 | 24 | public: 25 | QList surfaces; 26 | QWaylandWlShell* shell; 27 | bool m_createSeat; 28 | }; 29 | 30 | -------------------------------------------------------------------------------- /tests/auto/compositor/compositor/testkeyboardgrabber.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2016 LG Electronics, Inc., author: 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #include "testkeyboardgrabber.h" 5 | 6 | TestKeyboardGrabber::TestKeyboardGrabber(QWaylandSeat *seat) 7 | : QWaylandKeyboard(seat) 8 | { 9 | } 10 | 11 | void TestKeyboardGrabber::setFocus(QWaylandSurface *surface) 12 | { 13 | Q_EMIT focusedCalled(); 14 | QWaylandKeyboard::setFocus(surface); 15 | } 16 | 17 | void TestKeyboardGrabber::sendKeyPressEvent(uint code) 18 | { 19 | Q_EMIT keyPressCalled(); 20 | QWaylandKeyboard::sendKeyPressEvent(code); 21 | } 22 | 23 | void TestKeyboardGrabber::sendKeyReleaseEvent(uint code) 24 | { 25 | Q_EMIT keyReleaseCalled(); 26 | QWaylandKeyboard::sendKeyReleaseEvent(code); 27 | } 28 | 29 | void TestKeyboardGrabber::sendKeyModifiers(QWaylandClient *client, uint32_t serial) 30 | { 31 | Q_EMIT modifiersCalled(); 32 | QWaylandKeyboard::sendKeyModifiers(client, serial); 33 | } 34 | -------------------------------------------------------------------------------- /tests/auto/compositor/compositor/testkeyboardgrabber.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2016 LG Electronics, Inc., author: 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #include "qwaylandkeyboard.h" 5 | 6 | class TestKeyboardGrabber : public QWaylandKeyboard 7 | { 8 | Q_OBJECT 9 | public: 10 | TestKeyboardGrabber(QWaylandSeat *seat); 11 | 12 | void setFocus(QWaylandSurface *surface) override; 13 | void sendKeyModifiers(QWaylandClient *client, uint32_t serial) override; 14 | void sendKeyPressEvent(uint code) override; 15 | void sendKeyReleaseEvent(uint code) override; 16 | 17 | signals: 18 | void focusedCalled(); 19 | void keyPressCalled(); 20 | void keyReleaseCalled(); 21 | void modifiersCalled(); 22 | }; 23 | 24 | 25 | -------------------------------------------------------------------------------- /tests/auto/compositor/compositor/testseat.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2016 LG Electronics, Inc., author: 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #include "testseat.h" 5 | #include 6 | 7 | TestSeat::TestSeat(QWaylandCompositor *compositor, QWaylandSeat::CapabilityFlags caps) 8 | : QWaylandSeat(compositor, caps) 9 | { 10 | m_queryCount = 0; 11 | } 12 | 13 | TestSeat::~TestSeat() 14 | { 15 | } 16 | 17 | bool TestSeat::isOwner(QInputEvent *event) const 18 | { 19 | m_queryCount++; 20 | QMouseEvent *me = dynamic_cast(event); 21 | return m_events.contains(me); 22 | } 23 | 24 | QList TestSeat::createMouseEvents(int count) 25 | { 26 | for (int i = 0; i < count; i++) { 27 | m_events.append(new QMouseEvent(QEvent::MouseMove, QPointF(10 + i, 10 + i), 28 | QPointF(10 + i, 10 + i), Qt::NoButton, Qt::NoButton, Qt::NoModifier)); 29 | } 30 | return m_events; 31 | } 32 | -------------------------------------------------------------------------------- /tests/auto/compositor/compositor/testseat.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2016 LG Electronics, Inc., author: 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #include 5 | #include 6 | 7 | QT_BEGIN_NAMESPACE 8 | class QInputEvent; 9 | class QMouseEvent; 10 | QT_END_NAMESPACE 11 | 12 | class TestSeat : public QWaylandSeat 13 | { 14 | Q_OBJECT 15 | public: 16 | 17 | TestSeat(QWaylandCompositor *compositor, QWaylandSeat::CapabilityFlags caps); 18 | ~TestSeat() override; 19 | 20 | bool isOwner(QInputEvent *inputEvent) const override; 21 | 22 | QList createMouseEvents(int count); 23 | 24 | int queryCount() { return m_queryCount; } 25 | 26 | private: 27 | mutable int m_queryCount; 28 | QList m_events; 29 | }; 30 | -------------------------------------------------------------------------------- /tests/manual/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022 The Qt Company Ltd. 2 | # SPDX-License-Identifier: BSD-3-Clause 3 | 4 | if(TARGET Qt::WaylandClient) 5 | add_subdirectory(qmlclient) 6 | add_subdirectory(subsurface) 7 | add_subdirectory(texture-sharing/cpp-client) 8 | add_subdirectory(texture-sharing-2) 9 | endif() 10 | 11 | if(TARGET Qt::WaylandCompositor) 12 | #add_subdirectory(wip-cpp-compositor) 13 | add_subdirectory(scaling-compositor) 14 | add_subdirectory(hwlayer-compositor) 15 | endif() 16 | 17 | if(QT_FEATURE_opengl AND TARGET Qt::Quick AND TARGET Qt::WaylandClient) 18 | add_subdirectory(server-buffer) 19 | endif() 20 | -------------------------------------------------------------------------------- /tests/manual/hwlayer-compositor/hwlayer-compositor.pro: -------------------------------------------------------------------------------- 1 | QT += gui qml 2 | 3 | SOURCES += \ 4 | main.cpp 5 | 6 | OTHER_FILES = \ 7 | main.qml 8 | 9 | RESOURCES += hwlayer-compositor.qrc 10 | 11 | target.path = $$[QT_INSTALL_EXAMPLES]/wayland/hwlayer-compositor 12 | sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS hwlayer-compositor.pro 13 | sources.path = $$[QT_INSTALL_EXAMPLES]/wayland/hwlayer-compositor 14 | INSTALLS += target sources 15 | -------------------------------------------------------------------------------- /tests/manual/hwlayer-compositor/hwlayer-compositor.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | main.qml 4 | 5 | 6 | -------------------------------------------------------------------------------- /tests/manual/hwlayer-compositor/main.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2018 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #include 5 | #include 6 | 7 | #include 8 | #include 9 | 10 | #include 11 | 12 | int main(int argc, char *argv[]) 13 | { 14 | QGuiApplication app(argc, argv); 15 | QQmlApplicationEngine appEngine(QUrl("qrc:///main.qml")); 16 | return app.exec(); 17 | } 18 | -------------------------------------------------------------------------------- /tests/manual/import-qml-modules/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2024 The Qt Company Ltd. 2 | # SPDX-License-Identifier: BSD-3-Clause 3 | 4 | cmake_minimum_required(VERSION 3.16) 5 | 6 | project(import_wayland_qml_modules VERSION 0.1 LANGUAGES CXX) 7 | 8 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 9 | 10 | find_package(Qt6 6.4 REQUIRED 11 | COMPONENTS 12 | Quick 13 | WaylandCompositor 14 | WaylandCompositorIviapplication 15 | WaylandCompositorPresentationTime 16 | WaylandCompositorWLShell 17 | WaylandCompositorXdgShell 18 | ) 19 | 20 | qt_standard_project_setup() 21 | 22 | qt_add_qml_module(import_wayland_qml_modules 23 | URI Qml 24 | QML_FILES Main.qml 25 | ) 26 | -------------------------------------------------------------------------------- /tests/manual/import-qml-modules/Main.qml: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2024 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | import QtQuick 5 | import QtWayland.Compositor.IviApplication 6 | import QtWayland.Compositor.PresentationTime 7 | import QtWayland.Compositor.QtShell 8 | import QtWayland.Compositor.WlShell 9 | import QtWayland.Compositor.XdgShell 10 | 11 | 12 | Item { 13 | property var p1: IviApplication {} 14 | property var p2: PresentationTime {} 15 | property var p3: QtShellChrome {} 16 | property var p4: WlShellSurface {} 17 | property var p5: XdgPopup {} 18 | } 19 | -------------------------------------------------------------------------------- /tests/manual/import-qml-modules/main.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2024 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #include 5 | #include 6 | 7 | int main(int argc, char *argv[]) 8 | { 9 | QGuiApplication app(argc, argv); 10 | 11 | QQmlApplicationEngine engine; 12 | const QUrl url(QStringLiteral("qrc:/Qml/Main.qml")); 13 | QObject::connect( 14 | &engine, &QQmlApplicationEngine::objectCreationFailed, &app, 15 | []() { QCoreApplication::exit(-1); }, Qt::QueuedConnection); 16 | engine.load(url); 17 | 18 | return app.exec(); 19 | } 20 | -------------------------------------------------------------------------------- /tests/manual/qmlclient/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022 The Qt Company Ltd. 2 | # SPDX-License-Identifier: BSD-3-Clause 3 | 4 | # Generated from qmlclient.pro. 5 | 6 | ##################################################################### 7 | ## qmlclient Binary: 8 | ##################################################################### 9 | 10 | qt_internal_add_manual_test(qmlclient 11 | GUI 12 | SOURCES 13 | main.cpp 14 | LIBRARIES 15 | Qt::CorePrivate 16 | Qt::Gui 17 | Qt::GuiPrivate 18 | Qt::Quick 19 | Qt::WaylandClient 20 | ) 21 | 22 | # Resources: 23 | set(qml_resource_files 24 | "main.qml" 25 | ) 26 | 27 | qt_internal_add_resource(qmlclient "qml" 28 | PREFIX 29 | "/" 30 | FILES 31 | ${qml_resource_files} 32 | ) 33 | 34 | 35 | #### Keys ignored in scope 1:.:.:qmlclient.pro:: 36 | # TEMPLATE = "app" 37 | -------------------------------------------------------------------------------- /tests/manual/qmlclient/main.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2016 Pier Luigi Fiorini 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #include 5 | #include 6 | 7 | int main(int argc, char* argv[]) 8 | { 9 | setenv("QT_QPA_PLATFORM", "wayland", 1); 10 | 11 | QGuiApplication app(argc, argv); 12 | QQmlApplicationEngine engine(QUrl("qrc:/main.qml")); 13 | return app.exec(); 14 | } 15 | -------------------------------------------------------------------------------- /tests/manual/qmlclient/qml.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | main.qml 4 | 5 | 6 | -------------------------------------------------------------------------------- /tests/manual/qmlclient/qmlclient.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = app 2 | 3 | QT += \ 4 | gui gui-private core-private \ 5 | quick \ 6 | waylandclient \ 7 | 8 | SOURCES += \ 9 | main.cpp 10 | 11 | RESOURCES += \ 12 | qml.qrc 13 | -------------------------------------------------------------------------------- /tests/manual/qt-shell/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022 The Qt Company Ltd. 2 | # SPDX-License-Identifier: BSD-3-Clause 3 | 4 | cmake_minimum_required(VERSION 3.14) 5 | project(qt-shell LANGUAGES CXX) 6 | 7 | set(CMAKE_INCLUDE_CURRENT_DIR ON) 8 | 9 | set(CMAKE_AUTOMOC ON) 10 | set(CMAKE_AUTORCC ON) 11 | set(CMAKE_AUTOUIC ON) 12 | 13 | find_package(Qt6 COMPONENTS Core) 14 | find_package(Qt6 COMPONENTS Gui) 15 | find_package(Qt6 COMPONENTS Qml) 16 | 17 | qt_add_executable(qt-shell 18 | main.cpp 19 | ) 20 | set_target_properties(qt-shell PROPERTIES 21 | WIN32_EXECUTABLE TRUE 22 | MACOSX_BUNDLE TRUE 23 | ) 24 | target_link_libraries(qt-shell PUBLIC 25 | Qt::Core 26 | Qt::Gui 27 | Qt::Qml 28 | ) 29 | 30 | 31 | # Resources: 32 | set(qt-shell_resource_files 33 | "images/background.jpg" 34 | "qml/Chrome.qml" 35 | "qml/HandleHandler.qml" 36 | "qml/CompositorScreen.qml" 37 | "qml/Keyboard.qml" 38 | "qml/main.qml" 39 | ) 40 | 41 | qt6_add_resources(qt-shell "qt-shell" 42 | PREFIX 43 | "/" 44 | FILES 45 | ${qt-shell_resource_files} 46 | ) 47 | -------------------------------------------------------------------------------- /tests/manual/qt-shell/images/background.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qt/qtwayland/07f81efabf8192c991efacb61cdd867f936751ac/tests/manual/qt-shell/images/background.jpg -------------------------------------------------------------------------------- /tests/manual/qt-shell/main.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #include 5 | #include 6 | 7 | #include 8 | 9 | #include 10 | 11 | int main(int argc, char *argv[]) 12 | { 13 | // ShareOpenGLContexts is needed for using the threaded renderer 14 | // on Nvidia EGLStreams 15 | QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts, true); 16 | QGuiApplication app(argc, argv); 17 | 18 | QQmlApplicationEngine appEngine(QUrl("qrc:///qml/main.qml")); 19 | 20 | return app.exec(); 21 | } 22 | -------------------------------------------------------------------------------- /tests/manual/qt-shell/qml/Keyboard.qml: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | import QtQuick 5 | import QtQuick.VirtualKeyboard 6 | 7 | InputPanel { 8 | visible: active 9 | y: active ? parent.height - height : parent.height 10 | anchors.left: parent.left 11 | anchors.right: parent.right 12 | } 13 | -------------------------------------------------------------------------------- /tests/manual/qt-shell/qml/main.qml: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | import QtQuick 5 | import QtWayland.Compositor 6 | import QtWayland.Compositor.QtShell 7 | 8 | WaylandCompositor { 9 | id: waylandCompositor 10 | 11 | CompositorScreen { id: screen; compositor: waylandCompositor } 12 | 13 | // Shell surface extension. Needed to provide a window concept for Wayland clients. 14 | // I.e. requests and events for maximization, minimization, resizing, closing etc. 15 | 16 | QtShell { 17 | onQtShellSurfaceCreated: screen.handleShellSurface(qtShellSurface) 18 | } 19 | 20 | // Extension for Input Method (QT_IM_MODULE) support at compositor-side 21 | QtTextInputMethodManager {} 22 | } 23 | -------------------------------------------------------------------------------- /tests/manual/qt-shell/qt-shell.pro: -------------------------------------------------------------------------------- 1 | QT += gui qml 2 | 3 | SOURCES += \ 4 | main.cpp 5 | 6 | OTHER_FILES = \ 7 | qml/main.qml \ 8 | qml/CompositorScreen.qml \ 9 | qml/Chrome.qml \ 10 | qml/Keyboard.qml \ 11 | images/background.jpg \ 12 | 13 | RESOURCES += qt-shell.qrc 14 | -------------------------------------------------------------------------------- /tests/manual/qt-shell/qt-shell.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | images/background.jpg 4 | qml/main.qml 5 | qml/CompositorScreen.qml 6 | qml/Chrome.qml 7 | qml/Keyboard.qml 8 | qml/HandleHandler.qml 9 | 10 | 11 | -------------------------------------------------------------------------------- /tests/manual/scaling-compositor/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022 The Qt Company Ltd. 2 | # SPDX-License-Identifier: BSD-3-Clause 3 | 4 | # Generated from scaling-compositor.pro. 5 | 6 | ##################################################################### 7 | ## scaling-compositor Binary: 8 | ##################################################################### 9 | 10 | qt_internal_add_manual_test(scaling-compositor 11 | GUI 12 | SOURCES 13 | main.cpp 14 | LIBRARIES 15 | Qt::Gui 16 | Qt::Qml 17 | ) 18 | 19 | # Resources: 20 | set(qml_resource_files 21 | "main.qml" 22 | ) 23 | 24 | qt_internal_add_resource(scaling-compositor "qml" 25 | PREFIX 26 | "/" 27 | FILES 28 | ${qml_resource_files} 29 | ) 30 | 31 | 32 | #### Keys ignored in scope 1:.:.:scaling-compositor.pro:: 33 | # TEMPLATE = "app" 34 | -------------------------------------------------------------------------------- /tests/manual/scaling-compositor/main.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2017 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #include 5 | #include 6 | 7 | int main(int argc, char* argv[]) 8 | { 9 | QGuiApplication app(argc, argv); 10 | QQmlApplicationEngine engine(QUrl("qrc:/main.qml")); 11 | return app.exec(); 12 | } 13 | -------------------------------------------------------------------------------- /tests/manual/scaling-compositor/qml.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | main.qml 4 | 5 | 6 | -------------------------------------------------------------------------------- /tests/manual/scaling-compositor/scaling-compositor.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = app 2 | 3 | QT += gui qml 4 | SOURCES += main.cpp 5 | 6 | RESOURCES += qml.qrc 7 | -------------------------------------------------------------------------------- /tests/manual/server-buffer/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.16) 2 | project(server-buffer) 3 | 4 | add_subdirectory(cpp-client) 5 | add_subdirectory(compositor) 6 | -------------------------------------------------------------------------------- /tests/manual/server-buffer/compositor/compositor.pro: -------------------------------------------------------------------------------- 1 | QT += core gui qml 2 | 3 | QT += waylandcompositor-private 4 | 5 | CONFIG += wayland-scanner 6 | CONFIG += c++11 7 | SOURCES += \ 8 | main.cpp \ 9 | sharebufferextension.cpp 10 | 11 | OTHER_FILES = \ 12 | qml/main.qml \ 13 | images/background.jpg 14 | 15 | WAYLANDSERVERSOURCES += \ 16 | ../share-buffer.xml 17 | 18 | RESOURCES += compositor.qrc 19 | 20 | TARGET = compositor 21 | 22 | HEADERS += \ 23 | sharebufferextension.h 24 | 25 | target.path = $$[QT_INSTALL_EXAMPLES]/wayland/server-buffer/compositor 26 | INSTALLS += target 27 | -------------------------------------------------------------------------------- /tests/manual/server-buffer/compositor/compositor.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | images/background.png 4 | images/Siberischer_tiger_de_edit02.jpg 5 | qml/main.qml 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/manual/server-buffer/compositor/images/Siberischer_tiger_de_edit02.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qt/qtwayland/07f81efabf8192c991efacb61cdd867f936751ac/tests/manual/server-buffer/compositor/images/Siberischer_tiger_de_edit02.jpg -------------------------------------------------------------------------------- /tests/manual/server-buffer/compositor/images/Siberischer_tiger_de_edit02.txt: -------------------------------------------------------------------------------- 1 | Image from https://en.wikipedia.org/wiki/File:Siberischer_tiger_de_edit02.jpg 2 | 3 | Author: S. Taheri, edited by Fir0002 4 | 5 | License: Creative Commons Attribution-Share Alike 2.5 Generic 6 | -------------------------------------------------------------------------------- /tests/manual/server-buffer/compositor/images/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qt/qtwayland/07f81efabf8192c991efacb61cdd867f936751ac/tests/manual/server-buffer/compositor/images/background.png -------------------------------------------------------------------------------- /tests/manual/server-buffer/compositor/main.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2017 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | #include 10 | #include 11 | 12 | #include "sharebufferextension.h" 13 | 14 | static void registerTypes() 15 | { 16 | qmlRegisterType("io.qt.examples.sharebufferextension", 1, 0, "ShareBufferExtension"); 17 | } 18 | 19 | int main(int argc, char *argv[]) 20 | { 21 | // Make sure there is a valid OpenGL context in the main thread 22 | qputenv("QSG_RENDER_LOOP", "basic"); 23 | 24 | QGuiApplication app(argc, argv); 25 | registerTypes(); 26 | QQmlApplicationEngine appEngine(QUrl("qrc:///qml/main.qml")); 27 | 28 | return app.exec(); 29 | } 30 | -------------------------------------------------------------------------------- /tests/manual/server-buffer/compositor/qml/main.qml: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2017 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | import QtQuick 5 | import QtWayland.Compositor 6 | import QtWayland.Compositor.WlShell 7 | import QtQuick.Window 8 | 9 | import io.qt.examples.sharebufferextension 10 | 11 | WaylandCompositor { 12 | WaylandOutput { 13 | sizeFollowsWindow: true 14 | window: Window { 15 | width: 1024 16 | height: 768 17 | visible: true 18 | Image { 19 | id: surfaceArea 20 | anchors.fill: parent 21 | fillMode: Image.Tile 22 | source: "qrc:/images/background.png" 23 | smooth: false 24 | } 25 | } 26 | } 27 | 28 | Component { 29 | id: chromeComponent 30 | ShellSurfaceItem { 31 | onSurfaceDestroyed: destroy() 32 | } 33 | } 34 | 35 | WlShell { 36 | onWlShellSurfaceCreated: (shellSurface) => { 37 | chromeComponent.createObject(surfaceArea, { "shellSurface": shellSurface } ); 38 | } 39 | } 40 | 41 | ShareBufferExtension { 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /tests/manual/server-buffer/cpp-client/cpp-client.pro: -------------------------------------------------------------------------------- 1 | QT += waylandclient-private gui-private opengl 2 | CONFIG += wayland-scanner 3 | 4 | WAYLANDCLIENTSOURCES += ../share-buffer.xml 5 | 6 | SOURCES += main.cpp \ 7 | sharebufferextension.cpp 8 | 9 | HEADERS += \ 10 | sharebufferextension.h 11 | 12 | TARGET = server-buffer-cpp-client 13 | 14 | target.path = $$[QT_INSTALL_EXAMPLES]/wayland/server-buffer/cpp-client 15 | INSTALLS += target 16 | -------------------------------------------------------------------------------- /tests/manual/server-buffer/cpp-client/sharebufferextension.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2017 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #ifndef SHAREBUFFEREXTENSION_H 5 | #define SHAREBUFFEREXTENSION_H 6 | 7 | #include 8 | #include 9 | #include 10 | #include "qwayland-share-buffer.h" 11 | 12 | QT_BEGIN_NAMESPACE 13 | 14 | namespace QtWaylandClient { 15 | class QWaylandServerBuffer; 16 | class QWaylandServerBufferIntegration; 17 | }; 18 | 19 | class ShareBufferExtension : public QWaylandClientExtensionTemplate 20 | , public QtWayland::qt_share_buffer 21 | { 22 | Q_OBJECT 23 | public: 24 | ShareBufferExtension(); 25 | 26 | signals: 27 | void bufferReceived(QtWaylandClient::QWaylandServerBuffer *buffer); 28 | 29 | private: 30 | void share_buffer_cross_buffer(struct ::qt_server_buffer *buffer) override; 31 | QtWaylandClient::QWaylandServerBufferIntegration *m_server_buffer_integration = nullptr; 32 | }; 33 | 34 | QT_END_NAMESPACE 35 | 36 | #endif // SHAREBUFFEREXTENSION_H 37 | -------------------------------------------------------------------------------- /tests/manual/server-buffer/server-buffer.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE=subdirs 2 | 3 | SUBDIRS += cpp-client compositor 4 | 5 | EXAMPLE_FILES += \ 6 | share-buffer.xml 7 | -------------------------------------------------------------------------------- /tests/manual/server-buffer/share-buffer.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Copyright (C) 2015 The Qt Company Ltd. 5 | SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /tests/manual/subsurface/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022 The Qt Company Ltd. 2 | # SPDX-License-Identifier: BSD-3-Clause 3 | 4 | # Generated from subsurface.pro. 5 | 6 | ##################################################################### 7 | ## subsurface Binary: 8 | ##################################################################### 9 | 10 | qt_internal_add_manual_test(subsurface 11 | GUI 12 | SOURCES 13 | main.cpp 14 | shmwindow.cpp shmwindow.h 15 | LIBRARIES 16 | Qt::CorePrivate 17 | Qt::Gui 18 | Qt::GuiPrivate 19 | Qt::Quick 20 | Qt::WaylandClient 21 | ) 22 | 23 | # Resources: 24 | set(qml_resource_files 25 | "child.qml" 26 | "main.qml" 27 | ) 28 | 29 | qt_internal_add_resource(subsurface "qml" 30 | PREFIX 31 | "/" 32 | FILES 33 | ${qml_resource_files} 34 | ) 35 | 36 | 37 | #### Keys ignored in scope 1:.:.:subsurface.pro:: 38 | # TEMPLATE = "app" 39 | -------------------------------------------------------------------------------- /tests/manual/subsurface/child.qml: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2015 LG Electronics Inc, author: 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | import QtQuick 2.4 5 | import QtQuick.Window 2.2 6 | 7 | Rectangle { 8 | width: 300 9 | height: 300 10 | 11 | color: "darkgray" 12 | 13 | Rectangle { 14 | width: 100 15 | height: 100 16 | color: "magenta" 17 | 18 | Text { 19 | anchors.centerIn: parent 20 | text: "quick" 21 | } 22 | 23 | RotationAnimation on rotation { 24 | duration: 10000 25 | loops: Animation.Infinite 26 | from: 0 27 | to: 360 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /tests/manual/subsurface/qml.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | main.qml 4 | child.qml 5 | 6 | 7 | -------------------------------------------------------------------------------- /tests/manual/subsurface/shmwindow.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2015 LG Electronics Ltd, author: 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #include "shmwindow.h" 5 | 6 | #include 7 | #include 8 | 9 | ShmWindow::ShmWindow(QWindow *parent) 10 | : QRasterWindow(parent) 11 | , m_rotation(0) 12 | { 13 | m_timer = startTimer(100); 14 | } 15 | 16 | void ShmWindow::timerEvent(QTimerEvent *event) 17 | { 18 | if (event->timerId() == m_timer) { 19 | m_rotation++; 20 | update(); 21 | } 22 | } 23 | 24 | void ShmWindow::paintEvent(QPaintEvent *event) 25 | { 26 | Q_UNUSED(event); 27 | QPainter painter(this); 28 | 29 | painter.fillRect(0, 0, width(), height(), Qt::white); 30 | 31 | qreal xc = width() * 0.5; 32 | qreal yc = height() * 0.5; 33 | painter.translate(xc, yc); 34 | painter.rotate(m_rotation); 35 | painter.drawText(QRectF(-xc, -yc, width(), height()), Qt::AlignCenter, QStringLiteral("SHM")); 36 | } 37 | 38 | -------------------------------------------------------------------------------- /tests/manual/subsurface/shmwindow.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2015 LG Electronics Ltd, author: 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #ifndef SHMWINDOW_H 5 | #define SHMWINDOW_H 6 | 7 | #include 8 | 9 | class ShmWindow : public QRasterWindow 10 | { 11 | Q_OBJECT 12 | public: 13 | explicit ShmWindow(QWindow *parent); 14 | 15 | protected: 16 | void paintEvent(QPaintEvent *event) override; 17 | void timerEvent(QTimerEvent *) override; 18 | 19 | private: 20 | int m_rotation; 21 | int m_timer; 22 | }; 23 | #endif // SHMWINDOW_H 24 | -------------------------------------------------------------------------------- /tests/manual/subsurface/subsurface.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = app 2 | 3 | QT += \ 4 | gui gui-private core-private\ 5 | quick \ 6 | waylandclient \ 7 | 8 | HEADERS += \ 9 | shmwindow.h \ 10 | 11 | SOURCES += \ 12 | main.cpp \ 13 | shmwindow.cpp \ 14 | 15 | RESOURCES += \ 16 | qml.qrc 17 | 18 | -------------------------------------------------------------------------------- /tests/manual/texture-sharing-2/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022 The Qt Company Ltd. 2 | # SPDX-License-Identifier: BSD-3-Clause 3 | 4 | # Generated from texture-sharing.pro. 5 | 6 | add_subdirectory(qml-client) 7 | add_subdirectory(custom-compositor) 8 | -------------------------------------------------------------------------------- /tests/manual/texture-sharing-2/custom-compositor/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022 The Qt Company Ltd. 2 | # SPDX-License-Identifier: BSD-3-Clause 3 | 4 | qt_internal_add_manual_test(texture-sharing-custom-compositor 5 | GUI 6 | SOURCES 7 | main.cpp 8 | LIBRARIES 9 | Qt::Qml 10 | Qt::WaylandCompositorPrivate 11 | ) 12 | 13 | 14 | # Resources: 15 | set(compositor_resource_files 16 | "images/background.png" 17 | "images/car.ktx" 18 | "images/qt4.astc" 19 | "images/qt_logo.png" 20 | "qml/main.qml" 21 | ) 22 | 23 | qt_internal_add_resource(texture-sharing-custom-compositor "compositor" 24 | PREFIX 25 | "/" 26 | FILES 27 | ${compositor_resource_files} 28 | ) 29 | -------------------------------------------------------------------------------- /tests/manual/texture-sharing-2/custom-compositor/compositor.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | images/background.png 4 | images/qt_logo.png 5 | images/qt4.astc 6 | images/car.ktx 7 | qml/main.qml 8 | 9 | 10 | -------------------------------------------------------------------------------- /tests/manual/texture-sharing-2/custom-compositor/custom-compositor.pro: -------------------------------------------------------------------------------- 1 | QT += core gui qml 2 | 3 | QT += waylandcompositor-private 4 | 5 | SOURCES += \ 6 | main.cpp 7 | 8 | OTHER_FILES = \ 9 | qml/main.qml \ 10 | images/background.jpg 11 | 12 | RESOURCES += compositor.qrc 13 | 14 | TARGET = texture-sharing-custom-compositor 15 | 16 | target.path = $$[QT_INSTALL_EXAMPLES]/wayland/texture-sharing/custom-compositor 17 | INSTALLS += target 18 | -------------------------------------------------------------------------------- /tests/manual/texture-sharing-2/custom-compositor/images/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qt/qtwayland/07f81efabf8192c991efacb61cdd867f936751ac/tests/manual/texture-sharing-2/custom-compositor/images/background.png -------------------------------------------------------------------------------- /tests/manual/texture-sharing-2/custom-compositor/images/car.ktx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qt/qtwayland/07f81efabf8192c991efacb61cdd867f936751ac/tests/manual/texture-sharing-2/custom-compositor/images/car.ktx -------------------------------------------------------------------------------- /tests/manual/texture-sharing-2/custom-compositor/images/qt4.astc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qt/qtwayland/07f81efabf8192c991efacb61cdd867f936751ac/tests/manual/texture-sharing-2/custom-compositor/images/qt4.astc -------------------------------------------------------------------------------- /tests/manual/texture-sharing-2/custom-compositor/images/qt_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qt/qtwayland/07f81efabf8192c991efacb61cdd867f936751ac/tests/manual/texture-sharing-2/custom-compositor/images/qt_logo.png -------------------------------------------------------------------------------- /tests/manual/texture-sharing-2/qml-client/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022 The Qt Company Ltd. 2 | # SPDX-License-Identifier: BSD-3-Clause 3 | 4 | qt_internal_add_manual_test(qml-client 5 | GUI 6 | SOURCES 7 | main.cpp 8 | LIBRARIES 9 | Qt::Quick 10 | ) 11 | 12 | # Resources: 13 | set(qml-client_resource_files 14 | "main.qml" 15 | ) 16 | 17 | qt_internal_add_resource(qml-client "qml-client" 18 | PREFIX 19 | "/" 20 | FILES 21 | ${qml-client_resource_files} 22 | ) 23 | -------------------------------------------------------------------------------- /tests/manual/texture-sharing-2/qml-client/main.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2019 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | 13 | int main(int argc, char **argv) 14 | { 15 | QGuiApplication app(argc, argv); 16 | QQmlApplicationEngine appEngine; 17 | 18 | appEngine.load(QUrl("qrc:///main.qml")); 19 | 20 | return app.exec(); 21 | } 22 | -------------------------------------------------------------------------------- /tests/manual/texture-sharing-2/qml-client/qml-client.pro: -------------------------------------------------------------------------------- 1 | QT += quick 2 | 3 | SOURCES += \ 4 | main.cpp 5 | 6 | RESOURCES += \ 7 | qml-client.qrc 8 | 9 | DISTFILES += \ 10 | main.qml 11 | 12 | target.path = $$[QT_INSTALL_EXAMPLES]/wayland/texture-sharing/qml-client 13 | INSTALLS += target 14 | -------------------------------------------------------------------------------- /tests/manual/texture-sharing-2/qml-client/qml-client.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | main.qml 4 | 5 | 6 | -------------------------------------------------------------------------------- /tests/manual/texture-sharing-2/texture-sharing.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE=subdirs 2 | 3 | SUBDIRS += \ 4 | qml-client \ 5 | custom-compositor 6 | -------------------------------------------------------------------------------- /tests/manual/texture-sharing/cpp-client/cpp-client.pro: -------------------------------------------------------------------------------- 1 | QT += waylandclient-private gui-private opengl 2 | CONFIG += wayland-scanner 3 | 4 | WAYLANDCLIENTSOURCES += $$PWD/../../../../src/extensions/qt-texture-sharing-unstable-v1.xml 5 | 6 | SOURCES += main.cpp \ 7 | $$PWD/../../../../src/imports/texture-sharing/texturesharingextension.cpp 8 | 9 | HEADERS += \ 10 | $$PWD/../../../../src/imports/texture-sharing/texturesharingextension.h 11 | 12 | INCLUDEPATH += $$PWD/../../../../src/imports/texture-sharing/ 13 | 14 | target.path = $$[QT_INSTALL_EXAMPLES]/wayland/texture-sharing/cpp-client 15 | INSTALLS += target 16 | -------------------------------------------------------------------------------- /tests/manual/wip-cpp-compositor/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022 The Qt Company Ltd. 2 | # SPDX-License-Identifier: BSD-3-Clause 3 | 4 | # Generated from wip-cpp-compositor.pro. 5 | 6 | ##################################################################### 7 | ## wip-cpp-compositor Binary: 8 | ##################################################################### 9 | 10 | qt_internal_add_manual_test(wip-cpp-compositor 11 | GUI 12 | SOURCES 13 | compositor.cpp compositor.h 14 | main.cpp 15 | window.cpp window.h 16 | LIBRARIES 17 | Qt::Gui 18 | Qt::WaylandCompositor 19 | ) 20 | 21 | #### Keys ignored in scope 1:.:.:wip-cpp-compositor.pro:: 22 | # INSTALLS = "target" 23 | # target.path = "$$[QT_INSTALL_EXAMPLES]/wayland/reference-cpp" 24 | -------------------------------------------------------------------------------- /tests/manual/wip-cpp-compositor/README.md: -------------------------------------------------------------------------------- 1 | # Reference C++ Compositor 2 | 3 | An example showing what is required to get a C++-based compositor up and 4 | running implementing basic functionality such as pointer and keyboard input as 5 | well as resizing and moving windows. This example uses the stable xdg-shell 6 | protocol. 7 | -------------------------------------------------------------------------------- /tests/manual/wip-cpp-compositor/main.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2019 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #include 5 | #include "window.h" 6 | #include "compositor.h" 7 | 8 | int main(int argc, char *argv[]) 9 | { 10 | QGuiApplication app(argc, argv); 11 | 12 | Compositor compositor; 13 | Window window(&compositor); 14 | compositor.setWindow(&window); 15 | 16 | window.resize(800, 600); 17 | window.show(); 18 | 19 | return app.exec(); 20 | } 21 | -------------------------------------------------------------------------------- /tests/manual/wip-cpp-compositor/window.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2019 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only 3 | 4 | #ifndef WINDOW_H 5 | #define WINDOW_H 6 | 7 | #include 8 | #include 9 | 10 | QT_BEGIN_NAMESPACE 11 | 12 | class Compositor; 13 | class QWaylandOutput; 14 | 15 | class Window : public QOpenGLWindow 16 | { 17 | public: 18 | explicit Window(Compositor *compositor); 19 | 20 | protected: 21 | void initializeGL() override; 22 | void paintGL() override; 23 | 24 | void mousePressEvent(QMouseEvent *event) override; 25 | void mouseReleaseEvent(QMouseEvent *event) override; 26 | void mouseMoveEvent(QMouseEvent *event) override; 27 | #if QT_CONFIG(wheelevent) 28 | void wheelEvent(QWheelEvent *event) override; 29 | #endif 30 | 31 | void keyPressEvent(QKeyEvent *event) override; 32 | void keyReleaseEvent(QKeyEvent *event) override; 33 | 34 | private: 35 | QOpenGLTextureBlitter m_textureBlitter; 36 | Compositor *m_compositor = nullptr; 37 | QWaylandOutput *m_output = nullptr; 38 | }; 39 | 40 | QT_END_NAMESPACE 41 | 42 | #endif //WINDOW_H 43 | -------------------------------------------------------------------------------- /tests/manual/wip-cpp-compositor/wip-cpp-compositor.pro: -------------------------------------------------------------------------------- 1 | QT += gui waylandcompositor 2 | 3 | HEADERS += \ 4 | compositor.h \ 5 | window.h 6 | 7 | SOURCES += main.cpp \ 8 | compositor.cpp \ 9 | window.cpp 10 | 11 | target.path = $$[QT_INSTALL_EXAMPLES]/wayland/reference-cpp 12 | INSTALLS += target 13 | --------------------------------------------------------------------------------