Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: ParamSpec

[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.

Members

  • handleObj
  • lib
  • retainedCallbacks
  • signalHandlerNames
  • signalSetterHandlers

Methods

  • ParamSpec (Handle = null)

    Creates a new ParamSpec by wrapping a native handle or another wrapper.

    • @p 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 exposing handle(), or null. Returns null when the argument carries no pointer.

    • @p Source is the raw handle, raw buffer, wrapper, or null.
    • @r A raw pointer carrier or null when no pointer is present.
  • getLib ()

    Returns the opened native library for this generated wrapper.

    • @r The opened native library.
  • handle ()

    Returns the wrapped NativeHandle.

    • @r The wrapped NativeHandle.
  • isNull ()

    Returns true when the wrapped handle is null.

    • @r A bool.
  • describe ()

    Returns a small string for debugging generated wrappers.

    • @r 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).

    • @r None.
  • unref ()

    Decrements the reference count of a @pspec.

    • @r None.