2016-08-10 0:48 GMT+02:00 Yong Bakos <j...@humanoriented.com>: > Hi Giulio, > I missed these Wayland patches due to the weston subject > line, so forgive me for the late feedback. Suggestion inline > below.
Oh indeed, sorry about that. > >> On Aug 9, 2016, at 3:46 AM, Giulio Camuffo <giuliocamu...@gmail.com> wrote: >> >> Signed-off-by: Giulio Camuffo <giulio.camu...@kdab.com> >> Reviewed-by: Jonas Ã…dahl <jad...@gmail.com> >> --- >> src/wayland-server-core.h | 2 ++ >> src/wayland-server.c | 12 ++++++++++++ >> 2 files changed, 14 insertions(+) >> >> diff --git a/src/wayland-server-core.h b/src/wayland-server-core.h >> index 43e76fb..c0d25e9 100644 >> --- a/src/wayland-server-core.h >> +++ b/src/wayland-server-core.h >> @@ -427,6 +427,8 @@ int >> 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); > > Why isn't this called wl_resource_get_interface_name, > since that is exactly what this function returns? Because we have wl_proxy_get_class(), and this is the same for wl_resource. > > Regards, > yong > > >> void >> wl_resource_add_destroy_listener(struct wl_resource *resource, >> diff --git a/src/wayland-server.c b/src/wayland-server.c >> index b44ec9c..e2212e2 100644 >> --- a/src/wayland-server.c >> +++ b/src/wayland-server.c >> @@ -690,6 +690,18 @@ wl_resource_get_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) >> -- >> 2.9.2 >> >> _______________________________________________ >> wayland-devel mailing list >> wayland-devel@lists.freedesktop.org >> https://lists.freedesktop.org/mailman/listinfo/wayland-devel > _______________________________________________ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel