ParamSpecPool#
- class ParamSpecPool(*args, **kwargs)#
A ParamSpecPool maintains a collection of ParamSpec which can be
quickly accessed by owner and name.
The implementation of the Object property system uses such a pool to
store the ParamSpec of the properties all object types.
Methods#
- class ParamSpecPool
- free() None#
Frees the resources allocated by a
ParamSpecPool.Added in version 2.80.
- insert(pspec: ParamSpec, owner_type: GType) None#
Inserts a
ParamSpecin the pool.- Parameters:
pspec – the
ParamSpecto insertowner_type – a
Typeidentifying the owner ofpspec
- list(owner_type: GType) list[ParamSpec]#
Gets an array of all
ParamSpecowned byowner_typein the pool.- Parameters:
owner_type – the owner to look for
- list_owned(owner_type: GType) list[ParamSpec]#
Gets an
GListof allParamSpecowned byowner_typein the pool.- Parameters:
owner_type – the owner to look for
- lookup(param_name: str, owner_type: GType, walk_ancestors: bool) ParamSpec | None#
Looks up a
ParamSpecin 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 aParamSpecwithparam_nameowned by an ancestor ofowner_type.