Event Feeding Functions

Functions to tell Evas that events happened and should be processed. More...

Functions

EAPI int evas_event_freeze_get (const Evas *e)
 Return the freeze count of a given canvas.
EAPI void evas_event_feed_mouse_down (Evas *e, int b, Evas_Button_Flags flags, unsigned int timestamp, const void *data)
 Mouse down event feed.
EAPI void evas_event_feed_mouse_up (Evas *e, int b, Evas_Button_Flags flags, unsigned int timestamp, const void *data)
 Mouse up event feed.
EAPI void evas_event_feed_mouse_cancel (Evas *e, unsigned int timestamp, const void *data)
 Mouse cancel event feed.
EAPI void evas_event_feed_mouse_wheel (Evas *e, int direction, int z, unsigned int timestamp, const void *data)
 Mouse wheel event feed.
EAPI void evas_event_feed_mouse_move (Evas *e, int x, int y, unsigned int timestamp, const void *data)
 Mouse move event feed.
EAPI void evas_event_feed_mouse_in (Evas *e, unsigned int timestamp, const void *data)
 Mouse in event feed.
EAPI void evas_event_feed_mouse_out (Evas *e, unsigned int timestamp, const void *data)
 Mouse out event feed.
EAPI void evas_event_feed_key_down (Evas *e, const char *keyname, const char *key, const char *string, const char *compose, unsigned int timestamp, const void *data)
 Key down event feed.
EAPI void evas_event_feed_key_up (Evas *e, const char *keyname, const char *key, const char *string, const char *compose, unsigned int timestamp, const void *data)
 Key up event feed.
EAPI void evas_event_feed_hold (Evas *e, int hold, unsigned int timestamp, const void *data)
 Hold event feed.

Detailed Description

Functions to tell Evas that events happened and should be processed.

As explained in What Evas is not?, Evas does not know how to poll for events, so the developer should do it and then feed such events to the canvas to be processed. This is only required if operating Evas directly as modules such as Ecore_Evas does that for you.


Function Documentation

EAPI void evas_event_feed_hold ( Evas e,
int  hold,
unsigned int  timestamp,
const void *  data 
)

Hold event feed.

Parameters:
eThe given canvas pointer.
holdThe hold.
timestampThe timestamp of the mouse up event.
dataThe data for canvas.

This function makes the object to stop sending events.

References EVAS_CALLBACK_HOLD, EVAS_EVENT_FLAG_NONE, and _Evas_Event_Hold::hold.

EAPI void evas_event_feed_key_down ( Evas e,
const char *  keyname,
const char *  key,
const char *  string,
const char *  compose,
unsigned int  timestamp,
const void *  data 
)

Key down event feed.

Parameters:
eThe canvas to thaw out
keynameName of the key
keyThe key pressed.
stringA String
composeThe compose string
timestampTimestamp of the mouse up event
dataData for canvas.

This function will set some evas properties that is necessary when a key is pressed. It prepares information to be treated by the callback function.

References _Evas_Event_Key_Down::compose, EVAS_CALLBACK_KEY_DOWN, EVAS_EVENT_FLAG_NONE, _Evas_Event_Key_Down::key, _Evas_Event_Key_Down::keyname, and _Evas_Event_Key_Down::string.

EAPI void evas_event_feed_key_up ( Evas e,
const char *  keyname,
const char *  key,
const char *  string,
const char *  compose,
unsigned int  timestamp,
const void *  data 
)

Key up event feed.

Parameters:
eThe canvas to thaw out
keynameName of the key
keyThe key released.
stringstring
composecompose
timestampTimestamp of the mouse up event
dataData for canvas.

This function will set some evas properties that is necessary when a key is released. It prepares information to be treated by the callback function.

References _Evas_Event_Key_Up::compose, EVAS_CALLBACK_KEY_UP, EVAS_EVENT_FLAG_NONE, _Evas_Event_Key_Up::key, _Evas_Event_Key_Up::keyname, and _Evas_Event_Key_Up::string.

EAPI void evas_event_feed_mouse_cancel ( Evas e,
unsigned int  timestamp,
const void *  data 
)

Mouse cancel event feed.

Parameters:
eThe given canvas pointer.
timestampThe timestamp of the mouse up event.
dataThe data for canvas.

This function will call evas_event_feed_mouse_up() when a mouse cancel event happens.

References evas_event_feed_mouse_up().

EAPI void evas_event_feed_mouse_down ( Evas e,
int  b,
Evas_Button_Flags  flags,
unsigned int  timestamp,
const void *  data 
)

Mouse down event feed.

Parameters:
eThe given canvas pointer.
bThe button number.
flagsThe evas button flags.
timestampThe timestamp of the mouse down event.
dataThe data for canvas.

This function will set some evas properties that is necessary when the mouse button is pressed. It prepares information to be treated by the callback function.

References _Evas_Event_Mouse_Down::button, EVAS_CALLBACK_MOUSE_DOWN, and EVAS_EVENT_FLAG_NONE.

EAPI void evas_event_feed_mouse_in ( Evas e,
unsigned int  timestamp,
const void *  data 
)

Mouse in event feed.

Parameters:
eThe given canvas pointer.
timestampThe timestamp of the mouse up event.
dataThe data for canvas.

This function will set some evas properties that is necessary when the mouse in event happens. It prepares information to be treated by the callback function.

References _Evas_Event_Mouse_In::buttons, EVAS_CALLBACK_MOUSE_IN, evas_event_feed_mouse_move(), and EVAS_EVENT_FLAG_NONE.

EAPI void evas_event_feed_mouse_move ( Evas e,
int  x,
int  y,
unsigned int  timestamp,
const void *  data 
)

Mouse move event feed.

Parameters:
eThe given canvas pointer.
xThe horizontal position of the mouse pointer.
yThe vertical position of the mouse pointer.
timestampThe timestamp of the mouse up event.
dataThe data for canvas.

This function will set some evas properties that is necessary when the mouse is moved from its last position. It prepares information to be treated by the callback function.

References _Evas_Event_Mouse_In::buttons, _Evas_Event_Mouse_Out::buttons, _Evas_Event_Mouse_Move::buttons, EVAS_CALLBACK_MOUSE_IN, EVAS_CALLBACK_MOUSE_MOVE, EVAS_CALLBACK_MOUSE_OUT, and EVAS_EVENT_FLAG_NONE.

Referenced by evas_event_feed_mouse_in(), evas_event_feed_mouse_up(), evas_object_clip_set(), evas_object_clip_unset(), evas_object_hide(), evas_object_layer_set(), evas_object_line_xy_set(), evas_object_lower(), evas_object_move(), evas_object_pass_events_set(), evas_object_polygon_point_add(), evas_object_polygon_points_clear(), evas_object_raise(), evas_object_repeat_events_set(), evas_object_resize(), evas_object_show(), evas_object_stack_above(), evas_object_stack_below(), evas_object_text_font_set(), and evas_object_text_text_set().

EAPI void evas_event_feed_mouse_out ( Evas e,
unsigned int  timestamp,
const void *  data 
)

Mouse out event feed.

Parameters:
eThe given canvas pointer.
timestampTimestamp of the mouse up event.
dataThe data for canvas.

This function will set some evas properties that is necessary when the mouse out event happens. It prepares information to be treated by the callback function.

References _Evas_Event_Mouse_Out::buttons, EVAS_CALLBACK_MOUSE_OUT, and EVAS_EVENT_FLAG_NONE.

EAPI void evas_event_feed_mouse_up ( Evas e,
int  b,
Evas_Button_Flags  flags,
unsigned int  timestamp,
const void *  data 
)

Mouse up event feed.

Parameters:
eThe given canvas pointer.
bThe button number.
flagsevas button flags.
timestampThe timestamp of the mouse up event.
dataThe data for canvas.

This function will set some evas properties that is necessary when the mouse button is released. It prepares information to be treated by the callback function.

References _Evas_Event_Mouse_Up::button, _Evas_Event_Mouse_In::buttons, _Evas_Event_Mouse_Out::buttons, EVAS_CALLBACK_MOUSE_IN, EVAS_CALLBACK_MOUSE_OUT, EVAS_CALLBACK_MOUSE_UP, evas_event_feed_mouse_move(), and EVAS_EVENT_FLAG_NONE.

Referenced by evas_event_feed_mouse_cancel().

EAPI void evas_event_feed_mouse_wheel ( Evas e,
int  direction,
int  z,
unsigned int  timestamp,
const void *  data 
)

Mouse wheel event feed.

Parameters:
eThe given canvas pointer.
directionThe wheel mouse direction.
zHow much mouse wheel was scrolled up or down.
timestampThe timestamp of the mouse up event.
dataThe data for canvas.

This function will set some evas properties that is necessary when the mouse wheel is scrolled up or down. It prepares information to be treated by the callback function.

References EVAS_CALLBACK_MOUSE_WHEEL, and EVAS_EVENT_FLAG_NONE.

EAPI int evas_event_freeze_get ( const Evas e)

Return the freeze count of a given canvas.

Parameters:
eThe canvas to fetch the freeze count from.

This returns the number of times the canvas has been told to freeze events. It is possible to call evas_event_freeze() multiple times, and these must be matched by evas_event_thaw() calls. This call allows the program to discover just how many times things have been frozen in case it may want to break out of a deep freeze state where the count is high.

Example:

 extern Evas *evas;

 while (evas_event_freeze_get(evas) > 0) evas_event_thaw(evas);