evas: remove Evas_Canvas.object_top_in_rectangle_get
authorMike Blumenkrantz <zmike@osg.samsung.com>
Thu, 15 Feb 2018 02:14:52 +0000 (21:14 -0500)
committerWonki Kim <wonki_.kim@samsung.com>
Thu, 5 Apr 2018 18:05:30 +0000 (03:05 +0900)
also implement Efl_Canvas method

src/lib/evas/Evas_Legacy.h
src/lib/evas/canvas/evas_canvas.eo
src/lib/evas/canvas/evas_main.c

index aff6d7a..8fdf23d 100755 (executable)
@@ -2398,6 +2398,36 @@ EAPI Evas *evas_object_evas_get(const Eo *obj);
 EAPI Eina_List *evas_objects_in_rectangle_get(const Eo *obj, int x, int y, int w, int h, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects) EINA_WARN_UNUSED_RESULT;
 
 /**
+ * @brief Retrieve the Evas object stacked at the top of a given rectangular
+ * region in a canvas
+ *
+ * This function will traverse all the layers of the given canvas, from top to
+ * bottom, querying for objects with areas overlapping with the given
+ * rectangular region inside @c e. The user can remove from the query objects
+ * which are hidden and/or which are set to pass events.
+ *
+ * @warning This function will skip objects parented by smart objects, acting
+ * only on the ones at the "top level", with regard to object parenting.
+ *
+ * @param[in] obj The object.
+ * @param[in] x The top left corner's horizontal coordinate for the rectangular
+ * region.
+ * @param[in] y The top left corner's vertical coordinate for the rectangular
+ * region.
+ * @param[in] w The width of the rectangular region.
+ * @param[in] h The height of the rectangular region.
+ * @param[in] include_pass_events_objects Boolean flag to include or not
+ * objects which pass events in this calculation.
+ * @param[in] include_hidden_objects Boolean flag to include or not hidden
+ * objects in this calculation.
+ *
+ * @return The Evas object that is over all other objects at the given
+ * rectangular region.
+ *
+ * @ingroup Evas_Canvas
+ */
+EAPI Evas_Object *evas_object_top_in_rectangle_get(const Eo *obj, int x, int y, int w, int h, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects) EINA_WARN_UNUSED_RESULT;
+/**
  * @}
  */
 
index afcef89..2c3db51 100644 (file)
@@ -864,45 +864,6 @@ class Evas.Canvas (Efl.Object, Efl.Canvas, Efl.Animator, Efl.Input.Interface,
            @.render_idle_flush might discard too.
          ]]
       }
-      object_top_in_rectangle_get @const {
-         [[Retrieve the Evas object stacked at the top of a given
-           rectangular region in a canvas
-
-           This function will traverse all the layers of the given canvas,
-           from top to bottom, querying for objects with areas overlapping
-           with the given rectangular region inside $e. The user can remove
-           from the query objects which are hidden and/or which are set to
-           pass events.
-
-           Warning: This function will skip objects parented by smart
-           objects, acting only on the ones at the "top level", with
-           regard to object parenting.
-         ]]
-         return: Efl.Canvas.Object @warn_unused; [[
-            The Evas object that is over all other objects at the given
-            rectangular region.
-         ]]
-         params {
-            @in x: int; [[
-               The top left corner's horizontal coordinate for the
-               rectangular region.
-            ]]
-            @in y: int; [[
-               The top left corner's vertical coordinate for the
-               rectangular region.
-            ]]
-            @in w: int; [[The width of the rectangular region.]]
-            @in h: int; [[The height of the rectangular region.]]
-            @in include_pass_events_objects: bool; [[
-               Boolean flag to include or not objects which pass events
-               in this calculation.
-            ]]
-            @in include_hidden_objects: bool; [[
-               Boolean flag to include or not hidden objects in this
-               calculation.
-            ]]
-         }
-      }
       render {
          [[Force renderization of the given canvas.]]
 
@@ -1048,5 +1009,6 @@ class Evas.Canvas (Efl.Object, Efl.Canvas, Efl.Animator, Efl.Input.Interface,
       Efl.Canvas.objects_at_xy_get;
       Efl.Canvas.object_top_at_xy_get;
       Efl.Canvas.objects_in_rectangle_get;
+      Efl.Canvas.object_top_in_rectangle_get;
    }
 }
index 87d971a..7a5c1eb 100644 (file)
@@ -1495,15 +1495,15 @@ evas_object_top_at_pointer_get(const Evas *eo_e)
 }
 
 EOLIAN Evas_Object*
-_evas_canvas_object_top_in_rectangle_get(const Eo *eo_e EINA_UNUSED, Evas_Public_Data *e, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects)
+_evas_canvas_efl_canvas_object_top_in_rectangle_get(const Eo *eo_e EINA_UNUSED, Evas_Public_Data *e, Eina_Rect rect, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects)
 {
    Evas_Layer *lay;
    int xx, yy, ww, hh;
 
-   xx = x;
-   yy = y;
-   ww = w;
-   hh = h;
+   xx = rect.x;
+   yy = rect.y;
+   ww = rect.w;
+   hh = rect.h;
 ////   xx = evas_coord_world_x_to_screen(eo_e, x);
 ////   yy = evas_coord_world_y_to_screen(eo_e, y);
 ////   ww = evas_coord_world_x_to_screen(eo_e, w);
@@ -1534,6 +1534,12 @@ _evas_canvas_object_top_in_rectangle_get(const Eo *eo_e EINA_UNUSED, Evas_Public
    return NULL;
 }
 
+EAPI Evas_Object *
+evas_object_top_in_rectangle_get(const Eo *obj, int x, int y, int w, int h, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects)
+{
+   return efl_canvas_object_top_in_rectangle_get(obj, EINA_RECT(x, y, w, h), include_pass_events_objects, include_hidden_objects);
+}
+
 static Eina_List *
 _efl_canvas_evas_canvas_objects_at_xy_get_helper(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e, int x, int y, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects)
 {