elput: start elput_device_ and elput_seat_ namespaces, rename some functions
This commit is contained in:
parent
e34088d74e
commit
b09c6f1f3e
|
@ -47,7 +47,7 @@ _cb_device_change(void *data, int type EINA_UNUSED, void *event)
|
||||||
Ecore_Drm2_Output *output;
|
Ecore_Drm2_Output *output;
|
||||||
Eina_Stringshare *name;
|
Eina_Stringshare *name;
|
||||||
|
|
||||||
name = elput_input_device_output_name_get(ev->device);
|
name = elput_device_output_name_get(ev->device);
|
||||||
if (!name)
|
if (!name)
|
||||||
{
|
{
|
||||||
output = eina_list_data_get(device->outputs);
|
output = eina_list_data_get(device->outputs);
|
||||||
|
@ -67,8 +67,6 @@ _cb_device_change(void *data, int type EINA_UNUSED, void *event)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
eina_stringshare_del(name);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -341,18 +341,6 @@ EAPI void elput_input_pointer_xy_set(Elput_Manager *manager, const char *seat, i
|
||||||
*/
|
*/
|
||||||
EAPI Eina_Bool elput_input_pointer_left_handed_set(Elput_Manager *manager, const char *seat, Eina_Bool left);
|
EAPI Eina_Bool elput_input_pointer_left_handed_set(Elput_Manager *manager, const char *seat, Eina_Bool left);
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the list of devices on a given seat
|
|
||||||
*
|
|
||||||
* @param seat
|
|
||||||
*
|
|
||||||
* @return An Eina_List of existing Elput_Devices on a given seat or NULL on failure
|
|
||||||
*
|
|
||||||
* @ingroup Elput_Input_Group
|
|
||||||
* @since 1.18
|
|
||||||
*/
|
|
||||||
EAPI const Eina_List *elput_input_devices_get(Elput_Seat *seat);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the maximum position of any existing mouse pointers
|
* Set the maximum position of any existing mouse pointers
|
||||||
*
|
*
|
||||||
|
@ -429,18 +417,6 @@ EAPI void elput_input_keyboard_info_set(Elput_Manager *manager, void *context, v
|
||||||
*/
|
*/
|
||||||
EAPI void elput_input_keyboard_group_set(Elput_Manager *manager, int group);
|
EAPI void elput_input_keyboard_group_set(Elput_Manager *manager, int group);
|
||||||
|
|
||||||
/**
|
|
||||||
* Return the output name associated with a given device
|
|
||||||
*
|
|
||||||
* @param device
|
|
||||||
*
|
|
||||||
* @return An Eina_Stringshare of the output name for this device, or NULL on error
|
|
||||||
*
|
|
||||||
* @ingroup Elput_Input_Group
|
|
||||||
* @since 1.18
|
|
||||||
*/
|
|
||||||
EAPI Eina_Stringshare *elput_input_device_output_name_get(Elput_Device *device);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the pointer acceleration profile
|
* Set the pointer acceleration profile
|
||||||
*
|
*
|
||||||
|
@ -618,6 +594,60 @@ EAPI Eina_Bool elput_touch_tap_enabled_set(Elput_Device *device, Eina_Bool enabl
|
||||||
*/
|
*/
|
||||||
EAPI Eina_Bool elput_touch_tap_enabled_get(Elput_Device *device);
|
EAPI Eina_Bool elput_touch_tap_enabled_get(Elput_Device *device);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @defgroup Elput_Device_Group Elput device functions
|
||||||
|
*
|
||||||
|
* Functions for getting attributes of devices
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the seat object for a device
|
||||||
|
* @param dev
|
||||||
|
* @return The seat
|
||||||
|
* @ingroup Elput_Device_Group
|
||||||
|
* @since 1.20
|
||||||
|
*/
|
||||||
|
EAPI Elput_Seat *elput_device_seat_get(const Elput_Device *dev);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the caps for a device
|
||||||
|
* @param dev
|
||||||
|
* @return The caps, 0 on failure
|
||||||
|
* @ingroup Elput_Device_Group
|
||||||
|
* @since 1.20
|
||||||
|
*/
|
||||||
|
EAPI Elput_Device_Caps elput_device_caps_get(const Elput_Device *dev);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the output name associated with a given device
|
||||||
|
*
|
||||||
|
* @param device
|
||||||
|
*
|
||||||
|
* @return An Eina_Stringshare of the output name for this device, or NULL on error
|
||||||
|
*
|
||||||
|
* @ingroup Elput_Device_Group
|
||||||
|
* @since 1.20
|
||||||
|
*/
|
||||||
|
EAPI Eina_Stringshare *elput_device_output_name_get(Elput_Device *device);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @defgroup Elput_Seat_Group Elput seat functions
|
||||||
|
*
|
||||||
|
* Functions for getting attributes of seats
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the list of devices on a given seat
|
||||||
|
*
|
||||||
|
* @param seat
|
||||||
|
*
|
||||||
|
* @return An immutable list of existing Elput_Devices on a given seat or NULL on failure
|
||||||
|
*
|
||||||
|
* @ingroup Elput_Seat_Group
|
||||||
|
* @since 1.20
|
||||||
|
*/
|
||||||
|
EAPI const Eina_List *elput_seat_devices_get(const Elput_Seat *seat);
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
# undef EAPI
|
# undef EAPI
|
||||||
|
|
|
@ -552,13 +552,6 @@ elput_input_pointer_left_handed_set(Elput_Manager *manager, const char *seat, Ei
|
||||||
return EINA_TRUE;
|
return EINA_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI const Eina_List *
|
|
||||||
elput_input_devices_get(Elput_Seat *seat)
|
|
||||||
{
|
|
||||||
EINA_SAFETY_ON_NULL_RETURN_VAL(seat, NULL);
|
|
||||||
return seat->devices;
|
|
||||||
}
|
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
elput_input_pointer_max_set(Elput_Manager *manager, int maxw, int maxh)
|
elput_input_pointer_max_set(Elput_Manager *manager, int maxw, int maxh)
|
||||||
{
|
{
|
||||||
|
@ -687,15 +680,6 @@ elput_input_keyboard_group_set(Elput_Manager *manager, int group)
|
||||||
_keyboard_group_update(seat);
|
_keyboard_group_update(seat);
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI Eina_Stringshare *
|
|
||||||
elput_input_device_output_name_get(Elput_Device *device)
|
|
||||||
{
|
|
||||||
EINA_SAFETY_ON_NULL_RETURN_VAL(device, NULL);
|
|
||||||
|
|
||||||
if (!device->output_name) return NULL;
|
|
||||||
return eina_stringshare_ref(device->output_name);
|
|
||||||
}
|
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
elput_input_pointer_accel_profile_set(Elput_Manager *manager, const char *seat, uint32_t profile)
|
elput_input_pointer_accel_profile_set(Elput_Manager *manager, const char *seat, uint32_t profile)
|
||||||
{
|
{
|
||||||
|
@ -730,3 +714,33 @@ elput_input_pointer_accel_profile_set(Elput_Manager *manager, const char *seat,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EAPI Elput_Seat *
|
||||||
|
elput_device_seat_get(const Elput_Device *dev)
|
||||||
|
{
|
||||||
|
EINA_SAFETY_ON_NULL_RETURN_VAL(dev, NULL);
|
||||||
|
return dev->seat;
|
||||||
|
}
|
||||||
|
|
||||||
|
EAPI Elput_Device_Caps
|
||||||
|
elput_device_caps_get(const Elput_Device *dev)
|
||||||
|
{
|
||||||
|
EINA_SAFETY_ON_NULL_RETURN_VAL(dev, 0);
|
||||||
|
return dev->caps;
|
||||||
|
}
|
||||||
|
|
||||||
|
EAPI Eina_Stringshare *
|
||||||
|
elput_device_output_name_get(Elput_Device *device)
|
||||||
|
{
|
||||||
|
EINA_SAFETY_ON_NULL_RETURN_VAL(device, NULL);
|
||||||
|
|
||||||
|
return device->output_name;
|
||||||
|
}
|
||||||
|
|
||||||
|
EAPI const Eina_List *
|
||||||
|
elput_seat_devices_get(const Elput_Seat *seat)
|
||||||
|
{
|
||||||
|
EINA_SAFETY_ON_NULL_RETURN_VAL(seat, NULL);
|
||||||
|
return seat->devices;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue