efl.ecore_input
Module¶
New in version 1.17.
This module provide access to the low-level input events, you usually don’t need to use this stuff, unless you need some sort of custom event handling.
To be informed about specific events just use one of the on_*_add(func, *args, **kargs) functions, the callback given will be fired when events occur.
Callback signature is:
func(event, *args, **kargs) → int
Where event
will be a class relative to the specific event (such as
EventKey
) All the additional arguments and keyword arguments passed
in the *_add function will be passed back in the callback.
In some events (EventKey at least) the callback function may return ecore.ECORE_CALLBACK_DONE or ecore.ECORE_CALLBACK_PASS_ON to block the event propagation down the chain or not.
To stop receiving event use efl.ecore.EventHandler.delete()
Enumerations¶
Ecore_Event_Modifier¶
- efl.ecore_input.ECORE_EVENT_MODIFIER_SHIFT¶
- efl.ecore_input.ECORE_EVENT_MODIFIER_CTRL¶
- efl.ecore_input.ECORE_EVENT_MODIFIER_ALT¶
- efl.ecore_input.ECORE_EVENT_MODIFIER_WIN¶
- efl.ecore_input.ECORE_EVENT_MODIFIER_SCROLL¶
- efl.ecore_input.ECORE_EVENT_MODIFIER_NUM¶
- efl.ecore_input.ECORE_EVENT_MODIFIER_CAPS¶
- efl.ecore_input.ECORE_EVENT_LOCK_SCROLL¶
- efl.ecore_input.ECORE_EVENT_LOCK_NUM¶
- efl.ecore_input.ECORE_EVENT_LOCK_CAPS¶
- efl.ecore_input.ECORE_EVENT_LOCK_SHIFT¶
- efl.ecore_input.ECORE_EVENT_MODIFIER_ALTGR¶
Classes and Functions¶
- class efl.ecore_input.EventKey¶
Bases:
efl.ecore.Event
Contains information about an Ecore keyboard event.
See also
- Variables
keyname (str) – The key name
key (str) – The key symbol
string (str) –
compose (int) – Final string corresponding to the key symbol composed
timestamp (int) – Time when the event occurred.
modifiers (int) – Ecore_Event_Modifier The OR combination of modifiers key
same_screen (bool) – Same screen flag
keycode (int) – Key scan code numeric value
- class efl.ecore_input.EventMouseButton¶
Bases:
efl.ecore.Event
Contains information about an Ecore mouse button event.
- Variables
timestamp (int) – Time when the event occurred
modifiers (int) – Ecore_Event_Modifier The OR combination of modifiers key
buttons (int) – The button that was used
double_click (bool) – Double click event
triple_click (bool) – Triple click event
same_screen (bool) – Same screen flag
x (int) – x coordinate relative to window where event happened
y (int) – y coordinate relative to window where event happened
root (EventPoint) –
EventPoint
Coordinates relative to root window
- class efl.ecore_input.EventMouseIO¶
Bases:
efl.ecore.Event
Contains information about an Ecore mouse input/output event.
See also
- Variables
timestamp (int) – Time when the event occurred
modifiers (int) – Ecore_Event_Modifier The OR combination of modifiers key
x (int) – x coordinate relative to window where event happened
y (int) – y coordinate relative to window where event happened
- class efl.ecore_input.EventMouseMove¶
Bases:
efl.ecore.Event
Contains information about an Ecore mouse move event.
See also
- Variables
timestamp (int) – Time when the event occurred
modifiers (int) – Ecore_Event_Modifier The OR combination of modifiers key
same_screen (bool) – Same screen flag
x (int) – x coordinate relative to window where event happened
y (int) – y coordinate relative to window where event happened
root (EventPoint) – Coordinates relative to root window
- class efl.ecore_input.EventMouseWheel¶
Bases:
efl.ecore.Event
Contains information about an Ecore mouse wheel event.
See also
- Variables
timestamp (int) – Time when the event occurred
modifiers (int) – Ecore_Event_Modifier The OR combination of modifiers key
same_screen (bool) – Same screen flag
direction (int) – Orientation of the wheel (horizontal/vertical)
z (int) – Value of the wheel event (+1/-1)
x (int) – x coordinate relative to window where event happened
y (int) – y coordinate relative to window where event happened
root (EventPoint) – Coordinates relative to root window.
- class efl.ecore_input.EventMulti(int device, double radius, double radius_x, double radius_y, double pressure, double angle, double x, double y, double root_x, double root_y)¶
Bases:
object
- Variables
device (int) – 0 if normal mouse, 1+ for other mouse-devices (eg multi-touch - other fingers)
radius (double) – radius of press point - radius_x and y if its an ellipse (radius is the average of the 2)
radius_x (double) –
radius_y (double) –
pressure (double) – 1.0 == normal, > 1.0 == more, 0.0 == none
angle (double) – relative to perpendicular (0.0 == perpendicular), in degrees
x (double) – with sub-pixel precision, if available
y (double) – with sub-pixel precision, if available
root_x (double) – with sub-pixel precision, if available
root_y (double) – with sub-pixel precision, if available
- class efl.ecore_input.EventPoint(int x, int y)¶
Bases:
object
- Variables
x (int) – x coordinate
y (int) – y coordinate
- class efl.ecore_input.InputEventHandler(int type, func, *args, **kargs)¶
Bases:
efl.ecore.EventHandler
The event handler class
You never instantiate this class directly, instead use one of the on_*_add() functions.
- efl.ecore_input.init()¶
Initialize the Ecore Input library
Note
You never need to call this, it is automatically called at module import
- efl.ecore_input.on_key_down_add(func, *args, **kargs)¶
Creates an ecore event handler for the ECORE_EVENT_KEY_DOWN event.
- Returns
See also
- efl.ecore_input.on_key_up_add(func, *args, **kargs)¶
Creates an ecore event handler for the ECORE_EVENT_KEY_UP event.
- Returns
See also
- efl.ecore_input.on_mouse_button_down_add(func, *args, **kargs)¶
Creates an ecore event handler for the ECORE_EVENT_MOUSE_BUTTON_DOWN event.
- Returns
See also
- efl.ecore_input.on_mouse_button_up_add(func, *args, **kargs)¶
Create an ecore event handler for the ECORE_EVENT_MOUSE_BUTTON_UP event.
- Returns
See also
- efl.ecore_input.on_mouse_in_add(func, *args, **kargs)¶
Create an ecore event handler for the ECORE_EVENT_MOUSE_IN event.
- Returns
See also
- efl.ecore_input.on_mouse_move_add(func, *args, **kargs)¶
Create an ecore event handler for the ECORE_EVENT_MOUSE_MOVE event.
- Returns
See also
- efl.ecore_input.on_mouse_out_add(func, *args, **kargs)¶
Create an ecore event handler for the ECORE_EVENT_MOUSE_OUT event.
- Returns
See also
- efl.ecore_input.on_mouse_wheel_add(func, *args, **kargs)¶
Create an ecore event handler for the ECORE_EVENT_MOUSE_WHEEL event.
- Returns
See also
- efl.ecore_input.shutdown()¶
Shutdown the Ecore Input library.
Note
You never need to call this, it is automatically called at exit