Class ParamSpecPool

java.lang.Object
org.javagi.base.ProxyInstance
org.gnome.gobject.ParamSpecPool
All Implemented Interfaces:
Proxy

@Generated("org.javagi.JavaGI") public class ParamSpecPool extends ProxyInstance

A GParamSpecPool maintains a collection of GParamSpecs which can be quickly accessed by owner and name.

The implementation of the GObject property system uses such a pool to store the GParamSpecs of the properties all object types.

  • Constructor Details

    • ParamSpecPool

      public ParamSpecPool(MemorySegment address)
      Create a ParamSpecPool proxy instance for the provided memory address.
      Parameters:
      address - the memory address of the native object
  • Method Details

    • getMemoryLayout

      public static MemoryLayout getMemoryLayout()
      The memory layout of the native struct.
      Returns:
      the memory layout
    • new_

      public static ParamSpecPool new_(boolean typePrefixing)

      Creates a new GParamSpecPool.

      If typePrefixing is true, lookups in the newly created pool will allow to specify the owner as a colon-separated prefix of the property name, like "GtkContainer:border-width". This feature is deprecated, so you should always set typePrefixing to false.

      Parameters:
      typePrefixing - Whether the pool will support type-prefixed property names.
      Returns:
      a newly allocated GParamSpecPool.
    • free

      public void free()
      Frees the resources allocated by a GParamSpecPool.
      Since:
      2.80
    • insert

      public void insert(ParamSpec pspec, Type ownerType)
      Inserts a GParamSpec in the pool.
      Parameters:
      pspec - the GParamSpec to insert
      ownerType - a GType identifying the owner of pspec
    • list

      public ParamSpec[] list(Type ownerType)
      Gets an array of all GParamSpecs owned by ownerType in the pool.
      Parameters:
      ownerType - the owner to look for
      Returns:
      a newly allocated array containing pointers to all GParamSpecs owned by ownerType in the pool
    • listOwned

      public List<ParamSpec> listOwned(Type ownerType)
      Gets an GList of all GParamSpecs owned by ownerType in the pool.
      Parameters:
      ownerType - the owner to look for
      Returns:
      a GList of all GParamSpecs owned by ownerType in the poolGParamSpecs.
    • lookup

      public @Nullable ParamSpec lookup(String paramName, Type ownerType, boolean walkAncestors)
      Looks up a GParamSpec in the pool.
      Parameters:
      paramName - the name to look for
      ownerType - the owner to look for
      walkAncestors - If true, also try to find a GParamSpec with paramName owned by an ancestor of ownerType.
      Returns:
      The found GParamSpec, or null if no matching GParamSpec was found.
    • remove

      public void remove(ParamSpec pspec)
      Removes a GParamSpec from the pool.
      Parameters:
      pspec - the GParamSpec to remove