From 3e1523d6a7c83d74673f5106ff87f7da465f467c Mon Sep 17 00:00:00 2001 From: Harry Jeffery Date: Thu, 10 Dec 2015 15:26:01 +0000 Subject: Make imv_loader_get_image more informative --- src/loader.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/loader.h') 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 -- cgit v1.2.3