Skip to content

GObject.ParamSpecPool

record (struct)

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.

Methods

free

def free(self) -> None

Frees the resources allocated by a ParamSpecPool.

insert

def insert(self, pspec: ParamSpec, owner_type: type | Type) -> None

Inserts a ParamSpec in the pool.

Parameters:

  • pspec — the ParamSpec to insert
  • owner_type — a GType identifying the owner of pspec

list_

def list_(self, owner_type: type | Type) -> list[ParamSpec]

Gets an array of all GParamSpecs owned by owner_type in the pool.

Parameters:

  • owner_type — the owner to look for

list_owned

def list_owned(self, owner_type: type | Type) -> list[ParamSpec]

Gets an GLib.List of all GParamSpecs owned by owner_type in the pool.

Parameters:

  • owner_type — the owner to look for

lookup

def lookup(self, param_name: str, owner_type: type | Type, walk_ancestors: bool) -> ParamSpec | None

Looks up a ParamSpec in the pool.

Parameters:

  • param_name — the name to look for
  • owner_type — the owner to look for
  • walk_ancestors — If True, also try to find a ParamSpec with param_name owned by an ancestor of owner_type.

remove

def remove(self, pspec: ParamSpec) -> None

Removes a ParamSpec from the pool.

Parameters: