mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-10-29 05:40:16 -04:00
server: add wl_resource_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:
parent
4497232102
commit
8cad6f7b82
2 changed files with 17 additions and 0 deletions
|
|
@ -621,6 +621,9 @@ wl_resource_instance_of(struct wl_resource *resource,
|
||||||
const char *
|
const char *
|
||||||
wl_resource_get_class(const struct wl_resource *resource);
|
wl_resource_get_class(const struct wl_resource *resource);
|
||||||
|
|
||||||
|
const struct wl_interface *
|
||||||
|
wl_resource_get_interface(struct wl_resource *resource);
|
||||||
|
|
||||||
void
|
void
|
||||||
wl_resource_add_destroy_listener(struct wl_resource *resource,
|
wl_resource_add_destroy_listener(struct wl_resource *resource,
|
||||||
struct wl_listener *listener);
|
struct wl_listener *listener);
|
||||||
|
|
|
||||||
|
|
@ -905,6 +905,20 @@ wl_resource_get_class(const struct wl_resource *resource)
|
||||||
return resource->object.interface->name;
|
return resource->object.interface->name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Get the interface of a resource object
|
||||||
|
*
|
||||||
|
* \param resource The resource object
|
||||||
|
* \return The interface of the object associated with the resource
|
||||||
|
*
|
||||||
|
* \memberof wl_resource
|
||||||
|
* \since 1.24
|
||||||
|
*/
|
||||||
|
WL_EXPORT const struct wl_interface *
|
||||||
|
wl_resource_get_interface(struct wl_resource *resource)
|
||||||
|
{
|
||||||
|
return resource->object.interface;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a listener to be called at the beginning of wl_client destruction
|
* Add a listener to be called at the beginning of wl_client destruction
|
||||||
*
|
*
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue