Signed-off-by: Giulio Camuffo <giulio.camuffo@kdab.com>
Reviewed-by: Jonas Ã…dahl <jadahl@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
wl_resource_instance_of(struct wl_resource *resource,
const struct wl_interface *interface,
const void *implementation);
+const char *
+wl_resource_get_class(struct wl_resource *resource);
void
wl_resource_add_destroy_listener(struct wl_resource *resource,
return wl_signal_get(&resource->destroy_signal, notify);
}
+/** Retrieve the interface name (class) of a resource object.
+ *
+ * \param resource The resource object
+ *
+ * \memberof wl_resource
+ */
+WL_EXPORT const char *
+wl_resource_get_class(struct wl_resource *resource)
+{
+ return resource->object.interface->name;
+}
+
WL_EXPORT void
wl_client_add_destroy_listener(struct wl_client *client,
struct wl_listener *listener)