Functions
Drm input handling

Functions

EAPI Eina_Bool ecore_drm_inputs_create (Ecore_Drm_Device *dev)
 
EAPI void ecore_drm_inputs_destroy (Ecore_Drm_Device *dev)
 
EAPI Eina_Bool ecore_drm_inputs_enable (Ecore_Drm_Input *input)
 
EAPI void ecore_drm_inputs_disable (Ecore_Drm_Input *input)
 
EAPI void ecore_drm_inputs_device_axis_size_set (Ecore_Drm_Evdev *dev, int w, int h)
 Set the axis size of the given device. More...
 
EAPI Eina_Bool ecore_drm_evdev_key_remap_enable (Ecore_Drm_Evdev *edev, Eina_Bool enable)
 Enables key remap functionality on a Ecore_Drm_Evdev. More...
 
EAPI Eina_Bool ecore_drm_evdev_key_remap_set (Ecore_Drm_Evdev *edev, int *from_keys, int *to_keys, int num)
 Sets a given set of keys as remapped keys on a Ecore_Drm_Evdev. More...
 

Detailed Description

Function Documentation

◆ ecore_drm_inputs_device_axis_size_set()

EAPI void ecore_drm_inputs_device_axis_size_set ( Ecore_Drm_Evdev *  edev,
int  w,
int  h 
)

Set the axis size of the given device.

Parameters
edevThe device to set the axis size to.
wThe width of the axis.
hThe height of the axis.

This function sets set the width w and height h of the axis of device dev. If dev is a relative input device, a width and height must set for it. If its absolute set the ioctl correctly, if not, unsupported device.

References eeze_udev_find_by_subsystem_sysname(), eeze_udev_syspath_get_property(), eina_list_count(), EINA_LIST_FREE, EINA_SAFETY_ON_NULL_RETURN, EINA_SAFETY_ON_TRUE_RETURN, eina_stringshare_del(), and ERR.

◆ ecore_drm_evdev_key_remap_enable()

EAPI Eina_Bool ecore_drm_evdev_key_remap_enable ( Ecore_Drm_Evdev *  edev,
Eina_Bool  enable 
)

Enables key remap functionality on a Ecore_Drm_Evdev.

This function will enable the key remap functionality to the given Ecore_Drm_Evdev

Parameters
edevThe Ecore_Drm_Evdev to enable the key remap on
enableA valid Eina_Bool to enable or disable the key remap on the device
Returns
EINA_FALSE is returned if the Ecore_Drm_Evdev is not valid, or if no libinput device has been assigned to it yet. EINA_TRUE will be returned if enabling key remap for this device succeeded.
Since
1.17

Enables key remap functionality on a Ecore_Drm_Evdev.

Parameters
edevThe Ecore_Drm_Evdev to enable the key remap on.
enableAn Eina_Bool value to enable or disable the key remap on the device.
Returns
EINA_FALSE is returned if the Ecore_Drm_Evdev is not valid, or if no libinput device has been assigned to it yet. EINA_TRUE will be returned if enabling key remap for this device succeeded.

This function enables/disables key remap functionality with the given enable value. If the given enable value is EINA_FALSE, the key remap functionality wil be disable and the existing hash table for remapping keys will be freed.

References EINA_FALSE, eina_hash_free(), EINA_SAFETY_ON_NULL_RETURN_VAL, and EINA_TRUE.

◆ ecore_drm_evdev_key_remap_set()

EAPI Eina_Bool ecore_drm_evdev_key_remap_set ( Ecore_Drm_Evdev *  edev,
int *  from_keys,
int *  to_keys,
int  num 
)

Sets a given set of keys as remapped keys on a Ecore_Drm_Evdev.

This function will create a hash table of remapping keys as a member of the given Ecore_Drm_Evdev

Parameters
edevThe Ecore_Drm_Evdev to set the remapping keys on
from_keysA set of keycodes which contains the original keycode
to_keysA set of keycodes which contains the keycode to be remapped
numThe number of keys to be applied
Returns
EINA_FALSE is returned if the Ecore_Drm_Evdev is not valid, if no libinput device has been assigned to it yet, if key remap is not enabled yet, or the some of the given parameters such as from_keys, to_keys, num are not valid. EINA_TRUE will be returned if setting key remap for this device succeeded.
Since
1.17

Sets a given set of keys as remapped keys on a Ecore_Drm_Evdev.

Parameters
edevThe Ecore_Drm_Evdev to set the remapping keys on
from_keysA set of keys which contains the original keycodes
to_keysA set of keys which contains the keycodes to be remapped
numThe number of keys to be applied
Returns
EINA_FALSE is returned if the Ecore_Drm_Evdev is not valid, if no libinput device has been assigned to it yet, if key remap is not enabled yet, or the some of the given parameters such as from_keys, to_keys, num are not valid. EINA_TRUE will be returned if setting key remap for this device succeeded.

This function will create a hash table of remapping keys as a member of the given device. This hash table will be used in _device_remapped_key_get() later on. Whenever a key event is coming from the the backend of ecore drm layer the keycode of it can be replaced with the key found in the hash table. If there is no key found, the coming keycode will be used.

References EINA_FALSE, eina_hash_add(), eina_hash_int32_new(), EINA_SAFETY_ON_NULL_RETURN_VAL, EINA_SAFETY_ON_TRUE_RETURN_VAL, EINA_TRUE, and ERR.