PrintOperationProtocol
public protocol PrintOperationProtocol : ObjectProtocol, PrintOperationPreviewProtocol
GtkPrintOperation
is the high-level, portable printing API.
It looks a bit different than other GTK dialogs such as the
GtkFileChooser
, since some platforms don’t expose enough
infrastructure to implement a good print dialog. On such
platforms, GtkPrintOperation
uses the native print dialog.
On platforms which do not provide a native print dialog, GTK
uses its own, see [classGtk.PrintUnixDialog
].
The typical way to use the high-level printing API is to create
a GtkPrintOperation
object with [ctorGtk.PrintOperation.new
]
when the user selects to print. Then you set some properties on it,
e.g. the page size, any [classGtk.PrintSettings
] from previous print
operations, the number of pages, the current page, etc.
Then you start the print operation by calling [methodGtk.PrintOperation.run
].
It will then show a dialog, let the user select a printer and options.
When the user finished the dialog, various signals will be emitted on
the GtkPrintOperation
, the main one being
[signalGtk.PrintOperation::draw-page
], which you are supposed to handle
and render the page on the provided [classGtk.PrintContext
] using Cairo.
The high-level printing API
static GtkPrintSettings *settings = NULL;
static void
do_print (void)
{
GtkPrintOperation *print;
GtkPrintOperationResult res;
print = gtk_print_operation_new ();
if (settings != NULL)
gtk_print_operation_set_print_settings (print, settings);
g_signal_connect (print, "begin_print", G_CALLBACK (begin_print), NULL);
g_signal_connect (print, "draw_page", G_CALLBACK (draw_page), NULL);
res = gtk_print_operation_run (print, GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG,
GTK_WINDOW (main_window), NULL);
if (res == GTK_PRINT_OPERATION_RESULT_APPLY)
{
if (settings != NULL)
g_object_unref (settings);
settings = g_object_ref (gtk_print_operation_get_print_settings (print));
}
g_object_unref (print);
}
By default GtkPrintOperation
uses an external application to do
print preview. To implement a custom print preview, an application
must connect to the preview signal. The functions
[methodGtk.PrintOperationPreview.render_page
],
[methodGtk.PrintOperationPreview.end_preview
] and
[methodGtk.PrintOperationPreview.is_selected
]
are useful when implementing a print preview.
The PrintOperationProtocol
protocol exposes the methods and properties of an underlying GtkPrintOperation
instance.
The default implementation of these can be found in the protocol extension below.
For a concrete class that implements these methods and properties, see PrintOperation
.
Alternatively, use PrintOperationRef
as a lighweight, unowned
reference if you already have an instance you just want to use.
-
Untyped pointer to the underlying
GtkPrintOperation
instance.Declaration
Swift
var ptr: UnsafeMutableRawPointer! { get }
-
print_operation_ptr
Default implementationTyped pointer to the underlying
GtkPrintOperation
instance.Default Implementation
Return the stored, untyped pointer as a typed pointer to the
GtkPrintOperation
instance.Declaration
Swift
var print_operation_ptr: UnsafeMutablePointer<GtkPrintOperation>! { get }
-
Required Initialiser for types conforming to
PrintOperationProtocol
Declaration
Swift
init(raw: UnsafeMutableRawPointer)
-
bind(property:
Extension methodto: _: flags: transformFrom: transformTo: ) Bind a
PrintOperationPropertyName
source property to a given target object.Declaration
Swift
@discardableResult @inlinable func bind<Q, T>(property source_property: PrintOperationPropertyName, to target: T, _ target_property: Q, flags f: BindingFlags = .default, transformFrom transform_from: @escaping GLibObject.ValueTransformer = { $0.transform(destValue: $1) }, transformTo transform_to: @escaping GLibObject.ValueTransformer = { $0.transform(destValue: $1) }) -> BindingRef! where Q : PropertyNameProtocol, T : ObjectProtocol
Parameters
source_property
the source property to bind
target
the target object to bind to
target_property
the target property to bind to
flags
the flags to pass to the
Binding
transform_from
ValueTransformer
to use for forward transformationtransform_to
ValueTransformer
to use for backwards transformationReturn Value
binding reference or
nil
in case of an error -
get(property:
Extension method) Get the value of a PrintOperation property
Declaration
Swift
@inlinable func get(property: PrintOperationPropertyName) -> GLibObject.Value
Parameters
property
the property to get the value for
Return Value
the value of the named property
-
set(property:
Extension methodvalue: ) Set the value of a PrintOperation property. Note that this will only have an effect on properties that are writable and not construct-only!
Declaration
Swift
@inlinable func set(property: PrintOperationPropertyName, value v: GLibObject.Value)
Parameters
property
the property to get the value for
Return Value
the value of the named property
-
connect(signal:
Extension methodflags: handler: ) Connect a Swift signal handler to the given, typed
PrintOperationSignalName
signalDeclaration
Swift
@discardableResult @inlinable func connect(signal s: PrintOperationSignalName, flags f: ConnectFlags = ConnectFlags(0), handler h: @escaping SignalHandler) -> Int
Parameters
signal
The signal to connect
flags
The connection flags to use
data
A pointer to user data to provide to the callback
destroyData
A
GClosureNotify
C function to destroy the data pointed to byuserData
handler
The Swift signal handler (function or callback) to invoke on the given signal
Return Value
The signal handler ID (always greater than 0 for successful connections)
-
connect(signal:
Extension methodflags: data: destroyData: signalHandler: ) Connect a C signal handler to the given, typed
PrintOperationSignalName
signalDeclaration
Swift
@discardableResult @inlinable func connect(signal s: PrintOperationSignalName, flags f: ConnectFlags = ConnectFlags(0), data userData: gpointer!, destroyData destructor: GClosureNotify? = nil, signalHandler h: @escaping GCallback) -> Int
Parameters
signal
The signal to connect
flags
The connection flags to use
data
A pointer to user data to provide to the callback
destroyData
A
GClosureNotify
C function to destroy the data pointed to byuserData
signalHandler
The C function to be called on the given signal
Return Value
The signal handler ID (always greater than 0 for successful connections)
-
createCustomWidgetSignal
Extension methodEmitted when displaying the print dialog.
If you return a widget in a handler for this signal it will be added to a custom tab in the print dialog. You typically return a container widget with multiple widgets in it.
The print dialog owns the returned widget, and its lifetime is not controlled by the application. However, the widget is guaranteed to stay around until the [signal
Gtk.PrintOperation::custom-widget-apply
] signal is emitted on the operation. Then you can read out any information you need from the widgets.Note
This represents the underlyingcreate-custom-widget
signalWarning
aonCreateCustomWidget
wrapper for this signal could not be generated because it contains unimplemented features: { (8) nullable argument or return type is not allowed, (9) Record return type is not yet supported }Note
Instead, you can connectcreateCustomWidgetSignal
using theconnect(signal:)
methodsDeclaration
Swift
static var createCustomWidgetSignal: PrintOperationSignalName { get }
Parameters
flags
Flags
unownedSelf
Reference to instance of self
handler
A custom widget that gets embedded in the print dialog
-
onBeginPrint(flags:
Extension methodhandler: ) Emitted after the user has finished changing print settings in the dialog, before the actual rendering starts.
A typical use for
begin-print
is to use the parameters from the [classGtk.PrintContext
] and paginate the document accordingly, and then set the number of pages with [methodGtk.PrintOperation.set_n_pages
].Note
This represents the underlyingbegin-print
signalDeclaration
Swift
@discardableResult @inlinable func onBeginPrint(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: PrintOperationRef, _ context: PrintContextRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
context
the
GtkPrintContext
for the current operationhandler
The signal handler to call Run the given callback whenever the
beginPrint
signal is emitted -
beginPrintSignal
Extension methodTyped
begin-print
signal for using theconnect(signal:)
methodsDeclaration
Swift
static var beginPrintSignal: PrintOperationSignalName { get }
-
onCustomWidgetApply(flags:
Extension methodhandler: ) Emitted right before
begin-print
if you added a custom widget in thecreate-custom-widget
handler.When you get this signal you should read the information from the custom widgets, as the widgets are not guaranteed to be around at a later time.
Note
This represents the underlyingcustom-widget-apply
signalDeclaration
Swift
@discardableResult @inlinable func onCustomWidgetApply(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: PrintOperationRef, _ widget: WidgetRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
widget
the custom widget added in
create-custom-widget
handler
The signal handler to call Run the given callback whenever the
customWidgetApply
signal is emitted -
customWidgetApplySignal
Extension methodTyped
custom-widget-apply
signal for using theconnect(signal:)
methodsDeclaration
Swift
static var customWidgetApplySignal: PrintOperationSignalName { get }
-
onDone(flags:
Extension methodhandler: ) Emitted when the print operation run has finished doing everything required for printing.
result
gives you information about what happened during the run. Ifresult
isGTK_PRINT_OPERATION_RESULT_ERROR
then you can call [methodGtk.PrintOperation.get_error
] for more information.If you enabled print status tracking then [method
Gtk.PrintOperation.is_finished
] may still returnfalse
after thedone
signal was emitted.Note
This represents the underlyingdone
signalDeclaration
Swift
@discardableResult @inlinable func onDone(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: PrintOperationRef, _ result: PrintOperationResult) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
result
the result of the print operation
handler
The signal handler to call Run the given callback whenever the
done
signal is emitted -
doneSignal
Extension methodTyped
done
signal for using theconnect(signal:)
methodsDeclaration
Swift
static var doneSignal: PrintOperationSignalName { get }
-
onDrawPage(flags:
Extension methodhandler: ) Emitted for every page that is printed.
The signal handler must render the
page_nr
‘s page onto the cairo context obtained fromcontext
using [methodGtk.PrintContext.get_cairo_context
].static void draw_page (GtkPrintOperation *operation, GtkPrintContext *context, int page_nr, gpointer user_data) { cairo_t *cr; PangoLayout *layout; double width, text_height; int layout_height; PangoFontDescription *desc; cr = gtk_print_context_get_cairo_context (context); width = gtk_print_context_get_width (context); cairo_rectangle (cr, 0, 0, width, HEADER_HEIGHT); cairo_set_source_rgb (cr, 0.8, 0.8, 0.8); cairo_fill (cr); layout = gtk_print_context_create_pango_layout (context); desc = pango_font_description_from_string ("sans 14"); pango_layout_set_font_description (layout, desc); pango_font_description_free (desc); pango_layout_set_text (layout, "some text", -1); pango_layout_set_width (layout, width * PANGO_SCALE); pango_layout_set_alignment (layout, PANGO_ALIGN_CENTER); pango_layout_get_size (layout, NULL, &layout_height); text_height = (double)layout_height / PANGO_SCALE; cairo_move_to (cr, width / 2, (HEADER_HEIGHT - text_height) / 2); pango_cairo_show_layout (cr, layout); g_object_unref (layout); }
Use [method
Gtk.PrintOperation.set_use_full_page
] and [methodGtk.PrintOperation.set_unit
] before starting the print operation to set up the transformation of the cairo context according to your needs.Note
This represents the underlyingdraw-page
signalDeclaration
Swift
@discardableResult @inlinable func onDrawPage(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: PrintOperationRef, _ context: PrintContextRef, _ pageNr: Int) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
context
the
GtkPrintContext
for the current operationpageNr
the number of the currently printed page (0-based)
handler
The signal handler to call Run the given callback whenever the
drawPage
signal is emitted -
drawPageSignal
Extension methodTyped
draw-page
signal for using theconnect(signal:)
methodsDeclaration
Swift
static var drawPageSignal: PrintOperationSignalName { get }
-
onEndPrint(flags:
Extension methodhandler: ) Emitted after all pages have been rendered.
A handler for this signal can clean up any resources that have been allocated in the [signal
Gtk.PrintOperation::begin-print
] handler.Note
This represents the underlyingend-print
signalDeclaration
Swift
@discardableResult @inlinable func onEndPrint(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: PrintOperationRef, _ context: PrintContextRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
context
the
GtkPrintContext
for the current operationhandler
The signal handler to call Run the given callback whenever the
endPrint
signal is emitted -
endPrintSignal
Extension methodTyped
end-print
signal for using theconnect(signal:)
methodsDeclaration
Swift
static var endPrintSignal: PrintOperationSignalName { get }
-
onPaginate(flags:
Extension methodhandler: ) Emitted after the
begin-print
signal, but before the actual rendering starts.It keeps getting emitted until a connected signal handler returns
true
.The
paginate
signal is intended to be used for paginating a document in small chunks, to avoid blocking the user interface for a long time. The signal handler should update the number of pages using [methodGtk.PrintOperation.set_n_pages
], and returntrue
if the document has been completely paginated.If you don’t need to do pagination in chunks, you can simply do it all in the
begin-print
handler, and set the number of pages from there.Note
This represents the underlyingpaginate
signalDeclaration
Swift
@discardableResult @inlinable func onPaginate(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: PrintOperationRef, _ context: PrintContextRef) -> Bool) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
context
the
GtkPrintContext
for the current operationhandler
true
if pagination is complete Run the given callback whenever thepaginate
signal is emitted -
paginateSignal
Extension methodTyped
paginate
signal for using theconnect(signal:)
methodsDeclaration
Swift
static var paginateSignal: PrintOperationSignalName { get }
-
onPreview(flags:
Extension methodhandler: ) Gets emitted when a preview is requested from the native dialog.
The default handler for this signal uses an external viewer application to preview.
To implement a custom print preview, an application must return
true
from its handler for this signal. In order to use the providedcontext
for the preview implementation, it must be given a suitable cairo context with [methodGtk.PrintContext.set_cairo_context
].The custom preview implementation can use [method
Gtk.PrintOperationPreview.is_selected
] and [methodGtk.PrintOperationPreview.render_page
] to find pages which are selected for print and render them. The preview must be finished by calling methodGtk.PrintOperationPreview.end_preview
.Note
This represents the underlyingpreview
signalDeclaration
Swift
@discardableResult @inlinable func onPreview(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: PrintOperationRef, _ preview: PrintOperationPreviewRef, _ context: PrintContextRef, _ parent: WindowRef?) -> Bool) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
preview
the
GtkPrintOperationPreview
for the current operationcontext
the
GtkPrintContext
that will be usedparent
the
GtkWindow
to use as window parenthandler
true
if the listener wants to take over control of the preview Run the given callback whenever thepreview
signal is emitted -
previewSignal
Extension methodTyped
preview
signal for using theconnect(signal:)
methodsDeclaration
Swift
static var previewSignal: PrintOperationSignalName { get }
-
onRequestPageSetup(flags:
Extension methodhandler: ) Emitted once for every page that is printed.
This gives the application a chance to modify the page setup. Any changes done to
setup
will be in force only for printing this page.Note
This represents the underlyingrequest-page-setup
signalDeclaration
Swift
@discardableResult @inlinable func onRequestPageSetup(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: PrintOperationRef, _ context: PrintContextRef, _ pageNr: Int, _ setup: PageSetupRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
context
the
GtkPrintContext
for the current operationpageNr
the number of the currently printed page (0-based)
setup
the
GtkPageSetup
handler
The signal handler to call Run the given callback whenever the
requestPageSetup
signal is emitted -
requestPageSetupSignal
Extension methodTyped
request-page-setup
signal for using theconnect(signal:)
methodsDeclaration
Swift
static var requestPageSetupSignal: PrintOperationSignalName { get }
-
onStatusChanged(flags:
Extension methodhandler: ) Emitted at between the various phases of the print operation.
See [enum
Gtk.PrintStatus
] for the phases that are being discriminated. Use [methodGtk.PrintOperation.get_status
] to find out the current status.Note
This represents the underlyingstatus-changed
signalDeclaration
Swift
@discardableResult @inlinable func onStatusChanged(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: PrintOperationRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
handler
The signal handler to call Run the given callback whenever the
statusChanged
signal is emitted -
statusChangedSignal
Extension methodTyped
status-changed
signal for using theconnect(signal:)
methodsDeclaration
Swift
static var statusChangedSignal: PrintOperationSignalName { get }
-
onUpdateCustomWidget(flags:
Extension methodhandler: ) Emitted after change of selected printer.
The actual page setup and print settings are passed to the custom widget, which can actualize itself according to this change.
Note
This represents the underlyingupdate-custom-widget
signalDeclaration
Swift
@discardableResult @inlinable func onUpdateCustomWidget(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: PrintOperationRef, _ widget: WidgetRef, _ setup: PageSetupRef, _ settings: PrintSettingsRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
widget
the custom widget added in
create-custom-widget
setup
actual page setup
settings
actual print settings
handler
The signal handler to call Run the given callback whenever the
updateCustomWidget
signal is emitted -
updateCustomWidgetSignal
Extension methodTyped
update-custom-widget
signal for using theconnect(signal:)
methodsDeclaration
Swift
static var updateCustomWidgetSignal: PrintOperationSignalName { get }
-
onNotifyAllowAsync(flags:
Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property()
,g_object_set()
, et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY
, then any call tog_object_set_property()
results innotify
being emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY
, then this signal is emitted only when they explicitly callg_object_notify()
org_object_notify_by_pspec()
, and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()
call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)
It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::allow-async
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyAllowAsync(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: PrintOperationRef, _ pspec: ParamSpecRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
pspec
the
GParamSpec
of the property which changed.handler
The signal handler to call Run the given callback whenever the
notifyAllowAsync
signal is emitted -
notifyAllowAsyncSignal
Extension methodTyped
notify::allow-async
signal for using theconnect(signal:)
methodsDeclaration
Swift
static var notifyAllowAsyncSignal: PrintOperationSignalName { get }
-
onNotifyCurrentPage(flags:
Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property()
,g_object_set()
, et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY
, then any call tog_object_set_property()
results innotify
being emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY
, then this signal is emitted only when they explicitly callg_object_notify()
org_object_notify_by_pspec()
, and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()
call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)
It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::current-page
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyCurrentPage(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: PrintOperationRef, _ pspec: ParamSpecRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
pspec
the
GParamSpec
of the property which changed.handler
The signal handler to call Run the given callback whenever the
notifyCurrentPage
signal is emitted -
notifyCurrentPageSignal
Extension methodTyped
notify::current-page
signal for using theconnect(signal:)
methodsDeclaration
Swift
static var notifyCurrentPageSignal: PrintOperationSignalName { get }
-
onNotifyCustomTabLabel(flags:
Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property()
,g_object_set()
, et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY
, then any call tog_object_set_property()
results innotify
being emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY
, then this signal is emitted only when they explicitly callg_object_notify()
org_object_notify_by_pspec()
, and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()
call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)
It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::custom-tab-label
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyCustomTabLabel(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: PrintOperationRef, _ pspec: ParamSpecRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
pspec
the
GParamSpec
of the property which changed.handler
The signal handler to call Run the given callback whenever the
notifyCustomTabLabel
signal is emitted -
notifyCustomTabLabelSignal
Extension methodTyped
notify::custom-tab-label
signal for using theconnect(signal:)
methodsDeclaration
Swift
static var notifyCustomTabLabelSignal: PrintOperationSignalName { get }
-
onNotifyDefaultPageSetup(flags:
Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property()
,g_object_set()
, et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY
, then any call tog_object_set_property()
results innotify
being emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY
, then this signal is emitted only when they explicitly callg_object_notify()
org_object_notify_by_pspec()
, and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()
call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)
It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::default-page-setup
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyDefaultPageSetup(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: PrintOperationRef, _ pspec: ParamSpecRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
pspec
the
GParamSpec
of the property which changed.handler
The signal handler to call Run the given callback whenever the
notifyDefaultPageSetup
signal is emitted -
notifyDefaultPageSetupSignal
Extension methodTyped
notify::default-page-setup
signal for using theconnect(signal:)
methodsDeclaration
Swift
static var notifyDefaultPageSetupSignal: PrintOperationSignalName { get }
-
onNotifyEmbedPageSetup(flags:
Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property()
,g_object_set()
, et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY
, then any call tog_object_set_property()
results innotify
being emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY
, then this signal is emitted only when they explicitly callg_object_notify()
org_object_notify_by_pspec()
, and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()
call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)
It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::embed-page-setup
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyEmbedPageSetup(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: PrintOperationRef, _ pspec: ParamSpecRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
pspec
the
GParamSpec
of the property which changed.handler
The signal handler to call Run the given callback whenever the
notifyEmbedPageSetup
signal is emitted -
notifyEmbedPageSetupSignal
Extension methodTyped
notify::embed-page-setup
signal for using theconnect(signal:)
methodsDeclaration
Swift
static var notifyEmbedPageSetupSignal: PrintOperationSignalName { get }
-
onNotifyExportFilename(flags:
Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property()
,g_object_set()
, et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY
, then any call tog_object_set_property()
results innotify
being emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY
, then this signal is emitted only when they explicitly callg_object_notify()
org_object_notify_by_pspec()
, and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()
call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)
It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::export-filename
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyExportFilename(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: PrintOperationRef, _ pspec: ParamSpecRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
pspec
the
GParamSpec
of the property which changed.handler
The signal handler to call Run the given callback whenever the
notifyExportFilename
signal is emitted -
notifyExportFilenameSignal
Extension methodTyped
notify::export-filename
signal for using theconnect(signal:)
methodsDeclaration
Swift
static var notifyExportFilenameSignal: PrintOperationSignalName { get }
-
onNotifyHasSelection(flags:
Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property()
,g_object_set()
, et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY
, then any call tog_object_set_property()
results innotify
being emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY
, then this signal is emitted only when they explicitly callg_object_notify()
org_object_notify_by_pspec()
, and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()
call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)
It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::has-selection
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyHasSelection(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: PrintOperationRef, _ pspec: ParamSpecRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
pspec
the
GParamSpec
of the property which changed.handler
The signal handler to call Run the given callback whenever the
notifyHasSelection
signal is emitted -
notifyHasSelectionSignal
Extension methodTyped
notify::has-selection
signal for using theconnect(signal:)
methodsDeclaration
Swift
static var notifyHasSelectionSignal: PrintOperationSignalName { get }
-
onNotifyJobName(flags:
Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property()
,g_object_set()
, et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY
, then any call tog_object_set_property()
results innotify
being emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY
, then this signal is emitted only when they explicitly callg_object_notify()
org_object_notify_by_pspec()
, and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()
call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)
It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::job-name
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyJobName(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: PrintOperationRef, _ pspec: ParamSpecRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
pspec
the
GParamSpec
of the property which changed.handler
The signal handler to call Run the given callback whenever the
notifyJobName
signal is emitted -
notifyJobNameSignal
Extension methodTyped
notify::job-name
signal for using theconnect(signal:)
methodsDeclaration
Swift
static var notifyJobNameSignal: PrintOperationSignalName { get }
-
onNotifyNPages(flags:
Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property()
,g_object_set()
, et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY
, then any call tog_object_set_property()
results innotify
being emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY
, then this signal is emitted only when they explicitly callg_object_notify()
org_object_notify_by_pspec()
, and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()
call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)
It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::n-pages
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyNPages(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: PrintOperationRef, _ pspec: ParamSpecRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
pspec
the
GParamSpec
of the property which changed.handler
The signal handler to call Run the given callback whenever the
notifyNPages
signal is emitted -
notifyNPagesSignal
Extension methodTyped
notify::n-pages
signal for using theconnect(signal:)
methodsDeclaration
Swift
static var notifyNPagesSignal: PrintOperationSignalName { get }
-
onNotifyNPagesToPrint(flags:
Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property()
,g_object_set()
, et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY
, then any call tog_object_set_property()
results innotify
being emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY
, then this signal is emitted only when they explicitly callg_object_notify()
org_object_notify_by_pspec()
, and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()
call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)
It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::n-pages-to-print
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyNPagesToPrint(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: PrintOperationRef, _ pspec: ParamSpecRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
pspec
the
GParamSpec
of the property which changed.handler
The signal handler to call Run the given callback whenever the
notifyNPagesToPrint
signal is emitted -
notifyNPagesToPrintSignal
Extension methodTyped
notify::n-pages-to-print
signal for using theconnect(signal:)
methodsDeclaration
Swift
static var notifyNPagesToPrintSignal: PrintOperationSignalName { get }
-
onNotifyPrintSettings(flags:
Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property()
,g_object_set()
, et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY
, then any call tog_object_set_property()
results innotify
being emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY
, then this signal is emitted only when they explicitly callg_object_notify()
org_object_notify_by_pspec()
, and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()
call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)
It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::print-settings
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyPrintSettings(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: PrintOperationRef, _ pspec: ParamSpecRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
pspec
the
GParamSpec
of the property which changed.handler
The signal handler to call Run the given callback whenever the
notifyPrintSettings
signal is emitted -
notifyPrintSettingsSignal
Extension methodTyped
notify::print-settings
signal for using theconnect(signal:)
methodsDeclaration
Swift
static var notifyPrintSettingsSignal: PrintOperationSignalName { get }
-
onNotifyShowProgress(flags:
Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property()
,g_object_set()
, et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY
, then any call tog_object_set_property()
results innotify
being emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY
, then this signal is emitted only when they explicitly callg_object_notify()
org_object_notify_by_pspec()
, and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()
call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)
It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::show-progress
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyShowProgress(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: PrintOperationRef, _ pspec: ParamSpecRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
pspec
the
GParamSpec
of the property which changed.handler
The signal handler to call Run the given callback whenever the
notifyShowProgress
signal is emitted -
notifyShowProgressSignal
Extension methodTyped
notify::show-progress
signal for using theconnect(signal:)
methodsDeclaration
Swift
static var notifyShowProgressSignal: PrintOperationSignalName { get }
-
onNotifyStatus(flags:
Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property()
,g_object_set()
, et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY
, then any call tog_object_set_property()
results innotify
being emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY
, then this signal is emitted only when they explicitly callg_object_notify()
org_object_notify_by_pspec()
, and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()
call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)
It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::status
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyStatus(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: PrintOperationRef, _ pspec: ParamSpecRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
pspec
the
GParamSpec
of the property which changed.handler
The signal handler to call Run the given callback whenever the
notifyStatus
signal is emitted -
notifyStatusSignal
Extension methodTyped
notify::status
signal for using theconnect(signal:)
methodsDeclaration
Swift
static var notifyStatusSignal: PrintOperationSignalName { get }
-
onNotifyStatusString(flags:
Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property()
,g_object_set()
, et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY
, then any call tog_object_set_property()
results innotify
being emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY
, then this signal is emitted only when they explicitly callg_object_notify()
org_object_notify_by_pspec()
, and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()
call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)
It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::status-string
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyStatusString(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: PrintOperationRef, _ pspec: ParamSpecRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
pspec
the
GParamSpec
of the property which changed.handler
The signal handler to call Run the given callback whenever the
notifyStatusString
signal is emitted -
notifyStatusStringSignal
Extension methodTyped
notify::status-string
signal for using theconnect(signal:)
methodsDeclaration
Swift
static var notifyStatusStringSignal: PrintOperationSignalName { get }
-
onNotifySupportSelection(flags:
Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property()
,g_object_set()
, et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY
, then any call tog_object_set_property()
results innotify
being emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY
, then this signal is emitted only when they explicitly callg_object_notify()
org_object_notify_by_pspec()
, and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()
call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)
It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::support-selection
signalDeclaration
Swift
@discardableResult @inlinable func onNotifySupportSelection(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: PrintOperationRef, _ pspec: ParamSpecRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
pspec
the
GParamSpec
of the property which changed.handler
The signal handler to call Run the given callback whenever the
notifySupportSelection
signal is emitted -
notifySupportSelectionSignal
Extension methodTyped
notify::support-selection
signal for using theconnect(signal:)
methodsDeclaration
Swift
static var notifySupportSelectionSignal: PrintOperationSignalName { get }
-
onNotifyTrackPrintStatus(flags:
Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property()
,g_object_set()
, et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY
, then any call tog_object_set_property()
results innotify
being emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY
, then this signal is emitted only when they explicitly callg_object_notify()
org_object_notify_by_pspec()
, and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()
call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)
It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::track-print-status
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyTrackPrintStatus(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: PrintOperationRef, _ pspec: ParamSpecRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
pspec
the
GParamSpec
of the property which changed.handler
The signal handler to call Run the given callback whenever the
notifyTrackPrintStatus
signal is emitted -
notifyTrackPrintStatusSignal
Extension methodTyped
notify::track-print-status
signal for using theconnect(signal:)
methodsDeclaration
Swift
static var notifyTrackPrintStatusSignal: PrintOperationSignalName { get }
-
onNotifyUnit(flags:
Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property()
,g_object_set()
, et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY
, then any call tog_object_set_property()
results innotify
being emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY
, then this signal is emitted only when they explicitly callg_object_notify()
org_object_notify_by_pspec()
, and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()
call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)
It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::unit
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyUnit(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: PrintOperationRef, _ pspec: ParamSpecRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
pspec
the
GParamSpec
of the property which changed.handler
The signal handler to call Run the given callback whenever the
notifyUnit
signal is emitted -
notifyUnitSignal
Extension methodTyped
notify::unit
signal for using theconnect(signal:)
methodsDeclaration
Swift
static var notifyUnitSignal: PrintOperationSignalName { get }
-
onNotifyUseFullPage(flags:
Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property()
,g_object_set()
, et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY
, then any call tog_object_set_property()
results innotify
being emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY
, then this signal is emitted only when they explicitly callg_object_notify()
org_object_notify_by_pspec()
, and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()
call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)
It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::use-full-page
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyUseFullPage(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: PrintOperationRef, _ pspec: ParamSpecRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
pspec
the
GParamSpec
of the property which changed.handler
The signal handler to call Run the given callback whenever the
notifyUseFullPage
signal is emitted -
notifyUseFullPageSignal
Extension methodTyped
notify::use-full-page
signal for using theconnect(signal:)
methodsDeclaration
Swift
static var notifyUseFullPageSignal: PrintOperationSignalName { get }
-
cancel()
Extension methodCancels a running print operation.
This function may be called from a [signal
Gtk.PrintOperation::begin-print
], [signalGtk.PrintOperation::paginate
] or [signalGtk.PrintOperation::draw-page
] signal handler to stop the currently running print operation.Declaration
Swift
@inlinable func cancel()
-
drawPageFinish()
Extension methodSignal that drawing of particular page is complete.
It is called after completion of page drawing (e.g. drawing in another thread). If [method
Gtk.PrintOperation.set_defer_drawing
] was called before, then this function has to be called by application. Otherwise it is called by GTK itself.Declaration
Swift
@inlinable func drawPageFinish()
-
getDefaultPageSetup()
Extension methodReturns the default page setup.
Declaration
Swift
@inlinable func getDefaultPageSetup() -> PageSetupRef!
-
getEmbedPageSetup()
Extension methodGets whether page setup selection combos are embedded
Declaration
Swift
@inlinable func getEmbedPageSetup() -> Bool
-
getError()
Extension methodCall this when the result of a print operation is
GTK_PRINT_OPERATION_RESULT_ERROR
.It can be called either after [method
Gtk.PrintOperation.run
] returns, or in the [signalGtk.PrintOperation::done
] signal handler.The returned
GError
will contain more details on what went wrong.Declaration
Swift
@inlinable func getError() throws
-
getHasSelection()
Extension methodGets whether there is a selection.
Declaration
Swift
@inlinable func getHasSelection() -> Bool
-
getNPagesToPrint()
Extension methodReturns the number of pages that will be printed.
Note that this value is set during print preparation phase (
GTK_PRINT_STATUS_PREPARING
), so this function should never be called before the data generation phase (GTK_PRINT_STATUS_GENERATING_DATA
). You can connect to the [signalGtk.PrintOperation::status-changed
] signal and callgtk_print_operation_get_n_pages_to_print()
when print status isGTK_PRINT_STATUS_GENERATING_DATA
.This is typically used to track the progress of print operation.
Declaration
Swift
@inlinable func getNPagesToPrint() -> Int
-
getPrintSettings()
Extension methodReturns the current print settings.
Note that the return value is
nil
until either [methodGtk.PrintOperation.set_print_settings
] or [methodGtk.PrintOperation.run
] have been called.Declaration
Swift
@inlinable func getPrintSettings() -> PrintSettingsRef!
-
getStatus()
Extension methodReturns the status of the print operation.
Also see [method
Gtk.PrintOperation.get_status_string
].Declaration
Swift
@inlinable func getStatus() -> GtkPrintStatus
-
getStatusString()
Extension methodReturns a string representation of the status of the print operation.
The string is translated and suitable for displaying the print status e.g. in a
GtkStatusbar
.Use [method
Gtk.PrintOperation.get_status
] to obtain a status value that is suitable for programmatic use.Declaration
Swift
@inlinable func getStatusString() -> String!
-
getSupportSelection()
Extension methodGets whether the application supports print of selection
Declaration
Swift
@inlinable func getSupportSelection() -> Bool
-
run(action:
Extension methodparent: ) Runs the print operation.
Normally that this function does not return until the rendering of all pages is complete. You can connect to the [signal
Gtk.PrintOperation::status-changed
] signal onop
to obtain some information about the progress of the print operation.Furthermore, it may use a recursive mainloop to show the print dialog.
If you set the [Gtk.PrintOperation:allow-async] property, the operation will run asynchronously if this is supported on the platform. The [signal
Gtk.PrintOperation::done
] signal will be emitted with the result of the operation when the it is done (i.e. when the dialog is canceled, or when the print succeeds or fails).if (settings != NULL) gtk_print_operation_set_print_settings (print, settings); if (page_setup != NULL) gtk_print_operation_set_default_page_setup (print, page_setup); g_signal_connect (print, "begin-print", G_CALLBACK (begin_print), &data); g_signal_connect (print, "draw-page", G_CALLBACK (draw_page), &data); res = gtk_print_operation_run (print, GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG, parent, &error); if (res == GTK_PRINT_OPERATION_RESULT_ERROR) { error_dialog = gtk_message_dialog_new (GTK_WINDOW (parent), GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, "Error printing file:\n`s`", error->message); g_signal_connect (error_dialog, "response", G_CALLBACK (gtk_window_destroy), NULL); gtk_widget_show (error_dialog); g_error_free (error); } else if (res == GTK_PRINT_OPERATION_RESULT_APPLY) { if (settings != NULL) g_object_unref (settings); settings = g_object_ref (gtk_print_operation_get_print_settings (print)); }
Note that
gtk_print_operation_run()
can only be called once on a givenGtkPrintOperation
.Declaration
Swift
@inlinable func run(action: GtkPrintOperationAction, parent: WindowRef? = nil) throws -> GtkPrintOperationResult
-
run(action:
Extension methodparent: ) Runs the print operation.
Normally that this function does not return until the rendering of all pages is complete. You can connect to the [signal
Gtk.PrintOperation::status-changed
] signal onop
to obtain some information about the progress of the print operation.Furthermore, it may use a recursive mainloop to show the print dialog.
If you set the [Gtk.PrintOperation:allow-async] property, the operation will run asynchronously if this is supported on the platform. The [signal
Gtk.PrintOperation::done
] signal will be emitted with the result of the operation when the it is done (i.e. when the dialog is canceled, or when the print succeeds or fails).if (settings != NULL) gtk_print_operation_set_print_settings (print, settings); if (page_setup != NULL) gtk_print_operation_set_default_page_setup (print, page_setup); g_signal_connect (print, "begin-print", G_CALLBACK (begin_print), &data); g_signal_connect (print, "draw-page", G_CALLBACK (draw_page), &data); res = gtk_print_operation_run (print, GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG, parent, &error); if (res == GTK_PRINT_OPERATION_RESULT_ERROR) { error_dialog = gtk_message_dialog_new (GTK_WINDOW (parent), GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, "Error printing file:\n`s`", error->message); g_signal_connect (error_dialog, "response", G_CALLBACK (gtk_window_destroy), NULL); gtk_widget_show (error_dialog); g_error_free (error); } else if (res == GTK_PRINT_OPERATION_RESULT_APPLY) { if (settings != NULL) g_object_unref (settings); settings = g_object_ref (gtk_print_operation_get_print_settings (print)); }
Note that
gtk_print_operation_run()
can only be called once on a givenGtkPrintOperation
.Declaration
Swift
@inlinable func run<WindowT>(action: GtkPrintOperationAction, parent: WindowT?) throws -> GtkPrintOperationResult where WindowT : WindowProtocol
-
set(allowAsync:
Extension method) Sets whether
gtk_print_operation_run()
may return before the print operation is completed.Note that some platforms may not allow asynchronous operation.
Declaration
Swift
@inlinable func set(allowAsync: Bool)
-
set(currentPage:
Extension method) Sets the current page.
If this is called before [method
Gtk.PrintOperation.run
], the user will be able to select to print only the current page.Note that this only makes sense for pre-paginated documents.
Declaration
Swift
@inlinable func set(currentPage: Int)
-
setCustomTab(label:
Extension method) Sets the label for the tab holding custom widgets.
Declaration
Swift
@inlinable func setCustomTab(label: UnsafePointer<CChar>? = nil)
-
set(defaultPageSetup:
Extension method) Makes
default_page_setup
the default page setup forop
.This page setup will be used by [method
Gtk.PrintOperation.run
], but it can be overridden on a per-page basis by connecting to the [signalGtk.PrintOperation::request-page-setup
] signal.Declaration
Swift
@inlinable func set(defaultPageSetup: PageSetupRef? = nil)
-
set(defaultPageSetup:
Extension method) Makes
default_page_setup
the default page setup forop
.This page setup will be used by [method
Gtk.PrintOperation.run
], but it can be overridden on a per-page basis by connecting to the [signalGtk.PrintOperation::request-page-setup
] signal.Declaration
Swift
@inlinable func set<PageSetupT>(defaultPageSetup: PageSetupT?) where PageSetupT : PageSetupProtocol
-
setDeferDrawing()
Extension methodSets up the
GtkPrintOperation
to wait for calling of [methodGtk.PrintOperation.draw_page_finish
from application.This can be used for drawing page in another thread.
This function must be called in the callback of the [signal
Gtk.PrintOperation::draw-page
] signal.Declaration
Swift
@inlinable func setDeferDrawing()
-
setEmbedPageSetup(embed:
Extension method) Embed page size combo box and orientation combo box into page setup page.
Selected page setup is stored as default page setup in
GtkPrintOperation
.Declaration
Swift
@inlinable func setEmbedPageSetup(embed: Bool)
-
setExport(filename:
Extension method) Sets up the
GtkPrintOperation
to generate a file instead of showing the print dialog.The intended use of this function is for implementing “Export to PDF” actions. Currently, PDF is the only supported format.
“Print to PDF” support is independent of this and is done by letting the user pick the “Print to PDF” item from the list of printers in the print dialog.
Declaration
Swift
@inlinable func setExport(filename: UnsafePointer<CChar>!)
-
set(hasSelection:
Extension method) Sets whether there is a selection to print.
Application has to set number of pages to which the selection will draw by [method
Gtk.PrintOperation.set_n_pages
] in a handler for the [signalGtk.PrintOperation::begin-print
] signal.Declaration
Swift
@inlinable func set(hasSelection: Bool)
-
set(jobName:
Extension method) Sets the name of the print job.
The name is used to identify the job (e.g. in monitoring applications like eggcups).
If you don’t set a job name, GTK picks a default one by numbering successive print jobs.
Declaration
Swift
@inlinable func set(jobName: UnsafePointer<CChar>!)
-
set(nPages:
Extension method) Sets the number of pages in the document.
This must be set to a positive number before the rendering starts. It may be set in a [signal
Gtk.PrintOperation::begin-print
] signal handler.Note that the page numbers passed to the [signal
Gtk.PrintOperation::request-page-setup
] and [signalGtk.PrintOperation::draw-page
] signals are 0-based, i.e. if the user chooses to print all pages, the lastdraw-page
signal will be for pagen_pages
- 1.Declaration
Swift
@inlinable func set(nPages: Int)
-
set(printSettings:
Extension method) Sets the print settings for
op
.This is typically used to re-establish print settings from a previous print operation, see [method
Gtk.PrintOperation.run
].Declaration
Swift
@inlinable func set(printSettings: PrintSettingsRef? = nil)
-
set(printSettings:
Extension method) Sets the print settings for
op
.This is typically used to re-establish print settings from a previous print operation, see [method
Gtk.PrintOperation.run
].Declaration
Swift
@inlinable func set<PrintSettingsT>(printSettings: PrintSettingsT?) where PrintSettingsT : PrintSettingsProtocol
-
set(showProgress:
Extension method) If
show_progress
istrue
, the print operation will show a progress dialog during the print operation.Declaration
Swift
@inlinable func set(showProgress: Bool)
-
set(supportSelection:
Extension method) Sets whether selection is supported by
GtkPrintOperation
.Declaration
Swift
@inlinable func set(supportSelection: Bool)
-
setTrackPrintStatus(trackStatus:
Extension method) If track_status is
true
, the print operation 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.
Declaration
Swift
@inlinable func setTrackPrintStatus(trackStatus: Bool)
-
set(unit:
Extension method) Sets up the transformation for the cairo context obtained from
GtkPrintContext
in such a way that distances are measured in units ofunit
.Declaration
Swift
@inlinable func set(unit: GtkUnit)
-
setUse(fullPage:
Extension method) If
full_page
istrue
, the transformation for the cairo context obtained fromGtkPrintContext
puts the origin at the top left corner of the page.This may not be the top left corner of the sheet, depending on page orientation and the number of pages per sheet). Otherwise, the origin is at the top left corner of the imageable area (i.e. inside the margins).
Declaration
Swift
@inlinable func setUse(fullPage: Bool)
-
defaultPageSetup
Extension methodReturns the default page setup.
Declaration
Swift
@inlinable var defaultPageSetup: PageSetupRef! { get nonmutating set }
-
embedPageSetup
Extension methodGets whether page setup selection combos are embedded
Declaration
Swift
@inlinable var embedPageSetup: Bool { get nonmutating set }
-
hasSelection
Extension methodGets whether there is a selection.
Declaration
Swift
@inlinable var hasSelection: Bool { get nonmutating set }
-
isFinished
Extension methodA convenience function to find out if the print operation is finished.
a print operation is finished if its status is either
GTK_PRINT_STATUS_FINISHED
orGTK_PRINT_STATUS_FINISHED_ABORTED
.Note: when you enable print status tracking the print operation can be in a non-finished state even after done has been called, as the operation status then tracks the print job status on the printer.
Declaration
Swift
@inlinable var isFinished: Bool { get }
-
nPagesToPrint
Extension methodReturns the number of pages that will be printed.
Note that this value is set during print preparation phase (
GTK_PRINT_STATUS_PREPARING
), so this function should never be called before the data generation phase (GTK_PRINT_STATUS_GENERATING_DATA
). You can connect to the [signalGtk.PrintOperation::status-changed
] signal and callgtk_print_operation_get_n_pages_to_print()
when print status isGTK_PRINT_STATUS_GENERATING_DATA
.This is typically used to track the progress of print operation.
Declaration
Swift
@inlinable var nPagesToPrint: Int { get }
-
printSettings
Extension methodReturns the current print settings.
Note that the return value is
nil
until either [methodGtk.PrintOperation.set_print_settings
] or [methodGtk.PrintOperation.run
] have been called.Declaration
Swift
@inlinable var printSettings: PrintSettingsRef! { get nonmutating set }
-
status
Extension methodThe status of the print operation.
Declaration
Swift
@inlinable var status: GtkPrintStatus { get }
-
statusString
Extension methodReturns a string representation of the status of the print operation.
The string is translated and suitable for displaying the print status e.g. in a
GtkStatusbar
.Use [method
Gtk.PrintOperation.get_status
] to obtain a status value that is suitable for programmatic use.Declaration
Swift
@inlinable var statusString: String! { get }
-
supportSelection
Extension methodGets whether the application supports print of selection
Declaration
Swift
@inlinable var supportSelection: Bool { get nonmutating set }
-
parentInstance
Extension methodUndocumented
Declaration
Swift
@inlinable var parentInstance: GObject { get }