Gimp.ParamSpecObject

Fields

Name

Type

Access

Description

parent_instance

GObject.ParamSpecObject

r/w

Methods

class

duplicate (pspec)

class

get_default (pspec)

class

has_default (pspec)

class

set_default (pspec, default_value)

Details

class Gimp.ParamSpecObject
classmethod duplicate(pspec)
Parameters:

pspec (GObject.ParamSpec) – a [struct`Gimp`.ParamSpecObject].

Returns:

a newly created param spec.

Return type:

GObject.ParamSpec

This function duplicates pspec appropriately, depending on the accurate spec type.

classmethod get_default(pspec)
Parameters:

pspec (GObject.ParamSpec) – a GObject.Object GObject.ParamSpec

Returns:

the default value.

Return type:

GObject.Object

Get the default object value of the param spec.

If the pspec has been registered with a specific default (which can be verified with [func`Gimp`.ParamSpecObject.has_default]), it will be returned, though some specific subtypes may support returning dynamic default (e.g. based on context).

classmethod has_default(pspec)
Parameters:

pspec (GObject.ParamSpec) – a GObject.Object GObject.ParamSpec

Returns:

whether a default value was set.

Return type:

bool

This function tells whether a default was set, typically with [func`Gimp`.ParamSpecObject.set_default] or any other way. It does not guarantee that the default is an actual object (it may be None if valid as a default).

classmethod set_default(pspec, default_value)
Parameters:

Set the default object value of the param spec. This will switch the has_default flag so that [func`Gimp`.ParamSpecObject.has_default] will now return True.

A None default_value still counts as a default (unless the specific pspec does not allow None as a default).