
Gnome::Gtk4::T-printoperation
Class initialization
new
Initialization of a type class is simple and only needed when the standalone functions are used.
method new ( )
Enumerations
GtkPrintError
Error codes that identify various errors that can occur while using the GTK printing support.
GTK_PRINT_ERROR_GENERAL; An unspecified error occurred.GTK_PRINT_ERROR_INTERNAL_ERROR; An internal error occurred.GTK_PRINT_ERROR_NOMEM; A memory allocation failed.GTK_PRINT_ERROR_INVALID_FILE; An error occurred while loading a page setup or paper size from a key file.
GtkPrintOperationAction
Determines what action the print operation should perform.
A parameter of this typs is passed to .run()].
GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG; Show the print dialog.GTK_PRINT_OPERATION_ACTION_PRINT; Start to print without showing the print dialog, based on the current print settings.GTK_PRINT_OPERATION_ACTION_PREVIEW; Show the print preview.GTK_PRINT_OPERATION_ACTION_EXPORT; Export to a file. This requires the export-filename property to be set.
GtkPrintOperationResult
The result of a print operation.
A value of this type is returned by .run()].
GTK_PRINT_OPERATION_RESULT_ERROR; An error has occurred.GTK_PRINT_OPERATION_RESULT_APPLY; The print settings should be stored.GTK_PRINT_OPERATION_RESULT_CANCEL; The print operation has been canceled, the print settings should not be stored.GTK_PRINT_OPERATION_RESULT_IN_PROGRESS; The print operation is not complete yet. This value will only be returned when running asynchronously.
GtkPrintStatus
The status gives a rough indication of the completion of a running print operation.
GTK_PRINT_STATUS_INITIAL; The printing has not started yet; this status is set initially, and while the print dialog is shown.GTK_PRINT_STATUS_PREPARING; This status is set while the begin-print signal is emitted and during pagination.GTK_PRINT_STATUS_GENERATING_DATA; This status is set while the pages are being rendered.GTK_PRINT_STATUS_SENDING_DATA; The print job is being sent off to the printer.GTK_PRINT_STATUS_PENDING; The print job has been sent to the printer, but is not printed for some reason, e.g. the printer may be stopped.GTK_PRINT_STATUS_PENDING_ISSUE; Some problem has occurred during printing, e.g. a paper jam.GTK_PRINT_STATUS_PRINTING; The printer is processing the print job.GTK_PRINT_STATUS_FINISHED; The printing has been completed successfully.GTK_PRINT_STATUS_FINISHED_ABORTED; The printing has been aborted.
Callback Functions
PageSetupDoneFunc
Signature
:( N-Object() $page-setup, gpointer $data )
$page-setup; the Gnome::Gtk4::PageSetup that has been passed to gtk_print_run_page_setup_dialog_async()
$data; user data that has been passed to gtk_print_run_page_setup_dialog_async()
Standalone Functions
print-error-quark
Registers an error quark for Gnome::Gtk4::PrintOperation if necessary.
method print-error-quark (--> UInt )
Return value; The error quark used for Gnome::Gtk4::PrintOperation errors..
print-run-page-setup-dialog
Runs a page setup dialog, letting the user modify the values from $page-setup. If the user cancels the dialog, the returned Gnome::Gtk4::PageSetup is identical to the passed in $page-setup, otherwise it contains the modifications done in the dialog.
Note that this function may use a recursive mainloop to show the page setup dialog. See gtk_print_run_page_setup_dialog_async() if this is a problem.
method print-run-page-setup-dialog ( N-Object() $parent, N-Object() $page-setup, N-Object() $settings --> N-Object )
$parent; transient parent.
$page-setup; an existing Gnome::Gtk4::PageSetup.
$settings; a Gnome::Gtk4::PrintSettings.
Return value; a new Gnome::Gtk4::PageSetup.
print-run-page-setup-dialog-async
Runs a page setup dialog, letting the user modify the values from $page-setup.
In contrast to gtk_print_run_page_setup_dialog(), this function returns after showing the page setup dialog on platforms that support this, and calls $done-cb from a signal handler for the response signal of the dialog.
method print-run-page-setup-dialog-async ( N-Object() $parent, N-Object() $page-setup, N-Object() $settings, GtkPageSetupDoneFunc &done-cb, gpointer $data )
$parent; transient parent.
$page-setup; an existing Gnome::Gtk4::PageSetup.
$settings; a Gnome::Gtk4::PrintSettings.
GtkPageSetupDoneFunc &done-cb; a function to call when the user saves the modified page setup. The function must be specified with the following signature;
:( N-Object $page-setup, gpointer $data ).$data; user data to pass to
$done-cb.
About all my projects