log: move some files to log directory from debug directory 52/314352/2
authorSooChan Lim <sc1.lim@samsung.com>
Wed, 10 Jul 2024 09:37:57 +0000 (18:37 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Wed, 10 Jul 2024 10:40:29 +0000 (10:40 +0000)
for fixing mcd

Change-Id: I41a32ff3dd1ba4336b0243858a6ebdbbdd8b3323

16 files changed:
src/bin/Makefile.mk
src/bin/debug/e_error.c [deleted file]
src/bin/debug/e_error_intern.h [deleted file]
src/bin/debug/e_input_log.h [deleted file]
src/bin/debug/e_log.c [deleted file]
src/bin/debug/e_log_intern.h [deleted file]
src/bin/debug/e_video_debug.c [deleted file]
src/bin/debug/e_video_debug_intern.h [deleted file]
src/bin/log/e_error.c [new file with mode: 0644]
src/bin/log/e_error_intern.h [new file with mode: 0644]
src/bin/log/e_input_log.h [new file with mode: 0644]
src/bin/log/e_log.c [new file with mode: 0644]
src/bin/log/e_log_intern.h [new file with mode: 0644]
src/bin/log/e_video_debug.c [new file with mode: 0644]
src/bin/log/e_video_debug_intern.h [new file with mode: 0644]
src/modules/Makefile.mk

index bcefbc0ad74a16ed7e4b9673b82a2337036f454b..d42b141c71b5cb699c6212905237b7d951b29e5e 100644 (file)
@@ -12,6 +12,7 @@ E_CPPFLAGS = \
 -I$(top_builddir)/src/bin/displaymgr/video \
 -I$(top_builddir)/src/bin/utils \
 -I$(top_builddir)/src/bin/debug \
+-I$(top_builddir)/src/bin/log \
 -I$(top_srcdir) \
 -I$(top_srcdir)/src/bin \
 -I$(top_srcdir)/src/include \
@@ -25,6 +26,7 @@ E_CPPFLAGS = \
 -I$(top_srcdir)/src/bin/displaymgr/video \
 -I$(top_srcdir)/src/bin/utils \
 -I$(top_srcdir)/src/bin/debug \
+-I$(top_srcdir)/src/bin/log \
 @e_cflags@ \
 @cf_cflags@ \
 @VALGRIND_CFLAGS@ \
@@ -265,13 +267,13 @@ src/bin/utils/e_dbus_conn.c \
 src/bin/utils/e_msg.c \
 src/bin/utils/e_map.c \
 src/bin/utils/e_util_video.c \
-src/bin/debug/e_error.c \
 src/bin/debug/e_info_server.c \
-src/bin/debug/e_log.c \
 src/bin/debug/e_test_helper.c \
 src/bin/debug/e_info_protocol.c \
 src/bin/debug/e_info_server_input.c \
-src/bin/debug/e_video_debug.c
+src/bin/log/e_error.c \
+src/bin/log/e_log.c \
+src/bin/log/e_video_debug.c
 
 src_bin_enlightenment_CPPFLAGS = $(E_CPPFLAGS) -DEFL_BETA_API_SUPPORT -DEFL_EO_API_SUPPORT -DE_LOGGING=2 @WAYLAND_CFLAGS@ $(TTRACE_CFLAGS) $(DLOG_CFLAGS) $(PIXMAN_CFLAGS) $(POLICY_CFLAGS) $(EGL_CFLAGS)
 if HAVE_LIBGOMP
diff --git a/src/bin/debug/e_error.c b/src/bin/debug/e_error.c
deleted file mode 100644 (file)
index d034d70..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#include "e_error_intern.h"
-
-/* local subsystem functions */
-
-/* local subsystem globals */
-
-/* externally accessible functions */
-EINTERN void
-e_error_message_show_internal(char *txt)
-{
-   ELOGF("E ERROR", "%s", NULL, txt);
-}
-
-/* local subsystem functions */
diff --git a/src/bin/debug/e_error_intern.h b/src/bin/debug/e_error_intern.h
deleted file mode 100644 (file)
index d74618b..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-#ifndef E_ERROR_INTERN_H
-#define E_ERROR_INTERN_H
-
-#include "e_intern.h"
-
-#define e_error_message_show(args...) do \
-{ \
-   char __tmpbuf[4096]; \
- \
-   snprintf(__tmpbuf, sizeof(__tmpbuf), ##args); \
-   e_error_message_show_internal(__tmpbuf); \
-} while (0)
-
-EINTERN void e_error_message_show_internal(char *txt);
-
-#endif
diff --git a/src/bin/debug/e_input_log.h b/src/bin/debug/e_input_log.h
deleted file mode 100644 (file)
index e7827ed..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-#ifndef E_INPUT_PRIVIATES_H
-#define E_INPUT_PRIVIATES_H
-
-#ifdef DBG
-# undef DBG
-#endif
-
-#ifdef INF
-# undef INF
-#endif
-
-#ifdef ERR
-# undef ERR
-#endif
-
-extern int _e_input_log_dom;
-#define DBG(...)  EINA_LOG_DOM_DBG(_e_input_log_dom, __VA_ARGS__)
-#define INF(...)  EINA_LOG_DOM_INFO(_e_input_log_dom, __VA_ARGS__)
-#define ERR(...)  EINA_LOG_DOM_ERR(_e_input_log_dom, __VA_ARGS__)
-
-#define EIERR(msg, ARG...) ERR("[%s:%d] "msg, __FUNCTION__, __LINE__, ##ARG)
-#define EIINF(msg, ARG...) INF("[%s:%d] "msg, __FUNCTION__, __LINE__, ##ARG)
-#define EIDBG(msg, ARG...) DBG("[%s:%d] "msg, __FUNCTION__, __LINE__, ##ARG)
-
-#define DMERR(msg, ARG...) ERR("[%s:%d] "msg, __FUNCTION__, __LINE__, ##ARG)
-#define DMWRN(msg, ARG...) WRN("[%s:%d] "msg, __FUNCTION__, __LINE__, ##ARG)
-#define DMINF(msg, ARG...) INF("[%s:%d] "msg, __FUNCTION__, __LINE__, ##ARG)
-#define DMDBG(msg, ARG...) DBG("[%s:%d] "msg, __FUNCTION__, __LINE__, ##ARG)
-
-#endif
diff --git a/src/bin/debug/e_log.c b/src/bin/debug/e_log.c
deleted file mode 100644 (file)
index 4488090..0000000
+++ /dev/null
@@ -1,189 +0,0 @@
-#include "e_log_intern.h"
-#include <Ecore_File.h>
-
-E_API int e_log_dom = -1;
-
-#ifdef HAVE_DLOG
-static Eina_Bool _dlog_enabled = EINA_FALSE;
-#endif
-
-static void
-_e_log_cb(const Eina_Log_Domain *d, Eina_Log_Level level, const char *file, const char *fnc EINA_UNUSED, int line, const char *fmt, void *data EINA_UNUSED, va_list args)
-{
-   const char *color;
-#ifdef HAVE_DLOG
-   if (_dlog_enabled)
-     {
-        int log_level;
-        const char buf[512];
-
-        switch (level)
-          {
-           case EINA_LOG_LEVEL_CRITICAL:
-              log_level = DLOG_ERROR;
-              break;
-           case EINA_LOG_LEVEL_ERR:
-              log_level = DLOG_ERROR;
-              break;
-           case EINA_LOG_LEVEL_WARN:
-              log_level = DLOG_WARN;
-              break;
-           case EINA_LOG_LEVEL_INFO:
-              log_level = DLOG_INFO;
-              break;
-           case EINA_LOG_LEVEL_DBG:
-              log_level = DLOG_DEBUG;
-              break;
-           default:
-              log_level = DLOG_VERBOSE;
-              break;
-          }
-
-        vsnprintf((char *)buf, sizeof(buf), fmt, args);
-
-        if (e_config)
-          {
-             if (e_config->log_type == E_LOG_TYPE_SYSTEM)
-               {
-                  print_system_log(log_level, LOG_TAG,
-                                   "<%s> %18.18s:%04d %s",
-                                   d->domain_str, ecore_file_file_get(file), line, buf);
-               }
-             else
-               {
-                  dlog_print(log_level, LOG_TAG,
-                             "<%s> %18.18s:%04d %s",
-                             d->domain_str, ecore_file_file_get(file), line, buf);
-               }
-          }
-        else
-          {
-             dlog_print(log_level, LOG_TAG,
-                        "<%s> %18.18s:%04d %s",
-                        d->domain_str, ecore_file_file_get(file), line, buf);
-          }
-        return;
-     }
-#endif
-   color = eina_log_level_color_get(level);
-
-   fprintf(stdout,
-           "%s<" EINA_COLOR_RESET "%s%s>" EINA_COLOR_RESET "%18.18s:%04d" EINA_COLOR_RESET " ",
-           color, d->domain_str, color, ecore_file_file_get(file), line);
-   vfprintf(stdout, fmt, args);
-   putc('\n', stdout);
-}
-
-#ifdef HAVE_DLOG
-static void
-_e_log_wayland_dlog(const char *format, va_list args)
-{
-   if (e_config)
-     {
-        if (e_config->log_type == E_LOG_TYPE_SYSTEM)
-          vprint_system_log(DLOG_INFO, LOG_TAG, format, args);
-        else
-          dlog_vprint(DLOG_INFO, LOG_TAG, format, args);
-     }
-   else
-     dlog_vprint(DLOG_INFO, LOG_TAG, format, args);
-}
-
-static void
-_e_log_wayland_stderr(const char *format, va_list args)
-{
-   vfprintf(stderr, format, args);
-}
-
-EINTERN void
-e_log_dlog_enable(Eina_Bool enable)
-{
-   if (_dlog_enabled == enable) return;
-
-   _dlog_enabled = enable;
-
-   if (_dlog_enabled)
-     wl_log_set_handler_server(_e_log_wayland_dlog);
-   else
-     wl_log_set_handler_server(_e_log_wayland_stderr);
-}
-#endif
-
-EINTERN Eina_Bool
-e_log_path_set(const char *path)
-{
-   int  log_fd = -1;
-   FILE *log_fl;
-
-   if (!path)
-     {
-        ERR("no eina-log-path");
-        return EINA_FALSE;
-     }
-
-   log_fl = fopen(path, "a");
-   if (!log_fl)
-     {
-        ERR("failed: open file(%s)\n", path);
-        return EINA_FALSE;
-     }
-
-   fflush(stdout);
-   close(STDOUT_FILENO);
-
-   fflush(stderr);
-   close(STDERR_FILENO);
-
-   setvbuf(log_fl, NULL, _IOLBF, 512);
-   log_fd = fileno(log_fl);
-
-   dup2(log_fd, STDOUT_FILENO);
-   dup2(log_fd, STDERR_FILENO);
-
-   fclose(log_fl);
-
-   return EINA_TRUE;
-}
-
-EINTERN int
-e_log_init(void)
-{
-   const char *s;
-
-   eina_log_threads_enable();
-
-   e_log_dom = eina_log_domain_register("e", EINA_COLOR_WHITE);
-   if (e_log_dom < 0)
-     {
-        fprintf(stderr, "Could not create logging domain 'e'\n");
-        return 0;
-     }
-
-   eina_log_print_cb_set(_e_log_cb, NULL);
-   eina_log_domain_level_set("e", 3);
-
-#ifdef HAVE_DLOG
-   if (getenv("E_LOG_DLOG_ENABLE"))
-     e_log_dlog_enable(EINA_TRUE);
-#endif
-
-   s = getenv("E_LOG_FILE_PATH");
-   if (s)
-     {
-#ifdef HAVE_DLOG
-        e_log_dlog_enable(EINA_FALSE);
-#endif
-        e_log_path_set(s);
-     }
-
-   return 1;
-}
-
-EINTERN int
-e_log_shutdown(void)
-{
-   eina_log_domain_unregister(e_log_dom);
-   e_log_dom = -1;
-   return 0;
-}
-
diff --git a/src/bin/debug/e_log_intern.h b/src/bin/debug/e_log_intern.h
deleted file mode 100644 (file)
index 4924ea7..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-#ifndef E_LOG_INTERN_H
-#define E_LOG_INTERN_H
-
-#include "e_intern.h"
-#include "e_log.h"
-
-EINTERN int e_log_init(void);
-EINTERN int e_log_shutdown(void);
-
-#ifdef HAVE_DLOG
-EINTERN void e_log_dlog_enable(Eina_Bool enable);
-#endif
-EINTERN Eina_Bool e_log_path_set(const char *path);
-
-#endif
diff --git a/src/bin/debug/e_video_debug.c b/src/bin/debug/e_video_debug.c
deleted file mode 100644 (file)
index c005a8e..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-#include "e_video_debug_intern.h"
-
-static Eina_Bool video_to_primary = EINA_FALSE;
-static Eina_Bool video_punch = EINA_FALSE;
-static Evas_Object *punch_obj = NULL;
-
-E_API Eina_Bool
-e_video_debug_display_primary_plane_value_get(void)
-{
-   return video_to_primary;
-}
-
-E_API void
-e_video_debug_display_primary_plane_set(Eina_Bool set)
-{
-   video_to_primary = set;
-}
-
-EINTERN Eina_Bool
-e_video_debug_punch_value_get(void)
-{
-   return video_punch;
-}
-
-EINTERN void
-e_video_debug_punch_set(Eina_Bool set)
-{
-   video_punch = set;
-}
-
-EINTERN void
-e_video_debug_screen_punch_set(int x, int y, int w, int h, int a, int r, int g, int b)
-{
-   if (!punch_obj)
-     {
-        punch_obj = evas_object_rectangle_add(e_comp->evas);
-        evas_object_layer_set(punch_obj, EVAS_LAYER_MAX);
-        evas_object_render_op_set(punch_obj, EVAS_RENDER_COPY);
-     }
-
-   evas_object_color_set(punch_obj, r, g, b, a);
-
-   if (w == 0 || h == 0)
-     evas_output_size_get(e_comp->evas, &w, &h);
-
-   evas_object_move(punch_obj, x, y);
-   evas_object_resize(punch_obj, w, h);
-   evas_object_show(punch_obj);
-}
-
-EINTERN void
-e_video_debug_screen_punch_unset(void)
-{
-   if (!punch_obj)
-     return;
-
-   evas_object_del(punch_obj);
-   punch_obj = NULL;
-}
diff --git a/src/bin/debug/e_video_debug_intern.h b/src/bin/debug/e_video_debug_intern.h
deleted file mode 100644 (file)
index 8a01d4d..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-#ifndef E_VIDEO_DEBUG_INTERN_H
-#define E_VIDEO_DEBUG_INTERN_H
-
-#include "e_intern.h"
-#include "e_video_debug.h"
-
-#ifdef VER
-#undef VER
-#endif
-
-#ifdef VWR
-#undef VWR
-#endif
-
-#ifdef VIN
-#undef VIN
-#endif
-
-#ifdef VDB
-#undef VDB
-#endif
-
-#define VER(fmt, ec, arg...)   ELOGF("VIDEO <ERR>", fmt, ec, ##arg)
-#define VWR(fmt, ec, arg...)   ELOGF("VIDEO <WRN>", fmt, ec, ##arg)
-#define VIN(fmt, ec, arg...)   ELOGF("VIDEO <INF>", fmt, ec, ##arg)
-#define VDB(fmt, ec, arg...)   DBG("window(0x%08"PRIxPTR") ec(%p): "fmt, \
-                                 e_client_util_win_get(ec), ec, ##arg)
-
-#undef NEVER_GET_HERE
-#define NEVER_GET_HERE()     CRI("** need to improve more **")
-
-EINTERN Eina_Bool   e_video_debug_punch_value_get(void);
-EINTERN void        e_video_debug_punch_set(Eina_Bool set);
-EINTERN void        e_video_debug_screen_punch_set(int x, int y, int w, int h, int a, int r, int g, int b);
-EINTERN void        e_video_debug_screen_punch_unset(void);
-
-#endif
diff --git a/src/bin/log/e_error.c b/src/bin/log/e_error.c
new file mode 100644 (file)
index 0000000..d034d70
--- /dev/null
@@ -0,0 +1,14 @@
+#include "e_error_intern.h"
+
+/* local subsystem functions */
+
+/* local subsystem globals */
+
+/* externally accessible functions */
+EINTERN void
+e_error_message_show_internal(char *txt)
+{
+   ELOGF("E ERROR", "%s", NULL, txt);
+}
+
+/* local subsystem functions */
diff --git a/src/bin/log/e_error_intern.h b/src/bin/log/e_error_intern.h
new file mode 100644 (file)
index 0000000..d74618b
--- /dev/null
@@ -0,0 +1,16 @@
+#ifndef E_ERROR_INTERN_H
+#define E_ERROR_INTERN_H
+
+#include "e_intern.h"
+
+#define e_error_message_show(args...) do \
+{ \
+   char __tmpbuf[4096]; \
+ \
+   snprintf(__tmpbuf, sizeof(__tmpbuf), ##args); \
+   e_error_message_show_internal(__tmpbuf); \
+} while (0)
+
+EINTERN void e_error_message_show_internal(char *txt);
+
+#endif
diff --git a/src/bin/log/e_input_log.h b/src/bin/log/e_input_log.h
new file mode 100644 (file)
index 0000000..e7827ed
--- /dev/null
@@ -0,0 +1,30 @@
+#ifndef E_INPUT_PRIVIATES_H
+#define E_INPUT_PRIVIATES_H
+
+#ifdef DBG
+# undef DBG
+#endif
+
+#ifdef INF
+# undef INF
+#endif
+
+#ifdef ERR
+# undef ERR
+#endif
+
+extern int _e_input_log_dom;
+#define DBG(...)  EINA_LOG_DOM_DBG(_e_input_log_dom, __VA_ARGS__)
+#define INF(...)  EINA_LOG_DOM_INFO(_e_input_log_dom, __VA_ARGS__)
+#define ERR(...)  EINA_LOG_DOM_ERR(_e_input_log_dom, __VA_ARGS__)
+
+#define EIERR(msg, ARG...) ERR("[%s:%d] "msg, __FUNCTION__, __LINE__, ##ARG)
+#define EIINF(msg, ARG...) INF("[%s:%d] "msg, __FUNCTION__, __LINE__, ##ARG)
+#define EIDBG(msg, ARG...) DBG("[%s:%d] "msg, __FUNCTION__, __LINE__, ##ARG)
+
+#define DMERR(msg, ARG...) ERR("[%s:%d] "msg, __FUNCTION__, __LINE__, ##ARG)
+#define DMWRN(msg, ARG...) WRN("[%s:%d] "msg, __FUNCTION__, __LINE__, ##ARG)
+#define DMINF(msg, ARG...) INF("[%s:%d] "msg, __FUNCTION__, __LINE__, ##ARG)
+#define DMDBG(msg, ARG...) DBG("[%s:%d] "msg, __FUNCTION__, __LINE__, ##ARG)
+
+#endif
diff --git a/src/bin/log/e_log.c b/src/bin/log/e_log.c
new file mode 100644 (file)
index 0000000..4488090
--- /dev/null
@@ -0,0 +1,189 @@
+#include "e_log_intern.h"
+#include <Ecore_File.h>
+
+E_API int e_log_dom = -1;
+
+#ifdef HAVE_DLOG
+static Eina_Bool _dlog_enabled = EINA_FALSE;
+#endif
+
+static void
+_e_log_cb(const Eina_Log_Domain *d, Eina_Log_Level level, const char *file, const char *fnc EINA_UNUSED, int line, const char *fmt, void *data EINA_UNUSED, va_list args)
+{
+   const char *color;
+#ifdef HAVE_DLOG
+   if (_dlog_enabled)
+     {
+        int log_level;
+        const char buf[512];
+
+        switch (level)
+          {
+           case EINA_LOG_LEVEL_CRITICAL:
+              log_level = DLOG_ERROR;
+              break;
+           case EINA_LOG_LEVEL_ERR:
+              log_level = DLOG_ERROR;
+              break;
+           case EINA_LOG_LEVEL_WARN:
+              log_level = DLOG_WARN;
+              break;
+           case EINA_LOG_LEVEL_INFO:
+              log_level = DLOG_INFO;
+              break;
+           case EINA_LOG_LEVEL_DBG:
+              log_level = DLOG_DEBUG;
+              break;
+           default:
+              log_level = DLOG_VERBOSE;
+              break;
+          }
+
+        vsnprintf((char *)buf, sizeof(buf), fmt, args);
+
+        if (e_config)
+          {
+             if (e_config->log_type == E_LOG_TYPE_SYSTEM)
+               {
+                  print_system_log(log_level, LOG_TAG,
+                                   "<%s> %18.18s:%04d %s",
+                                   d->domain_str, ecore_file_file_get(file), line, buf);
+               }
+             else
+               {
+                  dlog_print(log_level, LOG_TAG,
+                             "<%s> %18.18s:%04d %s",
+                             d->domain_str, ecore_file_file_get(file), line, buf);
+               }
+          }
+        else
+          {
+             dlog_print(log_level, LOG_TAG,
+                        "<%s> %18.18s:%04d %s",
+                        d->domain_str, ecore_file_file_get(file), line, buf);
+          }
+        return;
+     }
+#endif
+   color = eina_log_level_color_get(level);
+
+   fprintf(stdout,
+           "%s<" EINA_COLOR_RESET "%s%s>" EINA_COLOR_RESET "%18.18s:%04d" EINA_COLOR_RESET " ",
+           color, d->domain_str, color, ecore_file_file_get(file), line);
+   vfprintf(stdout, fmt, args);
+   putc('\n', stdout);
+}
+
+#ifdef HAVE_DLOG
+static void
+_e_log_wayland_dlog(const char *format, va_list args)
+{
+   if (e_config)
+     {
+        if (e_config->log_type == E_LOG_TYPE_SYSTEM)
+          vprint_system_log(DLOG_INFO, LOG_TAG, format, args);
+        else
+          dlog_vprint(DLOG_INFO, LOG_TAG, format, args);
+     }
+   else
+     dlog_vprint(DLOG_INFO, LOG_TAG, format, args);
+}
+
+static void
+_e_log_wayland_stderr(const char *format, va_list args)
+{
+   vfprintf(stderr, format, args);
+}
+
+EINTERN void
+e_log_dlog_enable(Eina_Bool enable)
+{
+   if (_dlog_enabled == enable) return;
+
+   _dlog_enabled = enable;
+
+   if (_dlog_enabled)
+     wl_log_set_handler_server(_e_log_wayland_dlog);
+   else
+     wl_log_set_handler_server(_e_log_wayland_stderr);
+}
+#endif
+
+EINTERN Eina_Bool
+e_log_path_set(const char *path)
+{
+   int  log_fd = -1;
+   FILE *log_fl;
+
+   if (!path)
+     {
+        ERR("no eina-log-path");
+        return EINA_FALSE;
+     }
+
+   log_fl = fopen(path, "a");
+   if (!log_fl)
+     {
+        ERR("failed: open file(%s)\n", path);
+        return EINA_FALSE;
+     }
+
+   fflush(stdout);
+   close(STDOUT_FILENO);
+
+   fflush(stderr);
+   close(STDERR_FILENO);
+
+   setvbuf(log_fl, NULL, _IOLBF, 512);
+   log_fd = fileno(log_fl);
+
+   dup2(log_fd, STDOUT_FILENO);
+   dup2(log_fd, STDERR_FILENO);
+
+   fclose(log_fl);
+
+   return EINA_TRUE;
+}
+
+EINTERN int
+e_log_init(void)
+{
+   const char *s;
+
+   eina_log_threads_enable();
+
+   e_log_dom = eina_log_domain_register("e", EINA_COLOR_WHITE);
+   if (e_log_dom < 0)
+     {
+        fprintf(stderr, "Could not create logging domain 'e'\n");
+        return 0;
+     }
+
+   eina_log_print_cb_set(_e_log_cb, NULL);
+   eina_log_domain_level_set("e", 3);
+
+#ifdef HAVE_DLOG
+   if (getenv("E_LOG_DLOG_ENABLE"))
+     e_log_dlog_enable(EINA_TRUE);
+#endif
+
+   s = getenv("E_LOG_FILE_PATH");
+   if (s)
+     {
+#ifdef HAVE_DLOG
+        e_log_dlog_enable(EINA_FALSE);
+#endif
+        e_log_path_set(s);
+     }
+
+   return 1;
+}
+
+EINTERN int
+e_log_shutdown(void)
+{
+   eina_log_domain_unregister(e_log_dom);
+   e_log_dom = -1;
+   return 0;
+}
+
diff --git a/src/bin/log/e_log_intern.h b/src/bin/log/e_log_intern.h
new file mode 100644 (file)
index 0000000..4924ea7
--- /dev/null
@@ -0,0 +1,15 @@
+#ifndef E_LOG_INTERN_H
+#define E_LOG_INTERN_H
+
+#include "e_intern.h"
+#include "e_log.h"
+
+EINTERN int e_log_init(void);
+EINTERN int e_log_shutdown(void);
+
+#ifdef HAVE_DLOG
+EINTERN void e_log_dlog_enable(Eina_Bool enable);
+#endif
+EINTERN Eina_Bool e_log_path_set(const char *path);
+
+#endif
diff --git a/src/bin/log/e_video_debug.c b/src/bin/log/e_video_debug.c
new file mode 100644 (file)
index 0000000..c005a8e
--- /dev/null
@@ -0,0 +1,59 @@
+#include "e_video_debug_intern.h"
+
+static Eina_Bool video_to_primary = EINA_FALSE;
+static Eina_Bool video_punch = EINA_FALSE;
+static Evas_Object *punch_obj = NULL;
+
+E_API Eina_Bool
+e_video_debug_display_primary_plane_value_get(void)
+{
+   return video_to_primary;
+}
+
+E_API void
+e_video_debug_display_primary_plane_set(Eina_Bool set)
+{
+   video_to_primary = set;
+}
+
+EINTERN Eina_Bool
+e_video_debug_punch_value_get(void)
+{
+   return video_punch;
+}
+
+EINTERN void
+e_video_debug_punch_set(Eina_Bool set)
+{
+   video_punch = set;
+}
+
+EINTERN void
+e_video_debug_screen_punch_set(int x, int y, int w, int h, int a, int r, int g, int b)
+{
+   if (!punch_obj)
+     {
+        punch_obj = evas_object_rectangle_add(e_comp->evas);
+        evas_object_layer_set(punch_obj, EVAS_LAYER_MAX);
+        evas_object_render_op_set(punch_obj, EVAS_RENDER_COPY);
+     }
+
+   evas_object_color_set(punch_obj, r, g, b, a);
+
+   if (w == 0 || h == 0)
+     evas_output_size_get(e_comp->evas, &w, &h);
+
+   evas_object_move(punch_obj, x, y);
+   evas_object_resize(punch_obj, w, h);
+   evas_object_show(punch_obj);
+}
+
+EINTERN void
+e_video_debug_screen_punch_unset(void)
+{
+   if (!punch_obj)
+     return;
+
+   evas_object_del(punch_obj);
+   punch_obj = NULL;
+}
diff --git a/src/bin/log/e_video_debug_intern.h b/src/bin/log/e_video_debug_intern.h
new file mode 100644 (file)
index 0000000..8a01d4d
--- /dev/null
@@ -0,0 +1,37 @@
+#ifndef E_VIDEO_DEBUG_INTERN_H
+#define E_VIDEO_DEBUG_INTERN_H
+
+#include "e_intern.h"
+#include "e_video_debug.h"
+
+#ifdef VER
+#undef VER
+#endif
+
+#ifdef VWR
+#undef VWR
+#endif
+
+#ifdef VIN
+#undef VIN
+#endif
+
+#ifdef VDB
+#undef VDB
+#endif
+
+#define VER(fmt, ec, arg...)   ELOGF("VIDEO <ERR>", fmt, ec, ##arg)
+#define VWR(fmt, ec, arg...)   ELOGF("VIDEO <WRN>", fmt, ec, ##arg)
+#define VIN(fmt, ec, arg...)   ELOGF("VIDEO <INF>", fmt, ec, ##arg)
+#define VDB(fmt, ec, arg...)   DBG("window(0x%08"PRIxPTR") ec(%p): "fmt, \
+                                 e_client_util_win_get(ec), ec, ##arg)
+
+#undef NEVER_GET_HERE
+#define NEVER_GET_HERE()     CRI("** need to improve more **")
+
+EINTERN Eina_Bool   e_video_debug_punch_value_get(void);
+EINTERN void        e_video_debug_punch_set(Eina_Bool set);
+EINTERN void        e_video_debug_screen_punch_set(int x, int y, int w, int h, int a, int r, int g, int b);
+EINTERN void        e_video_debug_screen_punch_unset(void);
+
+#endif
index eaf5d0f4c0f20d8cfa90ca252f094ea30e46fa15..baa340c6ae0f48da46d5aeaefb242b6ce9b6e686 100644 (file)
@@ -4,11 +4,13 @@ MOD_CPPFLAGS = -I. -DE_LOGGING=2 \
 -I$(top_srcdir) \
 -I$(top_srcdir)/src/bin \
 -I$(top_srcdir)/src/bin/debug \
+-I$(top_srcdir)/src/bin/log \
 -I$(top_srcdir)/src/bin/compmgr \
 -I$(top_srcdir)/src/bin/core \
 -I$(top_srcdir)/src/include \
 -I$(top_builddir)/src/bin \
 -I$(top_builddir)/src/bin/debug \
+-I$(top_builddir)/src/bin/log \
 -I$(top_builddir)/src/bin/compmgr \
 -I$(top_builddir)/src/bin/core \
 -I$(top_builddir)/src/include \