aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIsaac Freund <mail@isaacfreund.com>2025-05-06 23:45:17 +0200
committerSimon Ser <contact@emersion.fr>2025-05-20 20:31:16 +0000
commit44972321025e6b34cd5544c2053559c64f1b29af (patch)
tree74130215d9f4019e6decb4ea7b1c7498f3a31d9b
parentprotocol: Clarify sending of wl_seat.capabilities (diff)
downloadwayland-44972321025e6b34cd5544c2053559c64f1b29af.tar
wayland-44972321025e6b34cd5544c2053559c64f1b29af.tar.gz
wayland-44972321025e6b34cd5544c2053559c64f1b29af.tar.bz2
wayland-44972321025e6b34cd5544c2053559c64f1b29af.tar.lz
wayland-44972321025e6b34cd5544c2053559c64f1b29af.tar.xz
wayland-44972321025e6b34cd5544c2053559c64f1b29af.tar.zst
wayland-44972321025e6b34cd5544c2053559c64f1b29af.zip
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>
-rw-r--r--src/wayland-client-core.h3
-rw-r--r--src/wayland-client.c14
2 files changed, 17 insertions, 0 deletions
diff --git a/src/wayland-client-core.h b/src/wayland-client-core.h
index a70d4f0..970e625 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 3d0ef7b..25aa1cd 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