forked from enlightenment/efl
till's shutdown patch - this is good (tm). :)
SVN revision: 8371
This commit is contained in:
parent
a6bb664833
commit
dca0de96c2
|
@ -275,6 +275,8 @@ extern "C" {
|
|||
int evas_hash_alloc_error (void);
|
||||
|
||||
int evas_alloc_error (void);
|
||||
|
||||
void evas_shutdown (void);
|
||||
|
||||
Evas *evas_new (void);
|
||||
void evas_free (Evas *e);
|
||||
|
|
|
@ -24,6 +24,12 @@
|
|||
|
||||
#include "Evas.h"
|
||||
|
||||
void
|
||||
evas_shutdown(void)
|
||||
{
|
||||
evas_font_dir_cache_free();
|
||||
}
|
||||
|
||||
/**
|
||||
* Allocate and new Evas empty canvas.
|
||||
* @return A zeroed out Evas, or NULL on failure
|
||||
|
|
|
@ -75,6 +75,24 @@ static Evas_Font_Dir *object_text_font_cache_dir_add(char *dir);
|
|||
static void object_text_font_cache_dir_del(char *dir, Evas_Font_Dir *fd);
|
||||
static int evas_object_text_font_string_parse(char *buffer, char dest[14][256]);
|
||||
|
||||
static Evas_Bool font_cache_dir_free(Evas_Hash *hash, const char *key,
|
||||
void *data, void *fdata)
|
||||
{
|
||||
object_text_font_cache_dir_del((char *) key, data);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
void
|
||||
evas_font_dir_cache_free(void)
|
||||
{
|
||||
if (!font_dirs) return;
|
||||
|
||||
evas_hash_foreach (font_dirs, font_cache_dir_free, NULL);
|
||||
evas_hash_free (font_dirs);
|
||||
font_dirs = NULL;
|
||||
}
|
||||
|
||||
static char *
|
||||
object_text_font_cache_find(char *dir, char *font)
|
||||
{
|
||||
|
@ -102,8 +120,11 @@ object_text_font_cache_dir_update(char *dir, Evas_Font_Dir *fd)
|
|||
{
|
||||
mt = evas_file_modified_time(dir);
|
||||
if (mt != fd->dir_mod_time)
|
||||
{
|
||||
object_text_font_cache_dir_del(dir, fd);
|
||||
else
|
||||
font_dirs = evas_hash_del(font_dirs, dir, fd);
|
||||
}
|
||||
else
|
||||
{
|
||||
tmp = evas_file_path_join(dir, "fonts.dir");
|
||||
if (tmp)
|
||||
|
@ -111,8 +132,11 @@ object_text_font_cache_dir_update(char *dir, Evas_Font_Dir *fd)
|
|||
mt = evas_file_modified_time(tmp);
|
||||
free(tmp);
|
||||
if (mt != fd->fonts_dir_mod_time)
|
||||
{
|
||||
object_text_font_cache_dir_del(dir, fd);
|
||||
else
|
||||
font_dirs = evas_hash_del(font_dirs, dir, fd);
|
||||
}
|
||||
else
|
||||
{
|
||||
tmp = evas_file_path_join(dir, "fonts.alias");
|
||||
if (tmp)
|
||||
|
@ -121,8 +145,11 @@ object_text_font_cache_dir_update(char *dir, Evas_Font_Dir *fd)
|
|||
free(tmp);
|
||||
}
|
||||
if (mt != fd->fonts_alias_mod_time)
|
||||
object_text_font_cache_dir_del(dir, fd);
|
||||
else
|
||||
{
|
||||
object_text_font_cache_dir_del(dir, fd);
|
||||
font_dirs = evas_hash_del(font_dirs, dir, fd);
|
||||
}
|
||||
else
|
||||
return fd;
|
||||
}
|
||||
}
|
||||
|
@ -362,7 +389,6 @@ object_text_font_cache_dir_add(char *dir)
|
|||
static void
|
||||
object_text_font_cache_dir_del(char *dir, Evas_Font_Dir *fd)
|
||||
{
|
||||
font_dirs = evas_hash_del(font_dirs, dir, fd);
|
||||
if (fd->lookup) evas_hash_free(fd->lookup);
|
||||
while (fd->fonts)
|
||||
{
|
||||
|
|
|
@ -874,6 +874,8 @@ Gfx_Func_Blend_Src_Mul_Dst evas_common_draw_func_blend_mul_get (RGBA_Ima
|
|||
Gfx_Func_Blend_Src_Alpha_Mul_Dst evas_common_draw_func_blend_alpha_get (RGBA_Image *dst);
|
||||
Gfx_Func_Blend_Src_Dst evas_common_draw_func_copy_get (int pixels, int reverse);
|
||||
|
||||
void evas_font_dir_cache_free(void);
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
Loading…
Reference in New Issue