Functions that feed key events to the canvas. More...
Typedefs | |
typedef struct _Evas_Lock | Evas_Lock |
An opaque type containing information on which lock keys are registered in an Evas canvas. | |
typedef struct _Evas_Modifier | Evas_Modifier |
An opaque type containing information on which modifier keys are registered in an Evas canvas. | |
typedef unsigned long long | Evas_Modifier_Mask |
A bitmask of modifier keys. More... | |
Functions | |
EVAS_API Eina_Bool | evas_key_modifier_is_set (const Evas_Modifier *m, const char *keyname) |
Checks the state of a given modifier of the default seat, at the time of the call. More... | |
EVAS_API Eina_Bool | evas_seat_key_modifier_is_set (const Evas_Modifier *m, const char *keyname, const Evas_Device *seat) |
Checks the state of a given modifier key of a given seat, at the time of the call. More... | |
EVAS_API Eina_Bool | evas_key_lock_is_set (const Evas_Lock *l, const char *keyname) |
Checks the state of a given lock key of the default seat, at the time of the call. More... | |
EVAS_API Eina_Bool | evas_seat_key_lock_is_set (const Evas_Lock *l, const char *keyname, const Evas_Device *seat) |
Checks the state of a given lock key of a given seat, at the time of the call. More... | |
Functions that feed key events to the canvas.
As explained in intro_not_evas, Evas is not aware of input systems at all. Then, the user, if using it crudely (evas_new()), will have to feed it with input events, so that it can react somehow. If, however, the user creates a canvas by means of the Ecore_Evas wrapper, it will automatically bind the chosen display engine's input events to the canvas, for you.
This group presents the functions dealing with the feeding of key events to the canvas. On most of them, one has to reference a given key by a name (keyname
argument). Those are platform dependent symbolic names for the keys. Sometimes you'll get the right keyname
by simply using an ASCII value of the key name, but it won't be like that always.
Typical platforms are Linux frame buffer (Ecore_FB) and X server (Ecore_X) when using Evas with Ecore and Ecore_Evas. Please refer to your display engine's documentation when using evas through an Ecore helper wrapper when you need the keyname
s.
Example:
All the other evas_key
functions behave on the same manner. See the full example.
typedef unsigned long long Evas_Modifier_Mask |
A bitmask of modifier keys.
See evas_key_modifier_mask_get() for the keyname to bit conversion.
EVAS_API Eina_Bool evas_key_modifier_is_set | ( | const Evas_Modifier * | m, |
const char * | keyname | ||
) |
Checks the state of a given modifier of the default seat, at the time of the call.
If the modifier is set, such as shift being pressed, this function returns Eina_True
.
m | The current modifiers set, as returned by evas_key_modifier_get(). |
keyname | The name of the modifier key to check status for. |
Eina_True
if the modifier key named keyname
is on, Eina_False
otherwise.References EINA_FALSE, EINA_SAFETY_ON_NULL_RETURN_VAL, and evas_seat_key_modifier_is_set().
EVAS_API Eina_Bool evas_seat_key_modifier_is_set | ( | const Evas_Modifier * | m, |
const char * | keyname, | ||
const Evas_Device * | seat | ||
) |
Checks the state of a given modifier key of a given seat, at the time of the call.
If the modifier is set, such as shift being pressed, this function returns Eina_True
.
m | The current modifiers set, as returned by evas_key_modifier_get(). |
keyname | The name of the modifier key to check status for. |
seat | The seat to check if the lock is set. Use NULL for the default seat. |
Eina_True
if the modifier key named keyname
is on, Eina_False
otherwise.References EINA_FALSE, and EINA_SAFETY_ON_NULL_RETURN_VAL.
Referenced by evas_key_modifier_is_set().
Checks the state of a given lock key of the default seat, at the time of the call.
If the lock is set, such as caps lock, this function returns Eina_True
.
l | The current locks set, as returned by evas_key_lock_get(). |
keyname | The name of the lock key to check status for. |
Eina_True
if the keyname
lock key is set, Eina_False
otherwise.References EINA_FALSE, EINA_SAFETY_ON_NULL_RETURN_VAL, and evas_seat_key_lock_is_set().
EVAS_API Eina_Bool evas_seat_key_lock_is_set | ( | const Evas_Lock * | l, |
const char * | keyname, | ||
const Evas_Device * | seat | ||
) |
Checks the state of a given lock key of a given seat, at the time of the call.
If the lock is set, such as caps lock, this function returns Eina_True
.
l | The current locks set, as returned by evas_key_lock_get(). |
keyname | The name of the lock key to check status for. |
seat | The seat to check if the lock is set. Use NULL for the default seat. |
Eina_True
if the keyname
lock key is set, Eina_False
otherwise.References EINA_FALSE, and EINA_SAFETY_ON_NULL_RETURN_VAL.
Referenced by evas_key_lock_is_set().