Make ImlibLoader struct opaque

Loaders should no longer directly access it.
This commit is contained in:
Kim Woelders 2020-01-03 21:19:44 +01:00
parent 875bc82b49
commit 9eaed188d2
5 changed files with 23 additions and 14 deletions

View File

@ -48,6 +48,7 @@ image.h \
image_tags.c \
line.c \
loaders.c \
loaders.h \
modules.c \
polygon.c \
rectangle.c \

View File

@ -14,6 +14,7 @@
#include "Imlib2.h"
#include "file.h"
#include "image.h"
#include "loaders.h"
/* Imlib loader context */
struct _imlibldctx {

View File

@ -92,20 +92,6 @@ struct _imlibimagepixmap {
};
#endif
struct _imlibloader {
char *file;
int num_formats;
char **formats;
void *handle;
char (*load)(ImlibImage * im,
ImlibProgressFunction progress,
char progress_granularity, char load_data);
char (*save)(ImlibImage * im,
ImlibProgressFunction progress,
char progress_granularity);
ImlibLoader *next;
};
void __imlib_RescanLoaders(void);
void __imlib_RemoveAllLoaders(void);
ImlibLoader **__imlib_GetLoaderList(void);

View File

@ -7,6 +7,7 @@
#include "file.h"
#include "image.h"
#include "loaders.h"
static void __imlib_LoadAllLoaders(void);

20
src/lib/loaders.h Normal file
View File

@ -0,0 +1,20 @@
#ifndef __LOADERS
#define __LOADERS 1
#include "image.h"
struct _imlibloader {
char *file;
int num_formats;
char **formats;
void *handle;
char (*load)(ImlibImage * im,
ImlibProgressFunction progress,
char progress_granularity, char load_data);
char (*save)(ImlibImage * im,
ImlibProgressFunction progress,
char progress_granularity);
ImlibLoader *next;
};
#endif /* __LOADERS */