#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \
&& !defined(__HADDOCK_VERSION__))
module GI.GObject.Structs.InterfaceInfo
(
InterfaceInfo(..) ,
newZeroInterfaceInfo ,
noInterfaceInfo ,
clearInterfaceInfoInterfaceData ,
getInterfaceInfoInterfaceData ,
#if ENABLE_OVERLOADING
interfaceInfo_interfaceData ,
#endif
setInterfaceInfoInterfaceData ,
clearInterfaceInfoInterfaceFinalize ,
getInterfaceInfoInterfaceFinalize ,
#if ENABLE_OVERLOADING
interfaceInfo_interfaceFinalize ,
#endif
setInterfaceInfoInterfaceFinalize ,
clearInterfaceInfoInterfaceInit ,
getInterfaceInfoInterfaceInit ,
#if ENABLE_OVERLOADING
interfaceInfo_interfaceInit ,
#endif
setInterfaceInfoInterfaceInit ,
) 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.Callbacks as GObject.Callbacks
newtype InterfaceInfo = InterfaceInfo (ManagedPtr InterfaceInfo)
instance WrappedPtr InterfaceInfo where
wrappedPtrCalloc = callocBytes 24
wrappedPtrCopy = \p -> withManagedPtr p (copyBytes 24 >=> wrapPtr InterfaceInfo)
wrappedPtrFree = Just ptr_to_g_free
newZeroInterfaceInfo :: MonadIO m => m InterfaceInfo
newZeroInterfaceInfo = liftIO $ wrappedPtrCalloc >>= wrapPtr InterfaceInfo
instance tag ~ 'AttrSet => Constructible InterfaceInfo tag where
new _ attrs = do
o <- newZeroInterfaceInfo
GI.Attributes.set o attrs
return o
noInterfaceInfo :: Maybe InterfaceInfo
noInterfaceInfo = Nothing
getInterfaceInfoInterfaceInit :: MonadIO m => InterfaceInfo -> m (Maybe GObject.Callbacks.InterfaceInitFunc)
getInterfaceInfoInterfaceInit s = liftIO $ withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 0) :: IO (FunPtr GObject.Callbacks.C_InterfaceInitFunc)
result <- SP.convertFunPtrIfNonNull val $ \val' -> do
let val'' = GObject.Callbacks.dynamic_InterfaceInitFunc val'
return val''
return result
setInterfaceInfoInterfaceInit :: MonadIO m => InterfaceInfo -> FunPtr GObject.Callbacks.C_InterfaceInitFunc -> m ()
setInterfaceInfoInterfaceInit s val = liftIO $ withManagedPtr s $ \ptr -> do
poke (ptr `plusPtr` 0) (val :: FunPtr GObject.Callbacks.C_InterfaceInitFunc)
clearInterfaceInfoInterfaceInit :: MonadIO m => InterfaceInfo -> m ()
clearInterfaceInfoInterfaceInit s = liftIO $ withManagedPtr s $ \ptr -> do
poke (ptr `plusPtr` 0) (FP.nullFunPtr :: FunPtr GObject.Callbacks.C_InterfaceInitFunc)
#if ENABLE_OVERLOADING
data InterfaceInfoInterfaceInitFieldInfo
instance AttrInfo InterfaceInfoInterfaceInitFieldInfo where
type AttrAllowedOps InterfaceInfoInterfaceInitFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint InterfaceInfoInterfaceInitFieldInfo = (~) (FunPtr GObject.Callbacks.C_InterfaceInitFunc)
type AttrBaseTypeConstraint InterfaceInfoInterfaceInitFieldInfo = (~) InterfaceInfo
type AttrGetType InterfaceInfoInterfaceInitFieldInfo = Maybe GObject.Callbacks.InterfaceInitFunc
type AttrLabel InterfaceInfoInterfaceInitFieldInfo = "interface_init"
type AttrOrigin InterfaceInfoInterfaceInitFieldInfo = InterfaceInfo
attrGet _ = getInterfaceInfoInterfaceInit
attrSet _ = setInterfaceInfoInterfaceInit
attrConstruct = undefined
attrClear _ = clearInterfaceInfoInterfaceInit
interfaceInfo_interfaceInit :: AttrLabelProxy "interfaceInit"
interfaceInfo_interfaceInit = AttrLabelProxy
#endif
getInterfaceInfoInterfaceFinalize :: MonadIO m => InterfaceInfo -> m (Maybe GObject.Callbacks.InterfaceFinalizeFunc)
getInterfaceInfoInterfaceFinalize s = liftIO $ withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 8) :: IO (FunPtr GObject.Callbacks.C_InterfaceFinalizeFunc)
result <- SP.convertFunPtrIfNonNull val $ \val' -> do
let val'' = GObject.Callbacks.dynamic_InterfaceFinalizeFunc val'
return val''
return result
setInterfaceInfoInterfaceFinalize :: MonadIO m => InterfaceInfo -> FunPtr GObject.Callbacks.C_InterfaceFinalizeFunc -> m ()
setInterfaceInfoInterfaceFinalize s val = liftIO $ withManagedPtr s $ \ptr -> do
poke (ptr `plusPtr` 8) (val :: FunPtr GObject.Callbacks.C_InterfaceFinalizeFunc)
clearInterfaceInfoInterfaceFinalize :: MonadIO m => InterfaceInfo -> m ()
clearInterfaceInfoInterfaceFinalize s = liftIO $ withManagedPtr s $ \ptr -> do
poke (ptr `plusPtr` 8) (FP.nullFunPtr :: FunPtr GObject.Callbacks.C_InterfaceFinalizeFunc)
#if ENABLE_OVERLOADING
data InterfaceInfoInterfaceFinalizeFieldInfo
instance AttrInfo InterfaceInfoInterfaceFinalizeFieldInfo where
type AttrAllowedOps InterfaceInfoInterfaceFinalizeFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint InterfaceInfoInterfaceFinalizeFieldInfo = (~) (FunPtr GObject.Callbacks.C_InterfaceFinalizeFunc)
type AttrBaseTypeConstraint InterfaceInfoInterfaceFinalizeFieldInfo = (~) InterfaceInfo
type AttrGetType InterfaceInfoInterfaceFinalizeFieldInfo = Maybe GObject.Callbacks.InterfaceFinalizeFunc
type AttrLabel InterfaceInfoInterfaceFinalizeFieldInfo = "interface_finalize"
type AttrOrigin InterfaceInfoInterfaceFinalizeFieldInfo = InterfaceInfo
attrGet _ = getInterfaceInfoInterfaceFinalize
attrSet _ = setInterfaceInfoInterfaceFinalize
attrConstruct = undefined
attrClear _ = clearInterfaceInfoInterfaceFinalize
interfaceInfo_interfaceFinalize :: AttrLabelProxy "interfaceFinalize"
interfaceInfo_interfaceFinalize = AttrLabelProxy
#endif
getInterfaceInfoInterfaceData :: MonadIO m => InterfaceInfo -> m (Ptr ())
getInterfaceInfoInterfaceData s = liftIO $ withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 16) :: IO (Ptr ())
return val
setInterfaceInfoInterfaceData :: MonadIO m => InterfaceInfo -> Ptr () -> m ()
setInterfaceInfoInterfaceData s val = liftIO $ withManagedPtr s $ \ptr -> do
poke (ptr `plusPtr` 16) (val :: Ptr ())
clearInterfaceInfoInterfaceData :: MonadIO m => InterfaceInfo -> m ()
clearInterfaceInfoInterfaceData s = liftIO $ withManagedPtr s $ \ptr -> do
poke (ptr `plusPtr` 16) (FP.nullPtr :: Ptr ())
#if ENABLE_OVERLOADING
data InterfaceInfoInterfaceDataFieldInfo
instance AttrInfo InterfaceInfoInterfaceDataFieldInfo where
type AttrAllowedOps InterfaceInfoInterfaceDataFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint InterfaceInfoInterfaceDataFieldInfo = (~) (Ptr ())
type AttrBaseTypeConstraint InterfaceInfoInterfaceDataFieldInfo = (~) InterfaceInfo
type AttrGetType InterfaceInfoInterfaceDataFieldInfo = Ptr ()
type AttrLabel InterfaceInfoInterfaceDataFieldInfo = "interface_data"
type AttrOrigin InterfaceInfoInterfaceDataFieldInfo = InterfaceInfo
attrGet _ = getInterfaceInfoInterfaceData
attrSet _ = setInterfaceInfoInterfaceData
attrConstruct = undefined
attrClear _ = clearInterfaceInfoInterfaceData
interfaceInfo_interfaceData :: AttrLabelProxy "interfaceData"
interfaceInfo_interfaceData = AttrLabelProxy
#endif
#if ENABLE_OVERLOADING
instance O.HasAttributeList InterfaceInfo
type instance O.AttributeList InterfaceInfo = InterfaceInfoAttributeList
type InterfaceInfoAttributeList = ('[ '("interfaceInit", InterfaceInfoInterfaceInitFieldInfo), '("interfaceFinalize", InterfaceInfoInterfaceFinalizeFieldInfo), '("interfaceData", InterfaceInfoInterfaceDataFieldInfo)] :: [(Symbol, *)])
#endif
#if ENABLE_OVERLOADING
type family ResolveInterfaceInfoMethod (t :: Symbol) (o :: *) :: * where
ResolveInterfaceInfoMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveInterfaceInfoMethod t InterfaceInfo, O.MethodInfo info InterfaceInfo p) => OL.IsLabel t (InterfaceInfo -> 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