#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \
&& !defined(__HADDOCK_VERSION__))
module GI.Pango.Structs.IncludedModule
(
IncludedModule(..) ,
newZeroIncludedModule ,
noIncludedModule ,
clearIncludedModuleExit ,
getIncludedModuleExit ,
#if ENABLE_OVERLOADING
includedModule_exit ,
#endif
setIncludedModuleExit ,
clearIncludedModuleInit ,
getIncludedModuleInit ,
#if ENABLE_OVERLOADING
includedModule_init ,
#endif
setIncludedModuleInit ,
clearIncludedModuleList ,
getIncludedModuleList ,
#if 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.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)
instance WrappedPtr IncludedModule where
wrappedPtrCalloc = callocBytes 32
wrappedPtrCopy = \p -> withManagedPtr p (copyBytes 32 >=> wrapPtr IncludedModule)
wrappedPtrFree = Just ptr_to_g_free
newZeroIncludedModule :: MonadIO m => m IncludedModule
newZeroIncludedModule = liftIO $ wrappedPtrCalloc >>= wrapPtr IncludedModule
instance tag ~ 'AttrSet => Constructible IncludedModule tag where
new _ attrs = do
o <- newZeroIncludedModule
GI.Attributes.set o attrs
return o
noIncludedModule :: Maybe IncludedModule
noIncludedModule = Nothing
getIncludedModuleList :: MonadIO m => IncludedModule -> m (Maybe Pango.Callbacks.IncludedModuleListFieldCallback)
getIncludedModuleList s = liftIO $ withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 0) :: IO (FunPtr Pango.Callbacks.C_IncludedModuleListFieldCallback)
result <- SP.convertFunPtrIfNonNull val $ \val' -> do
let val'' = Pango.Callbacks.dynamic_IncludedModuleListFieldCallback val'
return val''
return result
setIncludedModuleList :: MonadIO m => IncludedModule -> FunPtr Pango.Callbacks.C_IncludedModuleListFieldCallback -> m ()
setIncludedModuleList s val = liftIO $ withManagedPtr s $ \ptr -> do
poke (ptr `plusPtr` 0) (val :: FunPtr Pango.Callbacks.C_IncludedModuleListFieldCallback)
clearIncludedModuleList :: MonadIO m => IncludedModule -> m ()
clearIncludedModuleList s = liftIO $ withManagedPtr s $ \ptr -> do
poke (ptr `plusPtr` 0) (FP.nullFunPtr :: FunPtr Pango.Callbacks.C_IncludedModuleListFieldCallback)
#if ENABLE_OVERLOADING
data IncludedModuleListFieldInfo
instance AttrInfo IncludedModuleListFieldInfo where
type AttrAllowedOps IncludedModuleListFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint IncludedModuleListFieldInfo = (~) (FunPtr Pango.Callbacks.C_IncludedModuleListFieldCallback)
type AttrBaseTypeConstraint IncludedModuleListFieldInfo = (~) IncludedModule
type AttrGetType IncludedModuleListFieldInfo = Maybe Pango.Callbacks.IncludedModuleListFieldCallback
type AttrLabel IncludedModuleListFieldInfo = "list"
type AttrOrigin IncludedModuleListFieldInfo = IncludedModule
attrGet _ = getIncludedModuleList
attrSet _ = setIncludedModuleList
attrConstruct = undefined
attrClear _ = clearIncludedModuleList
includedModule_list :: AttrLabelProxy "list"
includedModule_list = AttrLabelProxy
#endif
getIncludedModuleInit :: MonadIO m => IncludedModule -> m (Maybe Pango.Callbacks.IncludedModuleInitFieldCallback)
getIncludedModuleInit s = liftIO $ withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 8) :: IO (FunPtr Pango.Callbacks.C_IncludedModuleInitFieldCallback)
result <- SP.convertFunPtrIfNonNull val $ \val' -> do
let val'' = Pango.Callbacks.dynamic_IncludedModuleInitFieldCallback val'
return val''
return result
setIncludedModuleInit :: MonadIO m => IncludedModule -> FunPtr Pango.Callbacks.C_IncludedModuleInitFieldCallback -> m ()
setIncludedModuleInit s val = liftIO $ withManagedPtr s $ \ptr -> do
poke (ptr `plusPtr` 8) (val :: FunPtr Pango.Callbacks.C_IncludedModuleInitFieldCallback)
clearIncludedModuleInit :: MonadIO m => IncludedModule -> m ()
clearIncludedModuleInit s = liftIO $ withManagedPtr s $ \ptr -> do
poke (ptr `plusPtr` 8) (FP.nullFunPtr :: FunPtr Pango.Callbacks.C_IncludedModuleInitFieldCallback)
#if ENABLE_OVERLOADING
data IncludedModuleInitFieldInfo
instance AttrInfo IncludedModuleInitFieldInfo where
type AttrAllowedOps IncludedModuleInitFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint IncludedModuleInitFieldInfo = (~) (FunPtr Pango.Callbacks.C_IncludedModuleInitFieldCallback)
type AttrBaseTypeConstraint IncludedModuleInitFieldInfo = (~) IncludedModule
type AttrGetType IncludedModuleInitFieldInfo = Maybe Pango.Callbacks.IncludedModuleInitFieldCallback
type AttrLabel IncludedModuleInitFieldInfo = "init"
type AttrOrigin IncludedModuleInitFieldInfo = IncludedModule
attrGet _ = getIncludedModuleInit
attrSet _ = setIncludedModuleInit
attrConstruct = undefined
attrClear _ = clearIncludedModuleInit
includedModule_init :: AttrLabelProxy "init"
includedModule_init = AttrLabelProxy
#endif
getIncludedModuleExit :: MonadIO m => IncludedModule -> m (Maybe Pango.Callbacks.IncludedModuleExitFieldCallback)
getIncludedModuleExit s = liftIO $ withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 16) :: IO (FunPtr Pango.Callbacks.C_IncludedModuleExitFieldCallback)
result <- SP.convertFunPtrIfNonNull val $ \val' -> do
let val'' = Pango.Callbacks.dynamic_IncludedModuleExitFieldCallback val'
return val''
return result
setIncludedModuleExit :: MonadIO m => IncludedModule -> FunPtr Pango.Callbacks.C_IncludedModuleExitFieldCallback -> m ()
setIncludedModuleExit s val = liftIO $ withManagedPtr s $ \ptr -> do
poke (ptr `plusPtr` 16) (val :: FunPtr Pango.Callbacks.C_IncludedModuleExitFieldCallback)
clearIncludedModuleExit :: MonadIO m => IncludedModule -> m ()
clearIncludedModuleExit s = liftIO $ withManagedPtr s $ \ptr -> do
poke (ptr `plusPtr` 16) (FP.nullFunPtr :: FunPtr Pango.Callbacks.C_IncludedModuleExitFieldCallback)
#if ENABLE_OVERLOADING
data IncludedModuleExitFieldInfo
instance AttrInfo IncludedModuleExitFieldInfo where
type AttrAllowedOps IncludedModuleExitFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint IncludedModuleExitFieldInfo = (~) (FunPtr Pango.Callbacks.C_IncludedModuleExitFieldCallback)
type AttrBaseTypeConstraint IncludedModuleExitFieldInfo = (~) IncludedModule
type AttrGetType IncludedModuleExitFieldInfo = Maybe Pango.Callbacks.IncludedModuleExitFieldCallback
type AttrLabel IncludedModuleExitFieldInfo = "exit"
type AttrOrigin IncludedModuleExitFieldInfo = IncludedModule
attrGet _ = getIncludedModuleExit
attrSet _ = setIncludedModuleExit
attrConstruct = undefined
attrClear _ = clearIncludedModuleExit
includedModule_exit :: AttrLabelProxy "exit"
includedModule_exit = AttrLabelProxy
#endif
#if ENABLE_OVERLOADING
instance O.HasAttributeList IncludedModule
type instance O.AttributeList IncludedModule = IncludedModuleAttributeList
type IncludedModuleAttributeList = ('[ '("list", IncludedModuleListFieldInfo), '("init", IncludedModuleInitFieldInfo), '("exit", IncludedModuleExitFieldInfo)] :: [(Symbol, *)])
#endif
#if 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 (O.MethodProxy :: O.MethodProxy info)
#else
fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#endif
#endif