Hoogle Search
Within LTS Haskell 24.10 (ghc-9.10.2)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
printOperationGetStatusString :: (HasCallStack, MonadIO m, IsPrintOperation a) => a -> m Textgi-gtk4 GI.Gtk.Objects.PrintOperation Returns a string representation of the status of the print operation. The string is translated and suitable for displaying the print status e.g. in a GtkStatusbar. Use printOperationGetStatus to obtain a status value that is suitable for programmatic use.
printOperationGetSupportSelection :: (HasCallStack, MonadIO m, IsPrintOperation a) => a -> m Boolgi-gtk4 GI.Gtk.Objects.PrintOperation Gets whether the application supports print of selection
printOperationIsFinished :: (HasCallStack, MonadIO m, IsPrintOperation a) => a -> m Boolgi-gtk4 GI.Gtk.Objects.PrintOperation A convenience function to find out if the print operation is finished. a print operation is finished if its status is either PrintStatusFinished or PrintStatusFinishedAborted. Note: when you enable print status tracking the print operation can be in a non-finished state even after done has been called, as the operation status then tracks the print job status on the printer.
printOperationNew :: (HasCallStack, MonadIO m) => m PrintOperationgi-gtk4 GI.Gtk.Objects.PrintOperation Creates a new GtkPrintOperation.
-
gi-gtk4 GI.Gtk.Objects.PrintOperation Runs the print operation. Normally that this function does not return until the rendering of all pages is complete. You can connect to the PrintOperation::statusChanged signal on op to obtain some information about the progress of the print operation. Furthermore, it may use a recursive mainloop to show the print dialog. If you set the [Gtk.PrintOperation:allow-async] property, the operation will run asynchronously if this is supported on the platform. The PrintOperation::done signal will be emitted with the result of the operation when the it is done (i.e. when the dialog is canceled, or when the print succeeds or fails).
c code
if (settings != NULL) gtk_print_operation_set_print_settings (print, settings); if (page_setup != NULL) gtk_print_operation_set_default_page_setup (print, page_setup); g_signal_connect (print, "begin-print", G_CALLBACK (begin_print), &data); g_signal_connect (print, "draw-page", G_CALLBACK (draw_page), &data); res = gtk_print_operation_run (print, GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG, parent, &error); if (res == GTK_PRINT_OPERATION_RESULT_ERROR) { error_dialog = gtk_message_dialog_new (GTK_WINDOW (parent), GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, "Error printing file:\n%s", error->message); g_signal_connect (error_dialog, "response", G_CALLBACK (gtk_window_destroy), NULL); gtk_window_present (GTK_WINDOW (error_dialog)); g_error_free (error); } else if (res == GTK_PRINT_OPERATION_RESULT_APPLY) { if (settings != NULL) g_object_unref (settings); settings = g_object_ref (gtk_print_operation_get_print_settings (print)); }
Note that printOperationRun can only be called once on a given GtkPrintOperation. printOperationSetAllowAsync :: (HasCallStack, MonadIO m, IsPrintOperation a) => a -> Bool -> m ()gi-gtk4 GI.Gtk.Objects.PrintOperation Sets whether printOperationRun may return before the print operation is completed. Note that some platforms may not allow asynchronous operation.
printOperationSetCurrentPage :: (HasCallStack, MonadIO m, IsPrintOperation a) => a -> Int32 -> m ()gi-gtk4 GI.Gtk.Objects.PrintOperation Sets the current page. If this is called before printOperationRun, the user will be able to select to print only the current page. Note that this only makes sense for pre-paginated documents.
-
gi-gtk4 GI.Gtk.Objects.PrintOperation Sets the label for the tab holding custom widgets.
-
gi-gtk4 GI.Gtk.Objects.PrintOperation Makes defaultPageSetup the default page setup for op. This page setup will be used by printOperationRun, but it can be overridden on a per-page basis by connecting to the PrintOperation::requestPageSetup signal.
printOperationSetDeferDrawing :: (HasCallStack, MonadIO m, IsPrintOperation a) => a -> m ()gi-gtk4 GI.Gtk.Objects.PrintOperation Sets up the GtkPrintOperation to wait for calling of [methodgtk.PrintOperation.draw_page_finish from application. This can be used for drawing page in another thread. This function must be called in the callback of the PrintOperation::drawPage signal.