forked from enlightenment/efl
efl_input_device: split up has_pointer_cap
it was somehow confusing that this function was used for two different things. Now we have 2 functions for checking is it is of pointer_type or how many pointer devices are in a seat. ref T7963 Reviewed-by: Chris Michael <cp.michael@samsung.com> Differential Revision: https://phab.enlightenment.org/D9142
This commit is contained in:
parent
6b8900d4fc
commit
b0c29edd78
|
@ -213,12 +213,19 @@ _efl_input_device_children_iterate(Eo *obj, Efl_Input_Device_Data *pd)
|
||||||
return &it->iterator;
|
return &it->iterator;
|
||||||
}
|
}
|
||||||
|
|
||||||
EOLIAN static unsigned int
|
EOLIAN static int
|
||||||
_efl_input_device_has_pointer_caps(Eo *obj EINA_UNUSED, Efl_Input_Device_Data *pd)
|
_efl_input_device_pointer_device_count_get(const Eo *obj EINA_UNUSED, Efl_Input_Device_Data *pd)
|
||||||
{
|
{
|
||||||
if (pd->klass == EFL_INPUT_DEVICE_TYPE_SEAT)
|
if (pd->klass == EFL_INPUT_DEVICE_TYPE_SEAT)
|
||||||
return pd->pointer_count;
|
return pd->pointer_count;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
EOLIAN static Eina_Bool
|
||||||
|
_efl_input_device_is_pointer_type_get(const Eo *obj EINA_UNUSED, Efl_Input_Device_Data *pd)
|
||||||
|
{
|
||||||
return _is_pointer(pd);
|
return _is_pointer(pd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#include "interfaces/efl_input_device.eo.c"
|
#include "interfaces/efl_input_device.eo.c"
|
||||||
|
|
|
@ -67,14 +67,27 @@ class @beta Efl.Input.Device extends Efl.Object
|
||||||
]]
|
]]
|
||||||
return: iterator<const(Efl.Input.Device)> @owned; [[List of device children]]
|
return: iterator<const(Efl.Input.Device)> @owned; [[List of device children]]
|
||||||
}
|
}
|
||||||
has_pointer_caps {
|
@property pointer_device_count {
|
||||||
[[Determine whether a device has pointer capabilities.
|
[[The number of pointer devices in this seat.
|
||||||
|
|
||||||
Returns 1 for Mouse, Touch, Pen, Pointer, and Wand type devices.
|
Pointer devices are the ones whose @.device_type is $mouse, $pen, $touch or $wand.
|
||||||
|
In case this device is not of the type $seat, -1 is returned.
|
||||||
If a seat device is passed returns the number of pointer devices in the seat.
|
|
||||||
]]
|
]]
|
||||||
return: uint; [[Pointer caps]]
|
get {
|
||||||
|
|
||||||
|
}
|
||||||
|
values {
|
||||||
|
devices : int; [[The number of pointer devices.]]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@property is_pointer_type {
|
||||||
|
[[$true if @.device_type is $mouse, $pen, $touch or $wand.]]
|
||||||
|
get {
|
||||||
|
|
||||||
|
}
|
||||||
|
values {
|
||||||
|
pointer_type : bool; [[$true if the device has pointing capabilities.]]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
implements {
|
implements {
|
||||||
|
|
Loading…
Reference in New Issue