gi-gobject-2.0.31: GObject bindings

Copyright | Will Thompson and Iñaki García Etxebarria
License | LGPL-2.1
Maintainer | Iñaki García Etxebarria
Safe Haskell | None
Language | Haskell2010

GI.GObject.Structs.ParamSpecTypeInfo

Contents

- Exported types
- Methods
- Properties
  - finalize
  - instanceInit
  - instanceSize
  - nPreallocs
  - valueSetDefault
  - valueType
  - valueValidate
  - valuesCmp

Description

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 `paramTypeRegisterStatic` The type system will perform a deep copy of this structure, so its memory does not need to be persistent across invocation of `paramTypeRegisterStatic`.

Synopsis

- newtype ParamSpecTypeInfo = ParamSpecTypeInfo (ManagedPtr ParamSpecTypeInfo)
- newZeroParamSpecTypeInfo :: MonadIO m => m ParamSpecTypeInfo
- clearParamSpecTypeInfoFinalize :: MonadIO m => ParamSpecTypeInfo -> m ()
- getParamSpecTypeInfoFinalize :: MonadIO m => ParamSpecTypeInfo -> m (Maybe ParamSpecTypeInfoFinalizeFieldCallback)
- setParamSpecTypeInfoFinalize :: MonadIO m => ParamSpecTypeInfo -> FunPtr C_ParamSpecTypeInfoFinalizeFieldCallback -> m ()
- clearParamSpecTypeInfoInstanceInit :: MonadIO m => ParamSpecTypeInfo -> m ()
- getParamSpecTypeInfoInstanceInit :: MonadIO m => ParamSpecTypeInfo -> m (Maybe ParamSpecTypeInfoInstanceInitFieldCallback)
- setParamSpecTypeInfoInstanceInit :: MonadIO m => ParamSpecTypeInfo -> FunPtr C_ParamSpecTypeInfoInstanceInitFieldCallback -> m ()
- getParamSpecTypeInfoInstanceSize :: MonadIO m => ParamSpecTypeInfo -> m Word16
- setParamSpecTypeInfoInstanceSize :: MonadIO m => ParamSpecTypeInfo -> Word16 -> m ()
- getParamSpecTypeInfoNPreallocs :: MonadIO m => ParamSpecTypeInfo -> m Word16
- setParamSpecTypeInfoNPreallocs :: MonadIO m => ParamSpecTypeInfo -> Word16 -> m ()
- clearParamSpecTypeInfoValueSetDefault :: MonadIO m => ParamSpecTypeInfo -> m ()
- getParamSpecTypeInfoValueSetDefault :: MonadIO m => ParamSpecTypeInfo -> m (Maybe ParamSpecTypeInfoValueSetDefaultFieldCallback)
- setParamSpecTypeInfoValueSetDefault :: MonadIO m => ParamSpecTypeInfo -> FunPtr C_ParamSpecTypeInfoValueSetDefaultFieldCallback -> m ()
- getParamSpecTypeInfoValueType :: MonadIO m => ParamSpecTypeInfo -> m GType
- setParamSpecTypeInfoValueType :: MonadIO m => ParamSpecTypeInfo -> GType -> m ()
- clearParamSpecTypeInfoValueValidate :: MonadIO m => ParamSpecTypeInfo -> m ()
- getParamSpecTypeInfoValueValidate :: MonadIO m => ParamSpecTypeInfo -> m (Maybe ParamSpecTypeInfoValueValidateFieldCallback)
- setParamSpecTypeInfoValueValidate :: MonadIO m => ParamSpecTypeInfo -> FunPtr C_ParamSpecTypeInfoValueValidateFieldCallback -> m ()
- clearParamSpecTypeInfoValuesCmp :: MonadIO m => ParamSpecTypeInfo -> m ()
- getParamSpecTypeInfoValuesCmp :: MonadIO m => ParamSpecTypeInfo -> m (Maybe ParamSpecTypeInfoValuesCmpFieldCallback)
- setParamSpecTypeInfoValuesCmp :: MonadIO m => ParamSpecTypeInfo -> FunPtr C_ParamSpecTypeInfoValuesCmpFieldCallback -> m ()

# Exported types

newtype ParamSpecTypeInfo Source #

Memory-managed wrapper type.

Constructors

ParamSpecTypeInfo (ManagedPtr ParamSpecTypeInfo) |

#### Instances

Instances details

Eq ParamSpecTypeInfo Source # |
Instance details Defined in GI.GObject.Structs.ParamSpecTypeInfo Methods (==) :: ParamSpecTypeInfo -> ParamSpecTypeInfo -> Bool Source # (/=) :: ParamSpecTypeInfo -> ParamSpecTypeInfo -> Bool Source #
BoxedPtr ParamSpecTypeInfo Source # |
Instance details Defined in GI.GObject.Structs.ParamSpecTypeInfo Methods boxedPtrCopy :: ParamSpecTypeInfo -> IO ParamSpecTypeInfo Source # boxedPtrFree :: ParamSpecTypeInfo -> IO () Source #
CallocPtr ParamSpecTypeInfo Source # |
Instance details Defined in GI.GObject.Structs.ParamSpecTypeInfo Methods boxedPtrCalloc :: IO (Ptr ParamSpecTypeInfo) Source #
ManagedPtrNewtype ParamSpecTypeInfo Source # |
Instance details Defined in GI.GObject.Structs.ParamSpecTypeInfo Methods toManagedPtr :: ParamSpecTypeInfo -> ManagedPtr ParamSpecTypeInfo Source #
tag ~ 'AttrSet => Constructible ParamSpecTypeInfo tag Source # |
Instance details Defined in GI.GObject.Structs.ParamSpecTypeInfo Methods new :: MonadIO m => (ManagedPtr ParamSpecTypeInfo -> ParamSpecTypeInfo) -> [AttrOp ParamSpecTypeInfo tag] -> m ParamSpecTypeInfo Source #

newZeroParamSpecTypeInfo :: MonadIO m => m ParamSpecTypeInfo Source #

Construct a `ParamSpecTypeInfo` struct initialized to zero.

# Methods

# Properties

## finalize

The instance finalization function (optional).

clearParamSpecTypeInfoFinalize :: MonadIO m => ParamSpecTypeInfo -> m () Source #

Set the value of the “`finalize`” field to `Nothing`. When overloading is enabled, this is equivalent to

    clear #finalize

getParamSpecTypeInfoFinalize :: MonadIO m => ParamSpecTypeInfo -> m (Maybe ParamSpecTypeInfoFinalizeFieldCallback) Source #

Get the value of the “`finalize`” field. When overloading is enabled, this is equivalent to

    get paramSpecTypeInfo #finalize

setParamSpecTypeInfoFinalize :: MonadIO m => ParamSpecTypeInfo -> FunPtr C_ParamSpecTypeInfoFinalizeFieldCallback -> m () Source #

Set the value of the “`finalize`” field. When overloading is enabled, this is equivalent to

    set paramSpecTypeInfo [ #finalize := value ]

## instanceInit

Location of the instance initialization function (optional).

clearParamSpecTypeInfoInstanceInit :: MonadIO m => ParamSpecTypeInfo -> m () Source #

Set the value of the “`instance_init`” field to `Nothing`. When overloading is enabled, this is equivalent to

    clear #instanceInit

getParamSpecTypeInfoInstanceInit :: MonadIO m => ParamSpecTypeInfo -> m (Maybe ParamSpecTypeInfoInstanceInitFieldCallback) Source #

Get the value of the “`instance_init`” field. When overloading is enabled, this is equivalent to

    get paramSpecTypeInfo #instanceInit

setParamSpecTypeInfoInstanceInit :: MonadIO m => ParamSpecTypeInfo -> FunPtr C_ParamSpecTypeInfoInstanceInitFieldCallback -> m () Source #

Set the value of the “`instance_init`” field. When overloading is enabled, this is equivalent to

    set paramSpecTypeInfo [ #instanceInit := value ]

## instanceSize

Size of the instance (object) structure.

getParamSpecTypeInfoInstanceSize :: MonadIO m => ParamSpecTypeInfo -> m Word16 Source #

Get the value of the “`instance_size`” field. When overloading is enabled, this is equivalent to

    get paramSpecTypeInfo #instanceSize

setParamSpecTypeInfoInstanceSize :: MonadIO m => ParamSpecTypeInfo -> Word16 -> m () Source #

Set the value of the “`instance_size`” field. When overloading is enabled, this is equivalent to

    set paramSpecTypeInfo [ #instanceSize := value ]

## 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 :: MonadIO m => ParamSpecTypeInfo -> m Word16 Source #

Get the value of the “`n_preallocs`” field. When overloading is enabled, this is equivalent to

    get paramSpecTypeInfo #nPreallocs

setParamSpecTypeInfoNPreallocs :: MonadIO m => ParamSpecTypeInfo -> Word16 -> m () Source #

Set the value of the “`n_preallocs`” field. When overloading is enabled, this is equivalent to

    set paramSpecTypeInfo [ #nPreallocs := value ]

## valueSetDefault

Resets a `value` to the default value for `pspec` (recommended, the default is `valueReset`), see `paramValueSetDefault`.

clearParamSpecTypeInfoValueSetDefault :: MonadIO m => ParamSpecTypeInfo -> m () Source #

Set the value of the “`value_set_default`” field to `Nothing`. When overloading is enabled, this is equivalent to

    clear #valueSetDefault

getParamSpecTypeInfoValueSetDefault :: MonadIO m => ParamSpecTypeInfo -> m (Maybe ParamSpecTypeInfoValueSetDefaultFieldCallback) Source #

Get the value of the “`value_set_default`” field. When overloading is enabled, this is equivalent to

    get paramSpecTypeInfo #valueSetDefault

setParamSpecTypeInfoValueSetDefault :: MonadIO m => ParamSpecTypeInfo -> FunPtr C_ParamSpecTypeInfoValueSetDefaultFieldCallback -> m () Source #

Set the value of the “`value_set_default`” field. When overloading is enabled, this is equivalent to

    set paramSpecTypeInfo [ #valueSetDefault := value ]

## valueType

The `GType` of values conforming to this `ParamSpec`

getParamSpecTypeInfoValueType :: MonadIO m => ParamSpecTypeInfo -> m GType Source #

Get the value of the “`value_type`” field. When overloading is enabled, this is equivalent to

    get paramSpecTypeInfo #valueType

setParamSpecTypeInfoValueType :: MonadIO m => ParamSpecTypeInfo -> GType -> m () Source #

Set the value of the “`value_type`” field. When overloading is enabled, this is equivalent to

    set paramSpecTypeInfo [ #valueType := value ]

## valueValidate

Ensures that the contents of `value` comply with the specifications set out by `pspec` (optional), see `paramValueValidate`.

clearParamSpecTypeInfoValueValidate :: MonadIO m => ParamSpecTypeInfo -> m () Source #

Set the value of the “`value_validate`” field to `Nothing`. When overloading is enabled, this is equivalent to

    clear #valueValidate

getParamSpecTypeInfoValueValidate :: MonadIO m => ParamSpecTypeInfo -> m (Maybe ParamSpecTypeInfoValueValidateFieldCallback) Source #

Get the value of the “`value_validate`” field. When overloading is enabled, this is equivalent to

    get paramSpecTypeInfo #valueValidate

setParamSpecTypeInfoValueValidate :: MonadIO m => ParamSpecTypeInfo -> FunPtr C_ParamSpecTypeInfoValueValidateFieldCallback -> m () Source #

Set the value of the “`value_validate`” field. When overloading is enabled, this is equivalent to

    set paramSpecTypeInfo [ #valueValidate := value ]

## valuesCmp

Compares `value1` with `value2` according to `pspec` (recommended, the default is `memcmp()`), see `paramValuesCmp`.

clearParamSpecTypeInfoValuesCmp :: MonadIO m => ParamSpecTypeInfo -> m () Source #

Set the value of the “`values_cmp`” field to `Nothing`. When overloading is enabled, this is equivalent to

    clear #valuesCmp

getParamSpecTypeInfoValuesCmp :: MonadIO m => ParamSpecTypeInfo -> m (Maybe ParamSpecTypeInfoValuesCmpFieldCallback) Source #

Get the value of the “`values_cmp`” field. When overloading is enabled, this is equivalent to

    get paramSpecTypeInfo #valuesCmp

setParamSpecTypeInfoValuesCmp :: MonadIO m => ParamSpecTypeInfo -> FunPtr C_ParamSpecTypeInfoValuesCmpFieldCallback -> m () Source #

Set the value of the “`values_cmp`” field. When overloading is enabled, this is equivalent to

    set paramSpecTypeInfo [ #valuesCmp := value ]