forked from enlightenment/efl
efl_input_device: add seat_id property
this is the hardware id of a seat which is required in order to match against objects from other components @feature
This commit is contained in:
parent
e0a1e63072
commit
4a16eb15fb
|
@ -95,6 +95,7 @@ struct _Efl_Input_Device_Data
|
|||
Eina_List *children; /* ref */
|
||||
Eina_Stringshare *name;
|
||||
Eina_Stringshare *desc;
|
||||
unsigned int id;
|
||||
Efl_Input_Device_Class klass;
|
||||
Efl_Input_Device_Sub_Class subclass;
|
||||
};
|
||||
|
|
|
@ -101,6 +101,20 @@ _efl_input_device_description_get(Eo *obj EINA_UNUSED, Efl_Input_Device_Data *pd
|
|||
return pd->desc;
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
_efl_input_device_seat_id_set(Eo *obj EINA_UNUSED, Efl_Input_Device_Data *pd, unsigned int id)
|
||||
{
|
||||
EINA_SAFETY_ON_TRUE_RETURN(pd->klass != EFL_INPUT_DEVICE_CLASS_SEAT);
|
||||
pd->id = id;
|
||||
}
|
||||
|
||||
EOLIAN static unsigned int
|
||||
_efl_input_device_seat_id_get(Eo *obj EINA_UNUSED, Efl_Input_Device_Data *pd)
|
||||
{
|
||||
EINA_SAFETY_ON_TRUE_RETURN_VAL(pd->klass != EFL_INPUT_DEVICE_CLASS_SEAT, 0);
|
||||
return pd->id;
|
||||
}
|
||||
|
||||
EOLIAN static Efl_Input_Device *
|
||||
_efl_input_device_seat_get(Eo *obj EINA_UNUSED, Efl_Input_Device_Data *pd)
|
||||
{
|
||||
|
|
|
@ -103,6 +103,16 @@ class Efl.Input.Device (Efl.Object)
|
|||
seat: Efl.Input.Device; [[The seat this device belongs to.]]
|
||||
}
|
||||
}
|
||||
@property seat_id {
|
||||
[[Seat id number
|
||||
@since 1.20
|
||||
]]
|
||||
set{}
|
||||
get{}
|
||||
values {
|
||||
id: uint; [[The id of the seat]]
|
||||
}
|
||||
}
|
||||
}
|
||||
implements {
|
||||
Efl.Object.constructor;
|
||||
|
|
Loading…
Reference in New Issue