mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-11-01 22:58:40 -04:00
client: add wl_proxy_get_class()
This is a useful shorthand for client application debugging macros, since you can ask the object class from the object itself. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
This commit is contained in:
parent
b581d13a7e
commit
a51ed6d50f
2 changed files with 13 additions and 0 deletions
|
|
@ -1127,6 +1127,18 @@ wl_proxy_get_id(struct wl_proxy *proxy)
|
||||||
return proxy->object.id;
|
return proxy->object.id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Get the interface name (class) of a proxy object
|
||||||
|
*
|
||||||
|
* \param proxy The proxy object
|
||||||
|
* \return The interface name of the object associated with the proxy
|
||||||
|
*
|
||||||
|
* \memberof wl_proxy
|
||||||
|
*/
|
||||||
|
WL_EXPORT const char *
|
||||||
|
wl_proxy_get_class(struct wl_proxy *proxy)
|
||||||
|
{
|
||||||
|
return proxy->object.interface->name;
|
||||||
|
}
|
||||||
|
|
||||||
/** Assign a proxy to an event queue
|
/** Assign a proxy to an event queue
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -131,6 +131,7 @@ int wl_proxy_add_listener(struct wl_proxy *proxy,
|
||||||
void wl_proxy_set_user_data(struct wl_proxy *proxy, void *user_data);
|
void wl_proxy_set_user_data(struct wl_proxy *proxy, void *user_data);
|
||||||
void *wl_proxy_get_user_data(struct wl_proxy *proxy);
|
void *wl_proxy_get_user_data(struct wl_proxy *proxy);
|
||||||
uint32_t wl_proxy_get_id(struct wl_proxy *proxy);
|
uint32_t wl_proxy_get_id(struct wl_proxy *proxy);
|
||||||
|
const char *wl_proxy_get_class(struct wl_proxy *proxy);
|
||||||
void wl_proxy_set_queue(struct wl_proxy *proxy, struct wl_event_queue *queue);
|
void wl_proxy_set_queue(struct wl_proxy *proxy, struct wl_event_queue *queue);
|
||||||
|
|
||||||
#include "wayland-client-protocol.h"
|
#include "wayland-client-protocol.h"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue