{-# LANGUAGE ImplicitParams, RankNTypes, TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gtk.Interfaces.PrintOperationPreview
(
PrintOperationPreview(..) ,
IsPrintOperationPreview ,
toPrintOperationPreview ,
#if defined(ENABLE_OVERLOADING)
ResolvePrintOperationPreviewMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
PrintOperationPreviewEndPreviewMethodInfo,
#endif
printOperationPreviewEndPreview ,
#if defined(ENABLE_OVERLOADING)
PrintOperationPreviewIsSelectedMethodInfo,
#endif
printOperationPreviewIsSelected ,
#if defined(ENABLE_OVERLOADING)
PrintOperationPreviewRenderPageMethodInfo,
#endif
printOperationPreviewRenderPage ,
PrintOperationPreviewGotPageSizeCallback,
#if defined(ENABLE_OVERLOADING)
PrintOperationPreviewGotPageSizeSignalInfo,
#endif
afterPrintOperationPreviewGotPageSize ,
onPrintOperationPreviewGotPageSize ,
PrintOperationPreviewReadyCallback ,
#if defined(ENABLE_OVERLOADING)
PrintOperationPreviewReadySignalInfo ,
#endif
afterPrintOperationPreviewReady ,
onPrintOperationPreviewReady ,
) 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.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GArray as B.GArray
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GHashTable as B.GHT
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.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
import qualified Data.Coerce as Coerce
import qualified Data.Text as T
import qualified Data.Kind as DK
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 GHC.Records as R
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 (SP.ManagedPtr PrintOperationPreview)
deriving (PrintOperationPreview -> PrintOperationPreview -> Bool
(PrintOperationPreview -> PrintOperationPreview -> Bool)
-> (PrintOperationPreview -> PrintOperationPreview -> Bool)
-> Eq PrintOperationPreview
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PrintOperationPreview -> PrintOperationPreview -> Bool
== :: PrintOperationPreview -> PrintOperationPreview -> Bool
$c/= :: PrintOperationPreview -> PrintOperationPreview -> Bool
/= :: PrintOperationPreview -> PrintOperationPreview -> Bool
Eq)
instance SP.ManagedPtrNewtype PrintOperationPreview where
toManagedPtr :: PrintOperationPreview -> ManagedPtr PrintOperationPreview
toManagedPtr (PrintOperationPreview ManagedPtr PrintOperationPreview
p) = ManagedPtr PrintOperationPreview
p
foreign import ccall "gtk_print_operation_preview_get_type"
c_gtk_print_operation_preview_get_type :: IO B.Types.GType
instance B.Types.TypedObject PrintOperationPreview where
glibType :: IO GType
glibType = IO GType
c_gtk_print_operation_preview_get_type
instance B.Types.GObject PrintOperationPreview
class (SP.GObject o, O.IsDescendantOf PrintOperationPreview o) => IsPrintOperationPreview o
instance (SP.GObject o, O.IsDescendantOf PrintOperationPreview o) => IsPrintOperationPreview o
instance O.HasParentTypes PrintOperationPreview
type instance O.ParentTypes PrintOperationPreview = '[GObject.Object.Object]
toPrintOperationPreview :: (MIO.MonadIO m, IsPrintOperationPreview o) => o -> m PrintOperationPreview
toPrintOperationPreview :: forall (m :: * -> *) o.
(MonadIO m, IsPrintOperationPreview o) =>
o -> m PrintOperationPreview
toPrintOperationPreview = IO PrintOperationPreview -> m PrintOperationPreview
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO PrintOperationPreview -> m PrintOperationPreview)
-> (o -> IO PrintOperationPreview) -> o -> m PrintOperationPreview
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr PrintOperationPreview -> PrintOperationPreview)
-> o -> IO PrintOperationPreview
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr PrintOperationPreview -> PrintOperationPreview
PrintOperationPreview
instance B.GValue.IsGValue (Maybe PrintOperationPreview) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_gtk_print_operation_preview_get_type
gvalueSet_ :: Ptr GValue -> Maybe PrintOperationPreview -> IO ()
gvalueSet_ Ptr GValue
gv Maybe PrintOperationPreview
P.Nothing = Ptr GValue -> Ptr PrintOperationPreview -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr PrintOperationPreview
forall a. Ptr a
FP.nullPtr :: FP.Ptr PrintOperationPreview)
gvalueSet_ Ptr GValue
gv (P.Just PrintOperationPreview
obj) = PrintOperationPreview
-> (Ptr PrintOperationPreview -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr PrintOperationPreview
obj (Ptr GValue -> Ptr PrintOperationPreview -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe PrintOperationPreview)
gvalueGet_ Ptr GValue
gv = do
Ptr PrintOperationPreview
ptr <- Ptr GValue -> IO (Ptr PrintOperationPreview)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr PrintOperationPreview)
if Ptr PrintOperationPreview
ptr Ptr PrintOperationPreview -> Ptr PrintOperationPreview -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr PrintOperationPreview
forall a. Ptr a
FP.nullPtr
then PrintOperationPreview -> Maybe PrintOperationPreview
forall a. a -> Maybe a
P.Just (PrintOperationPreview -> Maybe PrintOperationPreview)
-> IO PrintOperationPreview -> IO (Maybe PrintOperationPreview)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr PrintOperationPreview -> PrintOperationPreview)
-> Ptr PrintOperationPreview -> IO PrintOperationPreview
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr PrintOperationPreview -> PrintOperationPreview
PrintOperationPreview Ptr PrintOperationPreview
ptr
else Maybe PrintOperationPreview -> IO (Maybe PrintOperationPreview)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe PrintOperationPreview
forall a. Maybe a
P.Nothing
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList PrintOperationPreview
type instance O.AttributeList PrintOperationPreview = PrintOperationPreviewAttributeList
type PrintOperationPreviewAttributeList = ('[ ] :: [(Symbol, DK.Type)])
#endif
#if defined(ENABLE_OVERLOADING)
#endif
#if defined(ENABLE_OVERLOADING)
type family ResolvePrintOperationPreviewMethod (t :: Symbol) (o :: DK.Type) :: DK.Type 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.OverloadedMethod info PrintOperationPreview p) => OL.IsLabel t (PrintOperationPreview -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#if MIN_VERSION_base(4,13,0)
instance (info ~ ResolvePrintOperationPreviewMethod t PrintOperationPreview, O.OverloadedMethod info PrintOperationPreview p, R.HasField t PrintOperationPreview p) => R.HasField t PrintOperationPreview p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolvePrintOperationPreviewMethod t PrintOperationPreview, O.OverloadedMethodInfo info PrintOperationPreview) => OL.IsLabel t (O.MethodProxy info PrintOperationPreview) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPrintOperationPreview a) =>
a -> m ()
printOperationPreviewEndPreview a
preview = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr PrintOperationPreview
preview' <- a -> IO (Ptr PrintOperationPreview)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
preview
Ptr PrintOperationPreview -> IO ()
gtk_print_operation_preview_end_preview Ptr PrintOperationPreview
preview'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
preview
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data PrintOperationPreviewEndPreviewMethodInfo
instance (signature ~ (m ()), MonadIO m, IsPrintOperationPreview a) => O.OverloadedMethod PrintOperationPreviewEndPreviewMethodInfo a signature where
overloadedMethod = printOperationPreviewEndPreview
instance O.OverloadedMethodInfo PrintOperationPreviewEndPreviewMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Interfaces.PrintOperationPreview.printOperationPreviewEndPreview",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Interfaces-PrintOperationPreview.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPrintOperationPreview a) =>
a -> Int32 -> m Bool
printOperationPreviewIsSelected a
preview Int32
pageNr = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr PrintOperationPreview
preview' <- a -> IO (Ptr PrintOperationPreview)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
preview
CInt
result <- Ptr PrintOperationPreview -> Int32 -> IO CInt
gtk_print_operation_preview_is_selected Ptr PrintOperationPreview
preview' Int32
pageNr
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
preview
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data PrintOperationPreviewIsSelectedMethodInfo
instance (signature ~ (Int32 -> m Bool), MonadIO m, IsPrintOperationPreview a) => O.OverloadedMethod PrintOperationPreviewIsSelectedMethodInfo a signature where
overloadedMethod = printOperationPreviewIsSelected
instance O.OverloadedMethodInfo PrintOperationPreviewIsSelectedMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Interfaces.PrintOperationPreview.printOperationPreviewIsSelected",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Interfaces-PrintOperationPreview.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPrintOperationPreview a) =>
a -> Int32 -> m ()
printOperationPreviewRenderPage a
preview Int32
pageNr = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr PrintOperationPreview
preview' <- a -> IO (Ptr PrintOperationPreview)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
preview
Ptr PrintOperationPreview -> Int32 -> IO ()
gtk_print_operation_preview_render_page Ptr PrintOperationPreview
preview' Int32
pageNr
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
preview
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data PrintOperationPreviewRenderPageMethodInfo
instance (signature ~ (Int32 -> m ()), MonadIO m, IsPrintOperationPreview a) => O.OverloadedMethod PrintOperationPreviewRenderPageMethodInfo a signature where
overloadedMethod = printOperationPreviewRenderPage
instance O.OverloadedMethodInfo PrintOperationPreviewRenderPageMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Interfaces.PrintOperationPreview.printOperationPreviewRenderPage",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Interfaces-PrintOperationPreview.html#v:printOperationPreviewRenderPage"
})
#endif
type PrintOperationPreviewGotPageSizeCallback =
Gtk.PrintContext.PrintContext
-> Gtk.PageSetup.PageSetup
-> IO ()
type C_PrintOperationPreviewGotPageSizeCallback =
Ptr PrintOperationPreview ->
Ptr Gtk.PrintContext.PrintContext ->
Ptr Gtk.PageSetup.PageSetup ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_PrintOperationPreviewGotPageSizeCallback :: C_PrintOperationPreviewGotPageSizeCallback -> IO (FunPtr C_PrintOperationPreviewGotPageSizeCallback)
wrap_PrintOperationPreviewGotPageSizeCallback ::
GObject a => (a -> PrintOperationPreviewGotPageSizeCallback) ->
C_PrintOperationPreviewGotPageSizeCallback
wrap_PrintOperationPreviewGotPageSizeCallback :: forall a.
GObject a =>
(a -> PrintOperationPreviewGotPageSizeCallback)
-> C_PrintOperationPreviewGotPageSizeCallback
wrap_PrintOperationPreviewGotPageSizeCallback a -> PrintOperationPreviewGotPageSizeCallback
gi'cb Ptr PrintOperationPreview
gi'selfPtr Ptr PrintContext
context Ptr PageSetup
pageSetup Ptr ()
_ = do
PrintContext
context' <- ((ManagedPtr PrintContext -> PrintContext)
-> Ptr PrintContext -> IO PrintContext
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr PrintContext -> PrintContext
Gtk.PrintContext.PrintContext) Ptr PrintContext
context
PageSetup
pageSetup' <- ((ManagedPtr PageSetup -> PageSetup)
-> Ptr PageSetup -> IO PageSetup
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr PageSetup -> PageSetup
Gtk.PageSetup.PageSetup) Ptr PageSetup
pageSetup
Ptr PrintOperationPreview
-> (PrintOperationPreview -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr PrintOperationPreview
gi'selfPtr ((PrintOperationPreview -> IO ()) -> IO ())
-> (PrintOperationPreview -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \PrintOperationPreview
gi'self -> a -> PrintOperationPreviewGotPageSizeCallback
gi'cb (PrintOperationPreview -> a
forall a b. Coercible a b => a -> b
Coerce.coerce PrintOperationPreview
gi'self) PrintContext
context' PageSetup
pageSetup'
onPrintOperationPreviewGotPageSize :: (IsPrintOperationPreview a, MonadIO m) => a -> ((?self :: a) => PrintOperationPreviewGotPageSizeCallback) -> m SignalHandlerId
onPrintOperationPreviewGotPageSize :: forall a (m :: * -> *).
(IsPrintOperationPreview a, MonadIO m) =>
a
-> ((?self::a) => PrintOperationPreviewGotPageSizeCallback)
-> m SignalHandlerId
onPrintOperationPreviewGotPageSize a
obj (?self::a) => PrintOperationPreviewGotPageSizeCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> PrintOperationPreviewGotPageSizeCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => PrintOperationPreviewGotPageSizeCallback
PrintOperationPreviewGotPageSizeCallback
cb
let wrapped' :: C_PrintOperationPreviewGotPageSizeCallback
wrapped' = (a -> PrintOperationPreviewGotPageSizeCallback)
-> C_PrintOperationPreviewGotPageSizeCallback
forall a.
GObject a =>
(a -> PrintOperationPreviewGotPageSizeCallback)
-> C_PrintOperationPreviewGotPageSizeCallback
wrap_PrintOperationPreviewGotPageSizeCallback a -> PrintOperationPreviewGotPageSizeCallback
wrapped
FunPtr C_PrintOperationPreviewGotPageSizeCallback
wrapped'' <- C_PrintOperationPreviewGotPageSizeCallback
-> IO (FunPtr C_PrintOperationPreviewGotPageSizeCallback)
mk_PrintOperationPreviewGotPageSizeCallback C_PrintOperationPreviewGotPageSizeCallback
wrapped'
a
-> Text
-> FunPtr C_PrintOperationPreviewGotPageSizeCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"got-page-size" FunPtr C_PrintOperationPreviewGotPageSizeCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterPrintOperationPreviewGotPageSize :: (IsPrintOperationPreview a, MonadIO m) => a -> ((?self :: a) => PrintOperationPreviewGotPageSizeCallback) -> m SignalHandlerId
afterPrintOperationPreviewGotPageSize :: forall a (m :: * -> *).
(IsPrintOperationPreview a, MonadIO m) =>
a
-> ((?self::a) => PrintOperationPreviewGotPageSizeCallback)
-> m SignalHandlerId
afterPrintOperationPreviewGotPageSize a
obj (?self::a) => PrintOperationPreviewGotPageSizeCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> PrintOperationPreviewGotPageSizeCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => PrintOperationPreviewGotPageSizeCallback
PrintOperationPreviewGotPageSizeCallback
cb
let wrapped' :: C_PrintOperationPreviewGotPageSizeCallback
wrapped' = (a -> PrintOperationPreviewGotPageSizeCallback)
-> C_PrintOperationPreviewGotPageSizeCallback
forall a.
GObject a =>
(a -> PrintOperationPreviewGotPageSizeCallback)
-> C_PrintOperationPreviewGotPageSizeCallback
wrap_PrintOperationPreviewGotPageSizeCallback a -> PrintOperationPreviewGotPageSizeCallback
wrapped
FunPtr C_PrintOperationPreviewGotPageSizeCallback
wrapped'' <- C_PrintOperationPreviewGotPageSizeCallback
-> IO (FunPtr C_PrintOperationPreviewGotPageSizeCallback)
mk_PrintOperationPreviewGotPageSizeCallback C_PrintOperationPreviewGotPageSizeCallback
wrapped'
a
-> Text
-> FunPtr C_PrintOperationPreviewGotPageSizeCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"got-page-size" FunPtr C_PrintOperationPreviewGotPageSizeCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data PrintOperationPreviewGotPageSizeSignalInfo
instance SignalInfo PrintOperationPreviewGotPageSizeSignalInfo where
type HaskellCallbackType PrintOperationPreviewGotPageSizeSignalInfo = PrintOperationPreviewGotPageSizeCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_PrintOperationPreviewGotPageSizeCallback cb
cb'' <- mk_PrintOperationPreviewGotPageSizeCallback cb'
connectSignalFunPtr obj "got-page-size" cb'' connectMode detail
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Interfaces.PrintOperationPreview::got-page-size"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Interfaces-PrintOperationPreview.html#g:signal:gotPageSize"})
#endif
type PrintOperationPreviewReadyCallback =
Gtk.PrintContext.PrintContext
-> IO ()
type C_PrintOperationPreviewReadyCallback =
Ptr PrintOperationPreview ->
Ptr Gtk.PrintContext.PrintContext ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_PrintOperationPreviewReadyCallback :: C_PrintOperationPreviewReadyCallback -> IO (FunPtr C_PrintOperationPreviewReadyCallback)
wrap_PrintOperationPreviewReadyCallback ::
GObject a => (a -> PrintOperationPreviewReadyCallback) ->
C_PrintOperationPreviewReadyCallback
wrap_PrintOperationPreviewReadyCallback :: forall a.
GObject a =>
(a -> PrintOperationPreviewReadyCallback)
-> C_PrintOperationPreviewReadyCallback
wrap_PrintOperationPreviewReadyCallback a -> PrintOperationPreviewReadyCallback
gi'cb Ptr PrintOperationPreview
gi'selfPtr Ptr PrintContext
context Ptr ()
_ = do
PrintContext
context' <- ((ManagedPtr PrintContext -> PrintContext)
-> Ptr PrintContext -> IO PrintContext
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr PrintContext -> PrintContext
Gtk.PrintContext.PrintContext) Ptr PrintContext
context
Ptr PrintOperationPreview
-> (PrintOperationPreview -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr PrintOperationPreview
gi'selfPtr ((PrintOperationPreview -> IO ()) -> IO ())
-> (PrintOperationPreview -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \PrintOperationPreview
gi'self -> a -> PrintOperationPreviewReadyCallback
gi'cb (PrintOperationPreview -> a
forall a b. Coercible a b => a -> b
Coerce.coerce PrintOperationPreview
gi'self) PrintContext
context'
onPrintOperationPreviewReady :: (IsPrintOperationPreview a, MonadIO m) => a -> ((?self :: a) => PrintOperationPreviewReadyCallback) -> m SignalHandlerId
onPrintOperationPreviewReady :: forall a (m :: * -> *).
(IsPrintOperationPreview a, MonadIO m) =>
a
-> ((?self::a) => PrintOperationPreviewReadyCallback)
-> m SignalHandlerId
onPrintOperationPreviewReady a
obj (?self::a) => PrintOperationPreviewReadyCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> PrintOperationPreviewReadyCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => PrintOperationPreviewReadyCallback
PrintOperationPreviewReadyCallback
cb
let wrapped' :: C_PrintOperationPreviewReadyCallback
wrapped' = (a -> PrintOperationPreviewReadyCallback)
-> C_PrintOperationPreviewReadyCallback
forall a.
GObject a =>
(a -> PrintOperationPreviewReadyCallback)
-> C_PrintOperationPreviewReadyCallback
wrap_PrintOperationPreviewReadyCallback a -> PrintOperationPreviewReadyCallback
wrapped
FunPtr C_PrintOperationPreviewReadyCallback
wrapped'' <- C_PrintOperationPreviewReadyCallback
-> IO (FunPtr C_PrintOperationPreviewReadyCallback)
mk_PrintOperationPreviewReadyCallback C_PrintOperationPreviewReadyCallback
wrapped'
a
-> Text
-> FunPtr C_PrintOperationPreviewReadyCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"ready" FunPtr C_PrintOperationPreviewReadyCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterPrintOperationPreviewReady :: (IsPrintOperationPreview a, MonadIO m) => a -> ((?self :: a) => PrintOperationPreviewReadyCallback) -> m SignalHandlerId
afterPrintOperationPreviewReady :: forall a (m :: * -> *).
(IsPrintOperationPreview a, MonadIO m) =>
a
-> ((?self::a) => PrintOperationPreviewReadyCallback)
-> m SignalHandlerId
afterPrintOperationPreviewReady a
obj (?self::a) => PrintOperationPreviewReadyCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> PrintOperationPreviewReadyCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => PrintOperationPreviewReadyCallback
PrintOperationPreviewReadyCallback
cb
let wrapped' :: C_PrintOperationPreviewReadyCallback
wrapped' = (a -> PrintOperationPreviewReadyCallback)
-> C_PrintOperationPreviewReadyCallback
forall a.
GObject a =>
(a -> PrintOperationPreviewReadyCallback)
-> C_PrintOperationPreviewReadyCallback
wrap_PrintOperationPreviewReadyCallback a -> PrintOperationPreviewReadyCallback
wrapped
FunPtr C_PrintOperationPreviewReadyCallback
wrapped'' <- C_PrintOperationPreviewReadyCallback
-> IO (FunPtr C_PrintOperationPreviewReadyCallback)
mk_PrintOperationPreviewReadyCallback C_PrintOperationPreviewReadyCallback
wrapped'
a
-> Text
-> FunPtr C_PrintOperationPreviewReadyCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"ready" FunPtr C_PrintOperationPreviewReadyCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data PrintOperationPreviewReadySignalInfo
instance SignalInfo PrintOperationPreviewReadySignalInfo where
type HaskellCallbackType PrintOperationPreviewReadySignalInfo = PrintOperationPreviewReadyCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_PrintOperationPreviewReadyCallback cb
cb'' <- mk_PrintOperationPreviewReadyCallback cb'
connectSignalFunPtr obj "ready" cb'' connectMode detail
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Interfaces.PrintOperationPreview::ready"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Interfaces-PrintOperationPreview.html#g:signal:ready"})
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList PrintOperationPreview = PrintOperationPreviewSignalList
type PrintOperationPreviewSignalList = ('[ '("gotPageSize", PrintOperationPreviewGotPageSizeSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo), '("ready", PrintOperationPreviewReadySignalInfo)] :: [(Symbol, DK.Type)])
#endif