client: add wl_proxy_get_interface()

This is useful for the wayland bindings/scanner I'm working on for a
dynamically typed language.

Signed-off-by: Isaac Freund <mail@isaacfreund.com>
This commit is contained in:
Isaac Freund 2025-05-06 23:45:17 +02:00 committed by Simon Ser
parent 3214f858e2
commit 4497232102
2 changed files with 17 additions and 0 deletions

View file

@ -221,6 +221,9 @@ wl_proxy_get_tag(struct wl_proxy *proxy);
const char * const char *
wl_proxy_get_class(struct wl_proxy *proxy); wl_proxy_get_class(struct wl_proxy *proxy);
const struct wl_interface *
wl_proxy_get_interface(struct wl_proxy *proxy);
struct wl_display * struct wl_display *
wl_proxy_get_display(struct wl_proxy *proxy); wl_proxy_get_display(struct wl_proxy *proxy);

View file

@ -2513,6 +2513,20 @@ wl_proxy_get_class(struct wl_proxy *proxy)
return proxy->object.interface->name; return proxy->object.interface->name;
} }
/** Get the interface of a proxy object
*
* \param proxy The proxy object
* \return The interface of the object associated with the proxy
*
* \memberof wl_proxy
* \since 1.24
*/
WL_EXPORT const struct wl_interface *
wl_proxy_get_interface(struct wl_proxy *proxy)
{
return proxy->object.interface;
}
/** Get the display of a proxy object /** Get the display of a proxy object
* *
* \param proxy The proxy object * \param proxy The proxy object