Class ValueArray

All Implemented Interfaces:
Proxy

@Generated("org.javagi.JavaGI") public class ValueArray extends TypeInstance
A fundamental type that describes an ordered list of GValue
  • Constructor Details

    • ValueArray

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

    • getType

      public static @Nullable Type getType()
      Get the GType of the ValueArray class.
      Returns:
      the GType
    • getMemoryLayout

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

      protected ValueArray asParent()
      Return this instance as if it were its parent type. Comparable to the Java super keyword, but ensures the parent typeclass is also used in native code.
      Returns:
      the instance as if it were its parent type
    • appendAndTakeValue

      public static void appendAndTakeValue(Value value, Value appendValue)
      Appends appendValue to the GstValueArray in value.
      Parameters:
      value - a GValue of type GST_TYPE_ARRAY
      appendValue - the value to append
      Since:
      1.2
    • appendValue

      public static void appendValue(Value value, Value appendValue)
      Appends appendValue to the GstValueArray in value.
      Parameters:
      value - a GValue of type GST_TYPE_ARRAY
      appendValue - the value to append
    • getSize

      public static int getSize(Value value)
      Gets the number of values contained in value.
      Parameters:
      value - a GValue of type GST_TYPE_ARRAY
      Returns:
      the number of values
    • getValue

      public static Value getValue(Value value, int index)
      Gets the value that is a member of the array contained in value and has the index index.
      Parameters:
      value - a GValue of type GST_TYPE_ARRAY
      index - index of value to get from the array
      Returns:
      the value at the given index
    • init

      public static Value init(Value value, int prealloc)
      Initializes and pre-allocates a GValue of type GST_TYPE_ARRAY.
      Parameters:
      value - A zero-filled (uninitialized) GValue structure
      prealloc - The number of entries to pre-allocate in the array
      Returns:
      The GValue structure that has been passed in
      Since:
      1.18
    • prependValue

      public static void prependValue(Value value, Value prependValue)
      Prepends prependValue to the GstValueArray in value.
      Parameters:
      value - a GValue of type GST_TYPE_ARRAY
      prependValue - the value to prepend