Mercurial > hg > dmlib
diff dmres.h @ 730:3d813c81f33c
More work on resources API.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sun, 21 Apr 2013 19:29:00 +0300 |
parents | 867fc7f205a8 |
children | 0e164aaa7409 |
line wrap: on
line diff
--- a/dmres.h Sun Apr 21 18:34:13 2013 +0300 +++ b/dmres.h Sun Apr 21 19:29:00 2013 +0300 @@ -37,6 +37,7 @@ enum { DMF_PERSIST = 0x0001, // Persist loaded RAW resource + DMF_TEMPORARY = 0x0002, DMF_LOADED_RAW = 0x1000, // Raw data has been loaded DMF_LOADED_RES = 0x2000, // Resource has been loaded }; @@ -141,11 +142,11 @@ // Opening and closing resources -DMResource * dmf_open(DMResourceLib *lib, const char *); -DMResource * dmf_create_memio(DMResourceLib *lib, const char *, Uint8 *buf, size_t len); +int dmf_open(DMResourceLib *lib, const char *, DMResource **handle); +int dmf_create_memio(DMResourceLib *lib, const char *, Uint8 *buf, size_t len, DMResource **phandle); #ifdef DM_USE_STDIO -DMResource * dmf_create_stdio(const char *filename, const char *mode); -DMResource * dmf_create_stdio_stream(FILE *); +int dmf_create_stdio(const char *filename, const char *mode, DMResource **phandle); +int dmf_create_stdio_stream(FILE *, DMResource **phandle); #endif void dmf_close(DMResource *);