wl_interface(3)
π wl_interface β bestie, let's talk protocol objects π
okay so this is wl_interface(3), a page from the Library Functions Manual, and it's genuinely one of those foundational Wayland things you're gonna keep bumping into. come sit with me π«Ά
β¨ NAME β¨
wl_interface β the whole vibe is: it's a struct that describes a protocol object's interface. that's it, that's the girl π
πΈ SYNOPSIS πΈ
#include <wayland-util.h>
π Data Fields π
const char * nameint versionint method_countconst struct wl_message * methodsint event_countconst struct wl_message * events
π Detailed Description π
π¦ Protocol object interface π¦
so, a wl_interface describes the API of a protocol object that's defined in the Wayland protocol specification. the protocol implementation uses a wl_interface inside its marshalling machinery to encode client requests. no cap, that's literally the job.
the name of a wl_interface is the name of the corresponding protocol interface, and version represents the version of that interface. meanwhile method_count and event_count represent the number of methods (aka requests) and events in the respective wl_message members. counting girlies, rise π
for example, consider a protocol interface foo, marked as version 1, with two requests and one event.
<interface name="foo" version="1">
<request name="a"></request>
<request name="b"></request>
<event name="c"></event>
</interface>
given two wl_message arrays foo_requests and foo_events, a wl_interface for foo might be:
struct wl_interface foo_interface = {
"foo", 1,
2, foo_requests,
1, foo_events
};
π Note π
the server side of the protocol may define interface implementation types that incorporate the term interface in their name. take care to not confuse these server-side structs with a wl_interface variable whose name also ends in interface. for example, while the server may define a type struct wl_foo_interface, the client may define a struct wl_interface wl_foo_interface. same word, different girlies β do not mix them up, i'm begging π
π See also π
wl_messagewl_proxy- Interfaces
- Versioning
π₯ Field Documentation π₯
π int wl_interface::event_count
number of events β¨
π const struct wl_message* wl_interface::events
event signatures β¨
π int wl_interface::method_count
number of methods (requests) β¨
π const struct wl_message* wl_interface::methods
method (request) signatures β¨
π const char* wl_interface::name
interface name β¨
π int wl_interface::version
interface version β¨
π Author π
generated automatically by Doxygen for Wayland from the source code. so nobody hand-wrote this one, it's a robot's magnum opus π€π
and that's the whole page bestie!! this one's from Wayland, Version 1.26.0 β go forth and marshal your requests, ily, mwah ππ¦π
π¦ where this page comes from
- arch rolling: wayland-docs 1.26.0-1 Β· MIT
- fedora 44: wayland-devel 1.26.0-1.fc44 Β· MIT
- fedora 44: wayland-devel 1.26.0-1.fc44 Β· MIT
- nixpkgs unstable: wayland 1.26.0
- ubuntu stonking: libwayland-doc 1.26.0-1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms