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.ParamSpecPool

Contents

- Exported types
- Methods
  - insert
  - listOwned
  - lookup
  - remove

Description

A `ParamSpecPool` maintains a collection of `GParamSpecs` which can be quickly accessed by owner and name.

The implementation of the `Object` property system uses such a pool to store the `GParamSpecs` of the properties all object types.

Synopsis

- newtype ParamSpecPool = ParamSpecPool (ManagedPtr ParamSpecPool)
- paramSpecPoolInsert :: (HasCallStack, MonadIO m) => ParamSpecPool -> GParamSpec -> GType -> m ()
- paramSpecPoolListOwned :: (HasCallStack, MonadIO m) => ParamSpecPool -> GType -> m [GParamSpec]
- paramSpecPoolLookup :: (HasCallStack, MonadIO m) => ParamSpecPool -> Text -> GType -> Bool -> m (Maybe GParamSpec)
- paramSpecPoolRemove :: (HasCallStack, MonadIO m) => ParamSpecPool -> GParamSpec -> m ()

# Exported types

newtype ParamSpecPool Source #

Memory-managed wrapper type.

Constructors

ParamSpecPool (ManagedPtr ParamSpecPool) |

#### Instances

Instances details

Eq ParamSpecPool Source # |
Instance details Defined in GI.GObject.Structs.ParamSpecPool Methods (==) :: ParamSpecPool -> ParamSpecPool -> Bool Source # (/=) :: ParamSpecPool -> ParamSpecPool -> Bool Source #
BoxedPtr ParamSpecPool Source # |
Instance details Defined in GI.GObject.Structs.ParamSpecPool Methods boxedPtrCopy :: ParamSpecPool -> IO ParamSpecPool Source # boxedPtrFree :: ParamSpecPool -> IO () Source #
ManagedPtrNewtype ParamSpecPool Source # |
Instance details Defined in GI.GObject.Structs.ParamSpecPool Methods toManagedPtr :: ParamSpecPool -> ManagedPtr ParamSpecPool Source #

# Methods

### Click to display all available methods, including inherited ones

Expand

#### Methods

insert, listOwned, lookup, remove.

#### Getters

None.

#### Setters

None.

## insert

paramSpecPoolInsert Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> ParamSpecPool | `pool`: a `ParamSpecPool`.
-> GParamSpec | `pspec`: the `ParamSpec` to insert
-> GType | `ownerType`: a `GType` identifying the owner of `pspec`
-> m () |

Inserts a `ParamSpec` in the pool.

## listOwned

paramSpecPoolListOwned Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> ParamSpecPool | `pool`: a `ParamSpecPool`
-> GType | `ownerType`: the owner to look for
-> m [GParamSpec] | Returns: a `List` of all `GParamSpecs` owned by `ownerType` in the pool`GParamSpecs`.

Gets an `List` of all `GParamSpecs` owned by `ownerType` in the pool.

## lookup

paramSpecPoolLookup Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> ParamSpecPool | `pool`: a `ParamSpecPool`
-> Text | `paramName`: the name to look for
-> GType | `ownerType`: the owner to look for
-> Bool | `walkAncestors`: If `True`, also try to find a `ParamSpec` with `paramName` owned by an ancestor of `ownerType`.
-> m (Maybe GParamSpec) | Returns: The found `ParamSpec`, or `Nothing` if no matching `ParamSpec` was found.

Looks up a `ParamSpec` in the pool.

## remove

paramSpecPoolRemove Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> ParamSpecPool | `pool`: a `ParamSpecPool`
-> GParamSpec | `pspec`: the `ParamSpec` to remove
-> m () |

Removes a `ParamSpec` from the pool.