summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2019-06-20 15:17:32 +0200
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2019-06-20 17:25:42 +0200
commitb0c29edd7853abd893559d84a29b89a7bd201e50 (patch)
treeec2257fb504b4ab828d9e58889796f2c4da637ec
parent6b8900d4fc694ac714ba0b04dacb7b5f4968496c (diff)
downloadefl-b0c29edd7853abd893559d84a29b89a7bd201e50.tar.gz
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
-rw-r--r--src/lib/efl/interfaces/efl_input_device.c11
-rw-r--r--src/lib/efl/interfaces/efl_input_device.eo25
2 files changed, 28 insertions, 8 deletions
diff --git a/src/lib/efl/interfaces/efl_input_device.c b/src/lib/efl/interfaces/efl_input_device.c
index 4924f1f9d0..bd77780e00 100644
--- a/src/lib/efl/interfaces/efl_input_device.c
+++ b/src/lib/efl/interfaces/efl_input_device.c
@@ -213,12 +213,19 @@ _efl_input_device_children_iterate(Eo *obj, Efl_Input_Device_Data *pd)
return &it->iterator;
}
-EOLIAN static unsigned int
-_efl_input_device_has_pointer_caps(Eo *obj EINA_UNUSED, Efl_Input_Device_Data *pd)
+EOLIAN static int
+_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)
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);
}
+
#include "interfaces/efl_input_device.eo.c"
diff --git a/src/lib/efl/interfaces/efl_input_device.eo b/src/lib/efl/interfaces/efl_input_device.eo
index 28ec10eb5d..d296c5cafc 100644
--- a/src/lib/efl/interfaces/efl_input_device.eo
+++ b/src/lib/efl/interfaces/efl_input_device.eo
@@ -67,14 +67,27 @@ class @beta Efl.Input.Device extends Efl.Object
]]
return: iterator<const(Efl.Input.Device)> @owned; [[List of device children]]
}
- has_pointer_caps {
- [[Determine whether a device has pointer capabilities.
+ @property pointer_device_count {
+ [[The number of pointer devices in this seat.
- Returns 1 for Mouse, Touch, Pen, Pointer, and Wand type devices.
-
- If a seat device is passed returns the number of pointer devices in the seat.
+ 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.
]]
- 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 {