function add_poll(fd: GLib.PollFD, priority: Number(gint)): void {
    // Gjs wrapper for g_main_context_add_poll()

Adds a file descriptor to the set of file descriptors polled for this context. This will very seldom be used directly. Instead a typical event source will use GLib.Source.add_unix_fd instead.


a GLib.PollFD structure holding information about a file descriptor to watch.


the priority for this file descriptor which should be the same as the priority used for GLib.Source.prototype.attach to ensure that the file descriptor is polled whenever the results may be needed.