Add API to retrieve and iterate over the resources list of a client

To complement on the new resource created signal, this allows to
iterate over the existing resources of a client.

Signed-off-by: Giulio Camuffo <giulio.camuffo@kdab.com>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
[Pekka: added empty lines, init ret in for_each_helper()]
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
This commit is contained in:
Giulio Camuffo 2016-08-11 17:23:10 +02:00 committed by Pekka Paalanen
parent c55c1d787c
commit 2f617250d2
5 changed files with 85 additions and 7 deletions

View file

@ -75,7 +75,8 @@ struct wl_map {
uint32_t free_list;
};
typedef void (*wl_iterator_func_t)(void *element, void *data);
typedef enum wl_iterator_result (*wl_iterator_func_t)(void *element,
void *data);
void
wl_map_init(struct wl_map *map, uint32_t side);