forked from enlightenment/efl
evas: Add seat argument to 'pointer_inside' (EO)
This merges pointer_inside and pointer_inside_by_device. Affects only EO.
This commit is contained in:
parent
daa1547586
commit
b8ca1272ae
|
@ -209,10 +209,10 @@ interface Efl.Canvas ()
|
|||
A canvas begins with the mouse being assumed outside ($false).
|
||||
]]
|
||||
}
|
||||
/* keys {
|
||||
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]]
|
||||
|
|
|
@ -2363,9 +2363,9 @@ _efl_ui_win_efl_canvas_pointer_position_get(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data
|
|||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_efl_ui_win_efl_canvas_pointer_inside_get(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd)
|
||||
_efl_ui_win_efl_canvas_pointer_inside_get(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, Eo *dev)
|
||||
{
|
||||
return evas_pointer_inside_get(sd->evas);
|
||||
return efl_canvas_pointer_inside_get(sd->evas, dev);
|
||||
}
|
||||
|
||||
/* multi touch support */
|
||||
|
|
|
@ -1032,6 +1032,20 @@ EAPI const Evas_Lock *evas_key_lock_get(const Evas *obj) EINA_WARN_UNUSED_RESULT
|
|||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief Returns whether the mouse pointer is logically inside the canvas.
|
||||
*
|
||||
* @param[in] obj The object.
|
||||
* @param[in] dev The pointer device.
|
||||
*
|
||||
* @return @c true if the pointer is inside, @c false otherwise.
|
||||
*
|
||||
* @since 1.19
|
||||
*
|
||||
* @ingroup Evas_Canvas
|
||||
*/
|
||||
EAPI Eina_Bool evas_pointer_inside_by_device_get(const Evas *obj, Efl_Input_Device *dev);
|
||||
|
||||
/**
|
||||
* @brief Returns whether the default mouse pointer is logically inside the
|
||||
* canvas.
|
||||
|
|
|
@ -269,17 +269,6 @@ class Evas.Canvas (Efl.Object, Efl.Canvas, Efl.Animator, Efl.Input.Interface,
|
|||
y: int; [[The pointer to an integer to be filled in.]]
|
||||
}
|
||||
}
|
||||
@property pointer_inside_by_device {
|
||||
[[Returns whether the mouse pointer is logically inside the
|
||||
canvas. @since 1.19]]
|
||||
keys {
|
||||
dev: Efl.Input.Device; [[The pointer device.]]
|
||||
}
|
||||
get {}
|
||||
values {
|
||||
in: bool; [[$true if the pointer is inside, $false otherwise.]]
|
||||
}
|
||||
}
|
||||
@property image_max_size {
|
||||
get {
|
||||
[[Get the maximum image size evas can possibly handle.
|
||||
|
|
|
@ -634,9 +634,9 @@ _evas_canvas_pointer_button_down_mask_by_device_get(Eo *eo_e EINA_UNUSED,
|
|||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_evas_canvas_pointer_inside_by_device_get(Eo *eo_e EINA_UNUSED,
|
||||
_evas_canvas_efl_canvas_pointer_inside_get(Eo *eo_e EINA_UNUSED,
|
||||
Evas_Public_Data *e,
|
||||
Efl_Input_Device *dev)
|
||||
Eo *dev)
|
||||
{
|
||||
Evas_Pointer_Data *pdata = _evas_pointer_data_by_device_get(e, dev);
|
||||
if (!pdata) return EINA_FALSE;
|
||||
|
@ -661,12 +661,6 @@ _evas_canvas_pointer_button_down_mask_get(Eo *eo_e, Evas_Public_Data *e)
|
|||
return _evas_canvas_pointer_button_down_mask_by_device_get(eo_e, e, NULL);
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_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);
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
_evas_canvas_data_attach_set(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e, void *data)
|
||||
{
|
||||
|
@ -1300,7 +1294,13 @@ _evas_pointer_list_in_rect_get(Evas_Public_Data *edata, Evas_Object *obj,
|
|||
EAPI Eina_Bool
|
||||
evas_pointer_inside_get(const Evas *obj)
|
||||
{
|
||||
return efl_canvas_pointer_inside_get(obj);
|
||||
return efl_canvas_pointer_inside_get(obj, NULL);
|
||||
}
|
||||
|
||||
EAPI Eina_Bool
|
||||
evas_pointer_inside_by_device_get(const Evas *obj, Eo *dev)
|
||||
{
|
||||
return efl_canvas_pointer_inside_get(obj, dev);
|
||||
}
|
||||
|
||||
/* Internal EO APIs */
|
||||
|
|
|
@ -349,7 +349,7 @@ _inputs_timer3_cb(void *data)
|
|||
eina_iterator_free(it);
|
||||
fail_if(cnt != 2); // 2 moves (in the list), 2 ups (gone)
|
||||
|
||||
fail_if(!efl_canvas_pointer_inside_get(win));
|
||||
fail_if(!efl_canvas_pointer_inside_get(win, NULL));
|
||||
pos = efl_canvas_pointer_position_get(win);
|
||||
ck_assert_int_eq(pos.x, points[1][0].x);
|
||||
ck_assert_int_eq(pos.y, points[1][0].y);
|
||||
|
|
Loading…
Reference in New Issue