diff options
author | Kristian Høgsberg <krh@bitplanet.net> | 2012-04-27 11:28:06 -0400 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2012-04-27 11:28:06 -0400 |
commit | ac73a74f43bada3e6ed8e7e49e9f5e02b22f7d46 (patch) | |
tree | 8307d0bb323341e6c57b6078ebedcd86d69992b3 | |
parent | 4fd3696f98e339a1d8ac763f84fc6621f14b95f6 (diff) |
Add wl_client_get_object()
-rw-r--r-- | src/wayland-server.c | 6 | ||||
-rw-r--r-- | src/wayland-server.h | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/wayland-server.c b/src/wayland-server.c index 97d8918..b19e05b 100644 --- a/src/wayland-server.c +++ b/src/wayland-server.c @@ -374,6 +374,12 @@ wl_client_add_resource(struct wl_client *client, wl_signal_init(&resource->destroy_signal); } +WL_EXPORT struct wl_resource * +wl_client_get_object(struct wl_client *client, uint32_t id) +{ + return wl_map_lookup(&client->objects, id); +} + WL_EXPORT void wl_resource_post_no_memory(struct wl_resource *resource) { diff --git a/src/wayland-server.h b/src/wayland-server.h index 249cfa8..6be6897 100644 --- a/src/wayland-server.h +++ b/src/wayland-server.h @@ -118,6 +118,8 @@ struct wl_resource * wl_client_new_object(struct wl_client *client, const struct wl_interface *interface, const void *implementation, void *data); +struct wl_resource * +wl_client_get_object(struct wl_client *client, uint32_t id); struct wl_listener { struct wl_list link; |