Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: PrintDialogMeta

[338:14] static extends: object

Generated metadata helpers for PrintDialog class surfaces.

Methods

  • properties ()

    Returns property metadata for PrintDialog.

    • @r A list.

class: PrintDialog

[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.

Members

  • handleObj
  • lib
  • retainedCallbacks
  • signalHandlerNames
  • signalSetterHandlers

Methods

  • PrintDialog ()

    Creates a new GtkPrintDialog object.

  • 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 exposing handle(), or null. Returns null when the argument carries no pointer.

    • @p Source is the raw handle, raw buffer, wrapper, or null.
    • @r A raw pointer carrier or null when no pointer is present.
  • getLib ()

    Returns the opened native library for this generated wrapper.

    • @r The opened native library.
  • handle ()

    Returns the wrapped NativeHandle.

    • @r The wrapped NativeHandle.
  • isNull ()

    Returns true when the wrapped handle is null.

    • @r A bool.
  • describe ()

    Returns a small string for debugging generated wrappers.

    • @r A string.
  • asObject ()

    Wraps this handle as Object.

    • @r 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].

    • @p Value is the new property value.
    • @r None.
  • setModal (bool Value)

    Whether the print dialog is modal.

    • @p Value is the new property value.
    • @r None.
  • setPagesetup (object Value)

    The page setup to use.

    • @p Value is the new property value.
    • @r None.
  • setPrintsettings (object Value)

    The print settings to use.

    • @p Value is the new property value.
    • @r None.
  • setTitle (string Value)

    A title that may be shown on the print dialog that is presented by [method@Gtk.PrintDialog.setup].

    • @p Value is the new property value.
    • @r 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.

    • @p 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, NULL is 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.

    • @p 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].

    • @p accept_label is the new accept label.
    • @r None.
  • set_modal (bool modal)

    Sets whether the print dialog blocks interaction with the parent window while it is presented.

    • @p modal is the new value.
    • @r None.
  • set_page_setup (object page_setup)

    Set the page setup for the print dialog.

    • @p page_setup is the new page setup.
    • @r None.
  • set_print_settings (object print_settings)

    Sets the print settings for the print dialog.

    • @p print_settings is the new print settings.
    • @r None.
  • set_title (string title)

    Sets the title that will be shown on the print dialog.

    • @p title is the new title.
    • @r 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.

    • @p result is a GAsyncResult.