I have a 3rd party library with mainloop. I want to use GLib/Gtk with the app I'm developing. Is it possible to integrate GLib mainloop into another host?
The host loop allows to register an fd and execute nonblocking callback. Does GLib mainloop expose an fd to poll on and a function to process single event?
In general when joining two frameworks that both have main loops, you have to decide on one to be the "main one" and from inside its callbacks call the contents of the main loop of the other one.
But since your question seems to be "register an fd and execute nonblocking callback", maybe this could be your solution?