It derives from <GObject>.
Asynchronous API to present a print dialog to the user.
<GtkPrintDialog> collects the arguments that
are needed to present the dialog, such as a title for the dialog and
whether it should be modal.
The dialog is shown with the print-dialog:setup function.
The actual printing can be done with print-dialog:print or print-dialog:print-file. These APIs follows the GIO async
pattern, and the results can be obtained by calling the corresponding
finish methods.
A label that may be shown on the accept button of a print dialog that is
presented by print-dialog:setup.
Its value is a string, or #f.
Set it with (set! (print-dialog:accept-label self) value).
Whether the print dialog is modal.
Its value is a boolean.
Set it with (set! (print-dialog:modal self) value).
The page setup to use.
Its value is a <GtkPageSetup>, or #f.
Set it with (set! (print-dialog:page-setup self) value).
The print settings to use.
Its value is a <GtkPrintSettings>, or
#f.
Set it with (set! (print-dialog:print-settings self) value).
A title that may be shown on the print dialog that is presented by
print-dialog:setup.
Its value is a string, or #f.
Set it with (set! (print-dialog:title self) value).
Returns the label that will be shown on the accept button of the print dialog.
Passed: a <GtkPrintDialog>.
Returned: a string.
the accept label
Returns whether the print dialog blocks interaction with the parent window while it is presented.
Passed: a <GtkPrintDialog>.
Returned: a boolean.
whether the print dialog is modal
Returns the page setup.
Passed: a <GtkPrintDialog>.
Returned: a <GtkPageSetup>, or #f.
the page setup
Returns the print settings for the print dialog.
Passed: a <GtkPrintDialog>.
Returned: a <GtkPrintSettings>, or
#f.
the settings
Returns the title that will be shown on the print dialog.
Passed: a <GtkPrintDialog>.
Returned: a string.
the title
Creates a new <GtkPrintDialog> object.
Returned: a <GtkPrintDialog>.
the new <GtkPrintDialog>
This function prints content from a stream.
If you pass NULL as setup, then this method will present a
print dialog. Otherwise, it will attempt to print directly, without
user interaction.
The callback will be called when the printing is done.
Passed: a <GtkPrintDialog>.
Passed, or left out: a <GtkWindow>, or #f.
the parent <GtkWindow>
Passed, or left out: a <GtkPrintSetup>, or
#f.
the <GtkPrintSetup> to use
Passed, or left out: a <GCancellable>, or
#f.
a <GCancellable> to cancel the operation
Passed, or left out: a procedure, or #f.
a callback to call when the operation is complete
See GAsyncReadyCallback for how it
is called.
Not passed: guile-gi supplies it.
data to pass to callback
This function prints a file.
If you pass NULL as setup, then this method will present a
print dialog. Otherwise, it will attempt to print directly, without
user interaction.
Passed: a <GtkPrintDialog>.
Passed: a <GtkWindow>, or #f.
the parent <GtkWindow>
Passed: a <GtkPrintSetup>, or #f.
the <GtkPrintSetup> to use
Passed: a <GFile>.
the <GFile> to print
Passed, or left out: a <GCancellable>, or
#f.
a <GCancellable> to cancel the operation
Passed, or left out: a procedure, or #f.
a callback to call when the operation is complete
See GAsyncReadyCallback for how it
is called.
Not passed: guile-gi supplies it.
data to pass to callback
Finishes the print-dialog:print-file call and returns the results.
Note that this function returns a Gtk.DialogError.DISMISSED error
if the user cancels the dialog.
Passed: a <GtkPrintDialog>.
Passed: a <GAsyncResult>.
Returned: a boolean.
Whether the call was successful
Finishes the print-dialog:print call and
returns the results.
If the call was successful, the content to be printed should be written
to the returned output stream. Otherwise, NULL is returned.
The overall results of the print operation will be returned in the
output-stream:close? call, so if
you are interested in the results, you need to explicitly close the
output stream (it will be closed automatically if you just unref it). Be
aware that the close call may not be instant as it operation will for
the printer to finish printing.
Note that this function returns a Gtk.DialogError.DISMISSED error
if the user cancels the dialog.
Passed: a <GtkPrintDialog>.
Passed: a <GAsyncResult>.
Returned: a <GOutputStream>.
Sets the label that will be shown on the accept button of the print
dialog shown for print-dialog:setup.
Passed: a <GtkPrintDialog>.
Passed: a string.
the new accept label
Sets whether the print dialog blocks interaction with the parent window while it is presented.
Passed: a <GtkPrintDialog>.
Passed: a boolean.
the new value
Set the page setup for the print dialog.
Passed: a <GtkPrintDialog>.
Passed: a <GtkPageSetup>.
the new page setup
Sets the print settings for the print dialog.
Passed: a <GtkPrintDialog>.
Passed: a <GtkPrintSettings>.
the new print settings
Sets the title that will be shown on the print dialog.
Passed: a <GtkPrintDialog>.
Passed: a string.
the new title
This function presents a print dialog to let the user select a printer, and set up print settings and page setup.
The callback will be called when the dialog is dismissed. The
obtained <GtkPrintSetup> can then be passed to
print-dialog:print or
print-dialog:print-file.
One possible use for this method is to have the user select a printer,
then show a page setup UI in the application (e.g. to arrange images on
a page), then call print-dialog:print on
self to do the printing without further user interaction.
Passed: a <GtkPrintDialog>.
Passed, or left out: a <GtkWindow>, or #f.
the parent <GtkWindow>
Passed, or left out: a <GCancellable>, or
#f.
a <GCancellable> to cancel the operation
Passed, or left out: a procedure, or #f.
a callback to call when the operation is complete
See GAsyncReadyCallback for how it
is called.
Not passed: guile-gi supplies it.
data to pass to callback
Finishes the print-dialog:setup call.
If the call was successful, it returns a
<GtkPrintSetup> which contains the print
settings and page setup information that will be used to print.
Note that this function returns a Gtk.DialogError.DISMISSED error
if the user cancels the dialog.
Passed: a <GtkPrintDialog>.
Passed: a <GAsyncResult>.
Returned: a <GtkPrintSetup>.
the resulting [struct@Gtk.PrintSetup]