GLib.MainContext.prototype.query

function query(max_priority: Number(gint)): [return_value: Number(gint), timeout_: Number(gint), fds: Array(GLib.PollFD)] {
    // Gjs wrapper for g_main_context_query()
}
  

Determines information necessary to poll this main loop.

You must have successfully acquired the context with GLib.MainContext.prototype.acquire before you may call this function.

max_priority

maximum priority source to check

return_value

the number of records actually stored in fds, or, if more than n_fds records need to be stored, the number of records that need to be stored.

timeout_

location to store timeout to be used in polling

fds

location to store GLib.PollFD records that need to be polled.