summaryrefslogtreecommitdiffstats
path: root/src/compositor
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>2024-02-08 08:51:27 +0100
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>2024-02-13 11:51:12 +0100
commit50d2717f2d69388bca3df91f6be2d6a6c535947a (patch)
tree894a8d20a8d9b9250dc4c626e5b90570b458780e /src/compositor
parent7e6d6f207b54af9c397a0b2bbc380a02d2975ce0 (diff)
doc: Add documentation for cmake functions
This adds documentation for the cmake functions used to generate binding code for protocol extensions. Since the Wayland Client library did not have any documentation landing page, it also adds that. This currently only links to the cmake function, but it can be extended to include other APIs later if we add them. Pick-to: 6.7 Fixes: QTBUG-114147 Change-Id: I07d8dbe3bc32e5845482fe3e69ec6ba94897331b Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'src/compositor')
-rw-r--r--src/compositor/doc/qtwaylandcompositor.qdocconf3
-rw-r--r--src/compositor/doc/src/cmake/qt_generate_wayland_protocol_server_sources.qdoc47
-rw-r--r--src/compositor/doc/src/qtwaylandcompositor-overview.qdoc3
3 files changed, 52 insertions, 1 deletions
diff --git a/src/compositor/doc/qtwaylandcompositor.qdocconf b/src/compositor/doc/qtwaylandcompositor.qdocconf
index f83ceb72f..fae83583f 100644
--- a/src/compositor/doc/qtwaylandcompositor.qdocconf
+++ b/src/compositor/doc/qtwaylandcompositor.qdocconf
@@ -39,7 +39,8 @@ depends += qtcore \
qtwidgets \
qtvirtualkeyboard \
qtcmake \
- qtopengl
+ qtopengl \
+ qtwaylandclient
exampledirs += ../../../examples/wayland
headerdirs += \
diff --git a/src/compositor/doc/src/cmake/qt_generate_wayland_protocol_server_sources.qdoc b/src/compositor/doc/src/cmake/qt_generate_wayland_protocol_server_sources.qdoc
new file mode 100644
index 000000000..5a5849463
--- /dev/null
+++ b/src/compositor/doc/src/cmake/qt_generate_wayland_protocol_server_sources.qdoc
@@ -0,0 +1,47 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
+
+/*!
+\page qt-generate-wayland-protocol-server-sources.html
+\ingroup cmake-commands-qtwaylandcompositor
+
+\title qt_generate_wayland_protocol_server_sources
+\keyword qt6_generate_wayland_protocol_server_sources
+
+\summary {Generates server-side C++ bindings for a Wayland protocol .XML file}
+
+\cmakecommandsince 6.0
+
+The command is defined in the \c WaylandCompositor component of the \c Qt6 package, which
+can be loaded like so:
+
+\badcode
+find_package(Qt6 REQUIRED COMPONENTS WaylandCompositor)
+\endcode
+
+\section1 Synopsis
+
+\badcode
+qt_generate_wayland_protocol_server_sources(target
+ FILES file1.xml [file2.xml ...])
+\endcode
+
+\versionlessCMakeCommandsNote qt6_generate_wayland_protocol_server_sources()
+
+\section1 Description
+
+qt_generate_wayland_protocol_server_sources() creates the build steps to run \c{waylandscanner} and
+\c{qtwaylandscanner} on one or more Wayland protocol files. The tools will in turn generate binding
+code in C and C++ for implementing the protocols, and the resulting files will be built as part
+of the \c target.
+
+qt_generate_wayland_protocol_server_sources() will trigger generation of the files needed to
+implement the compositor side of the protocol.
+
+\l{qt_generate_wayland_protocol_client_sources}{qt_generate_wayland_protocol_client_sources()}
+is the equivalent function for the client.
+
+See the \l{Custom Shell} or \l{Custom Extension} examples for a demonstration of how to use these
+functions.
+*/
+
diff --git a/src/compositor/doc/src/qtwaylandcompositor-overview.qdoc b/src/compositor/doc/src/qtwaylandcompositor-overview.qdoc
index 90933cd47..86d15a5fd 100644
--- a/src/compositor/doc/src/qtwaylandcompositor-overview.qdoc
+++ b/src/compositor/doc/src/qtwaylandcompositor-overview.qdoc
@@ -141,6 +141,9 @@
\li \l{Qt Wayland Compositor C++ Classes}
\endlist
+ In addition, the module provides the CMake function
+ \l{qt_generate_wayland_protocol_server_sources}{qt_generate_wayland_protocol_server_sources()}.
+
\section1 Module Evolution
\l{Porting to Qt 6 - Qt Wayland Compositor} lists important changes in the
module API and functionality that were done for the Qt 6 series of Qt.