evas_device: add seat_id property, set seat id for default fallback seat

@feature
This commit is contained in:
Mike Blumenkrantz 2017-05-17 16:02:53 -04:00
parent bcdd87ce35
commit 589773055a
3 changed files with 37 additions and 0 deletions

View File

@ -1047,6 +1047,30 @@ EAPI void evas_device_name_set(Evas_Device *dev, const char *name);
*/
EAPI const char *evas_device_name_get(const Evas_Device *dev);
/**
* Set the seat id of a device
*
* @p dev The device to set the seat id of
* @p name The seat id
*
* @since 1.20
*/
EAPI void evas_device_seat_id_set(Evas_Device *dev, unsigned int id);
/**
* Get the seat id of a device
*
* @p dev The device to query
* @return The device seat id or 0 if none is set
*
* This gets the seat id set by evas_device_seat id_set().
*
* A seat id is the hardware id of the seat.
*
* @since 1.20
*/
EAPI unsigned int evas_device_seat_id_get(const Evas_Device *dev);
/**
* Set the description of a device as a string
*

View File

@ -349,6 +349,18 @@ evas_device_emulation_source_get(const Evas_Device *dev)
return efl_input_device_source_get(dev);
}
EAPI void
evas_device_seat_id_set(Evas_Device *dev, unsigned int id)
{
efl_input_device_seat_id_set(dev, id);
}
EAPI unsigned int
evas_device_seat_id_get(const Evas_Device *dev)
{
return efl_input_device_seat_id_get(dev);
}
void
_evas_device_cleanup(Evas *eo_e)
{

View File

@ -1014,6 +1014,7 @@ evas_output_method_set(Evas *eo_e, int render_method)
e->default_seat = evas_device_add_full(eo_e, "default", "The default seat",
NULL, NULL, EVAS_DEVICE_CLASS_SEAT,
EVAS_DEVICE_SUBCLASS_NONE);
evas_device_seat_id_set(e->default_seat, 1);
e->default_mouse = evas_device_add_full(eo_e, "keyboard",
"The default mouse",
e->default_seat, NULL,