Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (garetxe@gmail.com) |
Safe Haskell | None |
Language | Haskell2010 |
GI.Gtk.Objects.PrintOperation
Contents
- Exported types
- Methods
- cancel
- drawPageFinish
- getDefaultPageSetup
- getEmbedPageSetup
- getError
- getHasSelection
- getNPagesToPrint
- getPrintSettings
- getStatus
- getStatusString
- getSupportSelection
- isFinished
- new
- run
- setAllowAsync
- setCurrentPage
- setCustomTabLabel
- setDefaultPageSetup
- setDeferDrawing
- setEmbedPageSetup
- setExportFilename
- setHasSelection
- setJobName
- setNPages
- setPrintSettings
- setShowProgress
- setSupportSelection
- setTrackPrintStatus
- setUnit
- setUseFullPage
- Properties
- Signals
Description
GtkPrintOperation is the high-level, portable printing API.
It looks a bit different than other GTK+ dialogs such as the
FileChooser
, 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 GtkPrintUnixDialog
.
The typical way to use the high-level printing API is to create
a GtkPrintOperation object with printOperationNew
when
the user selects to print. Then you set some properties on it,
e.g. the page size, any PrintSettings
from previous print
operations, the number of pages, the current page, etc.
Then you start the print operation by calling printOperationRun
.
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 PrintOperation
, the main one being
PrintOperation
::draw-page
, which you are supposed to catch
and render the page on the provided PrintContext
using Cairo.
The high-level printing API
C code
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
printOperationPreviewRenderPage
,
printOperationPreviewEndPreview
and
printOperationPreviewIsSelected
are useful when implementing a print preview.
- newtype PrintOperation = PrintOperation (ManagedPtr PrintOperation)
- class GObject o => IsPrintOperation o
- toPrintOperation :: (MonadIO m, IsPrintOperation o) => o -> m PrintOperation
- noPrintOperation :: Maybe PrintOperation
- printOperationCancel :: (HasCallStack, MonadIO m, IsPrintOperation a) => a -> m ()
- printOperationDrawPageFinish :: (HasCallStack, MonadIO m, IsPrintOperation a) => a -> m ()
- printOperationGetDefaultPageSetup :: (HasCallStack, MonadIO m, IsPrintOperation a) => a -> m PageSetup
- printOperationGetEmbedPageSetup :: (HasCallStack, MonadIO m, IsPrintOperation a) => a -> m Bool
- printOperationGetError :: (HasCallStack, MonadIO m, IsPrintOperation a) => a -> m ()
- printOperationGetHasSelection :: (HasCallStack, MonadIO m, IsPrintOperation a) => a -> m Bool
- printOperationGetNPagesToPrint :: (HasCallStack, MonadIO m, IsPrintOperation a) => a -> m Int32
- printOperationGetPrintSettings :: (HasCallStack, MonadIO m, IsPrintOperation a) => a -> m PrintSettings
- printOperationGetStatus :: (HasCallStack, MonadIO m, IsPrintOperation a) => a -> m PrintStatus
- printOperationGetStatusString :: (HasCallStack, MonadIO m, IsPrintOperation a) => a -> m Text
- printOperationGetSupportSelection :: (HasCallStack, MonadIO m, IsPrintOperation a) => a -> m Bool
- printOperationIsFinished :: (HasCallStack, MonadIO m, IsPrintOperation a) => a -> m Bool
- printOperationNew :: (HasCallStack, MonadIO m) => m PrintOperation
- printOperationRun :: (HasCallStack, MonadIO m, IsPrintOperation a, IsWindow b) => a -> PrintOperationAction -> Maybe b -> m PrintOperationResult
- printOperationSetAllowAsync :: (HasCallStack, MonadIO m, IsPrintOperation a) => a -> Bool -> m ()
- printOperationSetCurrentPage :: (HasCallStack, MonadIO m, IsPrintOperation a) => a -> Int32 -> m ()
- printOperationSetCustomTabLabel :: (HasCallStack, MonadIO m, IsPrintOperation a) => a -> Maybe Text -> m ()
- printOperationSetDefaultPageSetup :: (HasCallStack, MonadIO m, IsPrintOperation a, IsPageSetup b) => a -> Maybe b -> m ()
- printOperationSetDeferDrawing :: (HasCallStack, MonadIO m, IsPrintOperation a) => a -> m ()
- printOperationSetEmbedPageSetup :: (HasCallStack, MonadIO m, IsPrintOperation a) => a -> Bool -> m ()
- printOperationSetExportFilename :: (HasCallStack, MonadIO m, IsPrintOperation a) => a -> [Char] -> m ()
- printOperationSetHasSelection :: (HasCallStack, MonadIO m, IsPrintOperation a) => a -> Bool -> m ()
- printOperationSetJobName :: (HasCallStack, MonadIO m, IsPrintOperation a) => a -> Text -> m ()
- printOperationSetNPages :: (HasCallStack, MonadIO m, IsPrintOperation a) => a -> Int32 -> m ()
- printOperationSetPrintSettings :: (HasCallStack, MonadIO m, IsPrintOperation a, IsPrintSettings b) => a -> Maybe b -> m ()
- printOperationSetShowProgress :: (HasCallStack, MonadIO m, IsPrintOperation a) => a -> Bool -> m ()
- printOperationSetSupportSelection :: (HasCallStack, MonadIO m, IsPrintOperation a) => a -> Bool -> m ()
- printOperationSetTrackPrintStatus :: (HasCallStack, MonadIO m, IsPrintOperation a) => a -> Bool -> m ()
- printOperationSetUnit :: (HasCallStack, MonadIO m, IsPrintOperation a) => a -> Unit -> m ()
- printOperationSetUseFullPage :: (HasCallStack, MonadIO m, IsPrintOperation a) => a -> Bool -> m ()
- constructPrintOperationAllowAsync :: IsPrintOperation o => Bool -> IO (GValueConstruct o)
- getPrintOperationAllowAsync :: (MonadIO m, IsPrintOperation o) => o -> m Bool
- setPrintOperationAllowAsync :: (MonadIO m, IsPrintOperation o) => o -> Bool -> m ()
- constructPrintOperationCurrentPage :: IsPrintOperation o => Int32 -> IO (GValueConstruct o)
- getPrintOperationCurrentPage :: (MonadIO m, IsPrintOperation o) => o -> m Int32
- setPrintOperationCurrentPage :: (MonadIO m, IsPrintOperation o) => o -> Int32 -> m ()
- clearPrintOperationCustomTabLabel :: (MonadIO m, IsPrintOperation o) => o -> m ()
- constructPrintOperationCustomTabLabel :: IsPrintOperation o => Text -> IO (GValueConstruct o)
- getPrintOperationCustomTabLabel :: (MonadIO m, IsPrintOperation o) => o -> m (Maybe Text)
- setPrintOperationCustomTabLabel :: (MonadIO m, IsPrintOperation o) => o -> Text -> m ()
- clearPrintOperationDefaultPageSetup :: (MonadIO m, IsPrintOperation o) => o -> m ()
- constructPrintOperationDefaultPageSetup :: (IsPrintOperation o, IsPageSetup a) => a -> IO (GValueConstruct o)
- getPrintOperationDefaultPageSetup :: (MonadIO m, IsPrintOperation o) => o -> m PageSetup
- setPrintOperationDefaultPageSetup :: (MonadIO m, IsPrintOperation o, IsPageSetup a) => o -> a -> m ()
- constructPrintOperationEmbedPageSetup :: IsPrintOperation o => Bool -> IO (GValueConstruct o)
- getPrintOperationEmbedPageSetup :: (MonadIO m, IsPrintOperation o) => o -> m Bool
- setPrintOperationEmbedPageSetup :: (MonadIO m, IsPrintOperation o) => o -> Bool -> m ()
- clearPrintOperationExportFilename :: (MonadIO m, IsPrintOperation o) => o -> m ()
- constructPrintOperationExportFilename :: IsPrintOperation o => Text -> IO (GValueConstruct o)
- getPrintOperationExportFilename :: (MonadIO m, IsPrintOperation o) => o -> m (Maybe Text)
- setPrintOperationExportFilename :: (MonadIO m, IsPrintOperation o) => o -> Text -> m ()
- constructPrintOperationHasSelection :: IsPrintOperation o => Bool -> IO (GValueConstruct o)
- getPrintOperationHasSelection :: (MonadIO m, IsPrintOperation o) => o -> m Bool
- setPrintOperationHasSelection :: (MonadIO m, IsPrintOperation o) => o -> Bool -> m ()
- constructPrintOperationJobName :: IsPrintOperation o => Text -> IO (GValueConstruct o)
- getPrintOperationJobName :: (MonadIO m, IsPrintOperation o) => o -> m (Maybe Text)
- setPrintOperationJobName :: (MonadIO m, IsPrintOperation o) => o -> Text -> m ()
- constructPrintOperationNPages :: IsPrintOperation o => Int32 -> IO (GValueConstruct o)
- getPrintOperationNPages :: (MonadIO m, IsPrintOperation o) => o -> m Int32
- setPrintOperationNPages :: (MonadIO m, IsPrintOperation o) => o -> Int32 -> m ()
- getPrintOperationNPagesToPrint :: (MonadIO m, IsPrintOperation o) => o -> m Int32
- clearPrintOperationPrintSettings :: (MonadIO m, IsPrintOperation o) => o -> m ()
- constructPrintOperationPrintSettings :: (IsPrintOperation o, IsPrintSettings a) => a -> IO (GValueConstruct o)
- getPrintOperationPrintSettings :: (MonadIO m, IsPrintOperation o) => o -> m PrintSettings
- setPrintOperationPrintSettings :: (MonadIO m, IsPrintOperation o, IsPrintSettings a) => o -> a -> m ()
- constructPrintOperationShowProgress :: IsPrintOperation o => Bool -> IO (GValueConstruct o)
- getPrintOperationShowProgress :: (MonadIO m, IsPrintOperation o) => o -> m Bool
- setPrintOperationShowProgress :: (MonadIO m, IsPrintOperation o) => o -> Bool -> m ()
- getPrintOperationStatus :: (MonadIO m, IsPrintOperation o) => o -> m PrintStatus
- getPrintOperationStatusString :: (MonadIO m, IsPrintOperation o) => o -> m Text
- constructPrintOperationSupportSelection :: IsPrintOperation o => Bool -> IO (GValueConstruct o)
- getPrintOperationSupportSelection :: (MonadIO m, IsPrintOperation o) => o -> m Bool
- setPrintOperationSupportSelection :: (MonadIO m, IsPrintOperation o) => o -> Bool -> m ()
- constructPrintOperationTrackPrintStatus :: IsPrintOperation o => Bool -> IO (GValueConstruct o)
- getPrintOperationTrackPrintStatus :: (MonadIO m, IsPrintOperation o) => o -> m Bool
- setPrintOperationTrackPrintStatus :: (MonadIO m, IsPrintOperation o) => o -> Bool -> m ()
- constructPrintOperationUnit :: IsPrintOperation o => Unit -> IO (GValueConstruct o)
- getPrintOperationUnit :: (MonadIO m, IsPrintOperation o) => o -> m Unit
- setPrintOperationUnit :: (MonadIO m, IsPrintOperation o) => o -> Unit -> m ()
- constructPrintOperationUseFullPage :: IsPrintOperation o => Bool -> IO (GValueConstruct o)
- getPrintOperationUseFullPage :: (MonadIO m, IsPrintOperation o) => o -> m Bool
- setPrintOperationUseFullPage :: (MonadIO m, IsPrintOperation o) => o -> Bool -> m ()
- type C_PrintOperationBeginPrintCallback = Ptr () -> Ptr PrintContext -> Ptr () -> IO ()
- type PrintOperationBeginPrintCallback = PrintContext -> IO ()
- afterPrintOperationBeginPrint :: (IsPrintOperation a, MonadIO m) => a -> PrintOperationBeginPrintCallback -> m SignalHandlerId
- genClosure_PrintOperationBeginPrint :: PrintOperationBeginPrintCallback -> IO Closure
- mk_PrintOperationBeginPrintCallback :: C_PrintOperationBeginPrintCallback -> IO (FunPtr C_PrintOperationBeginPrintCallback)
- noPrintOperationBeginPrintCallback :: Maybe PrintOperationBeginPrintCallback
- onPrintOperationBeginPrint :: (IsPrintOperation a, MonadIO m) => a -> PrintOperationBeginPrintCallback -> m SignalHandlerId
- wrap_PrintOperationBeginPrintCallback :: PrintOperationBeginPrintCallback -> Ptr () -> Ptr PrintContext -> Ptr () -> IO ()
- type C_PrintOperationCreateCustomWidgetCallback = Ptr () -> Ptr () -> IO (Ptr Object)
- type PrintOperationCreateCustomWidgetCallback = IO Object
- afterPrintOperationCreateCustomWidget :: (IsPrintOperation a, MonadIO m) => a -> PrintOperationCreateCustomWidgetCallback -> m SignalHandlerId
- genClosure_PrintOperationCreateCustomWidget :: PrintOperationCreateCustomWidgetCallback -> IO Closure
- mk_PrintOperationCreateCustomWidgetCallback :: C_PrintOperationCreateCustomWidgetCallback -> IO (FunPtr C_PrintOperationCreateCustomWidgetCallback)
- noPrintOperationCreateCustomWidgetCallback :: Maybe PrintOperationCreateCustomWidgetCallback
- onPrintOperationCreateCustomWidget :: (IsPrintOperation a, MonadIO m) => a -> PrintOperationCreateCustomWidgetCallback -> m SignalHandlerId
- wrap_PrintOperationCreateCustomWidgetCallback :: PrintOperationCreateCustomWidgetCallback -> Ptr () -> Ptr () -> IO (Ptr Object)
- type C_PrintOperationCustomWidgetApplyCallback = Ptr () -> Ptr Widget -> Ptr () -> IO ()
- type PrintOperationCustomWidgetApplyCallback = Widget -> IO ()
- afterPrintOperationCustomWidgetApply :: (IsPrintOperation a, MonadIO m) => a -> PrintOperationCustomWidgetApplyCallback -> m SignalHandlerId
- genClosure_PrintOperationCustomWidgetApply :: PrintOperationCustomWidgetApplyCallback -> IO Closure
- mk_PrintOperationCustomWidgetApplyCallback :: C_PrintOperationCustomWidgetApplyCallback -> IO (FunPtr C_PrintOperationCustomWidgetApplyCallback)
- noPrintOperationCustomWidgetApplyCallback :: Maybe PrintOperationCustomWidgetApplyCallback
- onPrintOperationCustomWidgetApply :: (IsPrintOperation a, MonadIO m) => a -> PrintOperationCustomWidgetApplyCallback -> m SignalHandlerId
- wrap_PrintOperationCustomWidgetApplyCallback :: PrintOperationCustomWidgetApplyCallback -> Ptr () -> Ptr Widget -> Ptr () -> IO ()
- type C_PrintOperationDoneCallback = Ptr () -> CUInt -> Ptr () -> IO ()
- type PrintOperationDoneCallback = PrintOperationResult -> IO ()
- afterPrintOperationDone :: (IsPrintOperation a, MonadIO m) => a -> PrintOperationDoneCallback -> m SignalHandlerId
- genClosure_PrintOperationDone :: PrintOperationDoneCallback -> IO Closure
- mk_PrintOperationDoneCallback :: C_PrintOperationDoneCallback -> IO (FunPtr C_PrintOperationDoneCallback)
- noPrintOperationDoneCallback :: Maybe PrintOperationDoneCallback
- onPrintOperationDone :: (IsPrintOperation a, MonadIO m) => a -> PrintOperationDoneCallback -> m SignalHandlerId
- wrap_PrintOperationDoneCallback :: PrintOperationDoneCallback -> Ptr () -> CUInt -> Ptr () -> IO ()
- type C_PrintOperationDrawPageCallback = Ptr () -> Ptr PrintContext -> Int32 -> Ptr () -> IO ()
- type PrintOperationDrawPageCallback = PrintContext -> Int32 -> IO ()
- afterPrintOperationDrawPage :: (IsPrintOperation a, MonadIO m) => a -> PrintOperationDrawPageCallback -> m SignalHandlerId
- genClosure_PrintOperationDrawPage :: PrintOperationDrawPageCallback -> IO Closure
- mk_PrintOperationDrawPageCallback :: C_PrintOperationDrawPageCallback -> IO (FunPtr C_PrintOperationDrawPageCallback)
- noPrintOperationDrawPageCallback :: Maybe PrintOperationDrawPageCallback
- onPrintOperationDrawPage :: (IsPrintOperation a, MonadIO m) => a -> PrintOperationDrawPageCallback -> m SignalHandlerId
- wrap_PrintOperationDrawPageCallback :: PrintOperationDrawPageCallback -> Ptr () -> Ptr PrintContext -> Int32 -> Ptr () -> IO ()
- type C_PrintOperationEndPrintCallback = Ptr () -> Ptr PrintContext -> Ptr () -> IO ()
- type PrintOperationEndPrintCallback = PrintContext -> IO ()
- afterPrintOperationEndPrint :: (IsPrintOperation a, MonadIO m) => a -> PrintOperationEndPrintCallback -> m SignalHandlerId
- genClosure_PrintOperationEndPrint :: PrintOperationEndPrintCallback -> IO Closure
- mk_PrintOperationEndPrintCallback :: C_PrintOperationEndPrintCallback -> IO (FunPtr C_PrintOperationEndPrintCallback)
- noPrintOperationEndPrintCallback :: Maybe PrintOperationEndPrintCallback
- onPrintOperationEndPrint :: (IsPrintOperation a, MonadIO m) => a -> PrintOperationEndPrintCallback -> m SignalHandlerId
- wrap_PrintOperationEndPrintCallback :: PrintOperationEndPrintCallback -> Ptr () -> Ptr PrintContext -> Ptr () -> IO ()
- type C_PrintOperationPaginateCallback = Ptr () -> Ptr PrintContext -> Ptr () -> IO CInt
- type PrintOperationPaginateCallback = PrintContext -> IO Bool
- afterPrintOperationPaginate :: (IsPrintOperation a, MonadIO m) => a -> PrintOperationPaginateCallback -> m SignalHandlerId
- genClosure_PrintOperationPaginate :: PrintOperationPaginateCallback -> IO Closure
- mk_PrintOperationPaginateCallback :: C_PrintOperationPaginateCallback -> IO (FunPtr C_PrintOperationPaginateCallback)
- noPrintOperationPaginateCallback :: Maybe PrintOperationPaginateCallback
- onPrintOperationPaginate :: (IsPrintOperation a, MonadIO m) => a -> PrintOperationPaginateCallback -> m SignalHandlerId
- wrap_PrintOperationPaginateCallback :: PrintOperationPaginateCallback -> Ptr () -> Ptr PrintContext -> Ptr () -> IO CInt
- type C_PrintOperationPreviewCallback = Ptr () -> Ptr PrintOperationPreview -> Ptr PrintContext -> Ptr Window -> Ptr () -> IO CInt
- type PrintOperationPreviewCallback = PrintOperationPreview -> PrintContext -> Maybe Window -> IO Bool
- afterPrintOperationPreview :: (IsPrintOperation a, MonadIO m) => a -> PrintOperationPreviewCallback -> m SignalHandlerId
- genClosure_PrintOperationPreview :: PrintOperationPreviewCallback -> IO Closure
- mk_PrintOperationPreviewCallback :: C_PrintOperationPreviewCallback -> IO (FunPtr C_PrintOperationPreviewCallback)
- noPrintOperationPreviewCallback :: Maybe PrintOperationPreviewCallback
- onPrintOperationPreview :: (IsPrintOperation a, MonadIO m) => a -> PrintOperationPreviewCallback -> m SignalHandlerId
- wrap_PrintOperationPreviewCallback :: PrintOperationPreviewCallback -> Ptr () -> Ptr PrintOperationPreview -> Ptr PrintContext -> Ptr Window -> Ptr () -> IO CInt
- type C_PrintOperationRequestPageSetupCallback = Ptr () -> Ptr PrintContext -> Int32 -> Ptr PageSetup -> Ptr () -> IO ()
- type PrintOperationRequestPageSetupCallback = PrintContext -> Int32 -> PageSetup -> IO ()
- afterPrintOperationRequestPageSetup :: (IsPrintOperation a, MonadIO m) => a -> PrintOperationRequestPageSetupCallback -> m SignalHandlerId
- genClosure_PrintOperationRequestPageSetup :: PrintOperationRequestPageSetupCallback -> IO Closure
- mk_PrintOperationRequestPageSetupCallback :: C_PrintOperationRequestPageSetupCallback -> IO (FunPtr C_PrintOperationRequestPageSetupCallback)
- noPrintOperationRequestPageSetupCallback :: Maybe PrintOperationRequestPageSetupCallback
- onPrintOperationRequestPageSetup :: (IsPrintOperation a, MonadIO m) => a -> PrintOperationRequestPageSetupCallback -> m SignalHandlerId
- wrap_PrintOperationRequestPageSetupCallback :: PrintOperationRequestPageSetupCallback -> Ptr () -> Ptr PrintContext -> Int32 -> Ptr PageSetup -> Ptr () -> IO ()
- type C_PrintOperationStatusChangedCallback = Ptr () -> Ptr () -> IO ()
- type PrintOperationStatusChangedCallback = IO ()
- afterPrintOperationStatusChanged :: (IsPrintOperation a, MonadIO m) => a -> PrintOperationStatusChangedCallback -> m SignalHandlerId
- genClosure_PrintOperationStatusChanged :: PrintOperationStatusChangedCallback -> IO Closure
- mk_PrintOperationStatusChangedCallback :: C_PrintOperationStatusChangedCallback -> IO (FunPtr C_PrintOperationStatusChangedCallback)
- noPrintOperationStatusChangedCallback :: Maybe PrintOperationStatusChangedCallback
- onPrintOperationStatusChanged :: (IsPrintOperation a, MonadIO m) => a -> PrintOperationStatusChangedCallback -> m SignalHandlerId
- wrap_PrintOperationStatusChangedCallback :: PrintOperationStatusChangedCallback -> Ptr () -> Ptr () -> IO ()
- type C_PrintOperationUpdateCustomWidgetCallback = Ptr () -> Ptr Widget -> Ptr PageSetup -> Ptr PrintSettings -> Ptr () -> IO ()
- type PrintOperationUpdateCustomWidgetCallback = Widget -> PageSetup -> PrintSettings -> IO ()
- afterPrintOperationUpdateCustomWidget :: (IsPrintOperation a, MonadIO m) => a -> PrintOperationUpdateCustomWidgetCallback -> m SignalHandlerId
- genClosure_PrintOperationUpdateCustomWidget :: PrintOperationUpdateCustomWidgetCallback -> IO Closure
- mk_PrintOperationUpdateCustomWidgetCallback :: C_PrintOperationUpdateCustomWidgetCallback -> IO (FunPtr C_PrintOperationUpdateCustomWidgetCallback)
- noPrintOperationUpdateCustomWidgetCallback :: Maybe PrintOperationUpdateCustomWidgetCallback
- onPrintOperationUpdateCustomWidget :: (IsPrintOperation a, MonadIO m) => a -> PrintOperationUpdateCustomWidgetCallback -> m SignalHandlerId
- wrap_PrintOperationUpdateCustomWidgetCallback :: PrintOperationUpdateCustomWidgetCallback -> Ptr () -> Ptr Widget -> Ptr PageSetup -> Ptr PrintSettings -> Ptr () -> IO ()
Exported types
newtype PrintOperation Source #
Constructors
PrintOperation (ManagedPtr PrintOperation) |
class GObject o => IsPrintOperation o Source #
Instances
toPrintOperation :: (MonadIO m, IsPrintOperation o) => o -> m PrintOperation Source #
Methods
cancel
Arguments
:: (HasCallStack, MonadIO m, IsPrintOperation a) | |
=> a |
|
-> m () |
Cancels a running print operation. This function may
be called from a PrintOperation
::begin-print
,
PrintOperation
::paginate
or PrintOperation
::draw-page
signal handler to stop the currently running print
operation.
Since: 2.10
drawPageFinish
printOperationDrawPageFinish Source #
Arguments
:: (HasCallStack, MonadIO m, IsPrintOperation a) | |
=> a |
|
-> m () |
Signalize that drawing of particular page is complete.
It is called after completion of page drawing (e.g. drawing in another
thread).
If printOperationSetDeferDrawing
was called before, then this function
has to be called by application. In another case it is called by the library
itself.
Since: 2.16
getDefaultPageSetup
printOperationGetDefaultPageSetup Source #
Arguments
:: (HasCallStack, MonadIO m, IsPrintOperation a) | |
=> a |
|
-> m PageSetup | Returns: the default page setup |
Returns the default page setup, see
printOperationSetDefaultPageSetup
.
Since: 2.10
getEmbedPageSetup
printOperationGetEmbedPageSetup Source #
Arguments
:: (HasCallStack, MonadIO m, IsPrintOperation a) | |
=> a |
|
-> m Bool | Returns: whether page setup selection combos are embedded |
Gets the value of PrintOperation
:embed-page-setup
property.
Since: 2.18
getError
printOperationGetError Source #
Arguments
:: (HasCallStack, MonadIO m, IsPrintOperation a) | |
=> a |
|
-> m () | (Can throw |
Call this when the result of a print operation is
PrintOperationResultError
, either as returned by
printOperationRun
, or in the PrintOperation
::done
signal
handler. The returned GError
will contain more details on what went wrong.
Since: 2.10
getHasSelection
printOperationGetHasSelection Source #
Arguments
:: (HasCallStack, MonadIO m, IsPrintOperation a) | |
=> a |
|
-> m Bool | Returns: whether there is a selection |
Gets the value of PrintOperation
:has-selection
property.
Since: 2.18
getNPagesToPrint
printOperationGetNPagesToPrint Source #
Arguments
:: (HasCallStack, MonadIO m, IsPrintOperation a) | |
=> a |
|
-> m Int32 | Returns: the number of pages that will be printed |
Returns the number of pages that will be printed.
Note that this value is set during print preparation phase
(PrintStatusPreparing
), so this function should never be
called before the data generation phase (PrintStatusGeneratingData
).
You can connect to the PrintOperation
::status-changed
signal
and call printOperationGetNPagesToPrint
when
print status is PrintStatusGeneratingData
.
This is typically used to track the progress of print operation.
Since: 2.18
getPrintSettings
printOperationGetPrintSettings Source #
Arguments
:: (HasCallStack, MonadIO m, IsPrintOperation a) | |
=> a |
|
-> m PrintSettings | Returns: the current print settings of |
Returns the current print settings.
Note that the return value is Nothing
until either
printOperationSetPrintSettings
or
printOperationRun
have been called.
Since: 2.10
getStatus
printOperationGetStatus Source #
Arguments
:: (HasCallStack, MonadIO m, IsPrintOperation a) | |
=> a |
|
-> m PrintStatus | Returns: the status of the print operation |
Returns the status of the print operation.
Also see printOperationGetStatusString
.
Since: 2.10
getStatusString
printOperationGetStatusString Source #
Arguments
:: (HasCallStack, MonadIO m, IsPrintOperation a) | |
=> a |
|
-> m Text | Returns: a string representation of the status of the print operation |
Returns 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 Statusbar
.
Use printOperationGetStatus
to obtain a status
value that is suitable for programmatic use.
Since: 2.10
getSupportSelection
printOperationGetSupportSelection Source #
Arguments
:: (HasCallStack, MonadIO m, IsPrintOperation a) | |
=> a |
|
-> m Bool | Returns: whether the application supports print of selection |
Gets the value of PrintOperation
:support-selection
property.
Since: 2.18
isFinished
printOperationIsFinished Source #
Arguments
:: (HasCallStack, MonadIO m, IsPrintOperation a) | |
=> a |
|
-> m Bool | Returns: |
A convenience function to find out if the print operation
is finished, either successfully (PrintStatusFinished
)
or unsuccessfully (PrintStatusFinishedAborted
).
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.
Since: 2.10
new
Arguments
:: (HasCallStack, MonadIO m) | |
=> m PrintOperation | Returns: a new |
Creates a new PrintOperation
.
Since: 2.10
run
Arguments
:: (HasCallStack, MonadIO m, IsPrintOperation a, IsWindow b) | |
=> a |
|
-> PrintOperationAction |
|
-> Maybe b |
|
-> m PrintOperationResult | Returns: the result of the print operation. A return value of
|
Runs the print operation, by first letting the user modify print settings in the print dialog, and then print the document.
Normally that this function does not return until the rendering of all
pages is complete. You can connect to the
PrintOperation
::status-changed
signal on op
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 call printOperationSetAllowAsync
or set the
PrintOperation
:allow-async
property the operation will run
asynchronously if this is supported on the platform. The
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).
C code
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_widget_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 printOperationRun
can only be called once on a
given PrintOperation
.
Since: 2.10
setAllowAsync
printOperationSetAllowAsync Source #
Arguments
:: (HasCallStack, MonadIO m, IsPrintOperation a) | |
=> a |
|
-> Bool |
|
-> m () |
Sets whether the printOperationRun
may return
before the print operation is completed. Note that
some platforms may not allow asynchronous operation.
Since: 2.10
setCurrentPage
printOperationSetCurrentPage Source #
Arguments
:: (HasCallStack, MonadIO m, IsPrintOperation a) | |
=> a |
|
-> Int32 |
|
-> m () |
Sets the current page.
If this is called before printOperationRun
,
the user will be able to select to print only the current page.
Note that this only makes sense for pre-paginated documents.
Since: 2.10
setCustomTabLabel
printOperationSetCustomTabLabel Source #
Arguments
:: (HasCallStack, MonadIO m, IsPrintOperation a) | |
=> a |
|
-> Maybe Text |
|
-> m () |
Sets the label for the tab holding custom widgets.
Since: 2.10
setDefaultPageSetup
printOperationSetDefaultPageSetup Source #
Arguments
:: (HasCallStack, MonadIO m, IsPrintOperation a, IsPageSetup b) | |
=> a |
|
-> Maybe b | |
-> m () |
Makes defaultPageSetup
the default page setup for op
.
This page setup will be used by printOperationRun
,
but it can be overridden on a per-page basis by connecting
to the PrintOperation
::request-page-setup
signal.
Since: 2.10
setDeferDrawing
printOperationSetDeferDrawing Source #
Arguments
:: (HasCallStack, MonadIO m, IsPrintOperation a) | |
=> a |
|
-> m () |
Sets up the PrintOperation
to wait for calling of
printOperationDrawPageFinish
from application. It can
be used for drawing page in another thread.
This function must be called in the callback of “draw-page” signal.
Since: 2.16
setEmbedPageSetup
printOperationSetEmbedPageSetup Source #
Arguments
:: (HasCallStack, MonadIO m, IsPrintOperation a) | |
=> a |
|
-> Bool |
|
-> m () |
Embed page size combo box and orientation combo box into page setup page.
Selected page setup is stored as default page setup in PrintOperation
.
Since: 2.18
setExportFilename
printOperationSetExportFilename Source #
Arguments
:: (HasCallStack, MonadIO m, IsPrintOperation a) | |
=> a |
|
-> [Char] |
|
-> m () |
Sets up the PrintOperation
to generate a file instead
of showing the print dialog. The indended 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.
Since: 2.10
setHasSelection
printOperationSetHasSelection Source #
Arguments
:: (HasCallStack, MonadIO m, IsPrintOperation a) | |
=> a |
|
-> Bool |
|
-> m () |
Sets whether there is a selection to print.
Application has to set number of pages to which the selection
will draw by printOperationSetNPages
in a callback of
PrintOperation
::begin-print
.
Since: 2.18
setJobName
printOperationSetJobName Source #
Arguments
:: (HasCallStack, MonadIO m, IsPrintOperation a) | |
=> a |
|
-> Text |
|
-> m () |
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.
Since: 2.10
setNPages
printOperationSetNPages Source #
Arguments
:: (HasCallStack, MonadIO m, IsPrintOperation a) | |
=> a |
|
-> Int32 |
|
-> m () |
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
PrintOperation
::begin-print
signal hander.
Note that the page numbers passed to the
PrintOperation
::request-page-setup
and PrintOperation
::draw-page
signals are 0-based, i.e. if
the user chooses to print all pages, the last ::draw-page signal
will be for page nPages
- 1.
Since: 2.10
setPrintSettings
printOperationSetPrintSettings Source #
Arguments
:: (HasCallStack, MonadIO m, IsPrintOperation a, IsPrintSettings b) | |
=> a |
|
-> Maybe b |
|
-> m () |
Sets the print settings for op
. This is typically used to
re-establish print settings from a previous print operation,
see printOperationRun
.
Since: 2.10
setShowProgress
printOperationSetShowProgress Source #
Arguments
:: (HasCallStack, MonadIO m, IsPrintOperation a) | |
=> a |
|
-> Bool |
|
-> m () |
If showProgress
is True
, the print operation will show a
progress dialog during the print operation.
Since: 2.10
setSupportSelection
printOperationSetSupportSelection Source #
Arguments
:: (HasCallStack, MonadIO m, IsPrintOperation a) | |
=> a |
|
-> Bool |
|
-> m () |
Sets whether selection is supported by PrintOperation
.
Since: 2.18
setTrackPrintStatus
printOperationSetTrackPrintStatus Source #
Arguments
:: (HasCallStack, MonadIO m, IsPrintOperation a) | |
=> a |
|
-> Bool |
|
-> m () |
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.
Since: 2.10
setUnit
printOperationSetUnit Source #
Arguments
:: (HasCallStack, MonadIO m, IsPrintOperation a) | |
=> a |
|
-> Unit |
|
-> m () |
Sets up the transformation for the cairo context obtained from
PrintContext
in such a way that distances are measured in
units of unit
.
Since: 2.10
setUseFullPage
printOperationSetUseFullPage Source #
Arguments
:: (HasCallStack, MonadIO m, IsPrintOperation a) | |
=> a |
|
-> Bool |
|
-> m () |
If fullPage
is True
, the transformation for the cairo context
obtained from PrintContext
puts the origin at the top left
corner of the page (which 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).
Since: 2.10
Properties
allowAsync
constructPrintOperationAllowAsync :: IsPrintOperation o => Bool -> IO (GValueConstruct o) Source #
getPrintOperationAllowAsync :: (MonadIO m, IsPrintOperation o) => o -> m Bool Source #
setPrintOperationAllowAsync :: (MonadIO m, IsPrintOperation o) => o -> Bool -> m () Source #
currentPage
constructPrintOperationCurrentPage :: IsPrintOperation o => Int32 -> IO (GValueConstruct o) Source #
getPrintOperationCurrentPage :: (MonadIO m, IsPrintOperation o) => o -> m Int32 Source #
setPrintOperationCurrentPage :: (MonadIO m, IsPrintOperation o) => o -> Int32 -> m () Source #
customTabLabel
clearPrintOperationCustomTabLabel :: (MonadIO m, IsPrintOperation o) => o -> m () Source #
constructPrintOperationCustomTabLabel :: IsPrintOperation o => Text -> IO (GValueConstruct o) Source #
getPrintOperationCustomTabLabel :: (MonadIO m, IsPrintOperation o) => o -> m (Maybe Text) Source #
setPrintOperationCustomTabLabel :: (MonadIO m, IsPrintOperation o) => o -> Text -> m () Source #
defaultPageSetup
clearPrintOperationDefaultPageSetup :: (MonadIO m, IsPrintOperation o) => o -> m () Source #
constructPrintOperationDefaultPageSetup :: (IsPrintOperation o, IsPageSetup a) => a -> IO (GValueConstruct o) Source #
getPrintOperationDefaultPageSetup :: (MonadIO m, IsPrintOperation o) => o -> m PageSetup Source #
setPrintOperationDefaultPageSetup :: (MonadIO m, IsPrintOperation o, IsPageSetup a) => o -> a -> m () Source #
embedPageSetup
constructPrintOperationEmbedPageSetup :: IsPrintOperation o => Bool -> IO (GValueConstruct o) Source #
getPrintOperationEmbedPageSetup :: (MonadIO m, IsPrintOperation o) => o -> m Bool Source #
setPrintOperationEmbedPageSetup :: (MonadIO m, IsPrintOperation o) => o -> Bool -> m () Source #
exportFilename
clearPrintOperationExportFilename :: (MonadIO m, IsPrintOperation o) => o -> m () Source #
constructPrintOperationExportFilename :: IsPrintOperation o => Text -> IO (GValueConstruct o) Source #
getPrintOperationExportFilename :: (MonadIO m, IsPrintOperation o) => o -> m (Maybe Text) Source #
setPrintOperationExportFilename :: (MonadIO m, IsPrintOperation o) => o -> Text -> m () Source #
hasSelection
constructPrintOperationHasSelection :: IsPrintOperation o => Bool -> IO (GValueConstruct o) Source #
getPrintOperationHasSelection :: (MonadIO m, IsPrintOperation o) => o -> m Bool Source #
setPrintOperationHasSelection :: (MonadIO m, IsPrintOperation o) => o -> Bool -> m () Source #
jobName
constructPrintOperationJobName :: IsPrintOperation o => Text -> IO (GValueConstruct o) Source #
getPrintOperationJobName :: (MonadIO m, IsPrintOperation o) => o -> m (Maybe Text) Source #
setPrintOperationJobName :: (MonadIO m, IsPrintOperation o) => o -> Text -> m () Source #
nPages
constructPrintOperationNPages :: IsPrintOperation o => Int32 -> IO (GValueConstruct o) Source #
getPrintOperationNPages :: (MonadIO m, IsPrintOperation o) => o -> m Int32 Source #
setPrintOperationNPages :: (MonadIO m, IsPrintOperation o) => o -> Int32 -> m () Source #
nPagesToPrint
getPrintOperationNPagesToPrint :: (MonadIO m, IsPrintOperation o) => o -> m Int32 Source #
printSettings
clearPrintOperationPrintSettings :: (MonadIO m, IsPrintOperation o) => o -> m () Source #
constructPrintOperationPrintSettings :: (IsPrintOperation o, IsPrintSettings a) => a -> IO (GValueConstruct o) Source #
getPrintOperationPrintSettings :: (MonadIO m, IsPrintOperation o) => o -> m PrintSettings Source #
setPrintOperationPrintSettings :: (MonadIO m, IsPrintOperation o, IsPrintSettings a) => o -> a -> m () Source #
showProgress
constructPrintOperationShowProgress :: IsPrintOperation o => Bool -> IO (GValueConstruct o) Source #
getPrintOperationShowProgress :: (MonadIO m, IsPrintOperation o) => o -> m Bool Source #
setPrintOperationShowProgress :: (MonadIO m, IsPrintOperation o) => o -> Bool -> m () Source #
status
getPrintOperationStatus :: (MonadIO m, IsPrintOperation o) => o -> m PrintStatus Source #
statusString
getPrintOperationStatusString :: (MonadIO m, IsPrintOperation o) => o -> m Text Source #
supportSelection
constructPrintOperationSupportSelection :: IsPrintOperation o => Bool -> IO (GValueConstruct o) Source #
getPrintOperationSupportSelection :: (MonadIO m, IsPrintOperation o) => o -> m Bool Source #
setPrintOperationSupportSelection :: (MonadIO m, IsPrintOperation o) => o -> Bool -> m () Source #
trackPrintStatus
constructPrintOperationTrackPrintStatus :: IsPrintOperation o => Bool -> IO (GValueConstruct o) Source #
getPrintOperationTrackPrintStatus :: (MonadIO m, IsPrintOperation o) => o -> m Bool Source #
setPrintOperationTrackPrintStatus :: (MonadIO m, IsPrintOperation o) => o -> Bool -> m () Source #
unit
constructPrintOperationUnit :: IsPrintOperation o => Unit -> IO (GValueConstruct o) Source #
getPrintOperationUnit :: (MonadIO m, IsPrintOperation o) => o -> m Unit Source #
setPrintOperationUnit :: (MonadIO m, IsPrintOperation o) => o -> Unit -> m () Source #
useFullPage
constructPrintOperationUseFullPage :: IsPrintOperation o => Bool -> IO (GValueConstruct o) Source #
getPrintOperationUseFullPage :: (MonadIO m, IsPrintOperation o) => o -> m Bool Source #
setPrintOperationUseFullPage :: (MonadIO m, IsPrintOperation o) => o -> Bool -> m () Source #
Signals
beginPrint
type C_PrintOperationBeginPrintCallback = Ptr () -> Ptr PrintContext -> Ptr () -> IO () Source #
type PrintOperationBeginPrintCallback = PrintContext -> IO () Source #
afterPrintOperationBeginPrint :: (IsPrintOperation a, MonadIO m) => a -> PrintOperationBeginPrintCallback -> m SignalHandlerId Source #
mk_PrintOperationBeginPrintCallback :: C_PrintOperationBeginPrintCallback -> IO (FunPtr C_PrintOperationBeginPrintCallback) Source #
onPrintOperationBeginPrint :: (IsPrintOperation a, MonadIO m) => a -> PrintOperationBeginPrintCallback -> m SignalHandlerId Source #
wrap_PrintOperationBeginPrintCallback :: PrintOperationBeginPrintCallback -> Ptr () -> Ptr PrintContext -> Ptr () -> IO () Source #
createCustomWidget
afterPrintOperationCreateCustomWidget :: (IsPrintOperation a, MonadIO m) => a -> PrintOperationCreateCustomWidgetCallback -> m SignalHandlerId Source #
genClosure_PrintOperationCreateCustomWidget :: PrintOperationCreateCustomWidgetCallback -> IO Closure Source #
mk_PrintOperationCreateCustomWidgetCallback :: C_PrintOperationCreateCustomWidgetCallback -> IO (FunPtr C_PrintOperationCreateCustomWidgetCallback) Source #
noPrintOperationCreateCustomWidgetCallback :: Maybe PrintOperationCreateCustomWidgetCallback Source #
onPrintOperationCreateCustomWidget :: (IsPrintOperation a, MonadIO m) => a -> PrintOperationCreateCustomWidgetCallback -> m SignalHandlerId Source #
wrap_PrintOperationCreateCustomWidgetCallback :: PrintOperationCreateCustomWidgetCallback -> Ptr () -> Ptr () -> IO (Ptr Object) Source #
customWidgetApply
type PrintOperationCustomWidgetApplyCallback = Widget -> IO () Source #
afterPrintOperationCustomWidgetApply :: (IsPrintOperation a, MonadIO m) => a -> PrintOperationCustomWidgetApplyCallback -> m SignalHandlerId Source #
genClosure_PrintOperationCustomWidgetApply :: PrintOperationCustomWidgetApplyCallback -> IO Closure Source #
mk_PrintOperationCustomWidgetApplyCallback :: C_PrintOperationCustomWidgetApplyCallback -> IO (FunPtr C_PrintOperationCustomWidgetApplyCallback) Source #
onPrintOperationCustomWidgetApply :: (IsPrintOperation a, MonadIO m) => a -> PrintOperationCustomWidgetApplyCallback -> m SignalHandlerId Source #
wrap_PrintOperationCustomWidgetApplyCallback :: PrintOperationCustomWidgetApplyCallback -> Ptr () -> Ptr Widget -> Ptr () -> IO () Source #
done
type PrintOperationDoneCallback = PrintOperationResult -> IO () Source #
afterPrintOperationDone :: (IsPrintOperation a, MonadIO m) => a -> PrintOperationDoneCallback -> m SignalHandlerId Source #
mk_PrintOperationDoneCallback :: C_PrintOperationDoneCallback -> IO (FunPtr C_PrintOperationDoneCallback) Source #
onPrintOperationDone :: (IsPrintOperation a, MonadIO m) => a -> PrintOperationDoneCallback -> m SignalHandlerId Source #
wrap_PrintOperationDoneCallback :: PrintOperationDoneCallback -> Ptr () -> CUInt -> Ptr () -> IO () Source #
drawPage
type C_PrintOperationDrawPageCallback = Ptr () -> Ptr PrintContext -> Int32 -> Ptr () -> IO () Source #
type PrintOperationDrawPageCallback = PrintContext -> Int32 -> IO () Source #
afterPrintOperationDrawPage :: (IsPrintOperation a, MonadIO m) => a -> PrintOperationDrawPageCallback -> m SignalHandlerId Source #
mk_PrintOperationDrawPageCallback :: C_PrintOperationDrawPageCallback -> IO (FunPtr C_PrintOperationDrawPageCallback) Source #
onPrintOperationDrawPage :: (IsPrintOperation a, MonadIO m) => a -> PrintOperationDrawPageCallback -> m SignalHandlerId Source #
wrap_PrintOperationDrawPageCallback :: PrintOperationDrawPageCallback -> Ptr () -> Ptr PrintContext -> Int32 -> Ptr () -> IO () Source #
endPrint
type C_PrintOperationEndPrintCallback = Ptr () -> Ptr PrintContext -> Ptr () -> IO () Source #
type PrintOperationEndPrintCallback = PrintContext -> IO () Source #
afterPrintOperationEndPrint :: (IsPrintOperation a, MonadIO m) => a -> PrintOperationEndPrintCallback -> m SignalHandlerId Source #
mk_PrintOperationEndPrintCallback :: C_PrintOperationEndPrintCallback -> IO (FunPtr C_PrintOperationEndPrintCallback) Source #
onPrintOperationEndPrint :: (IsPrintOperation a, MonadIO m) => a -> PrintOperationEndPrintCallback -> m SignalHandlerId Source #
wrap_PrintOperationEndPrintCallback :: PrintOperationEndPrintCallback -> Ptr () -> Ptr PrintContext -> Ptr () -> IO () Source #
paginate
type C_PrintOperationPaginateCallback = Ptr () -> Ptr PrintContext -> Ptr () -> IO CInt Source #
type PrintOperationPaginateCallback = PrintContext -> IO Bool Source #
afterPrintOperationPaginate :: (IsPrintOperation a, MonadIO m) => a -> PrintOperationPaginateCallback -> m SignalHandlerId Source #
mk_PrintOperationPaginateCallback :: C_PrintOperationPaginateCallback -> IO (FunPtr C_PrintOperationPaginateCallback) Source #
onPrintOperationPaginate :: (IsPrintOperation a, MonadIO m) => a -> PrintOperationPaginateCallback -> m SignalHandlerId Source #
wrap_PrintOperationPaginateCallback :: PrintOperationPaginateCallback -> Ptr () -> Ptr PrintContext -> Ptr () -> IO CInt Source #
preview
type C_PrintOperationPreviewCallback = Ptr () -> Ptr PrintOperationPreview -> Ptr PrintContext -> Ptr Window -> Ptr () -> IO CInt Source #
type PrintOperationPreviewCallback = PrintOperationPreview -> PrintContext -> Maybe Window -> IO Bool Source #
afterPrintOperationPreview :: (IsPrintOperation a, MonadIO m) => a -> PrintOperationPreviewCallback -> m SignalHandlerId Source #
mk_PrintOperationPreviewCallback :: C_PrintOperationPreviewCallback -> IO (FunPtr C_PrintOperationPreviewCallback) Source #
onPrintOperationPreview :: (IsPrintOperation a, MonadIO m) => a -> PrintOperationPreviewCallback -> m SignalHandlerId Source #
wrap_PrintOperationPreviewCallback :: PrintOperationPreviewCallback -> Ptr () -> Ptr PrintOperationPreview -> Ptr PrintContext -> Ptr Window -> Ptr () -> IO CInt Source #
requestPageSetup
type C_PrintOperationRequestPageSetupCallback = Ptr () -> Ptr PrintContext -> Int32 -> Ptr PageSetup -> Ptr () -> IO () Source #
type PrintOperationRequestPageSetupCallback = PrintContext -> Int32 -> PageSetup -> IO () Source #
afterPrintOperationRequestPageSetup :: (IsPrintOperation a, MonadIO m) => a -> PrintOperationRequestPageSetupCallback -> m SignalHandlerId Source #
genClosure_PrintOperationRequestPageSetup :: PrintOperationRequestPageSetupCallback -> IO Closure Source #
mk_PrintOperationRequestPageSetupCallback :: C_PrintOperationRequestPageSetupCallback -> IO (FunPtr C_PrintOperationRequestPageSetupCallback) Source #
onPrintOperationRequestPageSetup :: (IsPrintOperation a, MonadIO m) => a -> PrintOperationRequestPageSetupCallback -> m SignalHandlerId Source #
wrap_PrintOperationRequestPageSetupCallback :: PrintOperationRequestPageSetupCallback -> Ptr () -> Ptr PrintContext -> Int32 -> Ptr PageSetup -> Ptr () -> IO () Source #
statusChanged
type PrintOperationStatusChangedCallback = IO () Source #
afterPrintOperationStatusChanged :: (IsPrintOperation a, MonadIO m) => a -> PrintOperationStatusChangedCallback -> m SignalHandlerId Source #
genClosure_PrintOperationStatusChanged :: PrintOperationStatusChangedCallback -> IO Closure Source #
mk_PrintOperationStatusChangedCallback :: C_PrintOperationStatusChangedCallback -> IO (FunPtr C_PrintOperationStatusChangedCallback) Source #
onPrintOperationStatusChanged :: (IsPrintOperation a, MonadIO m) => a -> PrintOperationStatusChangedCallback -> m SignalHandlerId Source #
wrap_PrintOperationStatusChangedCallback :: PrintOperationStatusChangedCallback -> Ptr () -> Ptr () -> IO () Source #
updateCustomWidget
type C_PrintOperationUpdateCustomWidgetCallback = Ptr () -> Ptr Widget -> Ptr PageSetup -> Ptr PrintSettings -> Ptr () -> IO () Source #
type PrintOperationUpdateCustomWidgetCallback = Widget -> PageSetup -> PrintSettings -> IO () Source #
afterPrintOperationUpdateCustomWidget :: (IsPrintOperation a, MonadIO m) => a -> PrintOperationUpdateCustomWidgetCallback -> m SignalHandlerId Source #
genClosure_PrintOperationUpdateCustomWidget :: PrintOperationUpdateCustomWidgetCallback -> IO Closure Source #
mk_PrintOperationUpdateCustomWidgetCallback :: C_PrintOperationUpdateCustomWidgetCallback -> IO (FunPtr C_PrintOperationUpdateCustomWidgetCallback) Source #
noPrintOperationUpdateCustomWidgetCallback :: Maybe PrintOperationUpdateCustomWidgetCallback Source #
onPrintOperationUpdateCustomWidget :: (IsPrintOperation a, MonadIO m) => a -> PrintOperationUpdateCustomWidgetCallback -> m SignalHandlerId Source #
wrap_PrintOperationUpdateCustomWidgetCallback :: PrintOperationUpdateCustomWidgetCallback -> Ptr () -> Ptr Widget -> Ptr PageSetup -> Ptr PrintSettings -> Ptr () -> IO () Source #