evas : noti callback 03/169503/3
authorJoogab Yun <joogab.yun@samsung.com>
Wed, 7 Feb 2018 06:29:57 +0000 (15:29 +0900)
committerGerrit Code Review <gerrit@review.ap-northeast-2.compute.internal>
Wed, 7 Feb 2018 07:07:03 +0000 (07:07 +0000)
    E20 need to a noti callback for this object.
    so we register the callback temporarily

    This patch can be removed or modified later.

tizen_only

Change-Id: I77ea1270b12ec318956fc5e7cc2ee3eb32fdf029

src/lib/evas/Evas_Legacy.h
src/lib/evas/canvas/evas_image_legacy.c
src/lib/evas/canvas/evas_image_private.h
src/lib/evas/canvas/evas_object_image.c

index 6714b09..42bc071 100755 (executable)
@@ -5727,7 +5727,6 @@ EAPI Eina_Bool evas_object_image_pixels_dirty_get(const Evas_Object *obj);
  */
 EAPI void evas_object_image_pixels_get_callback_set(Evas_Object *obj, Evas_Object_Image_Pixels_Get_Cb func, void *data) EINA_ARG_NONNULL(2);
 
-
 /**
  * @typedef Evas_Video_Surface
  *
@@ -8044,6 +8043,27 @@ EAPI Eina_Bool                                evas_textblock_cursor_cluster_prev
  * END *
  *******/
 
+/************************************************************************
+ * TIZEN_ONLY(20150127): Add evas_image_pixels_noti_callback_set* APIs. *
+ ************************************************************************/
+/**
+ * @internal
+ *
+ * TIZEN_ONLY : noti callback
+ * E20 need to a noti callback for this object.
+ *
+ * so we register the callback temporarily
+ * This api can be removed or modified later.
+ *
+ * @param[in] func The callback function.
+ * @param[in] data The data pointer to be passed to @c func.
+ */
+EAPI void evas_image_pixels_noti_callback_set(Evas_Object *obj, Evas_Object_Image_Pixels_Get_Cb func, void *data);
+/*******
+ * END *
+ *******/
+
+
 #ifdef EFL_BETA_API_SUPPORT
 /**
  * Creates a new smart rectangle object on the given Evas @p e canvas.
index 356a23a..68053d2 100755 (executable)
@@ -540,6 +540,28 @@ evas_object_image_pixels_get_callback_set(Eo *eo_obj, Evas_Object_Image_Pixels_G
    EINA_COW_PIXEL_WRITE_END(o, pixi_write);
 }
 
+// TIZEN_ONLY : noti callback
+/* E20 need to a noti callback for this object.
+ * so we register the callback temporarily
+ * This patch can be removed or modified later.
+ */
+EAPI void
+evas_image_pixels_noti_callback_set(Eo *eo_obj, Evas_Object_Image_Pixels_Get_Cb func, void *data)
+{
+  EVAS_IMAGE_API(eo_obj);
+
+   Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS);
+   Evas_Image_Data *o = efl_data_scope_get(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
+
+   evas_object_async_block(obj);
+   EINA_COW_PIXEL_WRITE_BEGIN(o, pixi_write)
+     {
+        pixi_write->func.noti_pixels = func;
+        pixi_write->func.noti_pixels_data = data;
+     }
+   EINA_COW_PIXEL_WRITE_END(o, pixi_write);
+}
+
 EAPI void
 evas_object_image_pixels_dirty_set(Eo *eo_obj, Eina_Bool dirty)
 {
index da4cc0b..bacb7ec 100755 (executable)
@@ -60,6 +60,9 @@ struct _Evas_Object_Image_Pixels
       /* FIXME: no good match for eo */
       Evas_Object_Image_Pixels_Get_Cb  get_pixels;
       void                            *get_pixels_data;
+      /* TIZEN_ONLY : noti callback */
+      Evas_Object_Image_Pixels_Get_Cb  noti_pixels;
+      void                            *noti_pixels_data;
    } func;
    Eina_Hash       *images_to_free; /* pixel void* -> Evas_Image_Legacy_Pixels_Entry */
 
index e9021c0..d87af3c 100755 (executable)
@@ -1540,6 +1540,13 @@ evas_process_dirty_pixels(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj,
 {
    Eina_Bool direct_override = EINA_FALSE, direct_force_off = EINA_FALSE;
 
+   // TIZEN_ONLY : noti callback : notify the object when the engine_data exists
+   if (o->pixels->func.noti_pixels)
+     {
+       if (o->engine_data)
+         o->pixels->func.noti_pixels(o->pixels->func.noti_pixels_data, eo_obj);
+     }
+
    if (o->dirty_pixels)
      {
         if (o->pixels->func.get_pixels)