Class TimeCoord

All Implemented Interfaces:
Proxy

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

Stores a single event in a motion history.

To check whether an axis is present, check whether the corresponding flag from the Gdk.AxisFlags enumeration is set in the flags To access individual axis values, use the values of the values of the Gdk.AxisUse enumerations as indices.

  • Constructor Details

    • TimeCoord

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

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

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

      public TimeCoord(int time, Set<AxisFlags> flags, double[] axes, Arena arena)
      Allocate a new TimeCoord with the fields set to the provided values.
      Parameters:
      time - value for the field time
      flags - value for the field flags
      axes - value for the field axes
      arena - to control the memory allocation scope
    • TimeCoord

      public TimeCoord(int time, Set<AxisFlags> flags, double[] axes)
      Allocate a new TimeCoord with the fields set to the provided values. The memory is allocated with Arena.ofAuto().
      Parameters:
      time - value for the field time
      flags - value for the field flags
      axes - value for the field axes
  • Method Details

    • getMemoryLayout

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

      public int readTime()
      Read the value of the field time.
      Returns:
      The value of the field time
    • writeTime

      public void writeTime(int time)
      Write a value in the field time.
      Parameters:
      time - The new value for the field time
    • readFlags

      public Set<AxisFlags> readFlags()
      Read the value of the field flags.
      Returns:
      The value of the field flags
    • writeFlags

      public void writeFlags(Set<AxisFlags> flags)
      Write a value in the field flags.
      Parameters:
      flags - The new value for the field flags
    • readAxes

      public @Nullable double @Nullable [] readAxes()
      Read the value of the field axes.
      Returns:
      The value of the field axes
    • writeAxes

      public void writeAxes(@Nullable double @Nullable [] axes, Arena _arena)
      Write a value in the field axes.
      Parameters:
      axes - The new value for the field axes