Gtk.Clipboard.prototype.wait_for_contents

function wait_for_contents(target:Gdk.Atom):Gtk.SelectionData {
    // Gjs wrapper for gtk_clipboard_wait_for_contents()
}

Requests the contents of the clipboard using the given target. This function waits for the data to be received using the main loop, so events, timeouts, etc, may be dispatched during the wait.

target

an atom representing the form into which the clipboard owner should convert the selection.

Returns

a newly-allocated Gtk.SelectionData object or null if retrieving the given target failed. If non-null, this value must be freed with Gtk.free when you are finished with it.