{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Pango.Structs.IncludedModule
(
IncludedModule(..) ,
newZeroIncludedModule ,
noIncludedModule ,
#if defined(ENABLE_OVERLOADING)
ResolveIncludedModuleMethod ,
#endif
clearIncludedModuleExit ,
getIncludedModuleExit ,
#if defined(ENABLE_OVERLOADING)
includedModule_exit ,
#endif
setIncludedModuleExit ,
clearIncludedModuleInit ,
getIncludedModuleInit ,
#if defined(ENABLE_OVERLOADING)
includedModule_init ,
#endif
setIncludedModuleInit ,
clearIncludedModuleList ,
getIncludedModuleList ,
#if defined(ENABLE_OVERLOADING)
includedModule_list ,
#endif
setIncludedModuleList ,
) 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.GI.Base.Signals as B.Signals
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.Pango.Callbacks as Pango.Callbacks
newtype IncludedModule = IncludedModule (ManagedPtr IncludedModule)
deriving (IncludedModule -> IncludedModule -> Bool
(IncludedModule -> IncludedModule -> Bool)
-> (IncludedModule -> IncludedModule -> Bool) -> Eq IncludedModule
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: IncludedModule -> IncludedModule -> Bool
$c/= :: IncludedModule -> IncludedModule -> Bool
== :: IncludedModule -> IncludedModule -> Bool
$c== :: IncludedModule -> IncludedModule -> Bool
Eq)
instance WrappedPtr IncludedModule where
wrappedPtrCalloc :: IO (Ptr IncludedModule)
wrappedPtrCalloc = Int -> IO (Ptr IncludedModule)
forall a. Int -> IO (Ptr a)
callocBytes 32
wrappedPtrCopy :: IncludedModule -> IO IncludedModule
wrappedPtrCopy = \p :: IncludedModule
p -> IncludedModule
-> (Ptr IncludedModule -> IO IncludedModule) -> IO IncludedModule
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr IncludedModule
p (Int -> Ptr IncludedModule -> IO (Ptr IncludedModule)
forall a. WrappedPtr a => Int -> Ptr a -> IO (Ptr a)
copyBytes 32 (Ptr IncludedModule -> IO (Ptr IncludedModule))
-> (Ptr IncludedModule -> IO IncludedModule)
-> Ptr IncludedModule
-> IO IncludedModule
forall (m :: * -> *) a b c.
Monad m =>
(a -> m b) -> (b -> m c) -> a -> m c
>=> (ManagedPtr IncludedModule -> IncludedModule)
-> Ptr IncludedModule -> IO IncludedModule
forall a.
(HasCallStack, WrappedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapPtr ManagedPtr IncludedModule -> IncludedModule
IncludedModule)
wrappedPtrFree :: Maybe (GDestroyNotify IncludedModule)
wrappedPtrFree = GDestroyNotify IncludedModule
-> Maybe (GDestroyNotify IncludedModule)
forall a. a -> Maybe a
Just GDestroyNotify IncludedModule
forall a. FunPtr (Ptr a -> IO ())
ptr_to_g_free
newZeroIncludedModule :: MonadIO m => m IncludedModule
newZeroIncludedModule :: m IncludedModule
newZeroIncludedModule = IO IncludedModule -> m IncludedModule
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO IncludedModule -> m IncludedModule)
-> IO IncludedModule -> m IncludedModule
forall a b. (a -> b) -> a -> b
$ IO (Ptr IncludedModule)
forall a. WrappedPtr a => IO (Ptr a)
wrappedPtrCalloc IO (Ptr IncludedModule)
-> (Ptr IncludedModule -> IO IncludedModule) -> IO IncludedModule
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= (ManagedPtr IncludedModule -> IncludedModule)
-> Ptr IncludedModule -> IO IncludedModule
forall a.
(HasCallStack, WrappedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapPtr ManagedPtr IncludedModule -> IncludedModule
IncludedModule
instance tag ~ 'AttrSet => Constructible IncludedModule tag where
new :: (ManagedPtr IncludedModule -> IncludedModule)
-> [AttrOp IncludedModule tag] -> m IncludedModule
new _ attrs :: [AttrOp IncludedModule tag]
attrs = do
IncludedModule
o <- m IncludedModule
forall (m :: * -> *). MonadIO m => m IncludedModule
newZeroIncludedModule
IncludedModule -> [AttrOp IncludedModule 'AttrSet] -> m ()
forall o (m :: * -> *).
MonadIO m =>
o -> [AttrOp o 'AttrSet] -> m ()
GI.Attributes.set IncludedModule
o [AttrOp IncludedModule tag]
[AttrOp IncludedModule 'AttrSet]
attrs
IncludedModule -> m IncludedModule
forall (m :: * -> *) a. Monad m => a -> m a
return IncludedModule
o
noIncludedModule :: Maybe IncludedModule
noIncludedModule :: Maybe IncludedModule
noIncludedModule = Maybe IncludedModule
forall a. Maybe a
Nothing
getIncludedModuleList :: MonadIO m => IncludedModule -> m (Maybe Pango.Callbacks.IncludedModuleListFieldCallback)
getIncludedModuleList :: IncludedModule -> m (Maybe IncludedModuleListFieldCallback)
getIncludedModuleList s :: IncludedModule
s = IO (Maybe IncludedModuleListFieldCallback)
-> m (Maybe IncludedModuleListFieldCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe IncludedModuleListFieldCallback)
-> m (Maybe IncludedModuleListFieldCallback))
-> IO (Maybe IncludedModuleListFieldCallback)
-> m (Maybe IncludedModuleListFieldCallback)
forall a b. (a -> b) -> a -> b
$ IncludedModule
-> (Ptr IncludedModule
-> IO (Maybe IncludedModuleListFieldCallback))
-> IO (Maybe IncludedModuleListFieldCallback)
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr IncludedModule
s ((Ptr IncludedModule -> IO (Maybe IncludedModuleListFieldCallback))
-> IO (Maybe IncludedModuleListFieldCallback))
-> (Ptr IncludedModule
-> IO (Maybe IncludedModuleListFieldCallback))
-> IO (Maybe IncludedModuleListFieldCallback)
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr IncludedModule
ptr -> do
FunPtr C_IncludedModuleListFieldCallback
val <- Ptr (FunPtr C_IncludedModuleListFieldCallback)
-> IO (FunPtr C_IncludedModuleListFieldCallback)
forall a. Storable a => Ptr a -> IO a
peek (Ptr IncludedModule
ptr Ptr IncludedModule
-> Int -> Ptr (FunPtr C_IncludedModuleListFieldCallback)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0) :: IO (FunPtr Pango.Callbacks.C_IncludedModuleListFieldCallback)
Maybe IncludedModuleListFieldCallback
result <- FunPtr C_IncludedModuleListFieldCallback
-> (FunPtr C_IncludedModuleListFieldCallback
-> IO IncludedModuleListFieldCallback)
-> IO (Maybe IncludedModuleListFieldCallback)
forall a b. FunPtr a -> (FunPtr a -> IO b) -> IO (Maybe b)
SP.convertFunPtrIfNonNull FunPtr C_IncludedModuleListFieldCallback
val ((FunPtr C_IncludedModuleListFieldCallback
-> IO IncludedModuleListFieldCallback)
-> IO (Maybe IncludedModuleListFieldCallback))
-> (FunPtr C_IncludedModuleListFieldCallback
-> IO IncludedModuleListFieldCallback)
-> IO (Maybe IncludedModuleListFieldCallback)
forall a b. (a -> b) -> a -> b
$ \val' :: FunPtr C_IncludedModuleListFieldCallback
val' -> do
let val'' :: IncludedModuleListFieldCallback
val'' = FunPtr C_IncludedModuleListFieldCallback
-> IncludedModuleListFieldCallback
forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_IncludedModuleListFieldCallback
-> EngineInfo -> Int32 -> m ()
Pango.Callbacks.dynamic_IncludedModuleListFieldCallback FunPtr C_IncludedModuleListFieldCallback
val'
IncludedModuleListFieldCallback
-> IO IncludedModuleListFieldCallback
forall (m :: * -> *) a. Monad m => a -> m a
return IncludedModuleListFieldCallback
val''
Maybe IncludedModuleListFieldCallback
-> IO (Maybe IncludedModuleListFieldCallback)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe IncludedModuleListFieldCallback
result
setIncludedModuleList :: MonadIO m => IncludedModule -> FunPtr Pango.Callbacks.C_IncludedModuleListFieldCallback -> m ()
setIncludedModuleList :: IncludedModule -> FunPtr C_IncludedModuleListFieldCallback -> m ()
setIncludedModuleList s :: IncludedModule
s val :: FunPtr C_IncludedModuleListFieldCallback
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ IncludedModule -> (Ptr IncludedModule -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr IncludedModule
s ((Ptr IncludedModule -> IO ()) -> IO ())
-> (Ptr IncludedModule -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr IncludedModule
ptr -> do
Ptr (FunPtr C_IncludedModuleListFieldCallback)
-> FunPtr C_IncludedModuleListFieldCallback -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr IncludedModule
ptr Ptr IncludedModule
-> Int -> Ptr (FunPtr C_IncludedModuleListFieldCallback)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0) (FunPtr C_IncludedModuleListFieldCallback
val :: FunPtr Pango.Callbacks.C_IncludedModuleListFieldCallback)
clearIncludedModuleList :: MonadIO m => IncludedModule -> m ()
clearIncludedModuleList :: IncludedModule -> m ()
clearIncludedModuleList s :: IncludedModule
s = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ IncludedModule -> (Ptr IncludedModule -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr IncludedModule
s ((Ptr IncludedModule -> IO ()) -> IO ())
-> (Ptr IncludedModule -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr IncludedModule
ptr -> do
Ptr (FunPtr C_IncludedModuleListFieldCallback)
-> FunPtr C_IncludedModuleListFieldCallback -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr IncludedModule
ptr Ptr IncludedModule
-> Int -> Ptr (FunPtr C_IncludedModuleListFieldCallback)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0) (FunPtr C_IncludedModuleListFieldCallback
forall a. FunPtr a
FP.nullFunPtr :: FunPtr Pango.Callbacks.C_IncludedModuleListFieldCallback)
#if defined(ENABLE_OVERLOADING)
data IncludedModuleListFieldInfo
instance AttrInfo IncludedModuleListFieldInfo where
type AttrBaseTypeConstraint IncludedModuleListFieldInfo = (~) IncludedModule
type AttrAllowedOps IncludedModuleListFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint IncludedModuleListFieldInfo = (~) (FunPtr Pango.Callbacks.C_IncludedModuleListFieldCallback)
type AttrTransferTypeConstraint IncludedModuleListFieldInfo = (~)Pango.Callbacks.IncludedModuleListFieldCallback
type AttrTransferType IncludedModuleListFieldInfo = (FunPtr Pango.Callbacks.C_IncludedModuleListFieldCallback)
type AttrGetType IncludedModuleListFieldInfo = Maybe Pango.Callbacks.IncludedModuleListFieldCallback
type AttrLabel IncludedModuleListFieldInfo = "list"
type AttrOrigin IncludedModuleListFieldInfo = IncludedModule
attrGet = getIncludedModuleList
attrSet = setIncludedModuleList
attrConstruct = undefined
attrClear = clearIncludedModuleList
attrTransfer _ v = do
Pango.Callbacks.mk_IncludedModuleListFieldCallback (Pango.Callbacks.wrap_IncludedModuleListFieldCallback Nothing v)
includedModule_list :: AttrLabelProxy "list"
includedModule_list = AttrLabelProxy
#endif
getIncludedModuleInit :: MonadIO m => IncludedModule -> m (Maybe Pango.Callbacks.IncludedModuleInitFieldCallback)
getIncludedModuleInit :: IncludedModule -> m (Maybe IncludedModuleInitFieldCallback)
getIncludedModuleInit s :: IncludedModule
s = IO (Maybe IncludedModuleInitFieldCallback)
-> m (Maybe IncludedModuleInitFieldCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe IncludedModuleInitFieldCallback)
-> m (Maybe IncludedModuleInitFieldCallback))
-> IO (Maybe IncludedModuleInitFieldCallback)
-> m (Maybe IncludedModuleInitFieldCallback)
forall a b. (a -> b) -> a -> b
$ IncludedModule
-> (Ptr IncludedModule
-> IO (Maybe IncludedModuleInitFieldCallback))
-> IO (Maybe IncludedModuleInitFieldCallback)
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr IncludedModule
s ((Ptr IncludedModule -> IO (Maybe IncludedModuleInitFieldCallback))
-> IO (Maybe IncludedModuleInitFieldCallback))
-> (Ptr IncludedModule
-> IO (Maybe IncludedModuleInitFieldCallback))
-> IO (Maybe IncludedModuleInitFieldCallback)
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr IncludedModule
ptr -> do
FunPtr C_IncludedModuleInitFieldCallback
val <- Ptr (FunPtr C_IncludedModuleInitFieldCallback)
-> IO (FunPtr C_IncludedModuleInitFieldCallback)
forall a. Storable a => Ptr a -> IO a
peek (Ptr IncludedModule
ptr Ptr IncludedModule
-> Int -> Ptr (FunPtr C_IncludedModuleInitFieldCallback)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8) :: IO (FunPtr Pango.Callbacks.C_IncludedModuleInitFieldCallback)
Maybe IncludedModuleInitFieldCallback
result <- FunPtr C_IncludedModuleInitFieldCallback
-> (FunPtr C_IncludedModuleInitFieldCallback
-> IO IncludedModuleInitFieldCallback)
-> IO (Maybe IncludedModuleInitFieldCallback)
forall a b. FunPtr a -> (FunPtr a -> IO b) -> IO (Maybe b)
SP.convertFunPtrIfNonNull FunPtr C_IncludedModuleInitFieldCallback
val ((FunPtr C_IncludedModuleInitFieldCallback
-> IO IncludedModuleInitFieldCallback)
-> IO (Maybe IncludedModuleInitFieldCallback))
-> (FunPtr C_IncludedModuleInitFieldCallback
-> IO IncludedModuleInitFieldCallback)
-> IO (Maybe IncludedModuleInitFieldCallback)
forall a b. (a -> b) -> a -> b
$ \val' :: FunPtr C_IncludedModuleInitFieldCallback
val' -> do
let val'' :: IncludedModuleInitFieldCallback
val'' = FunPtr C_IncludedModuleInitFieldCallback
-> IncludedModuleInitFieldCallback
forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTypeModule a) =>
FunPtr C_IncludedModuleInitFieldCallback -> a -> m ()
Pango.Callbacks.dynamic_IncludedModuleInitFieldCallback FunPtr C_IncludedModuleInitFieldCallback
val'
IncludedModuleInitFieldCallback
-> IO IncludedModuleInitFieldCallback
forall (m :: * -> *) a. Monad m => a -> m a
return IncludedModuleInitFieldCallback
val''
Maybe IncludedModuleInitFieldCallback
-> IO (Maybe IncludedModuleInitFieldCallback)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe IncludedModuleInitFieldCallback
result
setIncludedModuleInit :: MonadIO m => IncludedModule -> FunPtr Pango.Callbacks.C_IncludedModuleInitFieldCallback -> m ()
setIncludedModuleInit :: IncludedModule -> FunPtr C_IncludedModuleInitFieldCallback -> m ()
setIncludedModuleInit s :: IncludedModule
s val :: FunPtr C_IncludedModuleInitFieldCallback
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ IncludedModule -> (Ptr IncludedModule -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr IncludedModule
s ((Ptr IncludedModule -> IO ()) -> IO ())
-> (Ptr IncludedModule -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr IncludedModule
ptr -> do
Ptr (FunPtr C_IncludedModuleInitFieldCallback)
-> FunPtr C_IncludedModuleInitFieldCallback -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr IncludedModule
ptr Ptr IncludedModule
-> Int -> Ptr (FunPtr C_IncludedModuleInitFieldCallback)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8) (FunPtr C_IncludedModuleInitFieldCallback
val :: FunPtr Pango.Callbacks.C_IncludedModuleInitFieldCallback)
clearIncludedModuleInit :: MonadIO m => IncludedModule -> m ()
clearIncludedModuleInit :: IncludedModule -> m ()
clearIncludedModuleInit s :: IncludedModule
s = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ IncludedModule -> (Ptr IncludedModule -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr IncludedModule
s ((Ptr IncludedModule -> IO ()) -> IO ())
-> (Ptr IncludedModule -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr IncludedModule
ptr -> do
Ptr (FunPtr C_IncludedModuleInitFieldCallback)
-> FunPtr C_IncludedModuleInitFieldCallback -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr IncludedModule
ptr Ptr IncludedModule
-> Int -> Ptr (FunPtr C_IncludedModuleInitFieldCallback)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8) (FunPtr C_IncludedModuleInitFieldCallback
forall a. FunPtr a
FP.nullFunPtr :: FunPtr Pango.Callbacks.C_IncludedModuleInitFieldCallback)
#if defined(ENABLE_OVERLOADING)
data IncludedModuleInitFieldInfo
instance AttrInfo IncludedModuleInitFieldInfo where
type AttrBaseTypeConstraint IncludedModuleInitFieldInfo = (~) IncludedModule
type AttrAllowedOps IncludedModuleInitFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint IncludedModuleInitFieldInfo = (~) (FunPtr Pango.Callbacks.C_IncludedModuleInitFieldCallback)
type AttrTransferTypeConstraint IncludedModuleInitFieldInfo = (~)Pango.Callbacks.IncludedModuleInitFieldCallback
type AttrTransferType IncludedModuleInitFieldInfo = (FunPtr Pango.Callbacks.C_IncludedModuleInitFieldCallback)
type AttrGetType IncludedModuleInitFieldInfo = Maybe Pango.Callbacks.IncludedModuleInitFieldCallback
type AttrLabel IncludedModuleInitFieldInfo = "init"
type AttrOrigin IncludedModuleInitFieldInfo = IncludedModule
attrGet = getIncludedModuleInit
attrSet = setIncludedModuleInit
attrConstruct = undefined
attrClear = clearIncludedModuleInit
attrTransfer _ v = do
Pango.Callbacks.mk_IncludedModuleInitFieldCallback (Pango.Callbacks.wrap_IncludedModuleInitFieldCallback Nothing v)
includedModule_init :: AttrLabelProxy "init"
includedModule_init = AttrLabelProxy
#endif
getIncludedModuleExit :: MonadIO m => IncludedModule -> m (Maybe Pango.Callbacks.IncludedModuleExitFieldCallback)
getIncludedModuleExit :: IncludedModule -> m (Maybe (IO ()))
getIncludedModuleExit s :: IncludedModule
s = IO (Maybe (IO ())) -> m (Maybe (IO ()))
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe (IO ())) -> m (Maybe (IO ())))
-> IO (Maybe (IO ())) -> m (Maybe (IO ()))
forall a b. (a -> b) -> a -> b
$ IncludedModule
-> (Ptr IncludedModule -> IO (Maybe (IO ()))) -> IO (Maybe (IO ()))
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr IncludedModule
s ((Ptr IncludedModule -> IO (Maybe (IO ()))) -> IO (Maybe (IO ())))
-> (Ptr IncludedModule -> IO (Maybe (IO ()))) -> IO (Maybe (IO ()))
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr IncludedModule
ptr -> do
FunPtr (IO ())
val <- Ptr (FunPtr (IO ())) -> IO (FunPtr (IO ()))
forall a. Storable a => Ptr a -> IO a
peek (Ptr IncludedModule
ptr Ptr IncludedModule -> Int -> Ptr (FunPtr (IO ()))
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16) :: IO (FunPtr Pango.Callbacks.C_IncludedModuleExitFieldCallback)
Maybe (IO ())
result <- FunPtr (IO ())
-> (FunPtr (IO ()) -> IO (IO ())) -> IO (Maybe (IO ()))
forall a b. FunPtr a -> (FunPtr a -> IO b) -> IO (Maybe b)
SP.convertFunPtrIfNonNull FunPtr (IO ())
val ((FunPtr (IO ()) -> IO (IO ())) -> IO (Maybe (IO ())))
-> (FunPtr (IO ()) -> IO (IO ())) -> IO (Maybe (IO ()))
forall a b. (a -> b) -> a -> b
$ \val' :: FunPtr (IO ())
val' -> do
let val'' :: IO ()
val'' = FunPtr (IO ()) -> IO ()
forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr (IO ()) -> m ()
Pango.Callbacks.dynamic_IncludedModuleExitFieldCallback FunPtr (IO ())
val'
IO () -> IO (IO ())
forall (m :: * -> *) a. Monad m => a -> m a
return IO ()
val''
Maybe (IO ()) -> IO (Maybe (IO ()))
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe (IO ())
result
setIncludedModuleExit :: MonadIO m => IncludedModule -> FunPtr Pango.Callbacks.C_IncludedModuleExitFieldCallback -> m ()
setIncludedModuleExit :: IncludedModule -> FunPtr (IO ()) -> m ()
setIncludedModuleExit s :: IncludedModule
s val :: FunPtr (IO ())
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ IncludedModule -> (Ptr IncludedModule -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr IncludedModule
s ((Ptr IncludedModule -> IO ()) -> IO ())
-> (Ptr IncludedModule -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr IncludedModule
ptr -> do
Ptr (FunPtr (IO ())) -> FunPtr (IO ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr IncludedModule
ptr Ptr IncludedModule -> Int -> Ptr (FunPtr (IO ()))
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16) (FunPtr (IO ())
val :: FunPtr Pango.Callbacks.C_IncludedModuleExitFieldCallback)
clearIncludedModuleExit :: MonadIO m => IncludedModule -> m ()
clearIncludedModuleExit :: IncludedModule -> m ()
clearIncludedModuleExit s :: IncludedModule
s = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ IncludedModule -> (Ptr IncludedModule -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr IncludedModule
s ((Ptr IncludedModule -> IO ()) -> IO ())
-> (Ptr IncludedModule -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr IncludedModule
ptr -> do
Ptr (FunPtr (IO ())) -> FunPtr (IO ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr IncludedModule
ptr Ptr IncludedModule -> Int -> Ptr (FunPtr (IO ()))
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16) (FunPtr (IO ())
forall a. FunPtr a
FP.nullFunPtr :: FunPtr Pango.Callbacks.C_IncludedModuleExitFieldCallback)
#if defined(ENABLE_OVERLOADING)
data IncludedModuleExitFieldInfo
instance AttrInfo IncludedModuleExitFieldInfo where
type AttrBaseTypeConstraint IncludedModuleExitFieldInfo = (~) IncludedModule
type AttrAllowedOps IncludedModuleExitFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint IncludedModuleExitFieldInfo = (~) (FunPtr Pango.Callbacks.C_IncludedModuleExitFieldCallback)
type AttrTransferTypeConstraint IncludedModuleExitFieldInfo = (~)Pango.Callbacks.IncludedModuleExitFieldCallback
type AttrTransferType IncludedModuleExitFieldInfo = (FunPtr Pango.Callbacks.C_IncludedModuleExitFieldCallback)
type AttrGetType IncludedModuleExitFieldInfo = Maybe Pango.Callbacks.IncludedModuleExitFieldCallback
type AttrLabel IncludedModuleExitFieldInfo = "exit"
type AttrOrigin IncludedModuleExitFieldInfo = IncludedModule
attrGet = getIncludedModuleExit
attrSet = setIncludedModuleExit
attrConstruct = undefined
attrClear = clearIncludedModuleExit
attrTransfer _ v = do
Pango.Callbacks.mk_IncludedModuleExitFieldCallback (Pango.Callbacks.wrap_IncludedModuleExitFieldCallback Nothing v)
includedModule_exit :: AttrLabelProxy "exit"
includedModule_exit = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList IncludedModule
type instance O.AttributeList IncludedModule = IncludedModuleAttributeList
type IncludedModuleAttributeList = ('[ '("list", IncludedModuleListFieldInfo), '("init", IncludedModuleInitFieldInfo), '("exit", IncludedModuleExitFieldInfo)] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING)
type family ResolveIncludedModuleMethod (t :: Symbol) (o :: *) :: * where
ResolveIncludedModuleMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveIncludedModuleMethod t IncludedModule, O.MethodInfo info IncludedModule p) => OL.IsLabel t (IncludedModule -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#endif