{-# LINE 2 "./Graphics/UI/Gtk/Printing/PrintOperation.chs" #-}
module Graphics.UI.Gtk.Printing.PrintOperation (
PrintOperation,
PrintOperationClass,
castToPrintOperation,
toPrintOperation,
PrintOperationPreview,
PrintOperationPreviewClass,
castToPrintOperationPreview,
toPrintOperationPreview,
PrintStatus(..),
PrintOperationAction(..),
PrintOperationResult(..),
PrintError(..),
printOperationNew,
printOperationSetAllowAsync,
printOperationGetError,
printOperationSetJobName,
printOperationSetNPages,
printOperationGetNPagesToPrint,
printOperationSetCurrentPage,
printOperationSetUseFullPage,
printOperationSetUnit,
printOperationSetExportFilename,
printOperationSetShowProgress,
printOperationSetTrackPrintStatus,
printOperationSetCustomTabLabel,
printOperationRun,
printOperationCancel,
printOperationDrawPageFinish,
printOperationSetDeferDrawing,
printOperationGetStatus,
printOperationGetStatusString,
printOperationIsFinished,
printRunPageSetupDialog,
printRunPageSetupDialogAsync,
printOperationPreviewEndPreview,
printOperationPreviewIsSelected,
printOperationPreviewRenderPage,
printOperationDefaultPageSetup,
printOperationPrintSettings,
printOperationJobName,
printOperationNPages,
printOperationCurrentPage,
printOperationUseFullPage,
printOperationTrackPrintStatus,
printOperationUnit,
printOperationShowProgress,
printOperationAllowAsync,
printOperationExportFilename,
printOperationStatus,
printOperationStatusString,
printOperationCustomTabLabel,
printOperationSupportSelection,
printOperationHasSelection,
printOperationEmbedPageSetup,
printOperationNPagesToPrint,
printOptDone,
printOptBeginPrint,
printOptPaginate,
printOptRequestPageSetup,
printOptDrawPage,
printOptEndPrint,
printOptStatusChanged,
printOptCreateCustomWidget,
printOptUpdateCustomWidget,
printOptCustomWidgetApply,
printOptPreview,
printOptReady,
printOptGotPageSize,
) where
import Control.Monad (liftM)
import System.Glib.FFI
import System.Glib.Attributes
import System.Glib.Properties
import System.Glib.UTFString
import System.Glib.GError
import Graphics.UI.Gtk.Types
{-# LINE 171 "./Graphics/UI/Gtk/Printing/PrintOperation.chs" #-}
import Graphics.UI.Gtk.Signals
{-# LINE 172 "./Graphics/UI/Gtk/Printing/PrintOperation.chs" #-}
import Graphics.UI.Gtk.Printing.PaperSize (Unit(..))
{-# LINE 175 "./Graphics/UI/Gtk/Printing/PrintOperation.chs" #-}
instance PrintOperationPreviewClass PrintOperation
data PrintStatus = PrintStatusInitial
| PrintStatusPreparing
| PrintStatusGeneratingData
| PrintStatusSendingData
| PrintStatusPending
| PrintStatusPendingIssue
| PrintStatusPrinting
| PrintStatusFinished
| PrintStatusFinishedAborted
deriving (Int -> PrintStatus
PrintStatus -> Int
PrintStatus -> [PrintStatus]
PrintStatus -> PrintStatus
PrintStatus -> PrintStatus -> [PrintStatus]
PrintStatus -> PrintStatus -> PrintStatus -> [PrintStatus]
(PrintStatus -> PrintStatus)
-> (PrintStatus -> PrintStatus)
-> (Int -> PrintStatus)
-> (PrintStatus -> Int)
-> (PrintStatus -> [PrintStatus])
-> (PrintStatus -> PrintStatus -> [PrintStatus])
-> (PrintStatus -> PrintStatus -> [PrintStatus])
-> (PrintStatus -> PrintStatus -> PrintStatus -> [PrintStatus])
-> Enum PrintStatus
forall a.
(a -> a)
-> (a -> a)
-> (Int -> a)
-> (a -> Int)
-> (a -> [a])
-> (a -> a -> [a])
-> (a -> a -> [a])
-> (a -> a -> a -> [a])
-> Enum a
$csucc :: PrintStatus -> PrintStatus
succ :: PrintStatus -> PrintStatus
$cpred :: PrintStatus -> PrintStatus
pred :: PrintStatus -> PrintStatus
$ctoEnum :: Int -> PrintStatus
toEnum :: Int -> PrintStatus
$cfromEnum :: PrintStatus -> Int
fromEnum :: PrintStatus -> Int
$cenumFrom :: PrintStatus -> [PrintStatus]
enumFrom :: PrintStatus -> [PrintStatus]
$cenumFromThen :: PrintStatus -> PrintStatus -> [PrintStatus]
enumFromThen :: PrintStatus -> PrintStatus -> [PrintStatus]
$cenumFromTo :: PrintStatus -> PrintStatus -> [PrintStatus]
enumFromTo :: PrintStatus -> PrintStatus -> [PrintStatus]
$cenumFromThenTo :: PrintStatus -> PrintStatus -> PrintStatus -> [PrintStatus]
enumFromThenTo :: PrintStatus -> PrintStatus -> PrintStatus -> [PrintStatus]
Enum,PrintStatus
PrintStatus -> PrintStatus -> Bounded PrintStatus
forall a. a -> a -> Bounded a
$cminBound :: PrintStatus
minBound :: PrintStatus
$cmaxBound :: PrintStatus
maxBound :: PrintStatus
Bounded,PrintStatus -> PrintStatus -> Bool
(PrintStatus -> PrintStatus -> Bool)
-> (PrintStatus -> PrintStatus -> Bool) -> Eq PrintStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PrintStatus -> PrintStatus -> Bool
== :: PrintStatus -> PrintStatus -> Bool
$c/= :: PrintStatus -> PrintStatus -> Bool
/= :: PrintStatus -> PrintStatus -> Bool
Eq,Int -> PrintStatus -> ShowS
[PrintStatus] -> ShowS
PrintStatus -> String
(Int -> PrintStatus -> ShowS)
-> (PrintStatus -> String)
-> ([PrintStatus] -> ShowS)
-> Show PrintStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> PrintStatus -> ShowS
showsPrec :: Int -> PrintStatus -> ShowS
$cshow :: PrintStatus -> String
show :: PrintStatus -> String
$cshowList :: [PrintStatus] -> ShowS
showList :: [PrintStatus] -> ShowS
Show)
{-# LINE 186 "./Graphics/UI/Gtk/Printing/PrintOperation.chs" #-}
data PrintOperationAction = PrintOperationActionPrintDialog
| PrintOperationActionPrint
| PrintOperationActionPreview
| PrintOperationActionExport
deriving (Enum,Bounded,Eq,Show)
{-# LINE 190 "./Graphics/UI/Gtk/Printing/PrintOperation.chs" #-}
data PrintOperationResult = PrintOperationResultError
| PrintOperationResultApply
| PrintOperationResultCancel
| PrintOperationResultInProgress
deriving (Enum,Bounded,Eq,Show)
{-# LINE 193 "./Graphics/UI/Gtk/Printing/PrintOperation.chs" #-}
data PrintError = PrintErrorGeneral
| PrintErrorInternalError
| PrintErrorNomem
| PrintErrorInvalidFile
deriving (Enum,Bounded,Eq,Show)
{-# LINE 196 "./Graphics/UI/Gtk/Printing/PrintOperation.chs" #-}
printOperationNew :: IO PrintOperation
printOperationNew :: IO PrintOperation
printOperationNew =
(ForeignPtr PrintOperation -> PrintOperation,
FinalizerPtr PrintOperation)
-> IO (Ptr PrintOperation) -> IO PrintOperation
forall obj.
GObjectClass obj =>
(ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
wrapNewGObject (ForeignPtr PrintOperation -> PrintOperation,
FinalizerPtr PrintOperation)
forall {a}.
(ForeignPtr PrintOperation -> PrintOperation, FinalizerPtr a)
mkPrintOperation (IO (Ptr PrintOperation) -> IO PrintOperation)
-> IO (Ptr PrintOperation) -> IO PrintOperation
forall a b. (a -> b) -> a -> b
$
IO (Ptr PrintOperation)
gtk_print_operation_new
{-# LINE 206 "./Graphics/UI/Gtk/Printing/PrintOperation.chs" #-}
printOperationSetAllowAsync :: PrintOperationClass self => self
-> Bool
-> IO ()
printOperationSetAllowAsync :: forall self. PrintOperationClass self => self -> Bool -> IO ()
printOperationSetAllowAsync self
self Bool
allowAsync =
(\(PrintOperation ForeignPtr PrintOperation
arg1) CInt
arg2 -> ForeignPtr PrintOperation -> (Ptr PrintOperation -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr PrintOperation
arg1 ((Ptr PrintOperation -> IO ()) -> IO ())
-> (Ptr PrintOperation -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr PrintOperation
argPtr1 ->Ptr PrintOperation -> CInt -> IO ()
gtk_print_operation_set_allow_async Ptr PrintOperation
argPtr1 CInt
arg2)
{-# LINE 219 "./Graphics/UI/Gtk/Printing/PrintOperation.chs" #-}
(toPrintOperation self)
(Bool -> CInt
forall a. Num a => Bool -> a
fromBool Bool
allowAsync)
printOperationGetError :: PrintOperationClass self => self -> IO ()
printOperationGetError :: forall self. PrintOperationClass self => self -> IO ()
printOperationGetError self
self =
(Ptr (Ptr ()) -> IO ()) -> IO ()
forall a. (Ptr (Ptr ()) -> IO a) -> IO a
propagateGError ((Ptr (Ptr ()) -> IO ()) -> IO ())
-> (Ptr (Ptr ()) -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr (Ptr ())
errorPtr ->
(\(PrintOperation ForeignPtr PrintOperation
arg1) Ptr (Ptr ())
arg2 -> ForeignPtr PrintOperation -> (Ptr PrintOperation -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr PrintOperation
arg1 ((Ptr PrintOperation -> IO ()) -> IO ())
-> (Ptr PrintOperation -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr PrintOperation
argPtr1 ->Ptr PrintOperation -> Ptr (Ptr ()) -> IO ()
gtk_print_operation_get_error Ptr PrintOperation
argPtr1 Ptr (Ptr ())
arg2)
{-# LINE 231 "./Graphics/UI/Gtk/Printing/PrintOperation.chs" #-}
(toPrintOperation self)
Ptr (Ptr ())
errorPtr
printOperationSetJobName :: (PrintOperationClass self, GlibString string) => self
-> string
-> IO ()
printOperationSetJobName :: forall self string.
(PrintOperationClass self, GlibString string) =>
self -> string -> IO ()
printOperationSetJobName self
self string
jobName =
string -> (CString -> IO ()) -> IO ()
forall a. string -> (CString -> IO a) -> IO a
forall s a. GlibString s => s -> (CString -> IO a) -> IO a
withUTFString string
jobName ((CString -> IO ()) -> IO ()) -> (CString -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \CString
jobNamePtr ->
(\(PrintOperation ForeignPtr PrintOperation
arg1) CString
arg2 -> ForeignPtr PrintOperation -> (Ptr PrintOperation -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr PrintOperation
arg1 ((Ptr PrintOperation -> IO ()) -> IO ())
-> (Ptr PrintOperation -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr PrintOperation
argPtr1 ->Ptr PrintOperation -> CString -> IO ()
gtk_print_operation_set_job_name Ptr PrintOperation
argPtr1 CString
arg2)
{-# LINE 246 "./Graphics/UI/Gtk/Printing/PrintOperation.chs" #-}
(toPrintOperation self)
CString
jobNamePtr
printOperationSetNPages :: PrintOperationClass self => self
-> Int
-> IO ()
printOperationSetNPages :: forall self. PrintOperationClass self => self -> Int -> IO ()
printOperationSetNPages self
self Int
nPages =
(\(PrintOperation ForeignPtr PrintOperation
arg1) CInt
arg2 -> ForeignPtr PrintOperation -> (Ptr PrintOperation -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr PrintOperation
arg1 ((Ptr PrintOperation -> IO ()) -> IO ())
-> (Ptr PrintOperation -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr PrintOperation
argPtr1 ->Ptr PrintOperation -> CInt -> IO ()
gtk_print_operation_set_n_pages Ptr PrintOperation
argPtr1 CInt
arg2)
{-# LINE 264 "./Graphics/UI/Gtk/Printing/PrintOperation.chs" #-}
(toPrintOperation self)
(Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
nPages)
printOperationGetNPagesToPrint :: PrintOperationClass self => self
-> IO Int
printOperationGetNPagesToPrint :: forall self. PrintOperationClass self => self -> IO Int
printOperationGetNPagesToPrint self
self =
(CInt -> Int) -> IO CInt -> IO Int
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM CInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral (IO CInt -> IO Int) -> IO CInt -> IO Int
forall a b. (a -> b) -> a -> b
$
(\(PrintOperation ForeignPtr PrintOperation
arg1) -> ForeignPtr PrintOperation
-> (Ptr PrintOperation -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr PrintOperation
arg1 ((Ptr PrintOperation -> IO CInt) -> IO CInt)
-> (Ptr PrintOperation -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr PrintOperation
argPtr1 ->Ptr PrintOperation -> IO CInt
gtk_print_operation_get_n_pages_to_print Ptr PrintOperation
argPtr1)
{-# LINE 285 "./Graphics/UI/Gtk/Printing/PrintOperation.chs" #-}
(toPrintOperation self)
printOperationSetCurrentPage :: PrintOperationClass self => self
-> Int
-> IO ()
printOperationSetCurrentPage :: forall self. PrintOperationClass self => self -> Int -> IO ()
printOperationSetCurrentPage self
self Int
currentPage =
(\(PrintOperation ForeignPtr PrintOperation
arg1) CInt
arg2 -> ForeignPtr PrintOperation -> (Ptr PrintOperation -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr PrintOperation
arg1 ((Ptr PrintOperation -> IO ()) -> IO ())
-> (Ptr PrintOperation -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr PrintOperation
argPtr1 ->Ptr PrintOperation -> CInt -> IO ()
gtk_print_operation_set_current_page Ptr PrintOperation
argPtr1 CInt
arg2)
{-# LINE 300 "./Graphics/UI/Gtk/Printing/PrintOperation.chs" #-}
(toPrintOperation self)
(Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
currentPage)
printOperationSetUseFullPage :: PrintOperationClass self => self
-> Bool
-> IO ()
printOperationSetUseFullPage :: forall self. PrintOperationClass self => self -> Bool -> IO ()
printOperationSetUseFullPage self
self Bool
fullPage =
(\(PrintOperation ForeignPtr PrintOperation
arg1) CInt
arg2 -> ForeignPtr PrintOperation -> (Ptr PrintOperation -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr PrintOperation
arg1 ((Ptr PrintOperation -> IO ()) -> IO ())
-> (Ptr PrintOperation -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr PrintOperation
argPtr1 ->Ptr PrintOperation -> CInt -> IO ()
gtk_print_operation_set_use_full_page Ptr PrintOperation
argPtr1 CInt
arg2)
{-# LINE 315 "./Graphics/UI/Gtk/Printing/PrintOperation.chs" #-}
(toPrintOperation self)
(Bool -> CInt
forall a. Num a => Bool -> a
fromBool Bool
fullPage)
printOperationSetUnit :: PrintOperationClass self => self
-> Unit
-> IO ()
printOperationSetUnit :: forall self. PrintOperationClass self => self -> Unit -> IO ()
printOperationSetUnit self
self Unit
unit =
(\(PrintOperation ForeignPtr PrintOperation
arg1) CInt
arg2 -> ForeignPtr PrintOperation -> (Ptr PrintOperation -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr PrintOperation
arg1 ((Ptr PrintOperation -> IO ()) -> IO ())
-> (Ptr PrintOperation -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr PrintOperation
argPtr1 ->Ptr PrintOperation -> CInt -> IO ()
gtk_print_operation_set_unit Ptr PrintOperation
argPtr1 CInt
arg2)
{-# LINE 326 "./Graphics/UI/Gtk/Printing/PrintOperation.chs" #-}
(toPrintOperation self)
((Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Unit -> Int) -> Unit -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Unit -> Int
forall a. Enum a => a -> Int
fromEnum) Unit
unit)
printOperationSetExportFilename :: (PrintOperationClass self, GlibString string) => self
-> string
-> IO ()
printOperationSetExportFilename :: forall self string.
(PrintOperationClass self, GlibString string) =>
self -> string -> IO ()
printOperationSetExportFilename self
self string
filename =
string -> (CString -> IO ()) -> IO ()
forall a. string -> (CString -> IO a) -> IO a
forall s a. GlibString s => s -> (CString -> IO a) -> IO a
withUTFString string
filename ((CString -> IO ()) -> IO ()) -> (CString -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \CString
filenamePtr ->
(\(PrintOperation ForeignPtr PrintOperation
arg1) CString
arg2 -> ForeignPtr PrintOperation -> (Ptr PrintOperation -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr PrintOperation
arg1 ((Ptr PrintOperation -> IO ()) -> IO ())
-> (Ptr PrintOperation -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr PrintOperation
argPtr1 ->Ptr PrintOperation -> CString -> IO ()
gtk_print_operation_set_export_filename Ptr PrintOperation
argPtr1 CString
arg2)
{-# LINE 343 "./Graphics/UI/Gtk/Printing/PrintOperation.chs" #-}
(toPrintOperation self)
CString
filenamePtr
printOperationSetShowProgress :: PrintOperationClass self => self
-> Bool
-> IO ()
printOperationSetShowProgress :: forall self. PrintOperationClass self => self -> Bool -> IO ()
printOperationSetShowProgress self
self Bool
showProgress =
(\(PrintOperation ForeignPtr PrintOperation
arg1) CInt
arg2 -> ForeignPtr PrintOperation -> (Ptr PrintOperation -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr PrintOperation
arg1 ((Ptr PrintOperation -> IO ()) -> IO ())
-> (Ptr PrintOperation -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr PrintOperation
argPtr1 ->Ptr PrintOperation -> CInt -> IO ()
gtk_print_operation_set_show_progress Ptr PrintOperation
argPtr1 CInt
arg2)
{-# LINE 354 "./Graphics/UI/Gtk/Printing/PrintOperation.chs" #-}
(toPrintOperation self)
(Bool -> CInt
forall a. Num a => Bool -> a
fromBool Bool
showProgress)
printOperationSetTrackPrintStatus :: PrintOperationClass self => self
-> Bool
-> IO ()
printOperationSetTrackPrintStatus :: forall self. PrintOperationClass self => self -> Bool -> IO ()
printOperationSetTrackPrintStatus self
self Bool
trackStatus =
(\(PrintOperation ForeignPtr PrintOperation
arg1) CInt
arg2 -> ForeignPtr PrintOperation -> (Ptr PrintOperation -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr PrintOperation
arg1 ((Ptr PrintOperation -> IO ()) -> IO ())
-> (Ptr PrintOperation -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr PrintOperation
argPtr1 ->Ptr PrintOperation -> CInt -> IO ()
gtk_print_operation_set_track_print_status Ptr PrintOperation
argPtr1 CInt
arg2)
{-# LINE 370 "./Graphics/UI/Gtk/Printing/PrintOperation.chs" #-}
(toPrintOperation self)
(Bool -> CInt
forall a. Num a => Bool -> a
fromBool Bool
trackStatus)
printOperationSetCustomTabLabel :: (PrintOperationClass self, GlibString string) => self
-> string
-> IO ()
printOperationSetCustomTabLabel :: forall self string.
(PrintOperationClass self, GlibString string) =>
self -> string -> IO ()
printOperationSetCustomTabLabel self
self string
label =
string -> (CString -> IO ()) -> IO ()
forall a. string -> (CString -> IO a) -> IO a
forall s a. GlibString s => s -> (CString -> IO a) -> IO a
withUTFString string
label ((CString -> IO ()) -> IO ()) -> (CString -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \CString
labelPtr ->
(\(PrintOperation ForeignPtr PrintOperation
arg1) CString
arg2 -> ForeignPtr PrintOperation -> (Ptr PrintOperation -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr PrintOperation
arg1 ((Ptr PrintOperation -> IO ()) -> IO ())
-> (Ptr PrintOperation -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr PrintOperation
argPtr1 ->Ptr PrintOperation -> CString -> IO ()
gtk_print_operation_set_custom_tab_label Ptr PrintOperation
argPtr1 CString
arg2)
{-# LINE 382 "./Graphics/UI/Gtk/Printing/PrintOperation.chs" #-}
(toPrintOperation self)
CString
labelPtr
printOperationRun :: (PrintOperationClass self, WindowClass parent) => self
-> PrintOperationAction
-> parent
-> IO PrintOperationResult
printOperationRun :: forall self parent.
(PrintOperationClass self, WindowClass parent) =>
self -> PrintOperationAction -> parent -> IO PrintOperationResult
printOperationRun self
self PrintOperationAction
action parent
parent =
(CInt -> PrintOperationResult)
-> IO CInt -> IO PrintOperationResult
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM (Int -> PrintOperationResult
forall a. Enum a => Int -> a
toEnum (Int -> PrintOperationResult)
-> (CInt -> Int) -> CInt -> PrintOperationResult
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) (IO CInt -> IO PrintOperationResult)
-> IO CInt -> IO PrintOperationResult
forall a b. (a -> b) -> a -> b
$
(Ptr (Ptr ()) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr ()) -> IO a) -> IO a
propagateGError ((Ptr (Ptr ()) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr ()) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr (Ptr ())
errorPtr ->
(\(PrintOperation ForeignPtr PrintOperation
arg1) CInt
arg2 (Window ForeignPtr Window
arg3) Ptr (Ptr ())
arg4 -> ForeignPtr PrintOperation
-> (Ptr PrintOperation -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr PrintOperation
arg1 ((Ptr PrintOperation -> IO CInt) -> IO CInt)
-> (Ptr PrintOperation -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr PrintOperation
argPtr1 ->ForeignPtr Window -> (Ptr Window -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Window
arg3 ((Ptr Window -> IO CInt) -> IO CInt)
-> (Ptr Window -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr Window
argPtr3 ->Ptr PrintOperation -> CInt -> Ptr Window -> Ptr (Ptr ()) -> IO CInt
gtk_print_operation_run Ptr PrintOperation
argPtr1 CInt
arg2 Ptr Window
argPtr3 Ptr (Ptr ())
arg4)
{-# LINE 416 "./Graphics/UI/Gtk/Printing/PrintOperation.chs" #-}
(toPrintOperation self)
((Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt)
-> (PrintOperationAction -> Int) -> PrintOperationAction -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. PrintOperationAction -> Int
forall a. Enum a => a -> Int
fromEnum) PrintOperationAction
action)
(parent -> Window
forall o. WindowClass o => o -> Window
toWindow parent
parent)
Ptr (Ptr ())
errorPtr
printOperationCancel :: PrintOperationClass self => self -> IO ()
printOperationCancel :: forall self. PrintOperationClass self => self -> IO ()
printOperationCancel self
self =
(\(PrintOperation ForeignPtr PrintOperation
arg1) -> ForeignPtr PrintOperation -> (Ptr PrintOperation -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr PrintOperation
arg1 ((Ptr PrintOperation -> IO ()) -> IO ())
-> (Ptr PrintOperation -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr PrintOperation
argPtr1 ->Ptr PrintOperation -> IO ()
gtk_print_operation_cancel Ptr PrintOperation
argPtr1)
{-# LINE 428 "./Graphics/UI/Gtk/Printing/PrintOperation.chs" #-}
(toPrintOperation self)
printOperationDrawPageFinish :: PrintOperationClass self => self -> IO ()
printOperationDrawPageFinish :: forall self. PrintOperationClass self => self -> IO ()
printOperationDrawPageFinish self
self =
(\(PrintOperation ForeignPtr PrintOperation
arg1) -> ForeignPtr PrintOperation -> (Ptr PrintOperation -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr PrintOperation
arg1 ((Ptr PrintOperation -> IO ()) -> IO ())
-> (Ptr PrintOperation -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr PrintOperation
argPtr1 ->Ptr PrintOperation -> IO ()
gtk_print_operation_draw_page_finish Ptr PrintOperation
argPtr1)
{-# LINE 443 "./Graphics/UI/Gtk/Printing/PrintOperation.chs" #-}
(toPrintOperation self)
printOperationSetDeferDrawing :: PrintOperationClass self => self -> IO ()
printOperationSetDeferDrawing :: forall self. PrintOperationClass self => self -> IO ()
printOperationSetDeferDrawing self
self =
(\(PrintOperation ForeignPtr PrintOperation
arg1) -> ForeignPtr PrintOperation -> (Ptr PrintOperation -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr PrintOperation
arg1 ((Ptr PrintOperation -> IO ()) -> IO ())
-> (Ptr PrintOperation -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr PrintOperation
argPtr1 ->Ptr PrintOperation -> IO ()
gtk_print_operation_set_defer_drawing Ptr PrintOperation
argPtr1)
{-# LINE 456 "./Graphics/UI/Gtk/Printing/PrintOperation.chs" #-}
(toPrintOperation self)
printOperationGetStatus :: PrintOperationClass self => self
-> IO PrintStatus
printOperationGetStatus :: forall self. PrintOperationClass self => self -> IO PrintStatus
printOperationGetStatus self
self =
(CInt -> PrintStatus) -> IO CInt -> IO PrintStatus
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM (Int -> PrintStatus
forall a. Enum a => Int -> a
toEnum (Int -> PrintStatus) -> (CInt -> Int) -> CInt -> PrintStatus
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) (IO CInt -> IO PrintStatus) -> IO CInt -> IO PrintStatus
forall a b. (a -> b) -> a -> b
$
(\(PrintOperation ForeignPtr PrintOperation
arg1) -> ForeignPtr PrintOperation
-> (Ptr PrintOperation -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr PrintOperation
arg1 ((Ptr PrintOperation -> IO CInt) -> IO CInt)
-> (Ptr PrintOperation -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr PrintOperation
argPtr1 ->Ptr PrintOperation -> IO CInt
gtk_print_operation_get_status Ptr PrintOperation
argPtr1)
{-# LINE 467 "./Graphics/UI/Gtk/Printing/PrintOperation.chs" #-}
(toPrintOperation self)
printOperationGetStatusString :: (PrintOperationClass self, GlibString string) => self
-> IO string
printOperationGetStatusString :: forall self string.
(PrintOperationClass self, GlibString string) =>
self -> IO string
printOperationGetStatusString self
self =
(\(PrintOperation ForeignPtr PrintOperation
arg1) -> ForeignPtr PrintOperation
-> (Ptr PrintOperation -> IO CString) -> IO CString
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr PrintOperation
arg1 ((Ptr PrintOperation -> IO CString) -> IO CString)
-> (Ptr PrintOperation -> IO CString) -> IO CString
forall a b. (a -> b) -> a -> b
$ \Ptr PrintOperation
argPtr1 ->Ptr PrintOperation -> IO CString
gtk_print_operation_get_status_string Ptr PrintOperation
argPtr1)
{-# LINE 481 "./Graphics/UI/Gtk/Printing/PrintOperation.chs" #-}
(toPrintOperation self)
IO CString -> (CString -> IO string) -> IO string
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= CString -> IO string
forall s. GlibString s => CString -> IO s
peekUTFString
printOperationIsFinished :: PrintOperationClass self => self
-> IO Bool
printOperationIsFinished :: forall self. PrintOperationClass self => self -> IO Bool
printOperationIsFinished self
self =
(CInt -> Bool) -> IO CInt -> IO Bool
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM CInt -> Bool
forall a. (Eq a, Num a) => a -> Bool
toBool (IO CInt -> IO Bool) -> IO CInt -> IO Bool
forall a b. (a -> b) -> a -> b
$
(\(PrintOperation ForeignPtr PrintOperation
arg1) -> ForeignPtr PrintOperation
-> (Ptr PrintOperation -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr PrintOperation
arg1 ((Ptr PrintOperation -> IO CInt) -> IO CInt)
-> (Ptr PrintOperation -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr PrintOperation
argPtr1 ->Ptr PrintOperation -> IO CInt
gtk_print_operation_is_finished Ptr PrintOperation
argPtr1)
{-# LINE 497 "./Graphics/UI/Gtk/Printing/PrintOperation.chs" #-}
(toPrintOperation self)
printRunPageSetupDialog :: (WindowClass window, PageSetupClass pageSetup, PrintSettingsClass setting)
=> window
-> pageSetup
-> setting
-> IO PageSetup
printRunPageSetupDialog :: forall window pageSetup setting.
(WindowClass window, PageSetupClass pageSetup,
PrintSettingsClass setting) =>
window -> pageSetup -> setting -> IO PageSetup
printRunPageSetupDialog window
window pageSetup
pageSetup setting
setting =
(ForeignPtr PageSetup -> PageSetup, FinalizerPtr PageSetup)
-> IO (Ptr PageSetup) -> IO PageSetup
forall obj.
GObjectClass obj =>
(ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
wrapNewGObject (ForeignPtr PageSetup -> PageSetup, FinalizerPtr PageSetup)
forall {a}. (ForeignPtr PageSetup -> PageSetup, FinalizerPtr a)
mkPageSetup (IO (Ptr PageSetup) -> IO PageSetup)
-> IO (Ptr PageSetup) -> IO PageSetup
forall a b. (a -> b) -> a -> b
$
(\(Window ForeignPtr Window
arg1) (PageSetup ForeignPtr PageSetup
arg2) (PrintSettings ForeignPtr PrintSettings
arg3) -> ForeignPtr Window
-> (Ptr Window -> IO (Ptr PageSetup)) -> IO (Ptr PageSetup)
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Window
arg1 ((Ptr Window -> IO (Ptr PageSetup)) -> IO (Ptr PageSetup))
-> (Ptr Window -> IO (Ptr PageSetup)) -> IO (Ptr PageSetup)
forall a b. (a -> b) -> a -> b
$ \Ptr Window
argPtr1 ->ForeignPtr PageSetup
-> (Ptr PageSetup -> IO (Ptr PageSetup)) -> IO (Ptr PageSetup)
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr PageSetup
arg2 ((Ptr PageSetup -> IO (Ptr PageSetup)) -> IO (Ptr PageSetup))
-> (Ptr PageSetup -> IO (Ptr PageSetup)) -> IO (Ptr PageSetup)
forall a b. (a -> b) -> a -> b
$ \Ptr PageSetup
argPtr2 ->ForeignPtr PrintSettings
-> (Ptr PrintSettings -> IO (Ptr PageSetup)) -> IO (Ptr PageSetup)
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr PrintSettings
arg3 ((Ptr PrintSettings -> IO (Ptr PageSetup)) -> IO (Ptr PageSetup))
-> (Ptr PrintSettings -> IO (Ptr PageSetup)) -> IO (Ptr PageSetup)
forall a b. (a -> b) -> a -> b
$ \Ptr PrintSettings
argPtr3 ->Ptr Window
-> Ptr PageSetup -> Ptr PrintSettings -> IO (Ptr PageSetup)
gtk_print_run_page_setup_dialog Ptr Window
argPtr1 Ptr PageSetup
argPtr2 Ptr PrintSettings
argPtr3)
{-# LINE 513 "./Graphics/UI/Gtk/Printing/PrintOperation.chs" #-}
(toWindow window)
(pageSetup -> PageSetup
forall o. PageSetupClass o => o -> PageSetup
toPageSetup pageSetup
pageSetup)
(setting -> PrintSettings
forall o. PrintSettingsClass o => o -> PrintSettings
toPrintSettings setting
setting)
type PageSetupDoneFunc = FunPtr (((Ptr PageSetup) -> ((Ptr ()) -> (IO ()))))
{-# LINE 518 "./Graphics/UI/Gtk/Printing/PrintOperation.chs" #-}
foreign import ccall "wrapper" mkGtkPageSetupDoneFunc ::
(Ptr PageSetup -> Ptr () -> IO ())
-> IO PageSetupDoneFunc
printRunPageSetupDialogAsync :: (WindowClass window, PageSetupClass pageSetup, PrintSettingsClass setting)
=> window
-> pageSetup
-> setting
-> (PageSetup -> IO ())
-> IO ()
printRunPageSetupDialogAsync :: forall window pageSetup setting.
(WindowClass window, PageSetupClass pageSetup,
PrintSettingsClass setting) =>
window -> pageSetup -> setting -> (PageSetup -> IO ()) -> IO ()
printRunPageSetupDialogAsync window
window pageSetup
pageSetup setting
setting PageSetup -> IO ()
doneCb = do
PageSetupDoneFunc
funcPtr <- (Ptr PageSetup -> Ptr () -> IO ()) -> IO PageSetupDoneFunc
mkGtkPageSetupDoneFunc ((Ptr PageSetup -> Ptr () -> IO ()) -> IO PageSetupDoneFunc)
-> (Ptr PageSetup -> Ptr () -> IO ()) -> IO PageSetupDoneFunc
forall a b. (a -> b) -> a -> b
$ \Ptr PageSetup
setupPtr Ptr ()
_ -> do
PageSetup
setup <- (ForeignPtr PageSetup -> PageSetup, FinalizerPtr PageSetup)
-> IO (Ptr PageSetup) -> IO PageSetup
forall obj.
GObjectClass obj =>
(ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
makeNewGObject (ForeignPtr PageSetup -> PageSetup, FinalizerPtr PageSetup)
forall {a}. (ForeignPtr PageSetup -> PageSetup, FinalizerPtr a)
mkPageSetup (Ptr PageSetup -> IO (Ptr PageSetup)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr PageSetup
setupPtr)
PageSetup -> IO ()
doneCb PageSetup
setup
(\(Window ForeignPtr Window
arg1) (PageSetup ForeignPtr PageSetup
arg2) (PrintSettings ForeignPtr PrintSettings
arg3) PageSetupDoneFunc
arg4 Ptr ()
arg5 -> ForeignPtr Window -> (Ptr Window -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Window
arg1 ((Ptr Window -> IO ()) -> IO ()) -> (Ptr Window -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Window
argPtr1 ->ForeignPtr PageSetup -> (Ptr PageSetup -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr PageSetup
arg2 ((Ptr PageSetup -> IO ()) -> IO ())
-> (Ptr PageSetup -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr PageSetup
argPtr2 ->ForeignPtr PrintSettings -> (Ptr PrintSettings -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr PrintSettings
arg3 ((Ptr PrintSettings -> IO ()) -> IO ())
-> (Ptr PrintSettings -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr PrintSettings
argPtr3 ->Ptr Window
-> Ptr PageSetup
-> Ptr PrintSettings
-> PageSetupDoneFunc
-> Ptr ()
-> IO ()
gtk_print_run_page_setup_dialog_async Ptr Window
argPtr1 Ptr PageSetup
argPtr2 Ptr PrintSettings
argPtr3 PageSetupDoneFunc
arg4 Ptr ()
arg5)
{-# LINE 539 "./Graphics/UI/Gtk/Printing/PrintOperation.chs" #-}
(toWindow window)
(pageSetup -> PageSetup
forall o. PageSetupClass o => o -> PageSetup
toPageSetup pageSetup
pageSetup)
(setting -> PrintSettings
forall o. PrintSettingsClass o => o -> PrintSettings
toPrintSettings setting
setting)
PageSetupDoneFunc
funcPtr
Ptr ()
forall a. Ptr a
nullPtr
printOperationPreviewEndPreview :: PrintOperationPreviewClass self
=> self
-> IO ()
printOperationPreviewEndPreview :: forall self. PrintOperationPreviewClass self => self -> IO ()
printOperationPreviewEndPreview self
self =
(\(PrintOperationPreview ForeignPtr PrintOperationPreview
arg1) -> ForeignPtr PrintOperationPreview
-> (Ptr PrintOperationPreview -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr PrintOperationPreview
arg1 ((Ptr PrintOperationPreview -> IO ()) -> IO ())
-> (Ptr PrintOperationPreview -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr PrintOperationPreview
argPtr1 ->Ptr PrintOperationPreview -> IO ()
gtk_print_operation_preview_end_preview Ptr PrintOperationPreview
argPtr1)
{-# LINE 553 "./Graphics/UI/Gtk/Printing/PrintOperation.chs" #-}
(toPrintOperationPreview self)
printOperationPreviewIsSelected :: PrintOperationPreviewClass self
=> self
-> Int
-> IO Bool
printOperationPreviewIsSelected :: forall self.
PrintOperationPreviewClass self =>
self -> Int -> IO Bool
printOperationPreviewIsSelected self
self Int
pageNr =
(CInt -> Bool) -> IO CInt -> IO Bool
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM CInt -> Bool
forall a. (Eq a, Num a) => a -> Bool
toBool (IO CInt -> IO Bool) -> IO CInt -> IO Bool
forall a b. (a -> b) -> a -> b
$
(\(PrintOperationPreview ForeignPtr PrintOperationPreview
arg1) CInt
arg2 -> ForeignPtr PrintOperationPreview
-> (Ptr PrintOperationPreview -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr PrintOperationPreview
arg1 ((Ptr PrintOperationPreview -> IO CInt) -> IO CInt)
-> (Ptr PrintOperationPreview -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr PrintOperationPreview
argPtr1 ->Ptr PrintOperationPreview -> CInt -> IO CInt
gtk_print_operation_preview_is_selected Ptr PrintOperationPreview
argPtr1 CInt
arg2)
{-# LINE 563 "./Graphics/UI/Gtk/Printing/PrintOperation.chs" #-}
(toPrintOperationPreview self)
(Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
pageNr)
printOperationPreviewRenderPage :: PrintOperationPreviewClass self
=> self
-> Int
-> IO ()
printOperationPreviewRenderPage :: forall self.
PrintOperationPreviewClass self =>
self -> Int -> IO ()
printOperationPreviewRenderPage self
self Int
pageNr =
(\(PrintOperationPreview ForeignPtr PrintOperationPreview
arg1) CInt
arg2 -> ForeignPtr PrintOperationPreview
-> (Ptr PrintOperationPreview -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr PrintOperationPreview
arg1 ((Ptr PrintOperationPreview -> IO ()) -> IO ())
-> (Ptr PrintOperationPreview -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr PrintOperationPreview
argPtr1 ->Ptr PrintOperationPreview -> CInt -> IO ()
gtk_print_operation_preview_render_page Ptr PrintOperationPreview
argPtr1 CInt
arg2)
{-# LINE 579 "./Graphics/UI/Gtk/Printing/PrintOperation.chs" #-}
(toPrintOperationPreview self)
(Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
pageNr)
printOperationDefaultPageSetup :: (PrintOperationClass self, PageSetupClass pageSetup) => ReadWriteAttr self PageSetup pageSetup
printOperationDefaultPageSetup :: forall self pageSetup.
(PrintOperationClass self, PageSetupClass pageSetup) =>
ReadWriteAttr self PageSetup pageSetup
printOperationDefaultPageSetup = String -> GType -> ReadWriteAttr self PageSetup pageSetup
forall gobj gobj' gobj''.
(GObjectClass gobj, GObjectClass gobj', GObjectClass gobj'') =>
String -> GType -> ReadWriteAttr gobj gobj' gobj''
newAttrFromObjectProperty String
"default-page-setup"
GType
gtk_page_setup_get_type
{-# LINE 594 "./Graphics/UI/Gtk/Printing/PrintOperation.chs" #-}
printOperationPrintSettings :: (PrintOperationClass self, PrintSettingsClass printSettings) => ReadWriteAttr self PrintSettings printSettings
printOperationPrintSettings :: forall self printSettings.
(PrintOperationClass self, PrintSettingsClass printSettings) =>
ReadWriteAttr self PrintSettings printSettings
printOperationPrintSettings = String -> GType -> ReadWriteAttr self PrintSettings printSettings
forall gobj gobj' gobj''.
(GObjectClass gobj, GObjectClass gobj', GObjectClass gobj'') =>
String -> GType -> ReadWriteAttr gobj gobj' gobj''
newAttrFromObjectProperty String
"print-settings"
GType
gtk_print_settings_get_type
{-# LINE 604 "./Graphics/UI/Gtk/Printing/PrintOperation.chs" #-}
printOperationJobName :: (PrintOperationClass self, GlibString string) => Attr self string
printOperationJobName :: forall self string.
(PrintOperationClass self, GlibString string) =>
Attr self string
printOperationJobName = String -> Attr self string
forall gobj string.
(GObjectClass gobj, GlibString string) =>
String -> Attr gobj string
newAttrFromStringProperty String
"job-name"
printOperationNPages :: PrintOperationClass self => Attr self Int
printOperationNPages :: forall self. PrintOperationClass self => Attr self Int
printOperationNPages = String -> Attr self Int
forall gobj. GObjectClass gobj => String -> Attr gobj Int
newAttrFromIntProperty String
"n-pages"
printOperationCurrentPage :: PrintOperationClass self => Attr self Int
printOperationCurrentPage :: forall self. PrintOperationClass self => Attr self Int
printOperationCurrentPage = String -> Attr self Int
forall gobj. GObjectClass gobj => String -> Attr gobj Int
newAttrFromIntProperty String
"current-page"
printOperationUseFullPage :: PrintOperationClass self => Attr self Bool
printOperationUseFullPage :: forall self. PrintOperationClass self => Attr self Bool
printOperationUseFullPage = String -> Attr self Bool
forall gobj. GObjectClass gobj => String -> Attr gobj Bool
newAttrFromBoolProperty String
"use-full-page"
printOperationTrackPrintStatus :: PrintOperationClass self => Attr self Bool
printOperationTrackPrintStatus :: forall self. PrintOperationClass self => Attr self Bool
printOperationTrackPrintStatus = String -> Attr self Bool
forall gobj. GObjectClass gobj => String -> Attr gobj Bool
newAttrFromBoolProperty String
"track-print-status"
printOperationUnit :: PrintOperationClass self => Attr self Unit
printOperationUnit :: forall self. PrintOperationClass self => Attr self Unit
printOperationUnit = String -> GType -> Attr self Unit
forall gobj enum.
(GObjectClass gobj, Enum enum) =>
String -> GType -> Attr gobj enum
newAttrFromEnumProperty String
"unit"
GType
gtk_unit_get_type
{-# LINE 679 "./Graphics/UI/Gtk/Printing/PrintOperation.chs" #-}
printOperationShowProgress :: PrintOperationClass self => Attr self Bool
printOperationShowProgress :: forall self. PrintOperationClass self => Attr self Bool
printOperationShowProgress = String -> Attr self Bool
forall gobj. GObjectClass gobj => String -> Attr gobj Bool
newAttrFromBoolProperty String
"show-progress"
printOperationAllowAsync :: PrintOperationClass self => Attr self Bool
printOperationAllowAsync :: forall self. PrintOperationClass self => Attr self Bool
printOperationAllowAsync = String -> Attr self Bool
forall gobj. GObjectClass gobj => String -> Attr gobj Bool
newAttrFromBoolProperty String
"allow-async"
printOperationExportFilename :: (PrintOperationClass self, GlibString string) => Attr self string
printOperationExportFilename :: forall self string.
(PrintOperationClass self, GlibString string) =>
Attr self string
printOperationExportFilename = String -> Attr self string
forall gobj string.
(GObjectClass gobj, GlibString string) =>
String -> Attr gobj string
newAttrFromStringProperty String
"export-filename"
printOperationStatus :: PrintOperationClass self => ReadAttr self PrintStatus
printOperationStatus :: forall self. PrintOperationClass self => ReadAttr self PrintStatus
printOperationStatus = String -> GType -> ReadAttr self PrintStatus
forall gobj enum.
(GObjectClass gobj, Enum enum) =>
String -> GType -> ReadAttr gobj enum
readAttrFromEnumProperty String
"status"
GType
gtk_print_status_get_type
{-# LINE 726 "./Graphics/UI/Gtk/Printing/PrintOperation.chs" #-}
printOperationStatusString :: (PrintOperationClass self, GlibString string) => ReadAttr self string
printOperationStatusString :: forall self string.
(PrintOperationClass self, GlibString string) =>
ReadAttr self string
printOperationStatusString = String -> ReadAttr self string
forall gobj string.
(GObjectClass gobj, GlibString string) =>
String -> ReadAttr gobj string
readAttrFromStringProperty String
"status-string"
printOperationCustomTabLabel :: (PrintOperationClass self, GlibString string) => Attr self string
printOperationCustomTabLabel :: forall self string.
(PrintOperationClass self, GlibString string) =>
Attr self string
printOperationCustomTabLabel = String -> Attr self string
forall gobj string.
(GObjectClass gobj, GlibString string) =>
String -> Attr gobj string
newAttrFromStringProperty String
"custom-tab-label"
printOperationSupportSelection :: PrintOperationClass self => Attr self Bool
printOperationSupportSelection :: forall self. PrintOperationClass self => Attr self Bool
printOperationSupportSelection = String -> Attr self Bool
forall gobj. GObjectClass gobj => String -> Attr gobj Bool
newAttrFromBoolProperty String
"support-selection"
printOperationHasSelection :: PrintOperationClass self => Attr self Bool
printOperationHasSelection :: forall self. PrintOperationClass self => Attr self Bool
printOperationHasSelection = String -> Attr self Bool
forall gobj. GObjectClass gobj => String -> Attr gobj Bool
newAttrFromBoolProperty String
"has-selection"
printOperationEmbedPageSetup :: PrintOperationClass self => Attr self Bool
printOperationEmbedPageSetup :: forall self. PrintOperationClass self => Attr self Bool
printOperationEmbedPageSetup = String -> Attr self Bool
forall gobj. GObjectClass gobj => String -> Attr gobj Bool
newAttrFromBoolProperty String
"embed-page-setup"
printOperationNPagesToPrint :: PrintOperationClass self => ReadAttr self Int
printOperationNPagesToPrint :: forall self. PrintOperationClass self => ReadAttr self Int
printOperationNPagesToPrint = String -> ReadAttr self Int
forall gobj. GObjectClass gobj => String -> ReadAttr gobj Int
readAttrFromIntProperty String
"n-pages-to-print"
printOptDone :: PrintOperationClass self => Signal self (PrintOperationResult -> IO ())
printOptDone :: forall self.
PrintOperationClass self =>
Signal self (PrintOperationResult -> IO ())
printOptDone = (Bool
-> self -> (PrintOperationResult -> IO ()) -> IO (ConnectId self))
-> Signal self (PrintOperationResult -> IO ())
forall object handler.
(Bool -> object -> handler -> IO (ConnectId object))
-> Signal object handler
Signal (String
-> Bool
-> self
-> (PrintOperationResult -> IO ())
-> IO (ConnectId self)
forall a obj.
(Enum a, GObjectClass obj) =>
String -> Bool -> obj -> (a -> IO ()) -> IO (ConnectId obj)
connect_ENUM__NONE String
"done")
printOptBeginPrint :: PrintOperationClass self => Signal self (PrintContext -> IO ())
printOptBeginPrint :: forall self.
PrintOperationClass self =>
Signal self (PrintContext -> IO ())
printOptBeginPrint = (Bool -> self -> (PrintContext -> IO ()) -> IO (ConnectId self))
-> Signal self (PrintContext -> IO ())
forall object handler.
(Bool -> object -> handler -> IO (ConnectId object))
-> Signal object handler
Signal (String
-> Bool -> self -> (PrintContext -> IO ()) -> IO (ConnectId self)
forall a' obj.
(GObjectClass a', GObjectClass obj) =>
String -> Bool -> obj -> (a' -> IO ()) -> IO (ConnectId obj)
connect_OBJECT__NONE String
"begin_print")
printOptPaginate :: PrintOperationClass self => Signal self (PrintContext -> IO Bool)
printOptPaginate :: forall self.
PrintOperationClass self =>
Signal self (PrintContext -> IO Bool)
printOptPaginate = (Bool -> self -> (PrintContext -> IO Bool) -> IO (ConnectId self))
-> Signal self (PrintContext -> IO Bool)
forall object handler.
(Bool -> object -> handler -> IO (ConnectId object))
-> Signal object handler
Signal (String
-> Bool -> self -> (PrintContext -> IO Bool) -> IO (ConnectId self)
forall a' obj.
(GObjectClass a', GObjectClass obj) =>
String -> Bool -> obj -> (a' -> IO Bool) -> IO (ConnectId obj)
connect_OBJECT__BOOL String
"paginate")
printOptRequestPageSetup :: PrintOperationClass self => Signal self (PrintContext -> Int -> PageSetup -> IO ())
printOptRequestPageSetup :: forall self.
PrintOperationClass self =>
Signal self (PrintContext -> Int -> PageSetup -> IO ())
printOptRequestPageSetup = (Bool
-> self
-> (PrintContext -> Int -> PageSetup -> IO ())
-> IO (ConnectId self))
-> Signal self (PrintContext -> Int -> PageSetup -> IO ())
forall object handler.
(Bool -> object -> handler -> IO (ConnectId object))
-> Signal object handler
Signal (String
-> Bool
-> self
-> (PrintContext -> Int -> PageSetup -> IO ())
-> IO (ConnectId self)
forall a' c' obj.
(GObjectClass a', GObjectClass c', GObjectClass obj) =>
String
-> Bool -> obj -> (a' -> Int -> c' -> IO ()) -> IO (ConnectId obj)
connect_OBJECT_INT_OBJECT__NONE String
"request_page_setup")
printOptDrawPage :: PrintOperationClass self => Signal self (PrintContext -> Int -> IO ())
printOptDrawPage :: forall self.
PrintOperationClass self =>
Signal self (PrintContext -> Int -> IO ())
printOptDrawPage = (Bool
-> self -> (PrintContext -> Int -> IO ()) -> IO (ConnectId self))
-> Signal self (PrintContext -> Int -> IO ())
forall object handler.
(Bool -> object -> handler -> IO (ConnectId object))
-> Signal object handler
Signal (String
-> Bool
-> self
-> (PrintContext -> Int -> IO ())
-> IO (ConnectId self)
forall a' obj.
(GObjectClass a', GObjectClass obj) =>
String -> Bool -> obj -> (a' -> Int -> IO ()) -> IO (ConnectId obj)
connect_OBJECT_INT__NONE String
"draw_page")
printOptEndPrint :: PrintOperationClass self => Signal self (PrintContext -> IO ())
printOptEndPrint :: forall self.
PrintOperationClass self =>
Signal self (PrintContext -> IO ())
printOptEndPrint = (Bool -> self -> (PrintContext -> IO ()) -> IO (ConnectId self))
-> Signal self (PrintContext -> IO ())
forall object handler.
(Bool -> object -> handler -> IO (ConnectId object))
-> Signal object handler
Signal (String
-> Bool -> self -> (PrintContext -> IO ()) -> IO (ConnectId self)
forall a' obj.
(GObjectClass a', GObjectClass obj) =>
String -> Bool -> obj -> (a' -> IO ()) -> IO (ConnectId obj)
connect_OBJECT__NONE String
"end_print")
printOptStatusChanged :: PrintOperationClass self => Signal self (IO ())
printOptStatusChanged :: forall self. PrintOperationClass self => Signal self (IO ())
printOptStatusChanged = (Bool -> self -> IO () -> IO (ConnectId self))
-> Signal self (IO ())
forall object handler.
(Bool -> object -> handler -> IO (ConnectId object))
-> Signal object handler
Signal (String -> Bool -> self -> IO () -> IO (ConnectId self)
forall obj.
GObjectClass obj =>
String -> Bool -> obj -> IO () -> IO (ConnectId obj)
connect_NONE__NONE String
"status_changed")
printOptCreateCustomWidget :: PrintOperationClass self => Signal self (IO Widget)
printOptCreateCustomWidget :: forall self. PrintOperationClass self => Signal self (IO Widget)
printOptCreateCustomWidget = (Bool -> self -> IO Widget -> IO (ConnectId self))
-> Signal self (IO Widget)
forall object handler.
(Bool -> object -> handler -> IO (ConnectId object))
-> Signal object handler
Signal (String -> Bool -> self -> IO Widget -> IO (ConnectId self)
forall obj.
GObjectClass obj =>
String -> Bool -> obj -> IO Widget -> IO (ConnectId obj)
connect_NONE__OBJECTPTR String
"create_custom_widget")
connect_NONE__OBJECTPTR ::
GObjectClass obj => SignalName ->
ConnectAfter -> obj ->
(IO Widget) ->
IO (ConnectId obj)
connect_NONE__OBJECTPTR :: forall obj.
GObjectClass obj =>
String -> Bool -> obj -> IO Widget -> IO (ConnectId obj)
connect_NONE__OBJECTPTR String
signal Bool
after obj
obj IO Widget
user =
String
-> Bool
-> obj
-> (Ptr GObject -> IO (Ptr Widget))
-> IO (ConnectId obj)
forall obj handler.
GObjectClass obj =>
String -> Bool -> obj -> handler -> IO (ConnectId obj)
connectGeneric String
signal Bool
after obj
obj Ptr GObject -> IO (Ptr Widget)
action
where action :: Ptr GObject -> IO (Ptr Widget)
action :: Ptr GObject -> IO (Ptr Widget)
action Ptr GObject
_ =
IO (Ptr Widget) -> IO (Ptr Widget)
forall a. IO a -> IO a
failOnGError (IO (Ptr Widget) -> IO (Ptr Widget))
-> IO (Ptr Widget) -> IO (Ptr Widget)
forall a b. (a -> b) -> a -> b
$ do
Widget
x <- IO Widget
user
Ptr Widget -> IO (Ptr Widget)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return (Ptr Widget -> IO (Ptr Widget)) -> Ptr Widget -> IO (Ptr Widget)
forall a b. (a -> b) -> a -> b
$ ForeignPtr Widget -> Ptr Widget
forall a. ForeignPtr a -> Ptr a
unsafeForeignPtrToPtr (Widget -> ForeignPtr Widget
unWidget (Widget -> Widget
forall o. WidgetClass o => o -> Widget
toWidget Widget
x))
printOptUpdateCustomWidget :: PrintOperationClass self => Signal self (Widget -> PageSetup -> PrintSettings -> IO ())
printOptUpdateCustomWidget :: forall self.
PrintOperationClass self =>
Signal self (Widget -> PageSetup -> PrintSettings -> IO ())
printOptUpdateCustomWidget = (Bool
-> self
-> (Widget -> PageSetup -> PrintSettings -> IO ())
-> IO (ConnectId self))
-> Signal self (Widget -> PageSetup -> PrintSettings -> IO ())
forall object handler.
(Bool -> object -> handler -> IO (ConnectId object))
-> Signal object handler
Signal (String
-> Bool
-> self
-> (Widget -> PageSetup -> PrintSettings -> IO ())
-> IO (ConnectId self)
forall a' b' c' obj.
(GObjectClass a', GObjectClass b', GObjectClass c',
GObjectClass obj) =>
String
-> Bool -> obj -> (a' -> b' -> c' -> IO ()) -> IO (ConnectId obj)
connect_OBJECT_OBJECT_OBJECT__NONE String
"update_custom_widget")
printOptCustomWidgetApply :: PrintOperationClass self => Signal self (Widget -> IO ())
printOptCustomWidgetApply :: forall self.
PrintOperationClass self =>
Signal self (Widget -> IO ())
printOptCustomWidgetApply = (Bool -> self -> (Widget -> IO ()) -> IO (ConnectId self))
-> Signal self (Widget -> IO ())
forall object handler.
(Bool -> object -> handler -> IO (ConnectId object))
-> Signal object handler
Signal (String -> Bool -> self -> (Widget -> IO ()) -> IO (ConnectId self)
forall a' obj.
(GObjectClass a', GObjectClass obj) =>
String -> Bool -> obj -> (a' -> IO ()) -> IO (ConnectId obj)
connect_OBJECT__NONE String
"custom_widget_apply")
printOptPreview :: PrintOperationClass self => Signal self (PrintOperationPreview -> PrintContext -> Window -> IO Bool)
printOptPreview :: forall self.
PrintOperationClass self =>
Signal
self (PrintOperationPreview -> PrintContext -> Window -> IO Bool)
printOptPreview = (Bool
-> self
-> (PrintOperationPreview -> PrintContext -> Window -> IO Bool)
-> IO (ConnectId self))
-> Signal
self (PrintOperationPreview -> PrintContext -> Window -> IO Bool)
forall object handler.
(Bool -> object -> handler -> IO (ConnectId object))
-> Signal object handler
Signal (String
-> Bool
-> self
-> (PrintOperationPreview -> PrintContext -> Window -> IO Bool)
-> IO (ConnectId self)
forall a' b' c' obj.
(GObjectClass a', GObjectClass b', GObjectClass c',
GObjectClass obj) =>
String
-> Bool -> obj -> (a' -> b' -> c' -> IO Bool) -> IO (ConnectId obj)
connect_OBJECT_OBJECT_OBJECT__BOOL String
"preview")
printOptReady :: PrintOperationPreviewClass self => Signal self (PrintContext -> IO ())
printOptReady :: forall self.
PrintOperationPreviewClass self =>
Signal self (PrintContext -> IO ())
printOptReady = (Bool -> self -> (PrintContext -> IO ()) -> IO (ConnectId self))
-> Signal self (PrintContext -> IO ())
forall object handler.
(Bool -> object -> handler -> IO (ConnectId object))
-> Signal object handler
Signal (String
-> Bool -> self -> (PrintContext -> IO ()) -> IO (ConnectId self)
forall a' obj.
(GObjectClass a', GObjectClass obj) =>
String -> Bool -> obj -> (a' -> IO ()) -> IO (ConnectId obj)
connect_OBJECT__NONE String
"ready")
printOptGotPageSize :: PrintOperationPreviewClass self => Signal self (PrintContext -> PageSetup -> IO ())
printOptGotPageSize :: forall self.
PrintOperationPreviewClass self =>
Signal self (PrintContext -> PageSetup -> IO ())
printOptGotPageSize = (Bool
-> self
-> (PrintContext -> PageSetup -> IO ())
-> IO (ConnectId self))
-> Signal self (PrintContext -> PageSetup -> IO ())
forall object handler.
(Bool -> object -> handler -> IO (ConnectId object))
-> Signal object handler
Signal (String
-> Bool
-> self
-> (PrintContext -> PageSetup -> IO ())
-> IO (ConnectId self)
forall a' b' obj.
(GObjectClass a', GObjectClass b', GObjectClass obj) =>
String -> Bool -> obj -> (a' -> b' -> IO ()) -> IO (ConnectId obj)
connect_OBJECT_OBJECT__NONE String
"got_page_size")
foreign import ccall safe "gtk_print_operation_new"
gtk_print_operation_new :: (IO (Ptr PrintOperation))
foreign import ccall safe "gtk_print_operation_set_allow_async"
gtk_print_operation_set_allow_async :: ((Ptr PrintOperation) -> (CInt -> (IO ())))
foreign import ccall safe "gtk_print_operation_get_error"
gtk_print_operation_get_error :: ((Ptr PrintOperation) -> ((Ptr (Ptr ())) -> (IO ())))
foreign import ccall safe "gtk_print_operation_set_job_name"
gtk_print_operation_set_job_name :: ((Ptr PrintOperation) -> ((Ptr CChar) -> (IO ())))
foreign import ccall safe "gtk_print_operation_set_n_pages"
gtk_print_operation_set_n_pages :: ((Ptr PrintOperation) -> (CInt -> (IO ())))
foreign import ccall safe "gtk_print_operation_get_n_pages_to_print"
gtk_print_operation_get_n_pages_to_print :: ((Ptr PrintOperation) -> (IO CInt))
foreign import ccall safe "gtk_print_operation_set_current_page"
gtk_print_operation_set_current_page :: ((Ptr PrintOperation) -> (CInt -> (IO ())))
foreign import ccall safe "gtk_print_operation_set_use_full_page"
gtk_print_operation_set_use_full_page :: ((Ptr PrintOperation) -> (CInt -> (IO ())))
foreign import ccall safe "gtk_print_operation_set_unit"
gtk_print_operation_set_unit :: ((Ptr PrintOperation) -> (CInt -> (IO ())))
foreign import ccall safe "gtk_print_operation_set_export_filename"
gtk_print_operation_set_export_filename :: ((Ptr PrintOperation) -> ((Ptr CChar) -> (IO ())))
foreign import ccall safe "gtk_print_operation_set_show_progress"
gtk_print_operation_set_show_progress :: ((Ptr PrintOperation) -> (CInt -> (IO ())))
foreign import ccall safe "gtk_print_operation_set_track_print_status"
gtk_print_operation_set_track_print_status :: ((Ptr PrintOperation) -> (CInt -> (IO ())))
foreign import ccall safe "gtk_print_operation_set_custom_tab_label"
gtk_print_operation_set_custom_tab_label :: ((Ptr PrintOperation) -> ((Ptr CChar) -> (IO ())))
foreign import ccall safe "gtk_print_operation_run"
gtk_print_operation_run :: ((Ptr PrintOperation) -> (CInt -> ((Ptr Window) -> ((Ptr (Ptr ())) -> (IO CInt)))))
foreign import ccall safe "gtk_print_operation_cancel"
gtk_print_operation_cancel :: ((Ptr PrintOperation) -> (IO ()))
foreign import ccall safe "gtk_print_operation_draw_page_finish"
gtk_print_operation_draw_page_finish :: ((Ptr PrintOperation) -> (IO ()))
foreign import ccall safe "gtk_print_operation_set_defer_drawing"
gtk_print_operation_set_defer_drawing :: ((Ptr PrintOperation) -> (IO ()))
foreign import ccall safe "gtk_print_operation_get_status"
gtk_print_operation_get_status :: ((Ptr PrintOperation) -> (IO CInt))
foreign import ccall safe "gtk_print_operation_get_status_string"
gtk_print_operation_get_status_string :: ((Ptr PrintOperation) -> (IO (Ptr CChar)))
foreign import ccall safe "gtk_print_operation_is_finished"
gtk_print_operation_is_finished :: ((Ptr PrintOperation) -> (IO CInt))
foreign import ccall safe "gtk_print_run_page_setup_dialog"
gtk_print_run_page_setup_dialog :: ((Ptr Window) -> ((Ptr PageSetup) -> ((Ptr PrintSettings) -> (IO (Ptr PageSetup)))))
foreign import ccall safe "gtk_print_run_page_setup_dialog_async"
gtk_print_run_page_setup_dialog_async :: ((Ptr Window) -> ((Ptr PageSetup) -> ((Ptr PrintSettings) -> ((FunPtr ((Ptr PageSetup) -> ((Ptr ()) -> (IO ())))) -> ((Ptr ()) -> (IO ()))))))
foreign import ccall safe "gtk_print_operation_preview_end_preview"
gtk_print_operation_preview_end_preview :: ((Ptr PrintOperationPreview) -> (IO ()))
foreign import ccall safe "gtk_print_operation_preview_is_selected"
gtk_print_operation_preview_is_selected :: ((Ptr PrintOperationPreview) -> (CInt -> (IO CInt)))
foreign import ccall safe "gtk_print_operation_preview_render_page"
gtk_print_operation_preview_render_page :: ((Ptr PrintOperationPreview) -> (CInt -> (IO ())))
foreign import ccall unsafe "gtk_page_setup_get_type"
gtk_page_setup_get_type :: CUInt
foreign import ccall unsafe "gtk_print_settings_get_type"
gtk_print_settings_get_type :: CUInt
foreign import ccall unsafe "gtk_unit_get_type"
gtk_unit_get_type :: CUInt
foreign import ccall unsafe "gtk_print_status_get_type"
gtk_print_status_get_type :: CUInt