From 44e987c8521a99519350a42292bcfcd28451dcbd Mon Sep 17 00:00:00 2001 From: dec05eba Date: Mon, 20 Dec 2021 10:26:12 +0100 Subject: Async load images --- include/hashmap.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/hashmap.h') diff --git a/include/hashmap.h b/include/hashmap.h index 0928081..f027d25 100644 --- a/include/hashmap.h +++ b/include/hashmap.h @@ -34,5 +34,9 @@ bool mgui_hashmap_get(mgui_hashmap *self, const char *key, size_t key_size, void /* Note: |hash| has to be the hash for |key|, which you can get by using calling |mgui_hashmap_hash| with |key| or as a result of |mgui_hashmap_insert| */ bool mgui_hashmap_get_by_hash(mgui_hashmap *self, const char *key, size_t key_size, uint64_t hash, void **value_out); uint64_t mgui_hashmap_hash(const char *key, size_t key_size); +/* Return false from |callback| to stop the iteration */ +void mgui_hashmap_for_each(mgui_hashmap *self, bool(*callback)(void *value, void *userdata), void *userdata); +/* Return true from |callback| to erase the item */ +void mgui_hashmap_for_each_erase(mgui_hashmap *self, bool(*callback)(void *value, void *userdata), void *userdata); #endif /* MGUI_HASHMAP_H */ -- cgit v1.2.3