Add new API for creating a snapshot window
authorSung-jae Park <nicesj.park@samsung.com>
Thu, 2 Oct 2014 04:44:31 +0000 (13:44 +0900)
committerSung-jae Park <nicesj.park@samsung.com>
Thu, 2 Oct 2014 04:44:31 +0000 (13:44 +0900)
[model] Redwood,Kiran,B3(Wearable)
[binary_type] AP
[customer] Docomo/Orange/ATT/Open
[issue#] N/A
[problem]
[cause]
[solution]
[team] HomeTF
[request]
[horizontal_expansion]

Change-Id: Ie9750ed5f18aeaa005e1f365fe305dc0de5d62ed

CMakeLists.txt
include/dynamicbox.h
src/dynamicbox.c
src/snapshot_window.c

index 565fdc9..127c155 100644 (file)
@@ -64,6 +64,7 @@ SET (BUILD_SOURCE
        src/dlist.c
        src/util.c
        src/dynamicbox.c
+       src/snapshot_window.c
 )
 
 ADD_LIBRARY(${PROJECT_NAME} SHARED ${BUILD_SOURCE})
index 6b7f3b8..7287e53 100644 (file)
@@ -144,6 +144,13 @@ extern "C" {
 typedef struct dynamicbox_desc *dynamicbox_desc_h;
 
 /**
+ * @internal
+ * @brief Flush Callback for snapshot window
+ * @since_tizen 2.3
+ */
+typedef void (*dynamicbox_flush_cb)(Evas_Object *snapshot_window, const char *id, int status, void *data);
+
+/**
  * @brief Updates a description file.
  * @since_tizen 2.3
  * @remarks Must be used only by Inhouse Dynamic Box.
@@ -717,6 +724,43 @@ extern int dynamicbox_freeze_scroller(const char *dboxid, const char *id);
 extern int dynamicbox_thaw_scroller(const char *dboxid, const char *id);
 
 /**
+ * @internal
+ * @brief Create a snapshot window
+ * @details
+ *         If you want create a snapshot image of contents, create this snapshot window
+ *         But it will not renders object asynchronously,
+ *         So you have to render the objects immediately, the delayed rendering object will not be on the canvas
+ *         After flush it to a file.
+ * @since_tizen 2.3
+ * @param[in] id
+ * @param[in] size_type
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/core/dynamicbox.provider
+ * @return Evas_Object window
+ * @retval #NULL failed to create a snapshot window
+ * @retval elm_win window object
+ * @see dynamicbox_snapshot_window_flush()
+ */
+extern void *dynamicbox_snapshot_window_add(const char *id, int size_type);
+
+/**
+ * @internal
+ * @brief Flush to a file for snapshot window
+ * @details N/A
+ * @since_tizen 2.3
+ * @param[in] snapshot_win Snapshot window
+ * @param[in] timeout After this, the image file will be created
+ * @param[in] flush_cb Right after flush an image file, this callback will be called
+ * @param[in] data Callback data for flush_cb
+ * @return int status
+ * @retval #DBOX_STATUS_ERROR_NONE Successfully flushed (flush timer added)
+ * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid paramter
+ * @retval #DBOX_STATUS_ERROR_FAULT Failed to create a flush timer
+ * @see dynamicbox_snapshot_window_add()
+ */
+extern int dynamicbox_snapshot_window_flush(void *snapshot_win, double timeout, dynamicbox_flush_cb flush_cb, void *data);
+
+/**
  * @}
  */
 
index 258b25d..c0390ed 100644 (file)
@@ -28,6 +28,7 @@
 #include <dynamicbox_service.h>
 #include <dynamicbox_provider.h>
 #include <dynamicbox_provider_buffer.h>
+#include <Evas.h>
 
 #include "debug.h"
 #include "dlist.h"
index 9bb82f1..3b7ad24 100644 (file)
@@ -1,3 +1,4 @@
+#include <Elementary.h>
 #include <Ecore_Evas.h>
 #include <Evas.h>
 #include <Ecore.h>
 #define QUALITY_N_COMPRESS "quality=100 compress=1"
 #define PUBLIC __attribute__((visibility("default")))
 
+
+
 struct snapshot_info {
        char *id;
-       void (*flush_cb)(Evas_Object *snapshot_window, const char *id, int status, void *data);
+       dynamicbox_flush_cb flush_cb;
        void *data;
 
        Ecore_Timer *flush_timer;
@@ -37,7 +40,7 @@ static inline Evas *create_virtual_canvas(int w, int h)
         // Create virtual canvas
         internal_ee = ecore_evas_buffer_new(w, h);
         if (!internal_ee) {
-                LOGD("Failed to create a new canvas buffer\n");
+                DbgPrint("Failed to create a new canvas buffer\n");
                 return NULL;
         }
 
@@ -48,7 +51,7 @@ static inline Evas *create_virtual_canvas(int w, int h)
         internal_e = ecore_evas_get(internal_ee);
         if (!internal_e) {
                 ecore_evas_free(internal_ee);
-                LOGD("Faield to get Evas object\n");
+                DbgPrint("Faield to get Evas object\n");
                 return NULL;
         }
 
@@ -63,8 +66,8 @@ static inline int flush_data_to_file(Evas *e, char *data, const char *filename,
 
         output = evas_object_image_add(e);
         if (!output) {
-               LOGD("Failed to create an image object\n");
-                return LB_STATUS_ERROR_FAULT;
+               DbgPrint("Failed to create an image object\n");
+                return DBOX_STATUS_ERROR_FAULT;
         }
 
         evas_object_image_data_set(output, NULL);
@@ -78,19 +81,19 @@ static inline int flush_data_to_file(Evas *e, char *data, const char *filename,
 
         if (evas_object_image_save(output, filename, NULL, QUALITY_N_COMPRESS) == EINA_FALSE) {
                 evas_object_del(output);
-               SECURE_LOGD("Faield to save a captured image (%s)\n", filename);
-                return LB_STATUS_ERROR_IO;
+               DbgPrint("Faield to save a captured image (%s)\n", filename);
+                return DBOX_STATUS_ERROR_IO_ERROR;
         }
 
        evas_object_del(output);
 
         if (access(filename, F_OK) != 0) {
-               SECURE_LOGD("File %s is not found\n", filename);
-                return LB_STATUS_ERROR_IO;
+               DbgPrint("File %s is not found\n", filename);
+                return DBOX_STATUS_ERROR_IO_ERROR;
         }
 
-       SECURE_LOGD("Flush data to a file (%s)\n", filename);
-       return LB_STATUS_SUCCESS;
+       DbgPrint("Flush data to a file (%s)\n", filename);
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 
@@ -101,12 +104,12 @@ static inline int destroy_virtual_canvas(Evas *e)
 
         ee = ecore_evas_ecore_evas_get(e);
         if (!ee) {
-               LOGD("Failed to ecore evas object\n");
-                return LB_STATUS_ERROR_FAULT;
+               DbgPrint("Failed to ecore evas object\n");
+                return DBOX_STATUS_ERROR_FAULT;
         }
 
         ecore_evas_free(ee);
-        return LB_STATUS_SUCCESS;
+        return DBOX_STATUS_ERROR_NONE;
 }
 
 
@@ -119,15 +122,15 @@ static inline int flush_to_file(void *canvas, const char *filename, int w, int h
 
        shot_e = create_virtual_canvas(w, h);
        if (!shot_e) {
-               LOGE("Unable to create a new virtual window\n");
-               return LB_STATUS_ERROR_FAULT;
+               ErrPrint("Unable to create a new virtual window\n");
+               return DBOX_STATUS_ERROR_FAULT;
        }
 
        shot_ee = ecore_evas_ecore_evas_get(shot_e);
        if (!shot_ee) {
-               LOGE("Unable to get Ecore_Evas\n");
+               ErrPrint("Unable to get Ecore_Evas\n");
                destroy_virtual_canvas(shot_e);
-               return LB_STATUS_ERROR_FAULT;
+               return DBOX_STATUS_ERROR_FAULT;
        }
 
        ecore_evas_manual_render_set(shot_ee, EINA_TRUE);
@@ -140,106 +143,129 @@ static inline int flush_to_file(void *canvas, const char *filename, int w, int h
 
 
 
-static void del_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
+static Eina_Bool snapshot_cb(void *data)
 {
+       Evas_Object *snapshot_win = data;
        struct snapshot_info *info;
-
-       info = evas_object_data_del(obj, "snapshot,info");
-       if (!info) {
-               return;
-       }
-
-       SECURE_LOGD("Delete object (%s)\n", info->id);
-
-       if (info->flush_cb) {
-               info->flush_cb(obj, info->id, LB_STATUS_ERROR_CANCEL, info->data);
-               LOGD("Flush is canceled\n");
-       }
-
-       /*!
-        * \note
-        * Render callback will be deleted.
-        */
-       destroy_virtual_canvas(e);
-       free(info->id);
-       free(info);
-}
-
-
-
-static Eina_Bool direct_snapshot_cb(void *data)
-{
        Evas *e;
        Ecore_Evas *ee;
        void *canvas;
-       int status;
-       int w;
-       int h;
-       void (*flush_cb)(Evas_Object *snapshot_window, const char *id, int status, void *data);
-       Evas_Object *snapshot_win = data;
-       struct snapshot_info *info;
+       dynamicbox_flush_cb flush_cb;
+       int status = DBOX_STATUS_ERROR_NONE;
 
        info = evas_object_data_get(snapshot_win, "snapshot,info");
        if (!info) {
-               LOGE("Unable to get snapshot info\n");
+               ErrPrint("Invalid object\n");
                return ECORE_CALLBACK_CANCEL;
        }
 
-       info->flush_timer = NULL;
+       if (info->flush_timer) {
+               info->flush_timer = NULL;
+       } else {
+               status = DBOX_STATUS_ERROR_CANCEL;
+       }
+
        flush_cb = info->flush_cb;
        info->flush_cb = NULL; /* To prevent call this from the delete callback */
 
        e = evas_object_evas_get(snapshot_win);
        if (!e) {
-               LOGE("Invalid object, failed to get Evas\n");
+               ErrPrint("Invalid object\n");
                if (flush_cb) {
-                       flush_cb(snapshot_win, info->id, LB_STATUS_ERROR_FAULT, info->data);
+                       flush_cb(snapshot_win, info->id, DBOX_STATUS_ERROR_FAULT, info->data);
                }
                return ECORE_CALLBACK_CANCEL;
        }
 
        ee = ecore_evas_ecore_evas_get(e);
        if (!ee) {
-               LOGE("Unable to get Ecore_Evas object\n");
+               ErrPrint("Invalid object (ee)\n");
                if (flush_cb) {
-                       flush_cb(snapshot_win, info->id, LB_STATUS_ERROR_FAULT, info->data);
+                       flush_cb(snapshot_win, info->id, DBOX_STATUS_ERROR_FAULT, info->data);
                }
                return ECORE_CALLBACK_CANCEL;
        }
 
-       ecore_evas_geometry_get(ee, NULL, NULL, &w, &h);
-       ecore_evas_manual_render_set(ee, EINA_TRUE);
-
-       canvas = ecore_evas_buffer_pixels_get(ee);
+       canvas = (void*)ecore_evas_buffer_pixels_get(ee);
        if (!canvas) {
-               LOGE("Failed to get canvas\n");
+               DbgPrint("Failed to get pixel canvas\n");
                if (flush_cb) {
-                       flush_cb(snapshot_win, info->id, LB_STATUS_ERROR_FAULT, info->data);
+                       flush_cb(snapshot_win, info->id, DBOX_STATUS_ERROR_FAULT, info->data);
                }
                return ECORE_CALLBACK_CANCEL;
        }
 
-       status = flush_to_file(canvas, info->id, w, h);
        if (flush_cb) {
+               int w;
+               int h;
+               int ret;
+
+               ecore_evas_geometry_get(ee, NULL, NULL, &w, &h);
+
+               DbgPrint("Flush size: %dx%d\n", w, h);
+               ret = flush_to_file(canvas, info->id, w, h);
+               if (status == DBOX_STATUS_ERROR_NONE) {
+                       status = ret;
+               }
+
                flush_cb(snapshot_win, info->id, status, info->data);
+               /**
+                * Do not access info after this.
+                */
        }
+
        return ECORE_CALLBACK_CANCEL;
 }
 
 
 
-static Eina_Bool snapshot_cb(void *data)
+static void del_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
 {
-       Evas_Object *snapshot_win = data;
        struct snapshot_info *info;
+
+       info = evas_object_data_del(obj, "snapshot,info");
+       if (!info) {
+               return;
+       }
+
+       DbgPrint("Delete object (%s)\n", info->id);
+
+       evas_event_callback_del(e, EVAS_CALLBACK_RENDER_POST, post_render_cb);
+       evas_event_callback_del(e, EVAS_CALLBACK_RENDER_PRE, pre_render_cb);
+
+       if (info->flush_timer) {
+               ecore_timer_del(info->flush_timer);
+               info->flush_timer = NULL;
+
+               (void)snapshot_cb(obj);
+               DbgPrint("Flush is canceled\n");
+       }
+
+       /**
+        * @note
+        * Render callback will be deleted.
+        */
+       free(info->id);
+       free(info);
+}
+
+
+
+static Eina_Bool direct_snapshot_cb(void *data)
+{
        Evas *e;
        Ecore_Evas *ee;
        void *canvas;
-       void (*flush_cb)(Evas_Object *snapshot_window, const char *id, int status, void *data);
+       int status;
+       int w;
+       int h;
+       dynamicbox_flush_cb flush_cb;
+       Evas_Object *snapshot_win = data;
+       struct snapshot_info *info;
 
        info = evas_object_data_get(snapshot_win, "snapshot,info");
        if (!info) {
-               LOGE("Invalid object\n");
+               ErrPrint("Unable to get snapshot info\n");
                return ECORE_CALLBACK_CANCEL;
        }
 
@@ -249,47 +275,38 @@ static Eina_Bool snapshot_cb(void *data)
 
        e = evas_object_evas_get(snapshot_win);
        if (!e) {
-               LOGE("Invalid object\n");
+               ErrPrint("Invalid object, failed to get Evas\n");
                if (flush_cb) {
-                       flush_cb(snapshot_win, info->id, LB_STATUS_ERROR_FAULT, info->data);
+                       flush_cb(snapshot_win, info->id, DBOX_STATUS_ERROR_FAULT, info->data);
                }
                return ECORE_CALLBACK_CANCEL;
        }
 
        ee = ecore_evas_ecore_evas_get(e);
        if (!ee) {
-               LOGE("Invalid object (ee)\n");
+               ErrPrint("Unable to get Ecore_Evas object\n");
                if (flush_cb) {
-                       flush_cb(snapshot_win, info->id, LB_STATUS_ERROR_FAULT, info->data);
+                       flush_cb(snapshot_win, info->id, DBOX_STATUS_ERROR_FAULT, info->data);
                }
                return ECORE_CALLBACK_CANCEL;
        }
 
-       canvas = (void*)ecore_evas_buffer_pixels_get(ee);
+       ecore_evas_geometry_get(ee, NULL, NULL, &w, &h);
+       ecore_evas_manual_render_set(ee, EINA_TRUE);
+
+       canvas = ecore_evas_buffer_pixels_get(ee);
        if (!canvas) {
-               LOGD("Failed to get pixel canvas\n");
+               ErrPrint("Failed to get canvas\n");
                if (flush_cb) {
-                       flush_cb(snapshot_win, info->id, LB_STATUS_ERROR_FAULT, info->data);
+                       flush_cb(snapshot_win, info->id, DBOX_STATUS_ERROR_FAULT, info->data);
                }
                return ECORE_CALLBACK_CANCEL;
        }
 
+       status = flush_to_file(canvas, info->id, w, h);
        if (flush_cb) {
-               int w;
-               int h;
-               int status;
-
-               ecore_evas_geometry_get(ee, NULL, NULL, &w, &h);
-
-               SECURE_LOGD("Flush size: %dx%d\n", w, h);
-               status = flush_to_file(canvas, info->id, w, h);
-
                flush_cb(snapshot_win, info->id, status, info->data);
-               /*!
-                * Do not access info after this.
-                */
        }
-
        return ECORE_CALLBACK_CANCEL;
 }
 
@@ -302,23 +319,24 @@ static void post_render_cb(void *data, Evas *e, void *event_info)
 
        info = evas_object_data_get(snapshot_win, "snapshot,info");
        if (!info) {
-               LOGE("snapshot info is not valid\n");
+               ErrPrint("snapshot info is not valid\n");
                return;
        }
 
        info->render_cnt++;
 
        if (info->flush_timer) {
-               /*!
+               /**
+                * @note
                 * This has not to be happens.
                 */
-               LOGE("Flush timer is not cleared\n");
+               ErrPrint("Flush timer is not cleared\n");
                ecore_timer_del(info->flush_timer);
                info->flush_timer = NULL;
        }
 
        if (!info->flush_cb) {
-               LOGD("Flush request is not initiated yet\n");
+               DbgPrint("Flush request is not initiated yet\n");
                return;
        }
 
@@ -329,16 +347,18 @@ static void post_render_cb(void *data, Evas *e, void *event_info)
         * Or we can met unexpected problems.
         * To avoid it, use the 0.0001f to get timer callback ASAP, not in this function.
         */
-       LOGD("Fire the flush timer %lf (%d)\n", info->timeout, info->render_cnt);
+       DbgPrint("Fire the flush timer %lf (%d)\n", info->timeout, info->render_cnt);
        info->flush_timer = ecore_timer_add(info->timeout, snapshot_cb, snapshot_win);
        if (!info->flush_timer) {
-               void (*flush_cb)(Evas_Object *snapshot_window, const char *id, int status, void *data);
+               dynamicbox_flush_cb flush_cb;
 
-               LOGE("Unalbe to add timer for getting the snapshot\n");
+               ErrPrint("Unalbe to add timer for getting the snapshot\n");
                flush_cb = info->flush_cb;
                info->flush_cb = NULL;
 
-               flush_cb(snapshot_win, info->id, LB_STATUS_ERROR_FAULT, info->data);
+               if (flush_cb) {
+                       flush_cb(snapshot_win, info->id, DBOX_STATUS_ERROR_FAULT, info->data);
+               }
                /*!
                 * \note
                 * Do not access info after from here.
@@ -355,73 +375,44 @@ static void pre_render_cb(void *data, Evas *e, void *event_info)
 
        info = evas_object_data_get(snapshot_win, "snapshot,info");
        if (!info) {
-               LOGE("snapshot info is not valid\n");
+               ErrPrint("snapshot info is not valid\n");
                return;
        }
 
        if (info->flush_timer) {
                ecore_timer_del(info->flush_timer);
                info->flush_timer = NULL;
-               LOGD("Clear the flush timer\n");
+               DbgPrint("Clear the flush timer\n");
        }
 
-       LOGD("Pre-render callback\n");
+       DbgPrint("Pre-render callback\n");
 }
 
 
 
-static void resize_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
-{
-       Ecore_Evas *ee;
-       int w;
-       int h;
-       int ow;
-       int oh;
-
-       ee = ecore_evas_ecore_evas_get(e);
-       if (!ee) {
-               return;
-       }
-
-       ecore_evas_geometry_get(ee, NULL, NULL, &w, &h);
-       evas_object_geometry_get(obj, NULL, NULL, &ow, &oh);
-       if (ow == w && oh == h) {
-               SECURE_LOGD("Size is not changed: %dx%d\n", w, h);
-               return;
-       }
-
-       /*!
-        * Box(parent object) is resized.
-        * Try to resize the canvas too.
-        */
-       ecore_evas_resize(ee, w, h);
-       SECURE_LOGD("Canvas is resized to %dx%d\n", w, h);
-}
-
-
-
-PUBLIC Evas_Object *livebox_snapshot_window_add(const char *id, int size_type)
+PUBLIC void *dynamicbox_snapshot_window_add(const char *id, int size_type)
 {
        struct snapshot_info *info;
        Evas_Object *snapshot_win;
+       Evas_Object *parent;
        Evas *e;
        int w;
        int h;
 
-       if (livebox_service_get_size(size_type, &w, &h) != LB_STATUS_SUCCESS) {
-               LOGE("Invalid size\n");
+       if (dynamicbox_service_get_size(size_type, &w, &h) != DBOX_STATUS_ERROR_NONE) {
+               ErrPrint("Invalid size\n");
                return NULL;
        }
 
        info = malloc(sizeof(*info));
        if (!info) {
-               LOGE("Heap: %s\n", strerror(errno));
+               ErrPrint("Heap: %s\n", strerror(errno));
                return NULL;
        }
 
        info->id = strdup(id);
        if (!info->id) {
-               LOGE("Heap: %s\n", strerror(errno));
+               ErrPrint("Heap: %s\n", strerror(errno));
                free(info);
                return NULL;
        }
@@ -438,7 +429,16 @@ PUBLIC Evas_Object *livebox_snapshot_window_add(const char *id, int size_type)
                return NULL;
        }
 
-       snapshot_win = evas_object_rectangle_add(e);
+       parent = evas_object_rectangle_add(e);
+       if (!parent) {
+               destroy_virtual_canvas(e);
+               free(info->id);
+               free(info);
+               return NULL;
+       }
+
+       snapshot_win = elm_win_add(parent, "DBox,Snapshot", ELM_WIN_DYNAMIC_BOX);
+       evas_object_del(parent);
        if (!snapshot_win) {
                destroy_virtual_canvas(e);
                free(info->id);
@@ -446,9 +446,8 @@ PUBLIC Evas_Object *livebox_snapshot_window_add(const char *id, int size_type)
                return NULL;
        }
 
-       SECURE_LOGD("Add new window %dx%d\n", w, h);
+       DbgPrint("Create a new window %dx%d for %s\n", w, h, id);
        evas_object_event_callback_add(snapshot_win, EVAS_CALLBACK_DEL, del_cb, NULL);
-       evas_object_event_callback_add(snapshot_win, EVAS_CALLBACK_RESIZE, resize_cb, NULL);
        evas_object_resize(snapshot_win, w, h);
        evas_object_show(snapshot_win);
 
@@ -462,19 +461,19 @@ PUBLIC Evas_Object *livebox_snapshot_window_add(const char *id, int size_type)
 
 
 
-PUBLIC int livebox_snapshot_window_flush(Evas_Object *snapshot_win, double timeout, void (*flush_cb)(Evas_Object *snapshot_window, const char *id, int status, void *data), void *data)
+PUBLIC int dynamicbox_snapshot_window_flush(void *snapshot_win, double timeout, dynamicbox_flush_cb flush_cb, void *data)
 {
        struct snapshot_info *info;
 
        if (!flush_cb || timeout < 0.0f) {
-               LOGE("Invalid argument (%p, %lf)\n", flush_cb, timeout);
-               return LB_STATUS_ERROR_INVALID;
+               ErrPrint("Invalid argument (%p, %lf)\n", flush_cb, timeout);
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        info = evas_object_data_get(snapshot_win, "snapshot,info");
        if (!info) {
-               LOGE("Invalid argument\n");
-               return LB_STATUS_ERROR_INVALID;
+               ErrPrint("Invalid argument\n");
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        info->timeout = timeout;
@@ -487,7 +486,7 @@ PUBLIC int livebox_snapshot_window_flush(Evas_Object *snapshot_win, double timeo
                 */
                info->flush_timer = ecore_timer_add(0.0001f, direct_snapshot_cb, snapshot_win);
                if (!info->flush_timer) {
-                       return LB_STATUS_ERROR_FAULT;
+                       return DBOX_STATUS_ERROR_FAULT;
                }
        } else if (info->render_cnt) {
                /*!
@@ -497,33 +496,16 @@ PUBLIC int livebox_snapshot_window_flush(Evas_Object *snapshot_win, double timeo
                DbgPrint("Rendered %d times already\n", info->render_cnt);
                info->flush_timer = ecore_timer_add(info->timeout, snapshot_cb, snapshot_win);
                if (!info->flush_timer) {
-                       return LB_STATUS_ERROR_FAULT;
+                       return DBOX_STATUS_ERROR_FAULT;
                }
        }
 
        info->flush_cb = flush_cb;
        info->data = data;
 
-       return LB_STATUS_SUCCESS;
-}
-
-
-
-PUBLIC int livebox_snapshot_window_del(Evas_Object *snapshot_win)
-{
-       Evas *e;
-       if (!snapshot_win || !evas_object_data_get(snapshot_win, "snapshot,info")) {
-               return LB_STATUS_ERROR_INVALID;
-       }
-
-       e = evas_object_evas_get(snapshot_win);
-       evas_event_callback_del(e, EVAS_CALLBACK_RENDER_POST, post_render_cb);
-       evas_event_callback_del(e, EVAS_CALLBACK_RENDER_PRE, pre_render_cb);
-
-       evas_object_del(snapshot_win);
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 
 
-// End of a file
+/* End of a file */