13#ifndef LOADERS_GP_CONTAINER_H
14#define LOADERS_GP_CONTAINER_H
20#include <loaders/gp_types.h>
24struct gp_container_ops {
34 int (*load_ex)(gp_container *self,
gp_pixmap **img,
40 void (*close)(gp_container *self);
47 int (*seek)(gp_container *self, ssize_t offset,
51 int (*match)(
const void *buf);
56 gp_container *(*init)(
gp_io *io);
62 const char *
const extensions[];
71 unsigned int img_count;
81 const struct gp_container_ops *ops;
83 char priv[] GP_ALIGNED;
86#define GP_CONTAINER_PRIV(c) ((void*)(c)->priv)
91static inline gp_pixmap *gp_container_load_next(gp_container *self,
94 return self->ops->load_next(self, callback);
100int gp_container_load_ex(gp_container *self,
gp_pixmap **img,
103static inline gp_pixmap *gp_container_load(gp_container *self,
108 gp_container_load_ex(self, &ret, NULL, callback);
113int gp_container_seek(gp_container *self, ssize_t offset,
116static inline void gp_container_close(gp_container *self)
118 self->ops->close(self);
121gp_container *gp_container_open(
const char *path);
A compiler dependent macros.
Typed recursive storage for key value pairs.
Seek contants and transformations.
gp_seek_whence
Seek constants.