core: Sit the freeze/thaw example on mainloop for now
This commit is contained in:
parent
24b7f14c14
commit
373a89a421
|
@ -60,22 +60,16 @@ _freezethaw_cb(void *data, const Efl_Event *event)
|
|||
static void
|
||||
_events_freeze(Efl_Loop *mainloop)
|
||||
{
|
||||
Efl_Loop *polled;
|
||||
|
||||
printf("Test 2:\n");
|
||||
|
||||
// we add a secondary loop to experiment with freeze/thaw of events.
|
||||
// if we did these experiments on the main loop, we could not receive
|
||||
// the timer events used to control the test.
|
||||
polled = efl_add(EFL_LOOP_CLASS, mainloop,
|
||||
efl_name_set(efl_added, "subloop"));
|
||||
efl_event_callback_add(polled, EFL_LOOP_EVENT_POLL_HIGH, _poll_cb, NULL);
|
||||
// Set up a new poll on the main loop that we will interupt with freeze.
|
||||
efl_event_callback_add(mainloop, EFL_LOOP_EVENT_POLL_HIGH, _poll_cb, NULL);
|
||||
|
||||
// notify every 0.1 seconds
|
||||
efl_add(EFL_LOOP_TIMER_CLASS, mainloop,
|
||||
efl_name_set(efl_added, "timer2"),
|
||||
efl_loop_timer_interval_set(efl_added, .1),
|
||||
efl_event_callback_add(efl_added, EFL_LOOP_TIMER_EVENT_TICK, _freezethaw_cb, polled));
|
||||
efl_event_callback_add(efl_added, EFL_LOOP_TIMER_EVENT_TICK, _freezethaw_cb, mainloop));
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in New Issue