aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.com>2022-03-01 18:01:38 -0500
committerXavier Claessens <xclaesse@gmail.com>2022-03-06 06:31:43 -0500
commite80a9c2cbac3080dad6e55c070c83cac47d6d7f8 (patch)
tree5f7303c29984e39245be41ed6db7857341aab14f /docs
parentaf9af219d815f157acd2dd4629727fcd90aa9d86 (diff)
downloadmeson-e80a9c2cbac3080dad6e55c070c83cac47d6d7f8.zip
meson-e80a9c2cbac3080dad6e55c070c83cac47d6d7f8.tar.gz
meson-e80a9c2cbac3080dad6e55c070c83cac47d6d7f8.tar.bz2
wayland module: Allow building both client and server sides
- Change `scope` kwarg to `public` boolean default to false. - Change `side` kwarg to `client` and `server` booleans. - Document returned values - Aggregate in a single unit test because have lots of small tests increases CI time. Fixes: #10040.
Diffstat (limited to 'docs')
-rw-r--r--docs/markdown/Wayland-module.md32
1 files changed, 20 insertions, 12 deletions
diff --git a/docs/markdown/Wayland-module.md b/docs/markdown/Wayland-module.md
index d30627c..345c4e3 100644
--- a/docs/markdown/Wayland-module.md
+++ b/docs/markdown/Wayland-module.md
@@ -26,7 +26,6 @@ executable('hw', 'main.c', xdg_shell, dependencies : wl_dep)
## Methods
### find_protocol
-
```meson
xml = wl_mod.find_protocol(
'xdg-decoration',
@@ -35,28 +34,37 @@ xml = wl_mod.find_protocol(
)
```
This function requires one positional argument: the protocol base name.
+
+It takes the following keyword arguments:
- `state` Optional arg that specifies the current state of the protocol.
-Either stable, staging, or unstable.
-The default is stable.
-- `version` The backwards incompatible version number.
-Required for staging or unstable. An error is raised for stable.
+ Either `'stable'`, `'staging'`, or `'unstable'`. The default is `'stable'`.
+- `version` The backwards incompatible version number as integer.
+ Required for staging and unstable, but not allowed for stable.
+
+**Returns**: a [[@file]] that can be passed to [scan_xml](#scan_xml)
### scan_xml
```meson
generated = wl_mod.scan_xml(
'my-protocol.xml',
- side : 'client',
- scope : 'private',
+ client : true,
+ server : true,
+ public : false,
)
```
This function accepts one or more arguments of either string or file type.
-- `side` Optional arg that specifies if client or server side code is generated.
-The default is client side.
-- `scope` Optional arg that specifies the scope of the generated code.
-Either public or private.
-The default is private.
+It takes the following keyword arguments:
+- `public` Optional arg that specifies the scope of the generated code.
+ The default is false.
+- `client` Optional arg that specifies if client side header file is
+ generated. The default is true.
+- `server` Optional arg that specifies if server side header file is
+ generated. The default is false.
+**Returns**: a list of [[@custom_tgt]] in the order source, client side header,
+server side header. Generated header files have the name
+`<name>-<client|server>-protocol.h`.
## Links
- [Official Wayland Documentation](https://wayland.freedesktop.org/docs/html/)