Basics
Guides
API Reference
Basics
Guides
API Reference
[338:14] static extends: object
Generated metadata helpers for PrintDialog class surfaces.
properties ()
Returns property metadata for
PrintDialog.
A list.[18:7] extends: object
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
[method@Gtk.PrintDialog.setup] function. The actual printing can be done with
[method@Gtk.PrintDialog.print] or [method@Gtk.PrintDialog.print_file]. These
APIs follows the GIO async pattern, and the results can be obtained by
calling the corresponding finish methods.
PrintDialog ()
Creates a new
GtkPrintDialogobject.
toNativeHandle (Source)
Normalizes a constructor argument into a raw pointer carrier. Accepts a raw NativeHandle, a raw NativeBuffer returned from
fn.call(...), another generated wrapper exposinghandle(), or null. Returns null when the argument carries no pointer.
Source is the raw handle, raw buffer, wrapper, or null.A raw pointer carrier or null when no pointer is present.getLib ()
Returns the opened native library for this generated wrapper.
The opened native library.handle ()
Returns the wrapped NativeHandle.
The wrapped NativeHandle.isNull ()
Returns true when the wrapped handle is null.
A bool.describe ()
Returns a small string for debugging generated wrappers.
A string.asObject ()
Wraps this handle as
Object.
A Object object.getProperty (string Name)
Reads one generated property by name.
setProperty (string Name, Value)
Writes one generated property by name.
setAcceptlabel (string Value)
A label that may be shown on the accept button of a print dialog that is presented by [method@Gtk.PrintDialog.setup].
Value is the new property value.None.setModal (bool Value)
Whether the print dialog is modal.
Value is the new property value.None.setPagesetup (object Value)
The page setup to use.
Value is the new property value.None.setPrintsettings (object Value)
The print settings to use.
Value is the new property value.None.setTitle (string Value)
A title that may be shown on the print dialog that is presented by [method@Gtk.PrintDialog.setup].
Value is the new property value.None.get_accept_label ()
Returns the label that will be shown on the accept button of the print dialog.
get_modal ()
Returns whether the print dialog blocks interaction with the parent window while it is presented.
get_page_setup ()
Returns the page setup.
get_print_settings ()
Returns the print settings for the print dialog.
get_title ()
Returns the title that will be shown on the print dialog.
print_file_finish (object result)
Finishes the [method@Gtk.PrintDialog.print_file] call and returns the results. Note that this function returns a [error@Gtk.DialogError.DISMISSED] error if the user cancels the dialog.
result is a GAsyncResult.print_finish (object result)
Finishes the [method@Gtk.PrintDialog.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,
NULLis returned. The overall results of the print operation will be returned in the [method@Gio.OutputStream.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 [error@Gtk.DialogError.DISMISSED] error if the user cancels the dialog.
result is a GAsyncResult.set_accept_label (string accept_label)
Sets the label that will be shown on the accept button of the print dialog shown for [method@Gtk.PrintDialog.setup].
accept_label is the new accept label.None.set_modal (bool modal)
Sets whether the print dialog blocks interaction with the parent window while it is presented.
modal is the new value.None.set_page_setup (object page_setup)
Set the page setup for the print dialog.
page_setup is the new page setup.None.set_print_settings (object print_settings)
Sets the print settings for the print dialog.
print_settings is the new print settings.None.set_title (string title)
Sets the title that will be shown on the print dialog.
title is the new title.None.setup_finish (object result)
Finishes the [method@Gtk.PrintDialog.setup] call. If the call was successful, it returns a [struct@Gtk.PrintSetup] which contains the print settings and page setup information that will be used to print. Note that this function returns a [error@Gtk.DialogError.DISMISSED] error if the user cancels the dialog.
result is a GAsyncResult.
Aussom
Write once. Embed everywhere.
Copyright 2026 Austin Lehman. All rights reserved.