aboutsummaryrefslogtreecommitdiff
path: root/src/loader.h
diff options
context:
space:
mode:
authorHarry Jeffery <harry@exec64.co.uk>2015-12-10 15:26:01 +0000
committerHarry Jeffery <harry@exec64.co.uk>2015-12-10 15:26:01 +0000
commit3e1523d6a7c83d74673f5106ff87f7da465f467c (patch)
tree9a93d3b3df80e2593649101339780904808cc0a9 /src/loader.h
parent6cd76000aa7875fcc7a74cce0ce31783fd82196d (diff)
downloadimv-3e1523d6a7c83d74673f5106ff87f7da465f467c.tar.gz
Make imv_loader_get_image more informative
Diffstat (limited to 'src/loader.h')
-rw-r--r--src/loader.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/loader.h b/src/loader.h
index 5f5a85e..46a7b97 100644
--- a/src/loader.h
+++ b/src/loader.h
@@ -29,6 +29,7 @@ struct imv_loader {
pthread_t bg_thread;
char *path;
FIBITMAP *out_bmp;
+ int out_is_new_image;
char *out_err;
FIMULTIBITMAP *mbmp;
FIBITMAP *bmp;
@@ -49,9 +50,12 @@ void imv_destroy_loader(struct imv_loader *img);
/* Asynchronously load the given file */
void imv_loader_load_path(struct imv_loader *ldr, const char *path);
-/* Returns image data if available. NULL if not. Caller is responsible for
- * cleaning up the data returned. Each image is only returned once. */
-FIBITMAP *imv_loader_get_image(struct imv_loader *ldr);
+/* Returns 1 if image data is available. 0 if not. Caller is responsible for
+ * cleaning up the data returned. Each image is only returned once.
+ * out_is_frame indicates whether the returned image is a new image, or just
+ * a new frame of an existing one. */
+int imv_loader_get_image(struct imv_loader *ldr, FIBITMAP **out_bmp,
+ int *out_is_frame);
/* If a file failed to loadd, return the path to that file. Otherwise returns
* NULL. Only returns the path once. Caller is responsible for cleaning up the