Basic API usage
Jan Bruns
code at abnuto.de
Wed Sep 9 15:44:59 UTC 2020
Ok. I now have an even earlier point of missing knowledge than I expected:
Why does the generated version of wayland-client-protocol.h reference a
server object called "wl_registry_interface"?
It makes use of it in
extern const struct wl_interface wl_registry_interface;
static inline struct wl_registry *
wl_display_get_registry(struct wl_display *wl_display)
{
struct wl_proxy *registry;
registry = wl_proxy_marshal_constructor((struct wl_proxy *) wl_display,
WL_DISPLAY_GET_REGISTRY, &wl_registry_interface, NULL);
return (struct wl_registry *) registry;
}
Doesn't wl_proxy_marshal_constructor normally allocate client-side
"objects, proxies" for new-id args?
An attempt to do the very same thing (import the named memory block by
means of linker, and passing an adress to that) from within simple
typeless testing code made wl_proxy_marshal_constructor return NULL
(instead of crashing). Maybe some detail I have done wrong, but I don't
understand what's going on here anyway.
Gruss
Jan Bruns
More information about the wayland-devel
mailing list