evas: Remove specific pointer_inside API

This is a name clash. It doesn't matter too much since Evas.Canvas isn't
meant to be exposed to the EO API.
This commit is contained in:
Jean-Philippe Andre 2017-10-31 16:23:07 +09:00
parent 20acefb419
commit ebe945c8d8
4 changed files with 38 additions and 32 deletions

View 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]]

View File

@ -1032,6 +1032,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
*

View 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; }
}

View 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 =