diff options
Diffstat (limited to 'docs/markdown')
-rw-r--r-- | docs/markdown/Wayland-module.md | 32 |
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/) |