gobject.param_spec

Module for [ParamSpec] class

class ParamSpec

Types 1

[gobject.param_spec.ParamSpec] encapsulates the metadata required to specify parameters, such as [gobject.object.ObjectWrap] properties.

Parameter names

A property name consists of one or more segments consisting of ASCII letters and digits, separated by either the `-` or _ character. The first character of a property name must be a letter. These are the same rules as for signal naming (see func@GObject.signal_new).

When creating and looking up a [gobject.param_spec.ParamSpec], either separator can be used, but they cannot be mixed. Using `-` is considerably more efficient, and is the ‘canonical form’. Using _ is discouraged.

Fields
GParamSpec * _cInstancePtr
Methods
void * _cPtr(Flag!"Dup" dup = No.Dup)
bool isValidName(string name)Validate a property name for a #GParamSpec. This can be useful for dynamically-generated properties which need to be validated at run-time before actually trying to create them.
string getBlurb()Get the short description of a #GParamSpec. Returns: the short description of pspec.
gobject.value.Value getDefaultValue()Gets the default value of pspec as a pointer to a #GValue.
string getName()Get the name of a #GParamSpec.
glib.types.Quark getNameQuark()Gets the GQuark for the name. Returns: the GQuark for pspec->name.
string getNick()Get the nickname of a #GParamSpec. Returns: the nickname of pspec.
void * getQdata(glib.types.Quark quark)Gets back user data pointers stored via [gobject.param_spec.ParamSpec.setQdata].
gobject.param_spec.ParamSpec getRedirectTarget()If the paramspec redirects operations to another paramspec, returns that paramspec. Redirect is used typically for providing a new implementation of a property in a derived type while preserving al...
void setQdata(glib.types.Quark quark, void * data = null)Sets an opaque, named pointer on a #GParamSpec. The name is specified through a #GQuark (retrieved e.g. via [glib.global.quarkFromStaticString]), and the pointer can be gotten back from the pspec w...
void sink()The initial reference count of a newly created #GParamSpec is 1, even though no one has explicitly called [gobject.paramspec.ParamSpec.ref] on it yet. So the initial reference count is flagged as "...
void * stealQdata(glib.types.Quark quark)Gets back user data pointers stored via [gobject.param_spec.ParamSpec.setQdata] and removes the data from pspec without invoking its destroy() function (if any was set). Usually, calling this func...
Constructors
this(void * ptr, Flag!"Take" take)
Destructors