forked from enlightenment/efl
vg_savers/eet: Added implementaion of vg saver to eet file
This commit is contained in:
parent
24ac2d6516
commit
bf79ec359d
|
@ -1,9 +1,4 @@
|
||||||
#ifdef HAVE_CONFIG_H
|
#include "vg_common.h"
|
||||||
# include <config.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "evas_common_private.h"
|
|
||||||
#include "evas_private.h"
|
|
||||||
|
|
||||||
static int _evas_vg_saver_eet_log_dom = -1;
|
static int _evas_vg_saver_eet_log_dom = -1;
|
||||||
|
|
||||||
|
@ -18,10 +13,22 @@ static int _evas_vg_saver_eet_log_dom = -1;
|
||||||
#define INF(...) EINA_LOG_DOM_INFO(_evas_vg_saver_eet_log_dom, __VA_ARGS__)
|
#define INF(...) EINA_LOG_DOM_INFO(_evas_vg_saver_eet_log_dom, __VA_ARGS__)
|
||||||
|
|
||||||
int
|
int
|
||||||
evas_vg_save_file_eet(void *vg EINA_UNUSED, const char *file EINA_UNUSED, const char *key EINA_UNUSED, int compress EINA_UNUSED)
|
evas_vg_save_file_eet(Vg_File_Data *evg_data, const char *file, const char *key, int compress)
|
||||||
{
|
{
|
||||||
INF("No Implementation Yet");
|
Eet_Data_Descriptor *svg_node_eet;
|
||||||
return 0;
|
Svg_Node *root;
|
||||||
|
Eet_File *ef;
|
||||||
|
|
||||||
|
ef = eet_open(file, EET_FILE_MODE_WRITE);
|
||||||
|
if (!ef)
|
||||||
|
return EVAS_LOAD_ERROR_GENERIC;
|
||||||
|
|
||||||
|
svg_node_eet = vg_common_svg_node_eet();
|
||||||
|
root = vg_common_create_svg_node(evg_data);
|
||||||
|
eet_data_write(ef, svg_node_eet, key, root, compress);
|
||||||
|
eet_close(ef);
|
||||||
|
|
||||||
|
return EVAS_LOAD_ERROR_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Evas_Vg_Save_Func evas_vg_save_eet_func =
|
static Evas_Vg_Save_Func evas_vg_save_eet_func =
|
||||||
|
@ -34,6 +41,13 @@ module_open(Evas_Module *em)
|
||||||
{
|
{
|
||||||
if (!em) return 0;
|
if (!em) return 0;
|
||||||
em->functions = (void *)(&evas_vg_save_eet_func);
|
em->functions = (void *)(&evas_vg_save_eet_func);
|
||||||
|
_evas_vg_saver_eet_log_dom = eina_log_domain_register
|
||||||
|
("vg-save-eet", EVAS_DEFAULT_LOG_COLOR);
|
||||||
|
if (_evas_vg_saver_eet_log_dom < 0)
|
||||||
|
{
|
||||||
|
EINA_LOG_ERR("Can not create a module log domain.");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -53,7 +67,7 @@ static Evas_Module_Api evas_modapi =
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
EVAS_MODULE_DEFINE(EVAS_MODULE_TYPE_VG_LOADER, vg_saver, eet);
|
EVAS_MODULE_DEFINE(EVAS_MODULE_TYPE_VG_SAVER, vg_saver, eet);
|
||||||
|
|
||||||
#ifndef EVAS_STATIC_BUILD_VG_EET
|
#ifndef EVAS_STATIC_BUILD_VG_EET
|
||||||
EVAS_EINA_MODULE_DEFINE(vg_saver, eet);
|
EVAS_EINA_MODULE_DEFINE(vg_saver, eet);
|
||||||
|
|
Loading…
Reference in New Issue