forked from old/legacy-imlib2
Expunged all the raw_file stuff and fixed a warning.
SVN revision: 5143
This commit is contained in:
parent
70d6cef5b3
commit
c0a35f2a2f
|
@ -130,7 +130,6 @@ extern "C"
|
||||||
void imlib_context_set_image(Imlib_Image image);
|
void imlib_context_set_image(Imlib_Image image);
|
||||||
void imlib_context_set_cliprect(int x, int y, int w, int h);
|
void imlib_context_set_cliprect(int x, int y, int w, int h);
|
||||||
void imlib_context_set_TTF_encoding(Imlib_TTF_Encoding encoding);
|
void imlib_context_set_TTF_encoding(Imlib_TTF_Encoding encoding);
|
||||||
void imlib_context_set_filename_raw_mode(int onoff);
|
|
||||||
|
|
||||||
/* context getting */
|
/* context getting */
|
||||||
#ifndef X_DISPLAY_MISSING
|
#ifndef X_DISPLAY_MISSING
|
||||||
|
@ -160,7 +159,6 @@ extern "C"
|
||||||
Imlib_Image imlib_context_get_image(void);
|
Imlib_Image imlib_context_get_image(void);
|
||||||
void imlib_context_get_cliprect(int *x, int *y, int *w, int *h);
|
void imlib_context_get_cliprect(int *x, int *y, int *w, int *h);
|
||||||
Imlib_TTF_Encoding imlib_context_get_TTF_encoding(void);
|
Imlib_TTF_Encoding imlib_context_get_TTF_encoding(void);
|
||||||
int imlib_context_get_filename_raw_mode(void);
|
|
||||||
|
|
||||||
int imlib_get_cache_size(void);
|
int imlib_get_cache_size(void);
|
||||||
void imlib_set_cache_size(int bytes);
|
void imlib_set_cache_size(int bytes);
|
||||||
|
|
38
src/api.c
38
src/api.c
|
@ -103,7 +103,6 @@ struct _imlibcontext
|
||||||
Imlib_Filter filter;
|
Imlib_Filter filter;
|
||||||
Imlib_Rectangle cliprect;
|
Imlib_Rectangle cliprect;
|
||||||
Imlib_TTF_Encoding encoding;
|
Imlib_TTF_Encoding encoding;
|
||||||
int filename_raw;
|
|
||||||
|
|
||||||
int references;
|
int references;
|
||||||
char dirty;
|
char dirty;
|
||||||
|
@ -187,7 +186,6 @@ imlib_context_new(void)
|
||||||
context->filter = NULL;
|
context->filter = NULL;
|
||||||
context->cliprect = (Imlib_Rectangle) { 0, 0, 0, 0 };
|
context->cliprect = (Imlib_Rectangle) { 0, 0, 0, 0 };
|
||||||
context->encoding = IMLIB_TTF_ENCODING_ISO_8859_1;
|
context->encoding = IMLIB_TTF_ENCODING_ISO_8859_1;
|
||||||
context->filename_raw = 0;
|
|
||||||
|
|
||||||
context->references = 0;
|
context->references = 0;
|
||||||
context->dirty = 0;
|
context->dirty = 0;
|
||||||
|
@ -629,21 +627,6 @@ imlib_context_get_TTF_encoding(void)
|
||||||
return ctx->encoding;
|
return ctx->encoding;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
imlib_context_set_filename_raw_mode(int onoff)
|
|
||||||
{
|
|
||||||
if (!ctx) ctx = imlib_context_new();
|
|
||||||
ctx->filename_raw = onoff;
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
|
||||||
imlib_context_get_filename_raw_mode(void)
|
|
||||||
{
|
|
||||||
if (!ctx) ctx = imlib_context_new();
|
|
||||||
return ctx->filename_raw;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* imlib api */
|
/* imlib api */
|
||||||
int
|
int
|
||||||
imlib_get_cache_size(void)
|
imlib_get_cache_size(void)
|
||||||
|
@ -725,7 +708,7 @@ imlib_load_image(const char *file)
|
||||||
prev_ctxt_image = ctx->image;
|
prev_ctxt_image = ctx->image;
|
||||||
im =
|
im =
|
||||||
__imlib_LoadImage(file, (ImlibProgressFunction) ctx->progress_func,
|
__imlib_LoadImage(file, (ImlibProgressFunction) ctx->progress_func,
|
||||||
ctx->progress_granularity, 0, 0, NULL, ctx->filename_raw);
|
ctx->progress_granularity, 0, 0, NULL);
|
||||||
ctx->image = prev_ctxt_image;
|
ctx->image = prev_ctxt_image;
|
||||||
return (Imlib_Image) im;
|
return (Imlib_Image) im;
|
||||||
}
|
}
|
||||||
|
@ -742,7 +725,7 @@ imlib_load_image_immediately(const char *file)
|
||||||
prev_ctxt_image = ctx->image;
|
prev_ctxt_image = ctx->image;
|
||||||
im =
|
im =
|
||||||
__imlib_LoadImage(file, (ImlibProgressFunction) ctx->progress_func,
|
__imlib_LoadImage(file, (ImlibProgressFunction) ctx->progress_func,
|
||||||
ctx->progress_granularity, 1, 0, NULL, ctx->filename_raw);
|
ctx->progress_granularity, 1, 0, NULL);
|
||||||
ctx->image = prev_ctxt_image;
|
ctx->image = prev_ctxt_image;
|
||||||
return (Imlib_Image) im;
|
return (Imlib_Image) im;
|
||||||
}
|
}
|
||||||
|
@ -759,7 +742,7 @@ imlib_load_image_without_cache(const char *file)
|
||||||
prev_ctxt_image = ctx->image;
|
prev_ctxt_image = ctx->image;
|
||||||
im =
|
im =
|
||||||
__imlib_LoadImage(file, (ImlibProgressFunction) ctx->progress_func,
|
__imlib_LoadImage(file, (ImlibProgressFunction) ctx->progress_func,
|
||||||
ctx->progress_granularity, 0, 1, NULL, ctx->filename_raw);
|
ctx->progress_granularity, 0, 1, NULL);
|
||||||
ctx->image = prev_ctxt_image;
|
ctx->image = prev_ctxt_image;
|
||||||
return (Imlib_Image) im;
|
return (Imlib_Image) im;
|
||||||
}
|
}
|
||||||
|
@ -776,7 +759,7 @@ imlib_load_image_immediately_without_cache(const char *file)
|
||||||
prev_ctxt_image = ctx->image;
|
prev_ctxt_image = ctx->image;
|
||||||
im =
|
im =
|
||||||
__imlib_LoadImage(file, (ImlibProgressFunction) ctx->progress_func,
|
__imlib_LoadImage(file, (ImlibProgressFunction) ctx->progress_func,
|
||||||
ctx->progress_granularity, 1, 1, NULL, ctx->filename_raw);
|
ctx->progress_granularity, 1, 1, NULL);
|
||||||
ctx->image = prev_ctxt_image;
|
ctx->image = prev_ctxt_image;
|
||||||
return (Imlib_Image) im;
|
return (Imlib_Image) im;
|
||||||
}
|
}
|
||||||
|
@ -792,17 +775,17 @@ imlib_load_image_with_error_return(const char *file,
|
||||||
if (!ctx) ctx = imlib_context_new();
|
if (!ctx) ctx = imlib_context_new();
|
||||||
CHECK_PARAM_POINTER_RETURN("imlib_load_image_with_error_return", "file",
|
CHECK_PARAM_POINTER_RETURN("imlib_load_image_with_error_return", "file",
|
||||||
file, NULL);
|
file, NULL);
|
||||||
if (!__imlib_FileExists(file, ctx->filename_raw))
|
if (!__imlib_FileExists(file))
|
||||||
{
|
{
|
||||||
*error_return = IMLIB_LOAD_ERROR_FILE_DOES_NOT_EXIST;
|
*error_return = IMLIB_LOAD_ERROR_FILE_DOES_NOT_EXIST;
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
if (__imlib_FileIsDir(file, ctx->filename_raw))
|
if (__imlib_FileIsDir(file))
|
||||||
{
|
{
|
||||||
*error_return = IMLIB_LOAD_ERROR_FILE_IS_DIRECTORY;
|
*error_return = IMLIB_LOAD_ERROR_FILE_IS_DIRECTORY;
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
if (!__imlib_FileCanRead(file, ctx->filename_raw))
|
if (!__imlib_FileCanRead(file))
|
||||||
{
|
{
|
||||||
*error_return = IMLIB_LOAD_ERROR_PERMISSION_DENIED_TO_READ;
|
*error_return = IMLIB_LOAD_ERROR_PERMISSION_DENIED_TO_READ;
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -812,8 +795,7 @@ imlib_load_image_with_error_return(const char *file,
|
||||||
(Imlib_Image) __imlib_LoadImage(file,
|
(Imlib_Image) __imlib_LoadImage(file,
|
||||||
(ImlibProgressFunction)
|
(ImlibProgressFunction)
|
||||||
ctx->progress_func,
|
ctx->progress_func,
|
||||||
ctx->progress_granularity, 1, 0, &er,
|
ctx->progress_granularity, 1, 0, &er);
|
||||||
ctx->filename_raw);
|
|
||||||
ctx->image = prev_ctxt_image;
|
ctx->image = prev_ctxt_image;
|
||||||
if (im)
|
if (im)
|
||||||
*error_return = IMLIB_LOAD_ERROR_NONE;
|
*error_return = IMLIB_LOAD_ERROR_NONE;
|
||||||
|
@ -3759,7 +3741,7 @@ imlib_save_image(const char *filename)
|
||||||
return;
|
return;
|
||||||
prev_ctxt_image = ctx->image;
|
prev_ctxt_image = ctx->image;
|
||||||
__imlib_SaveImage(im, filename, (ImlibProgressFunction) ctx->progress_func,
|
__imlib_SaveImage(im, filename, (ImlibProgressFunction) ctx->progress_func,
|
||||||
ctx->progress_granularity, NULL, ctx->filename_raw);
|
ctx->progress_granularity, NULL);
|
||||||
ctx->image = prev_ctxt_image;
|
ctx->image = prev_ctxt_image;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3784,7 +3766,7 @@ imlib_save_image_with_error_return(const char *filename,
|
||||||
return;
|
return;
|
||||||
prev_ctxt_image = ctx->image;
|
prev_ctxt_image = ctx->image;
|
||||||
__imlib_SaveImage(im, filename, (ImlibProgressFunction) ctx->progress_func,
|
__imlib_SaveImage(im, filename, (ImlibProgressFunction) ctx->progress_func,
|
||||||
ctx->progress_granularity, error_return, ctx->filename_raw);
|
ctx->progress_granularity, error_return);
|
||||||
ctx->image = prev_ctxt_image;
|
ctx->image = prev_ctxt_image;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -116,7 +116,7 @@ void __imlib_dynamic_filters_init()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void __imlib_dynamic_filters_deinit()
|
void __imlib_dynamic_filters_deinit()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
14
src/file.c
14
src/file.c
|
@ -113,7 +113,7 @@ __imlib_FileExtension(const char *file)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
__imlib_FileExists(const char *s, int raw)
|
__imlib_FileExists(const char *s)
|
||||||
{
|
{
|
||||||
struct stat st;
|
struct stat st;
|
||||||
char *fl;
|
char *fl;
|
||||||
|
@ -132,7 +132,7 @@ __imlib_FileExists(const char *s, int raw)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
__imlib_FileIsFile(const char *s, int raw)
|
__imlib_FileIsFile(const char *s)
|
||||||
{
|
{
|
||||||
struct stat st;
|
struct stat st;
|
||||||
char *fl;
|
char *fl;
|
||||||
|
@ -156,7 +156,7 @@ __imlib_FileIsFile(const char *s, int raw)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
__imlib_FileIsDir(const char *s, int raw)
|
__imlib_FileIsDir(const char *s)
|
||||||
{
|
{
|
||||||
struct stat st;
|
struct stat st;
|
||||||
char *fl;
|
char *fl;
|
||||||
|
@ -180,7 +180,7 @@ __imlib_FileIsDir(const char *s, int raw)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
__imlib_FilePermissions(const char *s, int raw)
|
__imlib_FilePermissions(const char *s)
|
||||||
{
|
{
|
||||||
struct stat st;
|
struct stat st;
|
||||||
char *fl;
|
char *fl;
|
||||||
|
@ -199,7 +199,7 @@ __imlib_FilePermissions(const char *s, int raw)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
__imlib_FileCanRead(const char *s, int raw)
|
__imlib_FileCanRead(const char *s)
|
||||||
{
|
{
|
||||||
char *fl;
|
char *fl;
|
||||||
int val;
|
int val;
|
||||||
|
@ -207,7 +207,7 @@ __imlib_FileCanRead(const char *s, int raw)
|
||||||
if (__imlib_IsRealFile(s)) fl = strdup(s);
|
if (__imlib_IsRealFile(s)) fl = strdup(s);
|
||||||
else fl = __imlib_FileRealFile(s);
|
else fl = __imlib_FileRealFile(s);
|
||||||
if (!fl) return 0;
|
if (!fl) return 0;
|
||||||
if (!(__imlib_FilePermissions(fl, 1) & (S_IRUSR | S_IRGRP | S_IROTH)))
|
if (!(__imlib_FilePermissions(fl) & (S_IRUSR | S_IRGRP | S_IROTH)))
|
||||||
{
|
{
|
||||||
free(fl);
|
free(fl);
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -314,7 +314,7 @@ __imlib_IsRealFile(const char *s)
|
||||||
}
|
}
|
||||||
|
|
||||||
time_t
|
time_t
|
||||||
__imlib_FileModDate(const char *s, int raw)
|
__imlib_FileModDate(const char *s)
|
||||||
{
|
{
|
||||||
struct stat st;
|
struct stat st;
|
||||||
char *fl;
|
char *fl;
|
||||||
|
|
12
src/file.h
12
src/file.h
|
@ -3,17 +3,17 @@
|
||||||
char *__imlib_FileKey(const char *file);
|
char *__imlib_FileKey(const char *file);
|
||||||
char *__imlib_FileRealFile(const char *file);
|
char *__imlib_FileRealFile(const char *file);
|
||||||
char *__imlib_FileExtension(const char *file);
|
char *__imlib_FileExtension(const char *file);
|
||||||
int __imlib_FileExists(const char *s, int raw);
|
int __imlib_FileExists(const char *s);
|
||||||
int __imlib_FileIsFile(const char *s, int raw);
|
int __imlib_FileIsFile(const char *s);
|
||||||
int __imlib_FileIsDir(const char *s, int raw);
|
int __imlib_FileIsDir(const char *s);
|
||||||
char **__imlib_FileDir(char *dir, int *num);
|
char **__imlib_FileDir(char *dir, int *num);
|
||||||
void __imlib_FileFreeDirList(char **l, int num);
|
void __imlib_FileFreeDirList(char **l, int num);
|
||||||
void __imlib_FileDel(char *s);
|
void __imlib_FileDel(char *s);
|
||||||
time_t __imlib_FileModDate(const char *s, int raw);
|
time_t __imlib_FileModDate(const char *s);
|
||||||
char *__imlib_FileHomeDir(int uid);
|
char *__imlib_FileHomeDir(int uid);
|
||||||
char *__imlib_FileField(char *s, int field);
|
char *__imlib_FileField(char *s, int field);
|
||||||
int __imlib_FilePermissions(const char *s, int raw);
|
int __imlib_FilePermissions(const char *s);
|
||||||
int __imlib_FileCanRead(const char *s, int raw);
|
int __imlib_FileCanRead(const char *s);
|
||||||
int __imlib_IsRealFile(const char *s);
|
int __imlib_IsRealFile(const char *s);
|
||||||
|
|
||||||
|
|
||||||
|
|
14
src/font.c
14
src/font.c
|
@ -335,17 +335,17 @@ __imlib_load_font(const char *fontname)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
sprintf(tmp, "%s.ttf", name);
|
sprintf(tmp, "%s.ttf", name);
|
||||||
if (__imlib_FileIsFile(tmp, 1))
|
if (__imlib_FileIsFile(tmp))
|
||||||
file = strdup(tmp);
|
file = strdup(tmp);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
sprintf(tmp, "%s.TTF", name);
|
sprintf(tmp, "%s.TTF", name);
|
||||||
if (__imlib_FileIsFile(tmp, 1))
|
if (__imlib_FileIsFile(tmp))
|
||||||
file = strdup(tmp);
|
file = strdup(tmp);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
sprintf(tmp, "%s", name);
|
sprintf(tmp, "%s", name);
|
||||||
if (__imlib_FileIsFile(tmp, 1))
|
if (__imlib_FileIsFile(tmp))
|
||||||
file = strdup(tmp);
|
file = strdup(tmp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -363,17 +363,17 @@ __imlib_load_font(const char *fontname)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
sprintf(tmp, "%s/%s.ttf", fpath[j], name);
|
sprintf(tmp, "%s/%s.ttf", fpath[j], name);
|
||||||
if (__imlib_FileIsFile(tmp, 1))
|
if (__imlib_FileIsFile(tmp))
|
||||||
file = strdup(tmp);
|
file = strdup(tmp);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
sprintf(tmp, "%s/%s.TTF", fpath[j], name);
|
sprintf(tmp, "%s/%s.TTF", fpath[j], name);
|
||||||
if (__imlib_FileIsFile(tmp, 1))
|
if (__imlib_FileIsFile(tmp))
|
||||||
file = strdup(tmp);
|
file = strdup(tmp);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
sprintf(tmp, "%s/%s", fpath[j], name);
|
sprintf(tmp, "%s/%s", fpath[j], name);
|
||||||
if (__imlib_FileIsFile(tmp, 1))
|
if (__imlib_FileIsFile(tmp))
|
||||||
file = strdup(tmp);
|
file = strdup(tmp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1882,7 +1882,7 @@ __imlib_list_fonts(int *num_ret)
|
||||||
*p = '\0';
|
*p = '\0';
|
||||||
if(!__imlib_ItemInList(list, l, dir[j]))
|
if(!__imlib_ItemInList(list, l, dir[j]))
|
||||||
{
|
{
|
||||||
if (__imlib_FileIsFile(path, 1))
|
if (__imlib_FileIsFile(path))
|
||||||
{
|
{
|
||||||
TT_Face f;
|
TT_Face f;
|
||||||
|
|
||||||
|
|
38
src/image.c
38
src/image.c
|
@ -788,16 +788,16 @@ __imlib_RescanLoaders(void)
|
||||||
/* ok - was the system loaders dir contents modified ? */
|
/* ok - was the system loaders dir contents modified ? */
|
||||||
last_scan_time = current_time;
|
last_scan_time = current_time;
|
||||||
#ifndef __EMX__
|
#ifndef __EMX__
|
||||||
if (__imlib_FileIsDir(SYS_LOADERS_PATH "/image/", 1))
|
if (__imlib_FileIsDir(SYS_LOADERS_PATH "/image/"))
|
||||||
#else
|
#else
|
||||||
if (__imlib_FileIsDir(__XOS2RedirRoot(SYS_LOADERS_PATH "/image/", 1)))
|
if (__imlib_FileIsDir(__XOS2RedirRoot(SYS_LOADERS_PATH "/image/")))
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
#ifndef __EMX__
|
#ifndef __EMX__
|
||||||
current_time = __imlib_FileModDate(SYS_LOADERS_PATH "/image/", 1);
|
current_time = __imlib_FileModDate(SYS_LOADERS_PATH "/image/");
|
||||||
#else
|
#else
|
||||||
current_time =
|
current_time =
|
||||||
__imlib_FileModDate(__XOS2RedirRoot(SYS_LOADERS_PATH "/image/", 1));
|
__imlib_FileModDate(__XOS2RedirRoot(SYS_LOADERS_PATH "/image/"));
|
||||||
#endif
|
#endif
|
||||||
if (current_time > last_modified_system_time)
|
if (current_time > last_modified_system_time)
|
||||||
{
|
{
|
||||||
|
@ -810,9 +810,9 @@ __imlib_RescanLoaders(void)
|
||||||
home = __imlib_FileHomeDir(getuid());
|
home = __imlib_FileHomeDir(getuid());
|
||||||
sprintf(s, "%s/" USER_LOADERS_PATH "/image/", home);
|
sprintf(s, "%s/" USER_LOADERS_PATH "/image/", home);
|
||||||
free(home);
|
free(home);
|
||||||
if (__imlib_FileIsDir(s, 1))
|
if (__imlib_FileIsDir(s))
|
||||||
{
|
{
|
||||||
current_time = __imlib_FileModDate(s, 1);
|
current_time = __imlib_FileModDate(s);
|
||||||
if (current_time > last_modified_home_time)
|
if (current_time > last_modified_home_time)
|
||||||
{
|
{
|
||||||
/* yup - set the "do_reload" flag */
|
/* yup - set the "do_reload" flag */
|
||||||
|
@ -1018,8 +1018,7 @@ __imlib_CreateImage(int w, int h, DATA32 * data)
|
||||||
ImlibImage *
|
ImlibImage *
|
||||||
__imlib_LoadImage(const char *file, ImlibProgressFunction progress,
|
__imlib_LoadImage(const char *file, ImlibProgressFunction progress,
|
||||||
char progress_granularity, char immediate_load,
|
char progress_granularity, char immediate_load,
|
||||||
char dont_cache, ImlibLoadError * er,
|
char dont_cache, ImlibLoadError * er)
|
||||||
int raw_file_mode)
|
|
||||||
{
|
{
|
||||||
ImlibImage *im;
|
ImlibImage *im;
|
||||||
ImlibLoader *best_loader;
|
ImlibLoader *best_loader;
|
||||||
|
@ -1038,7 +1037,7 @@ __imlib_LoadImage(const char *file, ImlibProgressFunction progress,
|
||||||
{
|
{
|
||||||
time_t current_modified_time;
|
time_t current_modified_time;
|
||||||
|
|
||||||
current_modified_time = __imlib_FileModDate(file, raw_file_mode);
|
current_modified_time = __imlib_FileModDate(file);
|
||||||
/* if the file on disk is newer than the cached one */
|
/* if the file on disk is newer than the cached one */
|
||||||
if (current_modified_time > im->moddate)
|
if (current_modified_time > im->moddate)
|
||||||
{
|
{
|
||||||
|
@ -1073,7 +1072,7 @@ __imlib_LoadImage(const char *file, ImlibProgressFunction progress,
|
||||||
im->real_file = __imlib_FileRealFile(file);
|
im->real_file = __imlib_FileRealFile(file);
|
||||||
im->key = __imlib_FileKey(file);
|
im->key = __imlib_FileKey(file);
|
||||||
}
|
}
|
||||||
im->moddate = __imlib_FileModDate(file, raw_file_mode);
|
im->moddate = __imlib_FileModDate(file);
|
||||||
/* ok - just check all our loaders are up to date */
|
/* ok - just check all our loaders are up to date */
|
||||||
__imlib_RescanLoaders();
|
__imlib_RescanLoaders();
|
||||||
/* take a guess by extension on the best loader to use */
|
/* take a guess by extension on the best loader to use */
|
||||||
|
@ -1298,8 +1297,7 @@ __imlib_DirtyImage(ImlibImage * im)
|
||||||
void
|
void
|
||||||
__imlib_SaveImage(ImlibImage * im, const char *file,
|
__imlib_SaveImage(ImlibImage * im, const char *file,
|
||||||
ImlibProgressFunction progress, char progress_granularity,
|
ImlibProgressFunction progress, char progress_granularity,
|
||||||
ImlibLoadError * er,
|
ImlibLoadError * er)
|
||||||
int raw_file_mode)
|
|
||||||
{
|
{
|
||||||
ImlibLoader *l;
|
ImlibLoader *l;
|
||||||
char e, *pfile;
|
char e, *pfile;
|
||||||
|
@ -1317,22 +1315,6 @@ __imlib_SaveImage(ImlibImage * im, const char *file,
|
||||||
im->file = strdup(file);
|
im->file = strdup(file);
|
||||||
im->real_file = strdup(im->file);
|
im->real_file = strdup(im->file);
|
||||||
|
|
||||||
/* if (raw_file_mode)
|
|
||||||
{
|
|
||||||
if (im->real_file) free(im->real_file);
|
|
||||||
if (im->key) free(im->key);
|
|
||||||
im->real_file = strdup(im->file);
|
|
||||||
im->key = NULL;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (im->real_file) free(im->real_file);
|
|
||||||
im->real_file = __imlib_FileRealFile(file);
|
|
||||||
if (im->key) free(im->key);
|
|
||||||
im->key = __imlib_FileKey(file);
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* find the laoder for the format - if its null use the extension */
|
/* find the laoder for the format - if its null use the extension */
|
||||||
l = __imlib_FindBestLoaderForFileFormat(im->real_file, im->format);
|
l = __imlib_FindBestLoaderForFileFormat(im->real_file, im->format);
|
||||||
/* no loader - abort */
|
/* no loader - abort */
|
||||||
|
|
|
@ -169,8 +169,7 @@ ImlibImage *__imlib_CreateImage(int w, int h, DATA32 *data);
|
||||||
ImlibImage *__imlib_LoadImage(const char *file,
|
ImlibImage *__imlib_LoadImage(const char *file,
|
||||||
ImlibProgressFunction progress,
|
ImlibProgressFunction progress,
|
||||||
char progress_granularity, char immediate_load,
|
char progress_granularity, char immediate_load,
|
||||||
char dont_cache, ImlibLoadError *er,
|
char dont_cache, ImlibLoadError *er);
|
||||||
int raw_file_mode);
|
|
||||||
#ifndef X_DISPLAY_MISSING
|
#ifndef X_DISPLAY_MISSING
|
||||||
ImlibImagePixmap *__imlib_FindImlibImagePixmapByID(Display *d, Pixmap p);
|
ImlibImagePixmap *__imlib_FindImlibImagePixmapByID(Display *d, Pixmap p);
|
||||||
#endif
|
#endif
|
||||||
|
@ -188,8 +187,7 @@ void __imlib_DirtyImage(ImlibImage *im);
|
||||||
void __imlib_SaveImage(ImlibImage *im, const char *file,
|
void __imlib_SaveImage(ImlibImage *im, const char *file,
|
||||||
ImlibProgressFunction progress,
|
ImlibProgressFunction progress,
|
||||||
char progress_granularity,
|
char progress_granularity,
|
||||||
ImlibLoadError *er,
|
ImlibLoadError *er);
|
||||||
int raw_file_mode);
|
|
||||||
|
|
||||||
# define IMAGE_HAS_ALPHA(im) ((im)->flags & F_HAS_ALPHA)
|
# define IMAGE_HAS_ALPHA(im) ((im)->flags & F_HAS_ALPHA)
|
||||||
# define IMAGE_IS_UNLOADED(im) ((im)->flags & F_UNLOADED)
|
# define IMAGE_IS_UNLOADED(im) ((im)->flags & F_UNLOADED)
|
||||||
|
|
Loading…
Reference in New Issue