diff options
author | dec05eba <dec05eba@protonmail.com> | 2021-12-20 10:26:12 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2021-12-21 20:22:33 +0100 |
commit | 44e987c8521a99519350a42292bcfcd28451dcbd (patch) | |
tree | 699015a5dd459e96e0b19f4836f7dcffc1e347de /include/hashmap.h | |
parent | 6bb40bf0c5cd8ee8fb87640fd04b2c595f84c1d3 (diff) |
Async load images
Diffstat (limited to 'include/hashmap.h')
-rw-r--r-- | include/hashmap.h | 4 |
1 files changed, 4 insertions, 0 deletions
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 */ |