libresman

annotate src/resman.h @ 1:469ce01809bc

rudimentary imgthumbs "example program". doesn't use libresman yet
author John Tsiombikas <nuclear@member.fsf.org>
date Fri, 31 Jan 2014 03:17:24 +0200
parents 61d7ff6da54b
children bd9b4ff19c93
rev   line source
nuclear@0 1 #ifndef RESOURCE_MANAGER_H_
nuclear@0 2 #define RESOURCE_MANAGER_H_
nuclear@0 3
nuclear@0 4 struct resman;
nuclear@0 5
nuclear@0 6 int resman_init(struct resman *rman);
nuclear@0 7 void resman_destroy(struct resman *rman);
nuclear@0 8
nuclear@0 9 /* The load callback will be called to load a data file. It may be called in the
nuclear@0 10 * context of a different loading thread.
nuclear@0 11 */
nuclear@1 12 /*void resman_set_load_func(struct resman *rman, resman_load_func_t func, void *cls);*/
nuclear@0 13
nuclear@0 14 /* The "done" callback will be called in the context of the main thread, whenever a
nuclear@0 15 * file was sucessfully loaded, or an error occured.
nuclear@0 16 * It's first argument (status) is set to whatever the load function returned, and its
nuclear@1 17 * closure pointer is the closure ...
nuclear@0 18 */
nuclear@1 19 /*void resman_set_done_func(struct resman *rman, resman_done_func_t func);*/
nuclear@1 20
nuclear@1 21
nuclear@1 22 int resman_lookup(struct resman *rman, const char *fname, void *cls);
nuclear@1 23 void resman_wait(struct resman *rman, int id);
nuclear@1 24
nuclear@1 25 int resman_poll(struct resman *rman);
nuclear@1 26
nuclear@1 27 void resman_set_res_data(struct resman *rman, int res_id, void *data);
nuclear@1 28 void *resman_get_res_data(struct resman *rman, int res_id);
nuclear@1 29
nuclear@0 30
nuclear@0 31 #endif /* RESOURCE_MANAGER_H_ */