aboutsummaryrefslogtreecommitdiff
path: root/src/source.h
diff options
context:
space:
mode:
authorHarry Jeffery <harry@exec64.co.uk>2019-06-15 14:28:29 +0100
committerHarry Jeffery <harry@exec64.co.uk>2019-07-03 20:50:19 +0100
commit7c7dc660e587eac1aa3c8b3405eba95ba558e682 (patch)
tree81d12d560b60d397be23c7d132e32a5de30e409a /src/source.h
parent20e9d23b82f55a751c3cf1166cb59ef26775ee00 (diff)
downloadimv-7c7dc660e587eac1aa3c8b3405eba95ba558e682.tar.gz
Big glfw refactor
I did a lot of this in a very ad-hoc fashion with no proper commit history. As such, the kindest thing to do seemed to be to just squash it into this one commit.
Diffstat (limited to 'src/source.h')
-rw-r--r--src/source.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/source.h b/src/source.h
index 4f1a0dd..eed95c4 100644
--- a/src/source.h
+++ b/src/source.h
@@ -3,7 +3,7 @@
#include <pthread.h>
#include <stdbool.h>
-#include "bitmap.h"
+#include "image.h"
struct imv_source_message {
/* Pointer to sender of message */
@@ -12,17 +12,17 @@ struct imv_source_message {
/* User-supplied pointer */
void *user_data;
- /* Receiver is responsible for destroying bitmap */
- struct imv_bitmap *bitmap;
+ /* Receiver is responsible for destroying image */
+ struct imv_image *image;
/* If an animated gif, the frame's duration in milliseconds, else 0 */
int frametime;
- /* Error message if bitmap was NULL */
+ /* Error message if image was NULL */
const char *error;
};
-/* Generic source of one or more bitmaps. Essentially a single image file */
+/* Generic source of one or more images. Essentially a single image file */
struct imv_source {
/* usually the path of the image this is the source of */
char *name;
@@ -45,10 +45,10 @@ struct imv_source {
pthread_mutex_t busy;
/* Trigger loading of the first frame. Returns 0 on success. */
- int (*load_first_frame)(struct imv_source *src);
+ void *(*load_first_frame)(struct imv_source *src);
/* Trigger loading of next frame. Returns 0 on success. */
- int (*load_next_frame)(struct imv_source *src);
+ void *(*load_next_frame)(struct imv_source *src);
/* Safely free contents of this source. After this returns
* it is safe to dealocate/overwrite the imv_source instance.