evas: Remove specific pointer_inside API
authorJean-Philippe Andre <jp.andre@samsung.com>
Tue, 31 Oct 2017 07:23:07 +0000 (16:23 +0900)
committerJean-Philippe Andre <jp.andre@samsung.com>
Wed, 1 Nov 2017 02:22:33 +0000 (11:22 +0900)
This is a name clash. It doesn't matter too much since Evas.Canvas isn't
meant to be exposed to the EO API.

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

index 6655dab..2711111 100644 (file)
@@ -209,7 +209,10 @@ interface Efl.Canvas ()
               A canvas begins with the mouse being assumed outside ($false).
             ]]
          }
-         /* FIXME: missing keys { seat } */
+         /* keys {
+            seat: Efl.Input.Device @optional; [[The seat to consider, if $null
+               then the default seat will be used.]]
+         } */
          values {
             inside: bool; [[$true if the mouse pointer is inside the canvas,
                             $false otherwise]]
index ddfb67f..32ef78e 100644 (file)
@@ -1033,6 +1033,30 @@ EAPI const Evas_Lock *evas_key_lock_get(const Evas *obj) EINA_WARN_UNUSED_RESULT
  */
 
 /**
+ * @brief Returns whether the default mouse pointer is logically inside the
+ * canvas.
+ *
+ * When this function is called it will return a value of either @c false or
+ * @c true, depending on if event_feed_mouse_in or event_feed_mouse_out have
+ * been called to feed in a  mouse enter event into the canvas.
+ *
+ * A return value of @c true indicates the mouse is logically inside the
+ * canvas, and @c false implies it is logically outside the canvas.
+ *
+ * A canvas begins with the mouse being assumed outside ($false).
+ *
+ * If @c e is not a valid canvas, the return value is undefined.
+ *
+ * @param[in] obj The object.
+ *
+ * @return @c true if the mouse pointer is inside the canvas, @c false
+ * otherwise
+ *
+ * @ingroup Evas_Canvas
+ */
+EAPI Eina_Bool evas_pointer_inside_get(const Evas *obj) EINA_WARN_UNUSED_RESULT;
+
+/**
  * @defgroup Evas_Touch_Point_List Touch Point List Functions
  *
  * Functions to get information of touched points in the Evas.
index b43c3ba..cb6b902 100644 (file)
@@ -280,36 +280,6 @@ class Evas.Canvas (Efl.Object, Efl.Canvas, Efl.Animator, Efl.Input.Interface,
             in: bool; [[$true if the pointer is inside, $false otherwise.]]
          }
       }
-      @property pointer_inside {
-         get {
-            [[Returns whether the default mouse pointer is logically inside the
-              canvas.
-
-              When this function is called it will return a value of either
-              $false or $true, depending on if event_feed_mouse_in or
-              event_feed_mouse_out have been called to feed in a  mouse
-              enter event into the canvas.
-
-              A return value of $true indicates the mouse is logically
-              inside the canvas, and $false implies it is logically
-              outside the canvas.
-
-              A canvas begins with the mouse being assumed outside ($false).
-
-              If $e is not a valid canvas, the return value is undefined.
-            ]]
-            /* FIXME-doc
-            Example:
-            @code
-            extern Evas *evas;
-
-            if (evas_pointer_inside_get(evas)) printf("Mouse is in!\n");
-            else printf("Mouse is out!\n");
-            @endcode
-            */
-            return: bool @warn_unused; [[$true if the mouse pointer is inside the canvas, $false otherwise]]
-         }
-      }
       @property image_max_size {
          get {
             [[Get the maximum image size evas can possibly handle.
@@ -1170,6 +1140,7 @@ class Evas.Canvas (Efl.Object, Efl.Canvas, Efl.Animator, Efl.Input.Interface,
       Efl.Object.provider_find;
       Efl.Loop_User.loop { get; }
       //Efl.Canvas.seats;
+      Efl.Canvas.pointer_inside { get; }
       Efl.Canvas.device { get; }
       Efl.Canvas.seat { get; }
    }
index 9efd0ca..3266af1 100644 (file)
@@ -662,7 +662,7 @@ _evas_canvas_pointer_button_down_mask_get(Eo *eo_e, Evas_Public_Data *e)
 }
 
 EOLIAN static Eina_Bool
-_evas_canvas_pointer_inside_get(Eo *eo_e, Evas_Public_Data *e)
+_evas_canvas_efl_canvas_pointer_inside_get(Eo *eo_e, Evas_Public_Data *e)
 {
    return _evas_canvas_pointer_inside_by_device_get(eo_e, e, NULL);
 }
@@ -1295,6 +1295,14 @@ _evas_pointer_list_in_rect_get(Evas_Public_Data *edata, Evas_Object *obj,
    return list;
 }
 
+/* Legacy EAPI */
+
+EAPI Eina_Bool
+evas_pointer_inside_get(const Evas *obj)
+{
+   return efl_canvas_pointer_inside_get(obj);
+}
+
 /* Internal EO APIs */
 
 EWAPI const Efl_Event_Description _EVAS_CANVAS_EVENT_RENDER_FLUSH_PRE =