Class TypeQuery

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

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

A structure holding information for a specific type.

See also: g_type_query()

  • Constructor Details

    • TypeQuery

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

      public TypeQuery(Arena arena)
      Allocate a new TypeQuery.
      Parameters:
      arena - to control the memory allocation scope
    • TypeQuery

      public TypeQuery()
      Allocate a new TypeQuery. The memory is allocated with Arena.ofAuto().
    • TypeQuery

      public TypeQuery(Type type, String typeName, int classSize, int instanceSize, Arena arena)
      Allocate a new TypeQuery with the fields set to the provided values.
      Parameters:
      type - value for the field type
      typeName - value for the field typeName
      classSize - value for the field classSize
      instanceSize - value for the field instanceSize
      arena - to control the memory allocation scope
    • TypeQuery

      public TypeQuery(Type type, String typeName, int classSize, int instanceSize)
      Allocate a new TypeQuery with the fields set to the provided values. The memory is allocated with Arena.ofAuto().
      Parameters:
      type - value for the field type
      typeName - value for the field typeName
      classSize - value for the field classSize
      instanceSize - value for the field instanceSize
  • Method Details

    • getMemoryLayout

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

      public Type readType()
      Read the value of the field type.
      Returns:
      The value of the field type
    • writeType

      public void writeType(Type type)
      Write a value in the field type.
      Parameters:
      type - The new value for the field type
    • readTypeName

      public String readTypeName()
      Read the value of the field type_name.
      Returns:
      The value of the field type_name
    • writeTypeName

      public void writeTypeName(String typeName, Arena _arena)
      Write a value in the field type_name.
      Parameters:
      typeName - The new value for the field type_name
      _arena - to control the memory allocation scope
    • readClassSize

      public int readClassSize()
      Read the value of the field class_size.
      Returns:
      The value of the field class_size
    • writeClassSize

      public void writeClassSize(int classSize)
      Write a value in the field class_size.
      Parameters:
      classSize - The new value for the field class_size
    • readInstanceSize

      public int readInstanceSize()
      Read the value of the field instance_size.
      Returns:
      The value of the field instance_size
    • writeInstanceSize

      public void writeInstanceSize(int instanceSize)
      Write a value in the field instance_size.
      Parameters:
      instanceSize - The new value for the field instance_size