Basics
Guides
API Reference
Basics
Guides
API Reference
[20:7] extends: object
GParamSpec encapsulates the metadata required to specify parameters, such
as GObject 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 GParamSpec,
either separator can be used, but they cannot be mixed. Using - is
considerably more efficient, and is the ‘canonical form’. Using _ is
discouraged.
ParamSpec (Handle = null)
Creates a new
ParamSpecby wrapping a native handle or another wrapper.
Handle is the native handle or another wrapper whose handle to adopt.toNativeHandle (Source)
Normalizes a constructor argument into a raw pointer carrier. Accepts a raw NativeHandle, a raw NativeBuffer returned from
fn.call(...), another generated wrapper exposinghandle(), or null. Returns null when the argument carries no pointer.
Source is the raw handle, raw buffer, wrapper, or null.A raw pointer carrier or null when no pointer is present.getLib ()
Returns the opened native library for this generated wrapper.
The opened native library.handle ()
Returns the wrapped NativeHandle.
The wrapped NativeHandle.isNull ()
Returns true when the wrapped handle is null.
A bool.describe ()
Returns a small string for debugging generated wrappers.
A string.get_blurb ()
Get the short description of a #GParamSpec.
get_default_value ()
Gets the default value of @pspec as a pointer to a #GValue. The #GValue will remain valid for the life of @pspec.
get_name ()
Get the name of a #GParamSpec. The name is always an "interned" string (as per g_intern_string()). This allows for pointer-value comparisons.
get_nick ()
Get the nickname of a #GParamSpec.
get_redirect_target ()
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 all the properties from the parent type. Redirection is established by creating a property of type #GParamSpecOverride. See g_object_class_override_property() for an example of the use of this capability.
ref ()
Increments the reference count of @pspec.
ref_sink ()
Convenience function to ref and sink a #GParamSpec.
sink ()
The initial reference count of a newly created #GParamSpec is 1, even though no one has explicitly called g_param_spec_ref() on it yet. So the initial reference count is flagged as "floating", until someone calls
g_param_spec_ref (pspec); g_param_spec_sink (pspec);in sequence on it, taking over the initial reference count (thus ending up with a @pspec that has a reference count of 1 still, but is not flagged "floating" anymore).
None.unref ()
Decrements the reference count of a @pspec.
None.
Aussom
Write once. Embed everywhere.
Copyright 2026 Austin Lehman. All rights reserved.