#include <widget_service_internal.h>
#include <widget_conf.h>
#include <widget_buffer.h>
+#include <widget_provider.h>
#include "widget.h"
#include "widget_internal.h"
}
}
+static void pre_destroy_cb(widget_pre_callback_e type, const char *pkgname, const char *id, void *data)
+{
+ vwin_info_t info = data;
+ if (strcmp(info->id, id)) {
+ /* Skip */
+ DbgPrint("SKIP: Pre destroy event callback is called [%s]\n", id);
+ return;
+ }
+ DbgPrint("Pre destroy event callback is called [%s]\n", id);
+
+ if (info->ee) {
+ DbgPrint("Toggle manual render mode to prevent from unwanted rendering");
+ ecore_evas_manual_render_set(info->ee, EINA_TRUE);
+ }
+}
+
static void ecore_evas_free_cb(Ecore_Evas *ee)
{
vwin_info_t info;
return;
}
+ widget_provider_del_pre_callback(WIDGET_PRE_DESTROY_CALLBACK, pre_destroy_cb, info);
+
if (info->e) {
evas_event_callback_del(info->e, EVAS_CALLBACK_RENDER_POST, post_render_cb);
evas_event_callback_del(info->e, EVAS_CALLBACK_RENDER_PRE, pre_render_cb);
Evas_Object *rect;
const char *engine;
+ /**
+ * @TODO
+ * If the evas object is already created,
+ * this function should returns ERROR.
+ */
+
if (!s_info.alloc_canvas && !s_info.alloc_canvas_with_stride && !s_info.alloc_canvas_with_pixmap) {
s_info.alloc_canvas_with_pixmap = dlsym(RTLD_DEFAULT, "ecore_evas_gl_x11_pixmap_allocfunc_new");
if (!s_info.alloc_canvas_with_pixmap) {
evas_event_callback_add(info->e, EVAS_CALLBACK_RENDER_POST, post_render_cb, info);
evas_event_callback_add(info->e, EVAS_CALLBACK_RENDER_PRE, pre_render_cb, info);
+ widget_provider_add_pre_callback(WIDGET_PRE_DESTROY_CALLBACK, pre_destroy_cb, info);
+
return info->e;
}