diff --git a/src/wayland-client-core.h b/src/wayland-client-core.h index a70d4f09..970e6254 100644 --- a/src/wayland-client-core.h +++ b/src/wayland-client-core.h @@ -221,6 +221,9 @@ wl_proxy_get_tag(struct wl_proxy *proxy); const char * wl_proxy_get_class(struct wl_proxy *proxy); +const struct wl_interface * +wl_proxy_get_interface(struct wl_proxy *proxy); + struct wl_display * wl_proxy_get_display(struct wl_proxy *proxy); diff --git a/src/wayland-client.c b/src/wayland-client.c index 3d0ef7b4..25aa1cd4 100644 --- a/src/wayland-client.c +++ b/src/wayland-client.c @@ -2513,6 +2513,20 @@ wl_proxy_get_class(struct wl_proxy *proxy) 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 * * \param proxy The proxy object