Language bindings for wl_registry_bind request

Brad Robinson brobinson at toptensoftware.com
Thu Jun 18 06:25:14 UTC 2020


Hi All,

I'm putting together a set of C# bindings for Wayland and it's coming along
nicely but I've hit an issue with wl_registry_bind where its implementation
doesn't seem to match the xml.

The wayland.xml file declares it as: (essentially one input parameter -
name)

    <request name="bind">      <description summary="bind an object to
the display">	Binds a new, client-created object to the server using
the	specified name as the identifier.      </description>      <arg
name="name" type="uint" summary="unique numeric name of the object"/>
    <arg name="id" type="new_id" summary="bounded object"/>
</request>


But the C implementation has additional version and interface parameters
and uses the wl_proxy_marshal_constructor_versioned - with apparently no
hints in the xml as to why.

static inline void *
wl_registry_bind(struct wl_registry *wl_registry, uint32_t name, const
struct wl_interface *interface, uint32_t version)
{
     struct wl_proxy *id;

     id = wl_proxy_marshal_constructor_versioned((struct wl_proxy *)
wl_registry,
         WL_REGISTRY_BIND, interface, version, name, interface->name,
version, NULL);

     return (void *) id;
}

Similarly the xml file would suggest the message signature should be "un",
but the C bindings have it as "usun".

What's going on here?  Is this a special case for this one method?

Brad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20200618/4662227d/attachment.htm>


More information about the wayland-devel mailing list