#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \
&& !defined(__HADDOCK_VERSION__))
module GI.Gtk.Interfaces.PrintOperationPreview
(
PrintOperationPreview(..) ,
noPrintOperationPreview ,
IsPrintOperationPreview ,
toPrintOperationPreview ,
#if ENABLE_OVERLOADING
PrintOperationPreviewEndPreviewMethodInfo,
#endif
printOperationPreviewEndPreview ,
#if ENABLE_OVERLOADING
PrintOperationPreviewIsSelectedMethodInfo,
#endif
printOperationPreviewIsSelected ,
#if ENABLE_OVERLOADING
PrintOperationPreviewRenderPageMethodInfo,
#endif
printOperationPreviewRenderPage ,
C_PrintOperationPreviewGotPageSizeCallback,
PrintOperationPreviewGotPageSizeCallback,
#if ENABLE_OVERLOADING
PrintOperationPreviewGotPageSizeSignalInfo,
#endif
afterPrintOperationPreviewGotPageSize ,
genClosure_PrintOperationPreviewGotPageSize,
mk_PrintOperationPreviewGotPageSizeCallback,
noPrintOperationPreviewGotPageSizeCallback,
onPrintOperationPreviewGotPageSize ,
wrap_PrintOperationPreviewGotPageSizeCallback,
C_PrintOperationPreviewReadyCallback ,
PrintOperationPreviewReadyCallback ,
#if ENABLE_OVERLOADING
PrintOperationPreviewReadySignalInfo ,
#endif
afterPrintOperationPreviewReady ,
genClosure_PrintOperationPreviewReady ,
mk_PrintOperationPreviewReadyCallback ,
noPrintOperationPreviewReadyCallback ,
onPrintOperationPreviewReady ,
wrap_PrintOperationPreviewReadyCallback ,
) where
import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P
import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GI.GObject.Objects.Object as GObject.Object
import {-# SOURCE #-} qualified GI.Gtk.Objects.PageSetup as Gtk.PageSetup
import {-# SOURCE #-} qualified GI.Gtk.Objects.PrintContext as Gtk.PrintContext
newtype PrintOperationPreview = PrintOperationPreview (ManagedPtr PrintOperationPreview)
noPrintOperationPreview :: Maybe PrintOperationPreview
noPrintOperationPreview = Nothing
type PrintOperationPreviewGotPageSizeCallback =
Gtk.PrintContext.PrintContext
-> Gtk.PageSetup.PageSetup
-> IO ()
noPrintOperationPreviewGotPageSizeCallback :: Maybe PrintOperationPreviewGotPageSizeCallback
noPrintOperationPreviewGotPageSizeCallback = Nothing
type C_PrintOperationPreviewGotPageSizeCallback =
Ptr () ->
Ptr Gtk.PrintContext.PrintContext ->
Ptr Gtk.PageSetup.PageSetup ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_PrintOperationPreviewGotPageSizeCallback :: C_PrintOperationPreviewGotPageSizeCallback -> IO (FunPtr C_PrintOperationPreviewGotPageSizeCallback)
genClosure_PrintOperationPreviewGotPageSize :: MonadIO m => PrintOperationPreviewGotPageSizeCallback -> m (GClosure C_PrintOperationPreviewGotPageSizeCallback)
genClosure_PrintOperationPreviewGotPageSize cb = liftIO $ do
let cb' = wrap_PrintOperationPreviewGotPageSizeCallback cb
mk_PrintOperationPreviewGotPageSizeCallback cb' >>= B.GClosure.newGClosure
wrap_PrintOperationPreviewGotPageSizeCallback ::
PrintOperationPreviewGotPageSizeCallback ->
C_PrintOperationPreviewGotPageSizeCallback
wrap_PrintOperationPreviewGotPageSizeCallback _cb _ context pageSetup _ = do
context' <- (newObject Gtk.PrintContext.PrintContext) context
pageSetup' <- (newObject Gtk.PageSetup.PageSetup) pageSetup
_cb context' pageSetup'
onPrintOperationPreviewGotPageSize :: (IsPrintOperationPreview a, MonadIO m) => a -> PrintOperationPreviewGotPageSizeCallback -> m SignalHandlerId
onPrintOperationPreviewGotPageSize obj cb = liftIO $ do
let cb' = wrap_PrintOperationPreviewGotPageSizeCallback cb
cb'' <- mk_PrintOperationPreviewGotPageSizeCallback cb'
connectSignalFunPtr obj "got-page-size" cb'' SignalConnectBefore
afterPrintOperationPreviewGotPageSize :: (IsPrintOperationPreview a, MonadIO m) => a -> PrintOperationPreviewGotPageSizeCallback -> m SignalHandlerId
afterPrintOperationPreviewGotPageSize obj cb = liftIO $ do
let cb' = wrap_PrintOperationPreviewGotPageSizeCallback cb
cb'' <- mk_PrintOperationPreviewGotPageSizeCallback cb'
connectSignalFunPtr obj "got-page-size" cb'' SignalConnectAfter
type PrintOperationPreviewReadyCallback =
Gtk.PrintContext.PrintContext
-> IO ()
noPrintOperationPreviewReadyCallback :: Maybe PrintOperationPreviewReadyCallback
noPrintOperationPreviewReadyCallback = Nothing
type C_PrintOperationPreviewReadyCallback =
Ptr () ->
Ptr Gtk.PrintContext.PrintContext ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_PrintOperationPreviewReadyCallback :: C_PrintOperationPreviewReadyCallback -> IO (FunPtr C_PrintOperationPreviewReadyCallback)
genClosure_PrintOperationPreviewReady :: MonadIO m => PrintOperationPreviewReadyCallback -> m (GClosure C_PrintOperationPreviewReadyCallback)
genClosure_PrintOperationPreviewReady cb = liftIO $ do
let cb' = wrap_PrintOperationPreviewReadyCallback cb
mk_PrintOperationPreviewReadyCallback cb' >>= B.GClosure.newGClosure
wrap_PrintOperationPreviewReadyCallback ::
PrintOperationPreviewReadyCallback ->
C_PrintOperationPreviewReadyCallback
wrap_PrintOperationPreviewReadyCallback _cb _ context _ = do
context' <- (newObject Gtk.PrintContext.PrintContext) context
_cb context'
onPrintOperationPreviewReady :: (IsPrintOperationPreview a, MonadIO m) => a -> PrintOperationPreviewReadyCallback -> m SignalHandlerId
onPrintOperationPreviewReady obj cb = liftIO $ do
let cb' = wrap_PrintOperationPreviewReadyCallback cb
cb'' <- mk_PrintOperationPreviewReadyCallback cb'
connectSignalFunPtr obj "ready" cb'' SignalConnectBefore
afterPrintOperationPreviewReady :: (IsPrintOperationPreview a, MonadIO m) => a -> PrintOperationPreviewReadyCallback -> m SignalHandlerId
afterPrintOperationPreviewReady obj cb = liftIO $ do
let cb' = wrap_PrintOperationPreviewReadyCallback cb
cb'' <- mk_PrintOperationPreviewReadyCallback cb'
connectSignalFunPtr obj "ready" cb'' SignalConnectAfter
#if ENABLE_OVERLOADING
data PrintOperationPreviewGotPageSizeSignalInfo
instance SignalInfo PrintOperationPreviewGotPageSizeSignalInfo where
type HaskellCallbackType PrintOperationPreviewGotPageSizeSignalInfo = PrintOperationPreviewGotPageSizeCallback
connectSignal _ obj cb connectMode = do
let cb' = wrap_PrintOperationPreviewGotPageSizeCallback cb
cb'' <- mk_PrintOperationPreviewGotPageSizeCallback cb'
connectSignalFunPtr obj "got-page-size" cb'' connectMode
data PrintOperationPreviewReadySignalInfo
instance SignalInfo PrintOperationPreviewReadySignalInfo where
type HaskellCallbackType PrintOperationPreviewReadySignalInfo = PrintOperationPreviewReadyCallback
connectSignal _ obj cb connectMode = do
let cb' = wrap_PrintOperationPreviewReadyCallback cb
cb'' <- mk_PrintOperationPreviewReadyCallback cb'
connectSignalFunPtr obj "ready" cb'' connectMode
type instance O.SignalList PrintOperationPreview = PrintOperationPreviewSignalList
type PrintOperationPreviewSignalList = ('[ '("gotPageSize", PrintOperationPreviewGotPageSizeSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo), '("ready", PrintOperationPreviewReadySignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "gtk_print_operation_preview_get_type"
c_gtk_print_operation_preview_get_type :: IO GType
instance GObject PrintOperationPreview where
gobjectType = c_gtk_print_operation_preview_get_type
class (GObject o, O.IsDescendantOf PrintOperationPreview o) => IsPrintOperationPreview o
instance (GObject o, O.IsDescendantOf PrintOperationPreview o) => IsPrintOperationPreview o
instance O.HasParentTypes PrintOperationPreview
type instance O.ParentTypes PrintOperationPreview = '[GObject.Object.Object]
toPrintOperationPreview :: (MonadIO m, IsPrintOperationPreview o) => o -> m PrintOperationPreview
toPrintOperationPreview = liftIO . unsafeCastTo PrintOperationPreview
#if ENABLE_OVERLOADING
instance O.HasAttributeList PrintOperationPreview
type instance O.AttributeList PrintOperationPreview = PrintOperationPreviewAttributeList
type PrintOperationPreviewAttributeList = ('[ ] :: [(Symbol, *)])
#endif
#if ENABLE_OVERLOADING
#endif
#if ENABLE_OVERLOADING
type family ResolvePrintOperationPreviewMethod (t :: Symbol) (o :: *) :: * where
ResolvePrintOperationPreviewMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolvePrintOperationPreviewMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolvePrintOperationPreviewMethod "endPreview" o = PrintOperationPreviewEndPreviewMethodInfo
ResolvePrintOperationPreviewMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolvePrintOperationPreviewMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolvePrintOperationPreviewMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolvePrintOperationPreviewMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolvePrintOperationPreviewMethod "isSelected" o = PrintOperationPreviewIsSelectedMethodInfo
ResolvePrintOperationPreviewMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolvePrintOperationPreviewMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolvePrintOperationPreviewMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolvePrintOperationPreviewMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolvePrintOperationPreviewMethod "renderPage" o = PrintOperationPreviewRenderPageMethodInfo
ResolvePrintOperationPreviewMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolvePrintOperationPreviewMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolvePrintOperationPreviewMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolvePrintOperationPreviewMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolvePrintOperationPreviewMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolvePrintOperationPreviewMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolvePrintOperationPreviewMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolvePrintOperationPreviewMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolvePrintOperationPreviewMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolvePrintOperationPreviewMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolvePrintOperationPreviewMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolvePrintOperationPreviewMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolvePrintOperationPreviewMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolvePrintOperationPreviewMethod t PrintOperationPreview, O.MethodInfo info PrintOperationPreview p) => OL.IsLabel t (PrintOperationPreview -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#else
fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#endif
#endif
foreign import ccall "gtk_print_operation_preview_end_preview" gtk_print_operation_preview_end_preview ::
Ptr PrintOperationPreview ->
IO ()
printOperationPreviewEndPreview ::
(B.CallStack.HasCallStack, MonadIO m, IsPrintOperationPreview a) =>
a
-> m ()
printOperationPreviewEndPreview preview = liftIO $ do
preview' <- unsafeManagedPtrCastPtr preview
gtk_print_operation_preview_end_preview preview'
touchManagedPtr preview
return ()
#if ENABLE_OVERLOADING
data PrintOperationPreviewEndPreviewMethodInfo
instance (signature ~ (m ()), MonadIO m, IsPrintOperationPreview a) => O.MethodInfo PrintOperationPreviewEndPreviewMethodInfo a signature where
overloadedMethod _ = printOperationPreviewEndPreview
#endif
foreign import ccall "gtk_print_operation_preview_is_selected" gtk_print_operation_preview_is_selected ::
Ptr PrintOperationPreview ->
Int32 ->
IO CInt
printOperationPreviewIsSelected ::
(B.CallStack.HasCallStack, MonadIO m, IsPrintOperationPreview a) =>
a
-> Int32
-> m Bool
printOperationPreviewIsSelected preview pageNr = liftIO $ do
preview' <- unsafeManagedPtrCastPtr preview
result <- gtk_print_operation_preview_is_selected preview' pageNr
let result' = (/= 0) result
touchManagedPtr preview
return result'
#if ENABLE_OVERLOADING
data PrintOperationPreviewIsSelectedMethodInfo
instance (signature ~ (Int32 -> m Bool), MonadIO m, IsPrintOperationPreview a) => O.MethodInfo PrintOperationPreviewIsSelectedMethodInfo a signature where
overloadedMethod _ = printOperationPreviewIsSelected
#endif
foreign import ccall "gtk_print_operation_preview_render_page" gtk_print_operation_preview_render_page ::
Ptr PrintOperationPreview ->
Int32 ->
IO ()
printOperationPreviewRenderPage ::
(B.CallStack.HasCallStack, MonadIO m, IsPrintOperationPreview a) =>
a
-> Int32
-> m ()
printOperationPreviewRenderPage preview pageNr = liftIO $ do
preview' <- unsafeManagedPtrCastPtr preview
gtk_print_operation_preview_render_page preview' pageNr
touchManagedPtr preview
return ()
#if ENABLE_OVERLOADING
data PrintOperationPreviewRenderPageMethodInfo
instance (signature ~ (Int32 -> m ()), MonadIO m, IsPrintOperationPreview a) => O.MethodInfo PrintOperationPreviewRenderPageMethodInfo a signature where
overloadedMethod _ = printOperationPreviewRenderPage
#endif