gi-gobject-2.0.18: GI/GObject/Structs/ParamSpecTypeInfo.hs
{- |
Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte
License : LGPL-2.1
Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)
This structure is used to provide the type system with the information
required to initialize and destruct (finalize) a parameter\'s class and
instances thereof.
The initialized structure is passed to the 'GI.GObject.Functions.paramTypeRegisterStatic'
The type system will perform a deep copy of this structure, so its memory
does not need to be persistent across invocation of
'GI.GObject.Functions.paramTypeRegisterStatic'.
-}
#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \
&& !defined(__HADDOCK_VERSION__))
module GI.GObject.Structs.ParamSpecTypeInfo
(
-- * Exported types
ParamSpecTypeInfo(..) ,
newZeroParamSpecTypeInfo ,
noParamSpecTypeInfo ,
-- * Properties
-- ** finalize #attr:finalize#
{- | /No description available in the introspection data./
-}
clearParamSpecTypeInfoFinalize ,
getParamSpecTypeInfoFinalize ,
#if ENABLE_OVERLOADING
paramSpecTypeInfo_finalize ,
#endif
setParamSpecTypeInfoFinalize ,
-- ** instanceInit #attr:instanceInit#
{- | /No description available in the introspection data./
-}
clearParamSpecTypeInfoInstanceInit ,
getParamSpecTypeInfoInstanceInit ,
#if ENABLE_OVERLOADING
paramSpecTypeInfo_instanceInit ,
#endif
setParamSpecTypeInfoInstanceInit ,
-- ** instanceSize #attr:instanceSize#
{- | Size of the instance (object) structure.
-}
getParamSpecTypeInfoInstanceSize ,
#if ENABLE_OVERLOADING
paramSpecTypeInfo_instanceSize ,
#endif
setParamSpecTypeInfoInstanceSize ,
-- ** nPreallocs #attr:nPreallocs#
{- | Prior to GLib 2.10, it specified the number of pre-allocated (cached) instances to reserve memory for (0 indicates no caching). Since GLib 2.10, it is ignored, since instances are allocated with the [slice allocator][glib-Memory-Slices] now.
-}
getParamSpecTypeInfoNPreallocs ,
#if ENABLE_OVERLOADING
paramSpecTypeInfo_nPreallocs ,
#endif
setParamSpecTypeInfoNPreallocs ,
-- ** valueSetDefault #attr:valueSetDefault#
{- | /No description available in the introspection data./
-}
clearParamSpecTypeInfoValueSetDefault ,
getParamSpecTypeInfoValueSetDefault ,
#if ENABLE_OVERLOADING
paramSpecTypeInfo_valueSetDefault ,
#endif
setParamSpecTypeInfoValueSetDefault ,
-- ** valueType #attr:valueType#
{- | The 'GType' of values conforming to this 'GI.GObject.Objects.ParamSpec.ParamSpec'
-}
getParamSpecTypeInfoValueType ,
#if ENABLE_OVERLOADING
paramSpecTypeInfo_valueType ,
#endif
setParamSpecTypeInfoValueType ,
-- ** valueValidate #attr:valueValidate#
{- | /No description available in the introspection data./
-}
clearParamSpecTypeInfoValueValidate ,
getParamSpecTypeInfoValueValidate ,
#if ENABLE_OVERLOADING
paramSpecTypeInfo_valueValidate ,
#endif
setParamSpecTypeInfoValueValidate ,
-- ** valuesCmp #attr:valuesCmp#
{- | /No description available in the introspection data./
-}
clearParamSpecTypeInfoValuesCmp ,
getParamSpecTypeInfoValuesCmp ,
#if ENABLE_OVERLOADING
paramSpecTypeInfo_valuesCmp ,
#endif
setParamSpecTypeInfoValuesCmp ,
) 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
-- | Memory-managed wrapper type.
newtype ParamSpecTypeInfo = ParamSpecTypeInfo (ManagedPtr ParamSpecTypeInfo)
instance WrappedPtr ParamSpecTypeInfo where
wrappedPtrCalloc = callocBytes 56
wrappedPtrCopy = \p -> withManagedPtr p (copyBytes 56 >=> wrapPtr ParamSpecTypeInfo)
wrappedPtrFree = Just ptr_to_g_free
-- | Construct a `ParamSpecTypeInfo` struct initialized to zero.
newZeroParamSpecTypeInfo :: MonadIO m => m ParamSpecTypeInfo
newZeroParamSpecTypeInfo = liftIO $ wrappedPtrCalloc >>= wrapPtr ParamSpecTypeInfo
instance tag ~ 'AttrSet => Constructible ParamSpecTypeInfo tag where
new _ attrs = do
o <- newZeroParamSpecTypeInfo
GI.Attributes.set o attrs
return o
-- | A convenience alias for `Nothing` :: `Maybe` `ParamSpecTypeInfo`.
noParamSpecTypeInfo :: Maybe ParamSpecTypeInfo
noParamSpecTypeInfo = Nothing
{- |
Get the value of the “@instance_size@” field.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
@
'Data.GI.Base.Attributes.get' paramSpecTypeInfo #instanceSize
@
-}
getParamSpecTypeInfoInstanceSize :: MonadIO m => ParamSpecTypeInfo -> m Word16
getParamSpecTypeInfoInstanceSize s = liftIO $ withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 0) :: IO Word16
return val
{- |
Set the value of the “@instance_size@” field.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
@
'Data.GI.Base.Attributes.set' paramSpecTypeInfo [ #instanceSize 'Data.GI.Base.Attributes.:=' value ]
@
-}
setParamSpecTypeInfoInstanceSize :: MonadIO m => ParamSpecTypeInfo -> Word16 -> m ()
setParamSpecTypeInfoInstanceSize s val = liftIO $ withManagedPtr s $ \ptr -> do
poke (ptr `plusPtr` 0) (val :: Word16)
#if ENABLE_OVERLOADING
data ParamSpecTypeInfoInstanceSizeFieldInfo
instance AttrInfo ParamSpecTypeInfoInstanceSizeFieldInfo where
type AttrAllowedOps ParamSpecTypeInfoInstanceSizeFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint ParamSpecTypeInfoInstanceSizeFieldInfo = (~) Word16
type AttrBaseTypeConstraint ParamSpecTypeInfoInstanceSizeFieldInfo = (~) ParamSpecTypeInfo
type AttrGetType ParamSpecTypeInfoInstanceSizeFieldInfo = Word16
type AttrLabel ParamSpecTypeInfoInstanceSizeFieldInfo = "instance_size"
type AttrOrigin ParamSpecTypeInfoInstanceSizeFieldInfo = ParamSpecTypeInfo
attrGet _ = getParamSpecTypeInfoInstanceSize
attrSet _ = setParamSpecTypeInfoInstanceSize
attrConstruct = undefined
attrClear _ = undefined
paramSpecTypeInfo_instanceSize :: AttrLabelProxy "instanceSize"
paramSpecTypeInfo_instanceSize = AttrLabelProxy
#endif
{- |
Get the value of the “@n_preallocs@” field.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
@
'Data.GI.Base.Attributes.get' paramSpecTypeInfo #nPreallocs
@
-}
getParamSpecTypeInfoNPreallocs :: MonadIO m => ParamSpecTypeInfo -> m Word16
getParamSpecTypeInfoNPreallocs s = liftIO $ withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 2) :: IO Word16
return val
{- |
Set the value of the “@n_preallocs@” field.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
@
'Data.GI.Base.Attributes.set' paramSpecTypeInfo [ #nPreallocs 'Data.GI.Base.Attributes.:=' value ]
@
-}
setParamSpecTypeInfoNPreallocs :: MonadIO m => ParamSpecTypeInfo -> Word16 -> m ()
setParamSpecTypeInfoNPreallocs s val = liftIO $ withManagedPtr s $ \ptr -> do
poke (ptr `plusPtr` 2) (val :: Word16)
#if ENABLE_OVERLOADING
data ParamSpecTypeInfoNPreallocsFieldInfo
instance AttrInfo ParamSpecTypeInfoNPreallocsFieldInfo where
type AttrAllowedOps ParamSpecTypeInfoNPreallocsFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint ParamSpecTypeInfoNPreallocsFieldInfo = (~) Word16
type AttrBaseTypeConstraint ParamSpecTypeInfoNPreallocsFieldInfo = (~) ParamSpecTypeInfo
type AttrGetType ParamSpecTypeInfoNPreallocsFieldInfo = Word16
type AttrLabel ParamSpecTypeInfoNPreallocsFieldInfo = "n_preallocs"
type AttrOrigin ParamSpecTypeInfoNPreallocsFieldInfo = ParamSpecTypeInfo
attrGet _ = getParamSpecTypeInfoNPreallocs
attrSet _ = setParamSpecTypeInfoNPreallocs
attrConstruct = undefined
attrClear _ = undefined
paramSpecTypeInfo_nPreallocs :: AttrLabelProxy "nPreallocs"
paramSpecTypeInfo_nPreallocs = AttrLabelProxy
#endif
{- |
Get the value of the “@instance_init@” field.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
@
'Data.GI.Base.Attributes.get' paramSpecTypeInfo #instanceInit
@
-}
getParamSpecTypeInfoInstanceInit :: MonadIO m => ParamSpecTypeInfo -> m (Maybe GObject.Callbacks.ParamSpecTypeInfoInstanceInitFieldCallback)
getParamSpecTypeInfoInstanceInit s = liftIO $ withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 8) :: IO (FunPtr GObject.Callbacks.C_ParamSpecTypeInfoInstanceInitFieldCallback)
result <- SP.convertFunPtrIfNonNull val $ \val' -> do
let val'' = GObject.Callbacks.dynamic_ParamSpecTypeInfoInstanceInitFieldCallback val'
return val''
return result
{- |
Set the value of the “@instance_init@” field.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
@
'Data.GI.Base.Attributes.set' paramSpecTypeInfo [ #instanceInit 'Data.GI.Base.Attributes.:=' value ]
@
-}
setParamSpecTypeInfoInstanceInit :: MonadIO m => ParamSpecTypeInfo -> FunPtr GObject.Callbacks.C_ParamSpecTypeInfoInstanceInitFieldCallback -> m ()
setParamSpecTypeInfoInstanceInit s val = liftIO $ withManagedPtr s $ \ptr -> do
poke (ptr `plusPtr` 8) (val :: FunPtr GObject.Callbacks.C_ParamSpecTypeInfoInstanceInitFieldCallback)
{- |
Set the value of the “@instance_init@” field to `Nothing`.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
@
'Data.GI.Base.Attributes.clear' #instanceInit
@
-}
clearParamSpecTypeInfoInstanceInit :: MonadIO m => ParamSpecTypeInfo -> m ()
clearParamSpecTypeInfoInstanceInit s = liftIO $ withManagedPtr s $ \ptr -> do
poke (ptr `plusPtr` 8) (FP.nullFunPtr :: FunPtr GObject.Callbacks.C_ParamSpecTypeInfoInstanceInitFieldCallback)
#if ENABLE_OVERLOADING
data ParamSpecTypeInfoInstanceInitFieldInfo
instance AttrInfo ParamSpecTypeInfoInstanceInitFieldInfo where
type AttrAllowedOps ParamSpecTypeInfoInstanceInitFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint ParamSpecTypeInfoInstanceInitFieldInfo = (~) (FunPtr GObject.Callbacks.C_ParamSpecTypeInfoInstanceInitFieldCallback)
type AttrBaseTypeConstraint ParamSpecTypeInfoInstanceInitFieldInfo = (~) ParamSpecTypeInfo
type AttrGetType ParamSpecTypeInfoInstanceInitFieldInfo = Maybe GObject.Callbacks.ParamSpecTypeInfoInstanceInitFieldCallback
type AttrLabel ParamSpecTypeInfoInstanceInitFieldInfo = "instance_init"
type AttrOrigin ParamSpecTypeInfoInstanceInitFieldInfo = ParamSpecTypeInfo
attrGet _ = getParamSpecTypeInfoInstanceInit
attrSet _ = setParamSpecTypeInfoInstanceInit
attrConstruct = undefined
attrClear _ = clearParamSpecTypeInfoInstanceInit
paramSpecTypeInfo_instanceInit :: AttrLabelProxy "instanceInit"
paramSpecTypeInfo_instanceInit = AttrLabelProxy
#endif
{- |
Get the value of the “@value_type@” field.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
@
'Data.GI.Base.Attributes.get' paramSpecTypeInfo #valueType
@
-}
getParamSpecTypeInfoValueType :: MonadIO m => ParamSpecTypeInfo -> m GType
getParamSpecTypeInfoValueType s = liftIO $ withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 16) :: IO CGType
let val' = GType val
return val'
{- |
Set the value of the “@value_type@” field.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
@
'Data.GI.Base.Attributes.set' paramSpecTypeInfo [ #valueType 'Data.GI.Base.Attributes.:=' value ]
@
-}
setParamSpecTypeInfoValueType :: MonadIO m => ParamSpecTypeInfo -> GType -> m ()
setParamSpecTypeInfoValueType s val = liftIO $ withManagedPtr s $ \ptr -> do
let val' = gtypeToCGType val
poke (ptr `plusPtr` 16) (val' :: CGType)
#if ENABLE_OVERLOADING
data ParamSpecTypeInfoValueTypeFieldInfo
instance AttrInfo ParamSpecTypeInfoValueTypeFieldInfo where
type AttrAllowedOps ParamSpecTypeInfoValueTypeFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint ParamSpecTypeInfoValueTypeFieldInfo = (~) GType
type AttrBaseTypeConstraint ParamSpecTypeInfoValueTypeFieldInfo = (~) ParamSpecTypeInfo
type AttrGetType ParamSpecTypeInfoValueTypeFieldInfo = GType
type AttrLabel ParamSpecTypeInfoValueTypeFieldInfo = "value_type"
type AttrOrigin ParamSpecTypeInfoValueTypeFieldInfo = ParamSpecTypeInfo
attrGet _ = getParamSpecTypeInfoValueType
attrSet _ = setParamSpecTypeInfoValueType
attrConstruct = undefined
attrClear _ = undefined
paramSpecTypeInfo_valueType :: AttrLabelProxy "valueType"
paramSpecTypeInfo_valueType = AttrLabelProxy
#endif
{- |
Get the value of the “@finalize@” field.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
@
'Data.GI.Base.Attributes.get' paramSpecTypeInfo #finalize
@
-}
getParamSpecTypeInfoFinalize :: MonadIO m => ParamSpecTypeInfo -> m (Maybe GObject.Callbacks.ParamSpecTypeInfoFinalizeFieldCallback)
getParamSpecTypeInfoFinalize s = liftIO $ withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 24) :: IO (FunPtr GObject.Callbacks.C_ParamSpecTypeInfoFinalizeFieldCallback)
result <- SP.convertFunPtrIfNonNull val $ \val' -> do
let val'' = GObject.Callbacks.dynamic_ParamSpecTypeInfoFinalizeFieldCallback val'
return val''
return result
{- |
Set the value of the “@finalize@” field.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
@
'Data.GI.Base.Attributes.set' paramSpecTypeInfo [ #finalize 'Data.GI.Base.Attributes.:=' value ]
@
-}
setParamSpecTypeInfoFinalize :: MonadIO m => ParamSpecTypeInfo -> FunPtr GObject.Callbacks.C_ParamSpecTypeInfoFinalizeFieldCallback -> m ()
setParamSpecTypeInfoFinalize s val = liftIO $ withManagedPtr s $ \ptr -> do
poke (ptr `plusPtr` 24) (val :: FunPtr GObject.Callbacks.C_ParamSpecTypeInfoFinalizeFieldCallback)
{- |
Set the value of the “@finalize@” field to `Nothing`.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
@
'Data.GI.Base.Attributes.clear' #finalize
@
-}
clearParamSpecTypeInfoFinalize :: MonadIO m => ParamSpecTypeInfo -> m ()
clearParamSpecTypeInfoFinalize s = liftIO $ withManagedPtr s $ \ptr -> do
poke (ptr `plusPtr` 24) (FP.nullFunPtr :: FunPtr GObject.Callbacks.C_ParamSpecTypeInfoFinalizeFieldCallback)
#if ENABLE_OVERLOADING
data ParamSpecTypeInfoFinalizeFieldInfo
instance AttrInfo ParamSpecTypeInfoFinalizeFieldInfo where
type AttrAllowedOps ParamSpecTypeInfoFinalizeFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint ParamSpecTypeInfoFinalizeFieldInfo = (~) (FunPtr GObject.Callbacks.C_ParamSpecTypeInfoFinalizeFieldCallback)
type AttrBaseTypeConstraint ParamSpecTypeInfoFinalizeFieldInfo = (~) ParamSpecTypeInfo
type AttrGetType ParamSpecTypeInfoFinalizeFieldInfo = Maybe GObject.Callbacks.ParamSpecTypeInfoFinalizeFieldCallback
type AttrLabel ParamSpecTypeInfoFinalizeFieldInfo = "finalize"
type AttrOrigin ParamSpecTypeInfoFinalizeFieldInfo = ParamSpecTypeInfo
attrGet _ = getParamSpecTypeInfoFinalize
attrSet _ = setParamSpecTypeInfoFinalize
attrConstruct = undefined
attrClear _ = clearParamSpecTypeInfoFinalize
paramSpecTypeInfo_finalize :: AttrLabelProxy "finalize"
paramSpecTypeInfo_finalize = AttrLabelProxy
#endif
{- |
Get the value of the “@value_set_default@” field.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
@
'Data.GI.Base.Attributes.get' paramSpecTypeInfo #valueSetDefault
@
-}
getParamSpecTypeInfoValueSetDefault :: MonadIO m => ParamSpecTypeInfo -> m (Maybe GObject.Callbacks.ParamSpecTypeInfoValueSetDefaultFieldCallback)
getParamSpecTypeInfoValueSetDefault s = liftIO $ withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 32) :: IO (FunPtr GObject.Callbacks.C_ParamSpecTypeInfoValueSetDefaultFieldCallback)
result <- SP.convertFunPtrIfNonNull val $ \val' -> do
let val'' = GObject.Callbacks.dynamic_ParamSpecTypeInfoValueSetDefaultFieldCallback val'
return val''
return result
{- |
Set the value of the “@value_set_default@” field.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
@
'Data.GI.Base.Attributes.set' paramSpecTypeInfo [ #valueSetDefault 'Data.GI.Base.Attributes.:=' value ]
@
-}
setParamSpecTypeInfoValueSetDefault :: MonadIO m => ParamSpecTypeInfo -> FunPtr GObject.Callbacks.C_ParamSpecTypeInfoValueSetDefaultFieldCallback -> m ()
setParamSpecTypeInfoValueSetDefault s val = liftIO $ withManagedPtr s $ \ptr -> do
poke (ptr `plusPtr` 32) (val :: FunPtr GObject.Callbacks.C_ParamSpecTypeInfoValueSetDefaultFieldCallback)
{- |
Set the value of the “@value_set_default@” field to `Nothing`.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
@
'Data.GI.Base.Attributes.clear' #valueSetDefault
@
-}
clearParamSpecTypeInfoValueSetDefault :: MonadIO m => ParamSpecTypeInfo -> m ()
clearParamSpecTypeInfoValueSetDefault s = liftIO $ withManagedPtr s $ \ptr -> do
poke (ptr `plusPtr` 32) (FP.nullFunPtr :: FunPtr GObject.Callbacks.C_ParamSpecTypeInfoValueSetDefaultFieldCallback)
#if ENABLE_OVERLOADING
data ParamSpecTypeInfoValueSetDefaultFieldInfo
instance AttrInfo ParamSpecTypeInfoValueSetDefaultFieldInfo where
type AttrAllowedOps ParamSpecTypeInfoValueSetDefaultFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint ParamSpecTypeInfoValueSetDefaultFieldInfo = (~) (FunPtr GObject.Callbacks.C_ParamSpecTypeInfoValueSetDefaultFieldCallback)
type AttrBaseTypeConstraint ParamSpecTypeInfoValueSetDefaultFieldInfo = (~) ParamSpecTypeInfo
type AttrGetType ParamSpecTypeInfoValueSetDefaultFieldInfo = Maybe GObject.Callbacks.ParamSpecTypeInfoValueSetDefaultFieldCallback
type AttrLabel ParamSpecTypeInfoValueSetDefaultFieldInfo = "value_set_default"
type AttrOrigin ParamSpecTypeInfoValueSetDefaultFieldInfo = ParamSpecTypeInfo
attrGet _ = getParamSpecTypeInfoValueSetDefault
attrSet _ = setParamSpecTypeInfoValueSetDefault
attrConstruct = undefined
attrClear _ = clearParamSpecTypeInfoValueSetDefault
paramSpecTypeInfo_valueSetDefault :: AttrLabelProxy "valueSetDefault"
paramSpecTypeInfo_valueSetDefault = AttrLabelProxy
#endif
{- |
Get the value of the “@value_validate@” field.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
@
'Data.GI.Base.Attributes.get' paramSpecTypeInfo #valueValidate
@
-}
getParamSpecTypeInfoValueValidate :: MonadIO m => ParamSpecTypeInfo -> m (Maybe GObject.Callbacks.ParamSpecTypeInfoValueValidateFieldCallback)
getParamSpecTypeInfoValueValidate s = liftIO $ withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 40) :: IO (FunPtr GObject.Callbacks.C_ParamSpecTypeInfoValueValidateFieldCallback)
result <- SP.convertFunPtrIfNonNull val $ \val' -> do
let val'' = GObject.Callbacks.dynamic_ParamSpecTypeInfoValueValidateFieldCallback val'
return val''
return result
{- |
Set the value of the “@value_validate@” field.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
@
'Data.GI.Base.Attributes.set' paramSpecTypeInfo [ #valueValidate 'Data.GI.Base.Attributes.:=' value ]
@
-}
setParamSpecTypeInfoValueValidate :: MonadIO m => ParamSpecTypeInfo -> FunPtr GObject.Callbacks.C_ParamSpecTypeInfoValueValidateFieldCallback -> m ()
setParamSpecTypeInfoValueValidate s val = liftIO $ withManagedPtr s $ \ptr -> do
poke (ptr `plusPtr` 40) (val :: FunPtr GObject.Callbacks.C_ParamSpecTypeInfoValueValidateFieldCallback)
{- |
Set the value of the “@value_validate@” field to `Nothing`.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
@
'Data.GI.Base.Attributes.clear' #valueValidate
@
-}
clearParamSpecTypeInfoValueValidate :: MonadIO m => ParamSpecTypeInfo -> m ()
clearParamSpecTypeInfoValueValidate s = liftIO $ withManagedPtr s $ \ptr -> do
poke (ptr `plusPtr` 40) (FP.nullFunPtr :: FunPtr GObject.Callbacks.C_ParamSpecTypeInfoValueValidateFieldCallback)
#if ENABLE_OVERLOADING
data ParamSpecTypeInfoValueValidateFieldInfo
instance AttrInfo ParamSpecTypeInfoValueValidateFieldInfo where
type AttrAllowedOps ParamSpecTypeInfoValueValidateFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint ParamSpecTypeInfoValueValidateFieldInfo = (~) (FunPtr GObject.Callbacks.C_ParamSpecTypeInfoValueValidateFieldCallback)
type AttrBaseTypeConstraint ParamSpecTypeInfoValueValidateFieldInfo = (~) ParamSpecTypeInfo
type AttrGetType ParamSpecTypeInfoValueValidateFieldInfo = Maybe GObject.Callbacks.ParamSpecTypeInfoValueValidateFieldCallback
type AttrLabel ParamSpecTypeInfoValueValidateFieldInfo = "value_validate"
type AttrOrigin ParamSpecTypeInfoValueValidateFieldInfo = ParamSpecTypeInfo
attrGet _ = getParamSpecTypeInfoValueValidate
attrSet _ = setParamSpecTypeInfoValueValidate
attrConstruct = undefined
attrClear _ = clearParamSpecTypeInfoValueValidate
paramSpecTypeInfo_valueValidate :: AttrLabelProxy "valueValidate"
paramSpecTypeInfo_valueValidate = AttrLabelProxy
#endif
{- |
Get the value of the “@values_cmp@” field.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
@
'Data.GI.Base.Attributes.get' paramSpecTypeInfo #valuesCmp
@
-}
getParamSpecTypeInfoValuesCmp :: MonadIO m => ParamSpecTypeInfo -> m (Maybe GObject.Callbacks.ParamSpecTypeInfoValuesCmpFieldCallback)
getParamSpecTypeInfoValuesCmp s = liftIO $ withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 48) :: IO (FunPtr GObject.Callbacks.C_ParamSpecTypeInfoValuesCmpFieldCallback)
result <- SP.convertFunPtrIfNonNull val $ \val' -> do
let val'' = GObject.Callbacks.dynamic_ParamSpecTypeInfoValuesCmpFieldCallback val'
return val''
return result
{- |
Set the value of the “@values_cmp@” field.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
@
'Data.GI.Base.Attributes.set' paramSpecTypeInfo [ #valuesCmp 'Data.GI.Base.Attributes.:=' value ]
@
-}
setParamSpecTypeInfoValuesCmp :: MonadIO m => ParamSpecTypeInfo -> FunPtr GObject.Callbacks.C_ParamSpecTypeInfoValuesCmpFieldCallback -> m ()
setParamSpecTypeInfoValuesCmp s val = liftIO $ withManagedPtr s $ \ptr -> do
poke (ptr `plusPtr` 48) (val :: FunPtr GObject.Callbacks.C_ParamSpecTypeInfoValuesCmpFieldCallback)
{- |
Set the value of the “@values_cmp@” field to `Nothing`.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
@
'Data.GI.Base.Attributes.clear' #valuesCmp
@
-}
clearParamSpecTypeInfoValuesCmp :: MonadIO m => ParamSpecTypeInfo -> m ()
clearParamSpecTypeInfoValuesCmp s = liftIO $ withManagedPtr s $ \ptr -> do
poke (ptr `plusPtr` 48) (FP.nullFunPtr :: FunPtr GObject.Callbacks.C_ParamSpecTypeInfoValuesCmpFieldCallback)
#if ENABLE_OVERLOADING
data ParamSpecTypeInfoValuesCmpFieldInfo
instance AttrInfo ParamSpecTypeInfoValuesCmpFieldInfo where
type AttrAllowedOps ParamSpecTypeInfoValuesCmpFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint ParamSpecTypeInfoValuesCmpFieldInfo = (~) (FunPtr GObject.Callbacks.C_ParamSpecTypeInfoValuesCmpFieldCallback)
type AttrBaseTypeConstraint ParamSpecTypeInfoValuesCmpFieldInfo = (~) ParamSpecTypeInfo
type AttrGetType ParamSpecTypeInfoValuesCmpFieldInfo = Maybe GObject.Callbacks.ParamSpecTypeInfoValuesCmpFieldCallback
type AttrLabel ParamSpecTypeInfoValuesCmpFieldInfo = "values_cmp"
type AttrOrigin ParamSpecTypeInfoValuesCmpFieldInfo = ParamSpecTypeInfo
attrGet _ = getParamSpecTypeInfoValuesCmp
attrSet _ = setParamSpecTypeInfoValuesCmp
attrConstruct = undefined
attrClear _ = clearParamSpecTypeInfoValuesCmp
paramSpecTypeInfo_valuesCmp :: AttrLabelProxy "valuesCmp"
paramSpecTypeInfo_valuesCmp = AttrLabelProxy
#endif
#if ENABLE_OVERLOADING
instance O.HasAttributeList ParamSpecTypeInfo
type instance O.AttributeList ParamSpecTypeInfo = ParamSpecTypeInfoAttributeList
type ParamSpecTypeInfoAttributeList = ('[ '("instanceSize", ParamSpecTypeInfoInstanceSizeFieldInfo), '("nPreallocs", ParamSpecTypeInfoNPreallocsFieldInfo), '("instanceInit", ParamSpecTypeInfoInstanceInitFieldInfo), '("valueType", ParamSpecTypeInfoValueTypeFieldInfo), '("finalize", ParamSpecTypeInfoFinalizeFieldInfo), '("valueSetDefault", ParamSpecTypeInfoValueSetDefaultFieldInfo), '("valueValidate", ParamSpecTypeInfoValueValidateFieldInfo), '("valuesCmp", ParamSpecTypeInfoValuesCmpFieldInfo)] :: [(Symbol, *)])
#endif
#if ENABLE_OVERLOADING
type family ResolveParamSpecTypeInfoMethod (t :: Symbol) (o :: *) :: * where
ResolveParamSpecTypeInfoMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveParamSpecTypeInfoMethod t ParamSpecTypeInfo, O.MethodInfo info ParamSpecTypeInfo p) => OL.IsLabel t (ParamSpecTypeInfo -> 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