Package org.gnome.gtk
Class RequestedSize
java.lang.Object
org.javagi.base.ProxyInstance
org.gnome.gtk.RequestedSize
- All Implemented Interfaces:
Proxy
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, org.gnome.gtk.RequestedSize[]).
-
Constructor Summary
ConstructorsConstructorDescriptionAllocate a new RequestedSize.RequestedSize(Arena arena) Allocate a new RequestedSize.RequestedSize(MemorySegment address) Create a RequestedSize proxy instance for the provided memory address.RequestedSize(MemorySegment data, int minimumSize, int naturalSize) Allocate a new RequestedSize with the fields set to the provided values.RequestedSize(MemorySegment data, int minimumSize, int naturalSize, Arena arena) Allocate a new RequestedSize with the fields set to the provided values. -
Method Summary
Modifier and TypeMethodDescriptionstatic MemoryLayoutThe memory layout of the native struct.readData()Read the value of the fielddata.intRead the value of the fieldminimum_size.intRead the value of the fieldnatural_size.voidwriteData(MemorySegment data) Write a value in the fielddata.voidwriteMinimumSize(int minimumSize) Write a value in the fieldminimum_size.voidwriteNaturalSize(int naturalSize) Write a value in the fieldnatural_size.Methods inherited from class org.javagi.base.ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
RequestedSize
Create a RequestedSize proxy instance for the provided memory address.- Parameters:
address- the memory address of the native object
-
RequestedSize
Allocate a new RequestedSize.- Parameters:
arena- to control the memory allocation scope
-
RequestedSize
public RequestedSize()Allocate a new RequestedSize. The memory is allocated withArena.ofAuto(). -
RequestedSize
Allocate a new RequestedSize with the fields set to the provided values.- Parameters:
data- value for the fielddataminimumSize- value for the fieldminimumSizenaturalSize- value for the fieldnaturalSizearena- to control the memory allocation scope
-
RequestedSize
Allocate a new RequestedSize with the fields set to the provided values. The memory is allocated withArena.ofAuto().- Parameters:
data- value for the fielddataminimumSize- value for the fieldminimumSizenaturalSize- value for the fieldnaturalSize
-
-
Method Details
-
getMemoryLayout
The memory layout of the native struct.- Returns:
- the memory layout
-
readData
Read the value of the fielddata.- Returns:
- The value of the field
data
-
writeData
Write a value in the fielddata.- Parameters:
data- The new value for the fielddata
-
readMinimumSize
public int readMinimumSize()Read the value of the fieldminimum_size.- Returns:
- The value of the field
minimum_size
-
writeMinimumSize
public void writeMinimumSize(int minimumSize) Write a value in the fieldminimum_size.- Parameters:
minimumSize- The new value for the fieldminimum_size
-
readNaturalSize
public int readNaturalSize()Read the value of the fieldnatural_size.- Returns:
- The value of the field
natural_size
-
writeNaturalSize
public void writeNaturalSize(int naturalSize) Write a value in the fieldnatural_size.- Parameters:
naturalSize- The new value for the fieldnatural_size
-