char *_elm_appname = NULL;
Elm_Config *_elm_config = NULL;
const char *_elm_data_dir = NULL;
+int _elm_log_dom = -1;
static Ecore_Event_Handler *_elm_exit_handler = NULL;
static Ecore_Event_Handler *_elm_event_property_change = NULL;
char buf[PATH_MAX];
char *s;
+ eina_init();
+ _elm_log_dom = eina_log_domain_register("elementary", EINA_COLOR_LIGHTBLUE);
+ if (!_elm_log_dom)
+ {
+ EINA_LOG_ERR("could not register elementary log domain.");
+ _elm_log_dom = EINA_LOG_DOMAIN_GLOBAL;
+ }
+
eet_init();
ecore_init();
ecore_app_args_set(argc, (const char **)argv);
if (!ecore_x_init(NULL))
{
- EINA_ERROR_PERR("elementary: ERROR. Cannot connect to X11 display. check $DISPLAY variable\n");
+ ERR("Cannot connect to X11 display. check $DISPLAY variable");
exit(1);
}
if (!ecore_x_screen_is_composited(0))
ecore_file_shutdown();
ecore_shutdown();
eet_shutdown();
+
+ if ((_elm_log_dom > -1) && (_elm_log_dom != EINA_LOG_DOMAIN_GLOBAL))
+ {
+ eina_log_domain_unregister(_elm_log_dom);
+ _elm_log_dom = -1;
+ }
+
+ eina_shutdown();
}
EAPI void
extern char *_elm_appname;
extern Elm_Config *_elm_config;
extern const char *_elm_data_dir;
+extern int _elm_log_dom;
+
+#define CRITICAL(...) EINA_LOG_DOM_CRIT(_elm_log_dom, __VA_ARGS__)
+#define ERR(...) EINA_LOG_DOM_ERR(_elm_log_dom, __VA_ARGS__)
+#define WRN(...) EINA_LOG_DOM_WARN(_elm_log_dom, __VA_ARGS__)
+#define INF(...) EINA_LOG_DOM_INFO(_elm_log_dom, __VA_ARGS__)
+#define DBG(...) EINA_LOG_DOM_DBG(_elm_log_dom, __VA_ARGS__)
#endif
const Eina_List *l;
const char *fontpath;
+ ERR("test");
+
win = ELM_NEW(Elm_Win);
switch (_elm_config->engine)
{
}
if (!win->ee)
{
- EINA_ERROR_PERR("elementary: ERROR. Cannot create window.\n");
+ ERR("Cannot create window.");
free(win);
return NULL;
}