Hm, this might be tricky. It’s much more common to do the opposite and change your application’s main loop abstraction to use GMainContext. It’s not going to be as easy as checking an fd: you cannot operate on fds because not every GSource corresponds to an fd, they can trigger for different reasons based on prepare()/check() functions and/or child sources, etc.
Maybe g_main_context_pending() would help? You’d have to check that on a timeout, though, which could mess up code that expects to execute sooner than whatever timeout you pick. You might need to make API changes to GMainContext if you want to do better than this.