WebKit2.PrintOperation.prototype.run_dialog
function run_dialog(parent: Gtk.Window): WebKit2.PrintOperationResponse { // Gjs wrapper for webkit_print_operation_run_dialog() }
Run the print dialog and start printing using the options selected by the user. This method returns when the print dialog is closed. If the print dialog is cancelled WebKit2.PrintOperationResponse.cancel is returned. If the user clicks on the print button, WebKit2.PrintOperationResponse.print is returned and the print operation starts. In this case, the WebKit2.PrintOperation::finished signal is emitted when the operation finishes. If an error occurs while printing, the signal WebKit2.PrintOperation::failed is emitted before WebKit2.PrintOperation::finished. If the print dialog is not cancelled current print settings and page setup of print_operation are updated with options selected by the user when Print button is pressed in print dialog. You can get the updated print settings and page setup by calling WebKit2.PrintOperation.prototype.get_print_settings and WebKit2.PrintOperation.prototype.get_page_setup after this method.
- parent
transient parent of the print dialog
- Returns
the WebKit2.PrintOperationResponse of the print dialog