Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: PrintJobStatuschangedCallback

[477:7] extends: object

Generated low-level callback wrapper for GIR callback status-changed.

Members

  • callbackObj
  • userFn
  • userData
  • hasUserData

Methods

  • PrintJobStatuschangedCallback (callback Fn, UserData = null)

    Creates one native callback wrapper. The wrapper owns a trampoline that converts native pointers into generated wrapper objects before invoking Fn.

    • @p Fn is the Aussom callback implementation.
    • @p UserData is retained and passed through to Fn on each invocation when provided.
  • trampoline (nativeSelf, nativeUserData)

    Internal trampoline. Converts native pointer arguments into generated wrapper instances, then invokes the user's callback.

  • callback ()

    Returns the wrapped NativeCallback.

  • handle ()

    Returns the callback as a NativeHandle.

  • close ()

    Closes the underlying NativeCallback.

  • isClosed ()

    Returns true when the callback has been closed.

class: PrintJobMeta

[547:14] static extends: object

Generated metadata helpers for PrintJob class surfaces.

Methods

  • properties ()

    Returns property metadata for PrintJob.

    • @r A list.
  • signals ()

    Returns signal metadata for PrintJob.

    • @r A list.

class: PrintJob

[19:7] extends: object

Represents a job that is sent to a printer. You only need to deal directly with print jobs if you use the non-portable [class@Gtk.PrintUnixDialog] API. Use [method@Gtk.PrintJob.get_surface] to obtain the cairo surface onto which the pages must be drawn. Use [method@Gtk.PrintJob.send] to send the finished job to the printer. If you don’t use cairo GtkPrintJob also supports printing of manually generated PostScript, via [method@Gtk.PrintJob.set_source_file].

Members

  • handleObj
  • lib
  • retainedCallbacks
  • signalHandlerNames
  • signalSetterHandlers

Methods

  • PrintJob (title = null, printer = null, settings = null, page_setup = null)

    Creates a new GtkPrintJob.

    • @p title is the job title.
    • @p printer is a GtkPrinter.
    • @p settings is a GtkPrintSettings.
    • @p page_setup is a GtkPageSetup.
  • 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.
  • connectSignal (string Name, CallbackObj)

    Connects one generated callback wrapper to a named signal.

    • @p Name is the signal name.
    • @p CallbackObj is the generated callback wrapper to connect.
    • @r The connected handler id.
  • disconnectSignalHandler (int HandlerId)

    Disconnects one retained signal handler id.

    • @p HandlerId is the signal handler id to disconnect.
    • @r None.
  • setOnStatuschanged (callback Fn, UserData = null)

    Emitted when the status of a job changes. The signal handler can use [method@Gtk.PrintJob.get_status] to obtain the new status.

    • @p Fn is the Aussom callback.
    • @p Fn is called with (PrintJob Self).
    • @p UserData is retained and passed through to the generated callback wrapper when provided.
    • @r The connected handler id.
  • getProperty (string Name)

    Reads one generated property by name.

  • setProperty (string Name, Value)

    Writes one generated property by name.

  • setTrackprintstatus (bool Value)

    %TRUE if the print job will continue to emit status-changed signals after the print data has been setn to the printer.

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

    Gets whether this job is printed collated.

  • get_n_up ()

    Gets the n-up setting for this job.

  • get_n_up_layout ()

    Gets the n-up layout setting for this job.

  • get_num_copies ()

    Gets the number of copies of this job.

  • get_page_set ()

    Gets the GtkPageSet setting for this job.

  • get_pages ()

    Gets the GtkPrintPages setting for this job.

  • get_printer ()

    Gets the GtkPrinter of the print job.

  • get_reverse ()

    Gets whether this job is printed reversed.

  • get_rotate ()

    Gets whether the job is printed rotated.

  • get_scale ()

    Gets the scale for this job.

  • get_settings ()

    Gets the GtkPrintSettings of the print job.

  • get_status ()

    Gets the status of the print job.

  • get_surface ()

    Gets a cairo surface onto which the pages of the print job should be rendered.

  • get_title ()

    Gets the job title.

  • get_track_print_status ()

    Returns whether jobs will be tracked after printing. For details, see [method@Gtk.PrintJob.set_track_print_status].

  • set_collate (bool collate)

    Sets whether this job is printed collated.

    • @p collate is whether the job is printed collated.
    • @r None.
  • set_n_up (int n_up)

    Sets the n-up setting for this job.

    • @p n_up is the n-up value.
    • @r None.
  • set_n_up_layout (string layout)

    Sets the n-up layout setting for this job.

    • @p layout is the n-up layout setting.
    • @r None.
  • set_num_copies (int num_copies)

    Sets the number of copies for this job.

    • @p num_copies is the number of copies.
    • @r None.
  • set_page_set (string page_set)

    Sets the GtkPageSet setting for this job.

    • @p page_set is a GtkPageSet setting.
    • @r None.
  • set_pages (string pages)

    Sets the GtkPrintPages setting for this job.

    • @p pages is the GtkPrintPages setting.
    • @r None.
  • set_reverse (bool reverse)

    Sets whether this job is printed reversed.

    • @p reverse is whether the job is printed reversed.
    • @r None.
  • set_rotate (bool rotate)

    Sets whether this job is printed rotated.

    • @p rotate is whether to print rotated.
    • @r None.
  • set_scale (double scale)

    Sets the scale for this job. 1.0 means unscaled.

    • @p scale is the scale.
    • @r None.
  • set_source_fd (int fd)

    Make the GtkPrintJob send an existing document to the printing system. The file can be in any format understood by the platforms printing system (typically PostScript, but on many platforms PDF may work too). See [method@Gtk.Printer.accepts_pdf] and [method@Gtk.Printer.accepts_ps]. This is similar to [method@Gtk.PrintJob.set_source_file], but takes expects an open file descriptor for the file, instead of a filename.

    • @p fd is a file descriptor.
  • set_source_file (string filename)

    Make the GtkPrintJob send an existing document to the printing system. The file can be in any format understood by the platforms printing system (typically PostScript, but on many platforms PDF may work too). See [method@Gtk.Printer.accepts_pdf] and [method@Gtk.Printer.accepts_ps].

    • @p filename is the file to be printed.
  • set_track_print_status (bool track_status)

    If track_status is %TRUE, the print job will try to continue report on the status of the print job in the printer queues and printer. This can allow your application to show things like “out of paper” issues, and when the print job actually reaches the printer. This function is often implemented using some form of polling, so it should not be enabled unless needed.

    • @p track_status is %TRUE to track status after printing.
    • @r None.