Efl.Loop (class)

Description

The Efl Main Loop

The Efl main loop provides a clean and tiny event loop library with many modules to do lots of convenient things for a programmer, saving time and effort. It's lean and designed to work on anything from embedded systems all the way up to large and powerful multi-cpu workstations. The main loop has a number of primitives you can use. It serializes these and allows for greater responsiveness without the need for threads (or any other concurrency). However you can provide these if you need to.

Inheritance

Members

app_efl_version (get)

Indicates the version of EFL with which this application was compiled.
const Efl_Version *efl_loop_app_efl_version_get(const Eo *obj);


begin

Runs the application main loop.
Eina_Value *efl_loop_begin(Eo *obj);


constructor [Overridden from Efl.Object]

Call the object's constructor.
Efl_Object *efl_constructor(Eo *obj);


destructor [Overridden from Efl.Object]

Call the object's destructor.
void efl_destructor(Eo *obj);


efl_version (get)

Indicates the currently running version of EFL.
const Efl_Version *efl_loop_efl_version_get(const Eo *obj);


idle

A future promise that will be resolved from a clean main loop context as soon as the main loop is idle.
Eina_Future *efl_loop_idle(Eo *obj);


iterate

Runs a single iteration of the main loop to process everything on the queue.
void efl_loop_iterate(Eo *obj);


iterate_may_block

Runs a single iteration of the main loop to process everything on the queue with block/non-blocking status.
int efl_loop_iterate_may_block(Eo *obj, int may_block);


job

A future promise that will be resolved from a clean main loop context as soon as possible.
Eina_Future *efl_loop_job(Eo *obj);


main (get) class

Points to the main loop instance of the application.
Efl_Loop *efl_loop_main_get(Efl_Class *klass);


message_handler_get class

Get a message handler object that is created by and owned by the Efl.Loop object, so you can listen to this message type by listening to message events on the handler as well as send objects as events.
Efl_Loop_Message_Handler *efl_loop_message_handler_get(Efl_Class *klass, Efl_Loop *loop, const Efl_Class *klass);


provider_find [Overridden from Efl.Object]

Searches upwards in the object tree for a provider which knows the given class/interface.
Efl_Object *efl_provider_find(const Eo *obj, const Efl_Object *klass);


quit

Quits the main loop once all the events currently on the queue have been processed.
void efl_loop_quit(Eo *obj, Eina_Value exit_code);


register

Will register a manager of a specific class to be answered by eo.provider_find.
Eina_Bool efl_loop_register(Eo *obj, const Efl_Class *klass, const Efl_Object *provider);


throttle (get, set)

Slow down the loop execution by forcing sleep for a small period of time every time the loop iterates/loops.
double efl_loop_throttle_get(const Eo *obj);
void efl_loop_throttle_set(Eo *obj, double amount);


time (get, set)

The time point when the loop was logically woken.
double efl_loop_time_get(const Eo *obj);
void efl_loop_time_set(Eo *obj, double timepoint);


timeout

A future promise that will be resolved from a clean main loop context after time seconds.
Eina_Future *efl_loop_timeout(Eo *obj, double time);


unregister

Will unregister a manager of a specific class that was previously registered and answered by eo.provider_find.
Eina_Bool efl_loop_unregister(Eo *obj, const Efl_Class *klass, const Efl_Object *provider);


Inherited

Efl.Object
allow_parent_unref (get, set) Allow an object to be deleted by unref even if it has a parent.
children_iterator_new Get an iterator on all childrens
comment (get, set) A human readable comment for the object
composite_attach Make an object a composite object of another.
composite_detach Detach a composite object from another object.
composite_part_is Check if an object is part of a composite object.
debug_name_override Build a read-only name for this object used for debugging.
del Unrefs the object and reparents it to NULL.
event_callback_forwarder_add Add an event callback forwarder for an event and an object.
event_callback_forwarder_del Remove an event callback forwarder for an event and an object.
event_callback_stop Stop the current callback call.
event_freeze Freeze events of object.
event_freeze_count (get) Return freeze events of object.
class event_global_freeze Freeze events of object.
class event_global_freeze_count (get) Return freeze events of object.
class event_global_thaw Thaw events of object.
event_thaw Thaw events of object.
finalize Called at the end of efl_add. Should not be called, just overridden.
finalized (get) True if the object is already finalized, otherwise false.
name (get, set) The name of the object.
name_find Find a child object with the given name and return it.
parent (get, set) The parent of an object.

Events

arguments

Event happens when args are provided to the loop by args_add().
EFL_LOOP_EVENT_ARGUMENTS(Efl_Loop_Arguments)


idle

Event occurs once the main loop is idle. If you keep listening on this event it may increase the burden on your CPU.
EFL_LOOP_EVENT_IDLE(void, @restart)


idle,enter

Event occurs once the main loop enters the idle state.
EFL_LOOP_EVENT_IDLE_ENTER(void, @restart)


idle,exit

Event occurs once the main loop exits the idle state.
EFL_LOOP_EVENT_IDLE_EXIT(void, @restart)


pause

Called when the window is not going be displayed for some time
EFL_LOOP_EVENT_PAUSE(void)


poll,high

Event occurs multiple times per second. The exact tick is undefined and can be adjusted system wide.
EFL_LOOP_EVENT_POLL_HIGH(void)


poll,low

Event occurs multiple times every 15 minutes. The exact tick is undefined and can be adjusted system wide.
EFL_LOOP_EVENT_POLL_LOW(void)


poll,medium

Event occurs multiple times per minute. The exact tick is undefined and can be adjusted system wide.
EFL_LOOP_EVENT_POLL_MEDIUM(void)


resume

Called before a window is rendered after a pause event
EFL_LOOP_EVENT_RESUME(void)


signal,hup

System specific, but on unix maps to SIGHUP signal to the process - only called on main loop object
EFL_LOOP_EVENT_SIGNAL_HUP(void)


signal,usr1

System specific, but on unix maps to SIGUSR1 signal to the process - only called on main loop object
EFL_LOOP_EVENT_SIGNAL_USR1(void)


signal,usr2

System specific, but on unix maps to SIGUSR2 signal to the process - only called on main loop object
EFL_LOOP_EVENT_SIGNAL_USR2(void)


terminate

Called before starting the shutdown of Elementary
EFL_LOOP_EVENT_TERMINATE(void)


Inherited

Efl.Object
callback,add A callback was added.
callback,del A callback was deleted.
del Object is being deleted.
destruct Object has been fully destroyed. It can not be used beyond this point. This event should only serve to clean up any dangling pointer.