### Build Wayland Libraries Source: https://github.com/wayland/wayland/blob/main/README.md Clone the Wayland repository, configure the build with Meson, and install the libraries. Replace PREFIX with your desired installation path. ```bash git clone https://gitlab.freedesktop.org/wayland/wayland cd wayland meson build/ --prefix=PREFIX ninja -C build/ install ``` -------------------------------- ### C Coding Style Example Source: https://github.com/wayland/wayland/blob/main/CONTRIBUTING.md Demonstrates Wayland's C coding style, including indentation with tabs, brace placement, and conditional statement formatting. ```c static int my_function(void) { int a = 0; if (a) b(); else c(); if (a) { b(); c(); } else { d(); } } ``` -------------------------------- ### Update and Commit Meson.build Version Source: https://github.com/wayland/wayland/blob/main/releasing.txt Update the version in meson.build and commit the changes with a descriptive message. Ensure release variables are set. ```bash export RELEASE_NUMBER="x.y.z" export RELEASE_NAME="[alpha|beta|RC1|RC2|official|point]" git status git commit meson.build -m "build: bump to version $RELEASE_NUMBER for the $RELEASE_NAME release" git push ``` -------------------------------- ### Run Wayland Test Suites Source: https://github.com/wayland/wayland/blob/main/releasing.txt Execute the test suites using ninja to ensure all tests pass or skip before proceeding with a release. ```bash $ ninja -C build/ test ``` -------------------------------- ### Commit and Push Release Changes Source: https://github.com/wayland/wayland/blob/main/releasing.txt Commit the updated releases.html file and push the changes. Deploy the changes using the deploy script. ```bash git commit ./releases.html -m "releases: Add ${RELEASE_NUMBER} release" git push $ ./deploy ``` -------------------------------- ### Generate Release Tarballs and Announcements Source: https://github.com/wayland/wayland/blob/main/releasing.txt Use the release.sh script to generate signed tarballs, upload them, and create a release announcement template. ```bash $ ./release.sh ``` -------------------------------- ### Wayland Protocol XML Structure Source: https://github.com/wayland/wayland/blob/main/doc/book/src/Message_XML.md Defines the basic structure of a Wayland protocol XML file, including optional copyright and description elements followed by one or more interface definitions. ```xml protocol ::= (copyright?, description? interface+) ``` -------------------------------- ### Create Release Branch Source: https://github.com/wayland/wayland/blob/main/releasing.txt Create a new release branch from a specific commit SHA. This is used for bug fixes and conservative changes to a release. ```bash $ git branch x.y [sha] $ git push origin x.y ``` -------------------------------- ### C Line Breaking and Assignment Style Source: https://github.com/wayland/wayland/blob/main/CONTRIBUTING.md Illustrates Wayland's C coding style for breaking long lines in function calls and variable assignments, aligning parameters and breaking around the equals sign. ```c long_variable_name = function_with_a_really_long_name(parameter1, parameter2, parameter3, parameter4); x = function_with_a_really_long_name(parameter1, parameter2, parameter3, parameter4); ``` -------------------------------- ### Request Element Definition Source: https://github.com/wayland/wayland/blob/main/doc/book/src/Message_XML.md Defines a request, which is a message sent from a client to a server, associated with a specific protocol object. Requests are assigned opcodes sequentially and can have zero to twenty arguments. ```APIDOC ## request ### Description Defines a request, a message from a client to a server. Requests are always associated with a specific protocol object. Requests are automatically assigned opcodes in the order they appear inside the interface element. Therefore the only backwards-compatible way to add requests to an interface is to add them to the end. Any event elements do not interfere with request opcode assignments. The arg elements declare the request's arguments. There can be 0 to 20 arguments for a request. The order of arg inside the request element defines the order of the arguments on the wire. All declared arguments are mandatory, and extra arguments are not allowed on the wire. The description element should be used to document the request. ### Attributes #### Required Attributes * **name** (string): The name of the request. Must start with an ASCII character a-z, A-Z, or underscore, and can be followed by numbers 0-9. Must be unique within all requests and events in the containing interface. #### Optional Attributes * **type** (string, "destructor"): If present, this request is a destructor that destroys the protocol object it is sent on. * **since** (integer): Specifies the interface version in which this request was added. Defaults to 1. Requests do not exist for protocol objects with a version smaller than this value. * **deprecated-since** (integer): Specifies the interface version from which this request is deprecated. Compositors should still be prepared to handle the request unless otherwise specified. ``` -------------------------------- ### Argument Definition (arg) Source: https://github.com/wayland/wayland/blob/main/doc/book/src/Message_XML.md Defines an argument for a Wayland request or event. It specifies the argument's name, type, and optional attributes like summary, interface, nullability, and enum association. ```APIDOC ## arg ### Description This element declares one argument for a request or an event. ### Attributes **Required Attributes** - `name` (string): The name of the argument. Must start with a letter or underscore, followed by letters, numbers, or underscores. Must be unique within the parent element's arguments. - `type` (string): The data type of the argument. Allowed types are: `int`, `uint`, `fixed`, `string`, `array`, `fd`, `new_id`, `object`. **Optional Attributes** - `summary` (string): A short description of the argument. Should not be used if `description` is used. - `interface` (string): Specifies the interface name for arguments of type `object` or `new_id`. This enforces type checking. - `allow-null` (boolean): Whether the argument can be null. Defaults to `false`. Applicable only for `string` and `object` types. - `enum` (string): Associates the argument with an enumeration. If specified, `type` must be `uint` or `int`. Can reference enums from other interfaces using `iface.enum-cname-suffix`. ``` -------------------------------- ### Description Element in Wayland XML Source: https://github.com/wayland/wayland/blob/main/doc/book/src/Message_XML.md The description element provides human-readable documentation for its parent element, supporting formatted text. It can also have an optional summary attribute for a concise description. ```xml description ::= #PCDATA ``` -------------------------------- ### event Definition Source: https://github.com/wayland/wayland/blob/main/doc/book/src/Message_XML.md Defines an event, which is a message sent from a server to a client, associated with a specific protocol object. Events are automatically assigned opcodes and their arguments are declared using `arg` elements. ```APIDOC ## event Definition ### Description Defines an event, a message from a server to a client. Events are always associated with a specific protocol object. Events are automatically assigned opcodes in the order they appear inside the interface element. The only backwards-compatible way to add events to an interface is to add them to the end. Request elements do not interfere with event opcode assignments. The `arg` elements declare the event's arguments. There can be 0 to 20 arguments for an event. The order of `arg` inside the `event` element defines the order of the arguments on the wire. All declared arguments are mandatory, and extra arguments are not allowed on the wire. The `description` element should be used to document the event. ### Attributes #### Required Attributes - **name** (string): The name of the event. Must start with an ASCII character a-z, A-Z, or underscore, and can be followed by numbers 0-9. Must be unique within all requests and events in the containing interface. #### Optional Attributes - **type** (string): If set to "destructor", the event is a destructor that shall destroy the protocol object it is sent on. Protocol IPC libraries may use this for bookkeeping protocol object lifetimes. **Note:** Destructor events are an underdeveloped feature and should not be used in new protocols due to potential race conditions. - **since** (integer): Specifies the interface version in which this event was added. Defaults to 1 if not specified. The event does not exist if the protocol object's bound version is smaller than `S`. - **deprecated-since** (integer): Specifies the interface version from which this event is deprecated. Clients must still be prepared to receive this event unless otherwise specified. ``` -------------------------------- ### Copyright Element in Wayland XML Source: https://github.com/wayland/wayland/blob/main/doc/book/src/Message_XML.md The copyright element contains free-form text for copyright and license notices within a Wayland protocol XML file. ```xml copyright ::= #PCDATA ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.