forked from enlightenment/efl
evas/loaders: add log domain for ICO loader.
This is to remove the dependency of the ico loader on Evas itself. Signed-off-by: Cedric Bail <cedric.bail@samsung.com>
This commit is contained in:
parent
8db3d4d2bf
commit
a09efda8d2
|
@ -11,6 +11,13 @@
|
||||||
#include "evas_common_private.h"
|
#include "evas_common_private.h"
|
||||||
#include "evas_private.h"
|
#include "evas_private.h"
|
||||||
|
|
||||||
|
static int _evas_loader_ico_log_dom = -1;
|
||||||
|
|
||||||
|
#ifdef ERR
|
||||||
|
# undef ERR
|
||||||
|
#endif
|
||||||
|
#define ERR(...) EINA_LOG_DOM_ERR(_evas_loader_ico_log_dom, __VA_ARGS__)
|
||||||
|
|
||||||
typedef struct _Evas_Loader_Internal Evas_Loader_Internal;
|
typedef struct _Evas_Loader_Internal Evas_Loader_Internal;
|
||||||
struct _Evas_Loader_Internal
|
struct _Evas_Loader_Internal
|
||||||
{
|
{
|
||||||
|
@ -818,6 +825,13 @@ static int
|
||||||
module_open(Evas_Module *em)
|
module_open(Evas_Module *em)
|
||||||
{
|
{
|
||||||
if (!em) return 0;
|
if (!em) return 0;
|
||||||
|
_evas_loader_ico_log_dom = eina_log_domain_register
|
||||||
|
("evas-ico", EVAS_DEFAULT_LOG_COLOR);
|
||||||
|
if (_evas_loader_ico_log_dom < 0)
|
||||||
|
{
|
||||||
|
EINA_LOG_ERR("Can not create a module log domain.");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
em->functions = (void *)(&evas_image_load_ico_func);
|
em->functions = (void *)(&evas_image_load_ico_func);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -825,6 +839,7 @@ module_open(Evas_Module *em)
|
||||||
static void
|
static void
|
||||||
module_close(Evas_Module *em EINA_UNUSED)
|
module_close(Evas_Module *em EINA_UNUSED)
|
||||||
{
|
{
|
||||||
|
eina_log_domain_unregister(_evas_loader_ico_log_dom);
|
||||||
}
|
}
|
||||||
|
|
||||||
static Evas_Module_Api evas_modapi =
|
static Evas_Module_Api evas_modapi =
|
||||||
|
|
Loading…
Reference in New Issue