mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-11-02 09:01:39 -05:00
Add a wl_resource_instance_of function
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
This commit is contained in:
parent
96afa34776
commit
5ac5d55d81
4 changed files with 21 additions and 4 deletions
|
|
@ -504,6 +504,15 @@ wl_resource_set_destructor(struct wl_resource *resource,
|
|||
resource->destroy = destroy;
|
||||
}
|
||||
|
||||
WL_EXPORT int
|
||||
wl_resource_instance_of(struct wl_resource *resource,
|
||||
const struct wl_interface *interface,
|
||||
const void *implementation)
|
||||
{
|
||||
return wl_interface_equal(resource->object.interface, interface) &&
|
||||
resource->object.implementation == implementation;
|
||||
}
|
||||
|
||||
WL_EXPORT void
|
||||
wl_resource_add_destroy_listener(struct wl_resource *resource,
|
||||
struct wl_listener * listener)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue