13#ifndef LOADERS_GP_CONTAINER_H
14#define LOADERS_GP_CONTAINER_H
19#include <loaders/gp_types.h>
21#include <loaders/gp_data_storage.h>
23struct gp_container_ops {
33 int (*load_ex)(gp_container *self,
gp_pixmap **img,
39 void (*close)(gp_container *self);
46 int (*seek)(gp_container *self, ssize_t offset,
50 int (*match)(
const void *buf);
55 gp_container *(*init)(gp_io *io);
61 const char *
const extensions[];
70 unsigned int img_count;
80 const struct gp_container_ops *ops;
85#define GP_CONTAINER_PRIV(c) ((void*)(c)->priv)
90static inline gp_pixmap *gp_container_load_next(gp_container *self,
93 return self->ops->load_next(self, callback);
99int gp_container_load_ex(gp_container *self,
gp_pixmap **img,
102static inline gp_pixmap *gp_container_load(gp_container *self,
107 gp_container_load_ex(self, &ret, NULL, callback);
112int gp_container_seek(gp_container *self, ssize_t offset,
115static inline void gp_container_close(gp_container *self)
117 self->ops->close(self);
120gp_container *gp_container_open(
const char *path);
Seek contants and transformations.
gp_seek_whence
Seek constants.