2016-02-16 05:55:20 -08:00
|
|
|
type @extern Ecore_Select_Function: __undefined_type;
|
|
|
|
|
2014-06-20 04:56:29 -07:00
|
|
|
class Ecore_Mainloop (Eo.Base)
|
2014-06-16 06:24:45 -07:00
|
|
|
{
|
2016-04-15 06:45:15 -07:00
|
|
|
[[The Ecore Main Loop
|
|
|
|
|
|
|
|
Ecore is a clean and tiny event loop library with many modules to do lots of
|
|
|
|
convenient things for a programmer, to save time and effort. It's small and
|
|
|
|
lean, designed to work from embedded systems all the way up to large and
|
|
|
|
powerful multi-cpu workstations. The main loop has a number of primitives to
|
|
|
|
be used with its main loop. It serializes all the primitives and allows for
|
|
|
|
great responsiveness without the need for threads(or any other concurrency).
|
|
|
|
]]
|
2014-06-16 06:24:45 -07:00
|
|
|
legacy_prefix: null;
|
2015-05-07 08:36:45 -07:00
|
|
|
methods {
|
|
|
|
@property select_func {
|
2016-04-15 06:45:15 -07:00
|
|
|
[[Function to use when monitoring multiple file descriptors.]]
|
2014-06-16 06:24:45 -07:00
|
|
|
set {
|
|
|
|
}
|
|
|
|
get {
|
|
|
|
}
|
|
|
|
values {
|
2015-05-18 08:13:08 -07:00
|
|
|
select_func: Ecore_Select_Function;
|
2016-04-15 06:45:15 -07:00
|
|
|
[[This function will be used instead of the system call select.]]
|
2014-06-16 06:24:45 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
iterate {
|
2016-04-15 06:45:15 -07:00
|
|
|
[[Runs a single iteration of the main loop to process everything on the
|
|
|
|
queue.]]
|
2014-06-16 06:24:45 -07:00
|
|
|
}
|
|
|
|
iterate_may_block {
|
2016-04-15 06:45:15 -07:00
|
|
|
[[Runs a single iteration of the main loop to process everything on the
|
|
|
|
queue with block/non-blocking status.]]
|
2014-08-08 07:40:19 -07:00
|
|
|
return: int;
|
2014-06-16 06:24:45 -07:00
|
|
|
params {
|
2016-04-15 06:45:15 -07:00
|
|
|
may_block: int; [[A flag if the main loop has a possibility of blocking.]]
|
2014-06-16 06:24:45 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
begin {
|
2016-04-15 06:45:15 -07:00
|
|
|
[[Runs the application main loop.]]
|
2014-06-16 06:24:45 -07:00
|
|
|
}
|
|
|
|
quit {
|
2016-04-15 06:45:15 -07:00
|
|
|
[[Quits the main loop once all the events currently on the queue have
|
|
|
|
been processed.]]
|
2014-06-16 06:24:45 -07:00
|
|
|
}
|
|
|
|
animator_ticked {
|
2016-04-15 06:45:15 -07:00
|
|
|
[[Returns if an animator has ticked off during this loop iteration.]]
|
2014-06-16 06:24:45 -07:00
|
|
|
/* FIXME: Should it be a prooperty? */
|
2014-08-28 09:02:10 -07:00
|
|
|
return: bool;
|
2014-06-16 06:24:45 -07:00
|
|
|
}
|
|
|
|
}
|
2014-07-31 22:38:40 -07:00
|
|
|
events {
|
2016-04-20 15:54:18 -07:00
|
|
|
idle,enter @restart; [[Event occurs once the main loop enters the idle state.]]
|
|
|
|
idle,exit @restart; [[Event occurs once the main loop exits the idle state.]]
|
|
|
|
idle @restart; /* FIXME: We need to make sure we can get it work. */
|
2014-07-31 22:38:40 -07:00
|
|
|
/* TODO: All of the legacy ecore events. (Ecore.h header) */
|
|
|
|
}
|
2014-06-16 06:24:45 -07:00
|
|
|
}
|