Class RequestedSize

java.lang.Object
org.javagi.base.ProxyInstance
org.gnome.gtk.RequestedSize
All Implemented Interfaces:
Proxy

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

Represents a request of a screen object in a given orientation.

These are primarily used in container implementations when allocating a natural size for children. See Gtk.distributeNaturalAllocation(int, RequestedSize[]).

  • Constructor Details

    • RequestedSize

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

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

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

      public RequestedSize(MemorySegment data, int minimumSize, int naturalSize, Arena arena)
      Allocate a new RequestedSize with the fields set to the provided values.
      Parameters:
      data - value for the field data
      minimumSize - value for the field minimumSize
      naturalSize - value for the field naturalSize
      arena - to control the memory allocation scope
    • RequestedSize

      public RequestedSize(MemorySegment data, int minimumSize, int naturalSize)
      Allocate a new RequestedSize with the fields set to the provided values. The memory is allocated with Arena.ofAuto().
      Parameters:
      data - value for the field data
      minimumSize - value for the field minimumSize
      naturalSize - value for the field naturalSize
  • Method Details

    • getMemoryLayout

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

      public MemorySegment readData()
      Read the value of the field data.
      Returns:
      The value of the field data
    • writeData

      public void writeData(MemorySegment data)
      Write a value in the field data.
      Parameters:
      data - The new value for the field data
    • readMinimumSize

      public int readMinimumSize()
      Read the value of the field minimum_size.
      Returns:
      The value of the field minimum_size
    • writeMinimumSize

      public void writeMinimumSize(int minimumSize)
      Write a value in the field minimum_size.
      Parameters:
      minimumSize - The new value for the field minimum_size
    • readNaturalSize

      public int readNaturalSize()
      Read the value of the field natural_size.
      Returns:
      The value of the field natural_size
    • writeNaturalSize

      public void writeNaturalSize(int naturalSize)
      Write a value in the field natural_size.
      Parameters:
      naturalSize - The new value for the field natural_size