Add bindings for `pw_loop`.
This adds a Loop
struct for creating and managing a pw_loop
struct, so that instead of blocking on a mainloop, a loop can be iterated manually (for example, this allows nesting it inside a GMainContext
when working with glib).
It also adds a LoopRef
struct that is a transparent wrapper around pw_loop
,
and can be obtained from both a Loop
and MainLoop
.
The methods previously on the loop trait are moved there, and the loop trait is now only responsible for obtaining
such a LoopRef
from any loop.
I also added the last missing loop source, IdleSource
to call a callback whenever the loop is idle.