mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2026-03-12 05:34:41 -04:00
Add a resource creation signal
This change allows to add a resource creation listener to a wl_client, which will be notified when a new resource is created for that client. The alternative would be to have a per wl_display listener, but i think that resources are really client specific objects, so it makes sense to use the wl_client as the context. Signed-off-by: Giulio Camuffo <giulio.camuffo@kdab.com> Reviewed-by: Jonas Ådahl <jadahl@gmail.com> [Pekka: added wl_list_remove() in TEST(new_resource).] Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
This commit is contained in:
parent
596024f728
commit
c55c1d787c
3 changed files with 110 additions and 10 deletions
|
|
@ -212,6 +212,10 @@ wl_client_get_object(struct wl_client *client, uint32_t id);
|
|||
void
|
||||
wl_client_post_no_memory(struct wl_client *client);
|
||||
|
||||
void
|
||||
wl_client_add_resource_created_listener(struct wl_client *client,
|
||||
struct wl_listener *listener);
|
||||
|
||||
/** \class wl_listener
|
||||
*
|
||||
* \brief A single listener for Wayland signals
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue