Also, add a comment for why using TYPE_UI here. In Linux-based platforms, we want the Glib message pump running (that is given by us by a UI message loop). For other platforms we can stick with TYPE_DEFAULT until there's a need to change it, so I think is best to keep the choice behind an ifdef.

Create a variable MessageLoop::Type and set it behind ifdefs, then use that variable in main_message_loop creation.