PKG_CHECK_MODULES([WAYLAND], [wayland-server xdg-shell-unstable-v6-server tizen-extension-client])
PKG_CHECK_MODULES([EFL], [eina ecore ecore-input evas ecore-wl2])
PKG_CHECK_MODULES([WAYLAND_TBM], [wayland-tbm-server])
-
+PKG_CHECK_MODULES([DLOG], [dlog])
AC_ARG_ENABLE([examples],
[AS_HELP_STRING([--enable-examples], [build examples, @<:@default=disabled@:>@])],
BuildRequires: pkgconfig(ecore-wl2)
BuildRequires: pkgconfig(wayland-tbm-server)
BuildRequires: pkgconfig(wayland-tbm-client)
+BuildRequires: pkgconfig(dlog)
Requires: libwayland-extension-server
Requires: pepper-xkb
AM_CFLAGS = $(GCC_CFLAGS)
libpepper_efl_ladir = $(libdir)
-libpepper_efl_la_LIBADD = @EFL_LIBS@ @WAYLAND_LIBS@ @PEPPER_LIBS@ @WAYLAND_TBM_LIBS@
+libpepper_efl_la_LIBADD = @EFL_LIBS@ @WAYLAND_LIBS@ @PEPPER_LIBS@ @WAYLAND_TBM_LIBS@ @DLOG_LIBS@
libpepper_efl_la_LDFLAGS = ${LDFLAGS}
libpepper_efl_la_CPPFLAGS = $(AM_CPPFLAGS)
libpepper_efl_la_CFLAGS = \
@WAYLAND_CFLAGS@ \
@PEPPER_CFLAGS@ \
@WAYLAND_TBM_CFLAGS@ \
+ @DLOG_CFLAGS@ \
-I$(top_srcdir)/src
libpepper_efl_la_SOURCES = \
compositor.c \
- log.c \
output.c \
shell.c \
input.c \
static Eina_Bool
_pepper_efl_compositor_init(void)
{
- Eina_Bool res;
-
- res = pepper_efl_log_init("pepper-efl");
- if (!res)
+ if (!eina_init())
{
- fprintf(stderr, "failed to init log system\n");
- goto err_log;
+ ERR("failed to init eina");
+ goto err_eina;
}
-
if (!ecore_init())
{
ERR("failed to init ecore");
err_hash:
ecore_shutdown();
err_ecore:
- pepper_efl_log_shutdown();
-err_log:
+ eina_shutdown();
+err_eina:
return EINA_FALSE;
}
{
PE_FREE_FUNC(_comp_hash, eina_hash_free);
ecore_shutdown();
- pepper_efl_log_shutdown();
+ eina_shutdown();
}
static pepper_efl_comp_t *
+++ /dev/null
-#include "private.h"
-
-int _log_domain = -1;
-static int _init_count = 0;
-
-int
-pepper_efl_log_init(const char *domain)
-{
- if (_init_count)
- goto end;
-
- if (!eina_init())
- {
- fprintf(stderr, "%s:%d - %s() error initializing Eina\n",
- __FILE__, __LINE__, __func__);
- return 0;
- }
-
- _log_domain = eina_log_domain_register(domain, EINA_COLOR_LIGHTCYAN);
-
- if (_log_domain < 0)
- {
- EINA_LOG_ERR("Unable to register '%s' log domain", domain);
- eina_shutdown();
- return 0;
- }
-
-end:
- return ++_init_count;
-}
-
-void
-pepper_efl_log_shutdown(void)
-{
- if ((_init_count <= 0) ||
- (--_init_count > 0))
- return;
-
- eina_log_domain_unregister(_log_domain);
- eina_shutdown();
-}
#include <wayland-server.h>
#include <wayland-tbm-server.h>
+#include <dlog.h>
+
typedef struct pepper_efl_comp pepper_efl_comp_t;
typedef struct pepper_efl_output pepper_efl_output_t;
typedef struct pepper_efl_input pepper_efl_input_t;
# define PE_CHECK_RET(x, ret) EINA_SAFETY_ON_NULL_RETURN_VAL(x, ret)
#endif
-extern int _log_domain;
-
-#define DBG(...) EINA_LOG_DOM_DBG(_log_domain, __VA_ARGS__)
-#define INF(...) EINA_LOG_DOM_INFO(_log_domain, __VA_ARGS__)
-#define WRN(...) EINA_LOG_DOM_WARN(_log_domain, __VA_ARGS__)
-#define ERR(...) EINA_LOG_DOM_ERR(_log_domain, __VA_ARGS__)
-#define CRI(...) EINA_LOG_DOM_CRIT(_log_domain, __VA_ARGS__)
+#ifdef LOG_TAG
+# undef LOG_TAG
+#endif
+#define LOG_TAG "PEPPER_EFL"
-int pepper_efl_log_init(const char *domain);
-void pepper_efl_log_shutdown(void);
+#define DBG(format, arg...) dlog_print(DLOG_DEBUG, LOG_TAG, format, ##arg)
+#define INF(format, arg...) dlog_print(DLOG_INFO, LOG_TAG, format, ##arg)
+#define WRN(format, arg...) dlog_print(DLOG_WARN, LOG_TAG, format, ##arg)
+#define ERR(format, arg...) dlog_print(DLOG_ERROR, LOG_TAG, format, ##arg)
pepper_efl_input_t *pepper_efl_input_create(pepper_efl_comp_t *comp, const char *seat_name);
void pepper_efl_input_destroy(pepper_efl_input_t *seat);
res = wl_list_empty(&tsurf->resource_list);
if (res)
{
- CRI("Couldn't unreference, list is empty");
+ ERR("Couldn't unreference, list is empty");
return;
}