history/semantics of uint32_t name

Jasper St. Pierre jstpierre at mecheye.net
Fri Apr 1 00:00:37 UTC 2016


wl_registry and wl_registry.bind are about globals and creating new
instances of globals.

A compositor can opt to provide a new global interface by using the
wl_global_create API. Immediately, an event is broadcasted to all
clients: the wl_registry.global event, which contains a name (the
uint32_t parameter), an interface (which is a string). If the user
wants to bind such a global, it passes that back to wl_registry.bind,
to get an instance of that global.

Why wasn't the interface used instead? I'm not sure. I imagine it was
to enforce that binding is done through the global event rather than
allowing a client to attempt to bind random objects through strings.

On Thu, Mar 31, 2016 at 4:48 PM, Yong Bakos <junk at humanoriented.com> wrote:
> Hi,
> I've been investigating the semantics of the name parameter within the wl_registry interface, prompted by a recent dialog regarding my patch of arg summary attributes in wayland.xml.
>
> I've dug around the Weston source to see what values are passed as the name argument, and where it goes... and I'm at a bit of a loss. This argument is always an integer, and seems like it's just passed around and never even used for anything! I feel like I must be missing something, hence this question: what is this `name` argument in wl_registry_bind, wl_registry_send_global, and wl_registry_send_global_remove? Why is it called name when it is merely a numeric identifier? Shouldn't it be called `id`?
>
> I'd love to see where this argument is used within the weston source, so if you know a file:line you can point me to, I'll add one beer to your queue.
>
> Thank you,
> yong
>
>
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/wayland-devel



-- 
  Jasper


More information about the wayland-devel mailing list