Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
Ecore Input

Data Structures

struct  _Ecore_Event_Key
 Contains information about an Ecore keyboard event. More...
 
struct  _Ecore_Event_Mouse_Button
 Contains information about an Ecore mouse button event. More...
 
struct  _Ecore_Event_Mouse_Wheel
 Contains information about an Ecore mouse wheel event. More...
 
struct  _Ecore_Event_Mouse_Move
 Contains information about an Ecore mouse move event. More...
 
struct  _Ecore_Axis
 
struct  _Ecore_Event_Axis_Update
 
struct  _Ecore_Event_Mouse_IO
 Contains information about an Ecore mouse input/output event. More...
 
struct  _Ecore_Event_Modifiers
 Contains information about an Ecore event modifier. More...
 
struct  _Ecore_Event_Joystick
 Contains information about a joystick event. More...
 
struct  _Ecore_Event_Joystic_Button
 Contains information about a joystick button event. More...
 
struct  _Ecore_Event_Joystic_Axis
 Contains information about a joystick axis event. More...
 
struct  _Ecore_Event_Joystic_Event_Type
 Contains information about a joystick event type. More...
 

Macros

#define ECORE_EVENT_MODIFIER_SHIFT   0x0001
 
#define ECORE_EVENT_MODIFIER_CTRL   0x0002
 
#define ECORE_EVENT_MODIFIER_ALT   0x0004
 
#define ECORE_EVENT_MODIFIER_WIN   0x0008
 
#define ECORE_EVENT_MODIFIER_SCROLL   0x0010
 
#define ECORE_EVENT_MODIFIER_NUM   0x0020
 
#define ECORE_EVENT_MODIFIER_CAPS   0x0040
 
#define ECORE_EVENT_LOCK_SCROLL   0x0080
 
#define ECORE_EVENT_LOCK_NUM   0x0100
 
#define ECORE_EVENT_LOCK_CAPS   0x0200
 
#define ECORE_EVENT_LOCK_SHIFT   0x0300
 
#define ECORE_EVENT_MODIFIER_ALTGR   0x0400
 
#define _ECORE_WINDOW_PREDEF   1
 
#define EAPI
 
#define EAPI
 

Typedefs

typedef uintptr_t Ecore_Window
 
typedef struct _Ecore_Event_Key Ecore_Event_Key
 
typedef struct _Ecore_Event_Mouse_Button Ecore_Event_Mouse_Button
 
typedef struct _Ecore_Event_Mouse_Wheel Ecore_Event_Mouse_Wheel
 
typedef struct _Ecore_Event_Mouse_Move Ecore_Event_Mouse_Move
 
typedef struct _Ecore_Event_Mouse_IO Ecore_Event_Mouse_IO
 
typedef struct _Ecore_Event_Modifiers Ecore_Event_Modifiers
 
typedef struct _Ecore_Event_Axis_Update Ecore_Event_Axis_Update
 
typedef struct _Ecore_Axis Ecore_Axis
 
typedef struct _Ecore_Event_Joystick Ecore_Event_Joystick
 
typedef enum _Ecore_Event_Modifier Ecore_Event_Modifier
 An enum of modifier events.
 
typedef enum _Ecore_Event_Press Ecore_Event_Press
 An enum of press events.
 
typedef enum _Ecore_Event_IO Ecore_Event_IO
 An enum of Input/Output events.
 
typedef enum _Ecore_Compose_State Ecore_Compose_State
 An enum of Compose states.
 
typedef enum _Ecore_Event_Joystick_Button Ecore_Event_Joystick_Button
 
typedef enum _Ecore_Event_Joystick_Axis Ecore_Event_Joystick_Axis
 
typedef enum _Ecore_Event_Joystick_Event Ecore_Event_Joystick_Event_Type
 
typedef enum _Ecore_Axis_Label Ecore_Axis_Label
 

Enumerations

enum  _Ecore_Event_Modifier {
  ECORE_NONE ,
  ECORE_SHIFT ,
  ECORE_CTRL ,
  ECORE_ALT ,
  ECORE_WIN ,
  ECORE_SCROLL ,
  ECORE_CAPS ,
  ECORE_MODE ,
  ECORE_LAST
}
 
enum  _Ecore_Event_Press {
  ECORE_DOWN ,
  ECORE_UP ,
  ECORE_CANCEL
}
 
enum  _Ecore_Event_IO {
  ECORE_IN ,
  ECORE_OUT
}
 
enum  _Ecore_Compose_State {
  ECORE_COMPOSE_NONE ,
  ECORE_COMPOSE_MIDDLE ,
  ECORE_COMPOSE_DONE
}
 
enum  _Ecore_Event_Joystick_Button {
  ECORE_EVENT_JOYSTICK_BUTTON_NONE ,
  ECORE_EVENT_JOYSTICK_BUTTON_FACE_0 ,
  ECORE_EVENT_JOYSTICK_BUTTON_FACE_1 ,
  ECORE_EVENT_JOYSTICK_BUTTON_FACE_2 ,
  ECORE_EVENT_JOYSTICK_BUTTON_FACE_3 ,
  ECORE_EVENT_JOYSTICK_BUTTON_LEFT_SHOULDER ,
  ECORE_EVENT_JOYSTICK_BUTTON_RIGHT_SHOULDER ,
  ECORE_EVENT_JOYSTICK_BUTTON_SELECT ,
  ECORE_EVENT_JOYSTICK_BUTTON_START ,
  ECORE_EVENT_JOYSTICK_BUTTON_LEFT_ANALOG_STICK ,
  ECORE_EVENT_JOYSTICK_BUTTON_RIGHT_ANALOG_STICK ,
  ECORE_EVENT_JOYSTICK_BUTTON_META ,
  ECORE_EVENT_JOYSTICK_BUTTON_LAST
}
 
enum  _Ecore_Event_Joystick_Axis {
  ECORE_EVENT_JOYSTICK_AXIS_NONE ,
  ECORE_EVENT_JOYSTICK_AXIS_HAT_X ,
  ECORE_EVENT_JOYSTICK_AXIS_HAT_Y ,
  ECORE_EVENT_JOYSTICK_AXIS_LEFT_SHOULDER ,
  ECORE_EVENT_JOYSTICK_AXIS_RIGHT_SHOULDER ,
  ECORE_EVENT_JOYSTICK_AXIS_LEFT_ANALOG_HOR ,
  ECORE_EVENT_JOYSTICK_AXIS_LEFT_ANALOG_VER ,
  ECORE_EVENT_JOYSTICK_AXIS_RIGHT_ANALOG_HOR ,
  ECORE_EVENT_JOYSTICK_AXIS_RIGHT_ANALOG_VER ,
  ECORE_EVENT_JOYSTICK_AXIS_LAST
}
 
enum  _Ecore_Event_Joystick_Event {
  ECORE_EVENT_JOYSTICK_EVENT_TYPE_NONE ,
  ECORE_EVENT_JOYSTICK_EVENT_TYPE_CONNECTED ,
  ECORE_EVENT_JOYSTICK_EVENT_TYPE_DISCONNECTED ,
  ECORE_EVENT_JOYSTICK_EVENT_TYPE_BUTTON ,
  ECORE_EVENT_JOYSTICK_EVENT_TYPE_AXIS ,
  ECORE_EVENT_JOYSTICK_EVENT_TYPE_LAST
}
 
enum  _Ecore_Axis_Label {
  ECORE_AXIS_LABEL_UNKNOWN ,
  ECORE_AXIS_LABEL_X ,
  ECORE_AXIS_LABEL_Y ,
  ECORE_AXIS_LABEL_PRESSURE ,
  ECORE_AXIS_LABEL_DISTANCE ,
  ECORE_AXIS_LABEL_AZIMUTH ,
  ECORE_AXIS_LABEL_TILT ,
  ECORE_AXIS_LABEL_TWIST ,
  ECORE_AXIS_LABEL_TOUCH_WIDTH_MAJOR ,
  ECORE_AXIS_LABEL_TOUCH_WIDTH_MINOR ,
  ECORE_AXIS_LABEL_TOOL_WIDTH_MAJOR ,
  ECORE_AXIS_LABEL_TOOL_WIDTH_MINOR ,
  ECORE_AXIS_LABEL_WINDOW_X ,
  ECORE_AXIS_LABEL_WINDOW_Y ,
  ECORE_AXIS_LABEL_NORMAL_X ,
  ECORE_AXIS_LABEL_NORMAL_Y ,
  ECORE_AXIS_LABEL_TOUCH_PALM
}
 

Functions

EAPI int ecore_event_init (void)
 Initializes the Ecore Event system.
 
EAPI int ecore_event_shutdown (void)
 Shutdowns the Ecore Event system.
 
EAPI unsigned int ecore_event_modifier_mask (Ecore_Event_Modifier modifier)
 Returns the Ecore modifier event integer associated to a Ecore_Event_Modifier modifier event. More...
 
EAPI Ecore_Event_Modifier ecore_event_update_modifier (const char *key, Ecore_Event_Modifiers *modifiers, int inc)
 Update a Ecore_Event_Modifiers array with "key" modifier. More...
 
EAPI Ecore_Compose_State ecore_compose_get (const Eina_List *seq, char **seqstr_ret)
 Handles a sequence of key symbols to make a final compose string. More...
 
EAPI void ecore_input_joystick_event_axis_deadzone_set (int event_axis_deadzone)
 Set deadzone of joystick event for an axis. More...
 
EAPI int ecore_input_joystick_event_axis_deadzone_get (void)
 Get deadzone of joystick event for an axis. More...
 
EAPI const char * ecore_input_joystick_name_get (int index)
 Get name of joystick. More...
 

Variables

EAPI int ECORE_EVENT_KEY_DOWN
 
EAPI int ECORE_EVENT_KEY_UP
 
EAPI int ECORE_EVENT_MOUSE_BUTTON_DOWN
 
EAPI int ECORE_EVENT_MOUSE_BUTTON_UP
 
EAPI int ECORE_EVENT_MOUSE_MOVE
 
EAPI int ECORE_EVENT_MOUSE_WHEEL
 
EAPI int ECORE_EVENT_MOUSE_IN
 
EAPI int ECORE_EVENT_MOUSE_OUT
 
EAPI int ECORE_EVENT_AXIS_UPDATE
 
EAPI int ECORE_EVENT_MOUSE_BUTTON_CANCEL
 
EAPI int ECORE_EVENT_JOYSTICK
 

Detailed Description

Macro Definition Documentation

◆ ECORE_EVENT_MODIFIER_ALTGR

#define ECORE_EVENT_MODIFIER_ALTGR   0x0400
Since
1.7

Typedef Documentation

◆ Ecore_Event_Axis_Update

Since
1.13

◆ Ecore_Axis

typedef struct _Ecore_Axis Ecore_Axis
Since
1.13

◆ Ecore_Event_Joystick

Since
1.18

◆ Ecore_Event_Joystick_Button

typedef enum _Ecore_Event_Joystick_Button Ecore_Event_Joystick_Button
Since
1.18

◆ Ecore_Event_Joystick_Axis

typedef enum _Ecore_Event_Joystick_Axis Ecore_Event_Joystick_Axis
Since
1.18

◆ Ecore_Event_Joystick_Event_Type

typedef enum _Ecore_Event_Joystick_Event Ecore_Event_Joystick_Event_Type
Since
1.18

◆ Ecore_Axis_Label

Since
1.13

Enumeration Type Documentation

◆ _Ecore_Event_Modifier

Enumerator
ECORE_MODE 
Since
1.7

◆ _Ecore_Axis_Label

Enumerator
ECORE_AXIS_LABEL_UNKNOWN 

Axis type is not known.

Range: Unbounded. Unit: Undefined.

Since
1.13
ECORE_AXIS_LABEL_X 

Position along physical X axis; not window relative.

Range: Unbounded. Unit: Undefined.

Since
1.13
ECORE_AXIS_LABEL_Y 

Position along physical Y axis; not window relative.

Range: Unbounded. Unit: Undefined.

Since
1.13
ECORE_AXIS_LABEL_PRESSURE 

Force applied to tool tip.

Range: [0.0, 1.0]. Unit: Unitless.

Since
1.13
ECORE_AXIS_LABEL_DISTANCE 

Relative distance along physical Z axis.

Range: [0.0, 1.0]. Unit: Unitless.

Since
1.13
ECORE_AXIS_LABEL_AZIMUTH 

Angle of tool about the Z axis from positive X axis.

Range: [-PI, PI]. Unit: Radians.

Since
1.13
ECORE_AXIS_LABEL_TILT 

Angle of tool about plane of sensor from positive Z axis.

Range: [0.0, PI]. Unit: Radians.

Since
1.13
ECORE_AXIS_LABEL_TWIST 

Rotation of tool about its major axis from its "natural" position.

Range: [-PI, PI] Unit: Radians.

Since
1.13
ECORE_AXIS_LABEL_TOUCH_WIDTH_MAJOR 

Length of contact ellipse along AZIMUTH.

Range: Unbounded: Unit: Same as ECORE_AXIS_LABEL_{X,Y}.

Since
1.13
ECORE_AXIS_LABEL_TOUCH_WIDTH_MINOR 

Length of contact ellipse perpendicular to AZIMUTH.

Range: Unbounded. Unit: Same as ECORE_AXIS_LABEL_{X,Y}.

Since
1.13
ECORE_AXIS_LABEL_TOOL_WIDTH_MAJOR 

Length of tool ellipse along AZIMUTH.

Range: Unbounded. Unit: Same as ECORE_AXIS_LABEL_{X,Y}.

Since
1.13
ECORE_AXIS_LABEL_TOOL_WIDTH_MINOR 

Length of tool ellipse perpendicular to AZIMUTH.

Range: Unbounded. Unit: Same as ECORE_AXIS_LABEL_{X,Y}.

Since
1.13
ECORE_AXIS_LABEL_WINDOW_X 

X coordinate mapped to the window.

Since
1.19
ECORE_AXIS_LABEL_WINDOW_Y 

Y coordinate mapped to the window.

Since
1.19
ECORE_AXIS_LABEL_NORMAL_X 

X normalized to the [0, 1] range.

Since
1.19
ECORE_AXIS_LABEL_NORMAL_Y 

Y normalized to the [0, 1] range.

Since
1.19
ECORE_AXIS_LABEL_TOUCH_PALM 

Size of palm contact.

Range: Unbounded. Unit: undefined. May be a boolean or a distance value, depending on the underlying H/W.

Since
1.20

Function Documentation

◆ ecore_event_modifier_mask()

EAPI unsigned int ecore_event_modifier_mask ( Ecore_Event_Modifier  modifier)

Returns the Ecore modifier event integer associated to a Ecore_Event_Modifier modifier event.

Parameters
modifierA Ecore_Event_Modifier event.
Returns
A event_modifier integer that matches with the provided modifier event.

◆ ecore_event_update_modifier()

EAPI Ecore_Event_Modifier ecore_event_update_modifier ( const char *  key,
Ecore_Event_Modifiers modifiers,
int  inc 
)

Update a Ecore_Event_Modifiers array with "key" modifier.

Parameters
keyA string describing a modifier key.
modifiersA Ecore_Event_Modifiers structure.
incThe value to increment in the modifiers array.
Returns
ECORE_NONE if the key does not match with an existing one, else the corresponding Ecore_Event_Modifier.

◆ ecore_compose_get()

EAPI Ecore_Compose_State ecore_compose_get ( const Eina_List seq,
char **  seqstr_ret 
)

Handles a sequence of key symbols to make a final compose string.

The final compose string seqstr_ret is allocated in this function and thus shall be freed when not needed anymore.

Parameters
seqThe sequence of key symbols in a Eina_List.
seqstr_retThe final compose string.
Returns
The status of the composition.

◆ ecore_input_joystick_event_axis_deadzone_set()

EAPI void ecore_input_joystick_event_axis_deadzone_set ( int  event_axis_deadzone)

Set deadzone of joystick event for an axis.

The axis type joystick event occurs without user's control if joystick is too sensitive. The deadzone prevents unnecessary events. The default value is 200. The event value for an axis is a signed integer between -32767 and +32767.

Parameters
event_axis_deadzoneThe joystick event axis deadzone.
Since
1.19

◆ ecore_input_joystick_event_axis_deadzone_get()

EAPI int ecore_input_joystick_event_axis_deadzone_get ( void  )

Get deadzone of joystick event for an axis.

Returns
deadzone of joystick event for an axis.
Since
1.19

◆ ecore_input_joystick_name_get()

EAPI const char * ecore_input_joystick_name_get ( int  index)

Get name of joystick.

This function returns the name string of the joysitck. If index does not exist, or on error, this function returns NULL.

Parameters
indexThe index of joystick.
Returns
name of joystick.
Since
1.20

References ecore_main_fd_handler_fd_get(), and EINA_LIST_FOREACH.

Variable Documentation

◆ ECORE_EVENT_AXIS_UPDATE

EAPI int ECORE_EVENT_AXIS_UPDATE
extern
Since
1.13

◆ ECORE_EVENT_MOUSE_BUTTON_CANCEL

EAPI int ECORE_EVENT_MOUSE_BUTTON_CANCEL
extern
Since
1.15

◆ ECORE_EVENT_JOYSTICK

EAPI int ECORE_EVENT_JOYSTICK
extern
Since
1.18