Package org.gnome.gtk
Class RequestedSize
java.lang.Object
io.github.jwharm.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 calling. See
Gtk.distributeNaturalAllocation(int, org.gnome.gtk.RequestedSize[])
.-
Constructor Summary
ConstructorDescriptionAllocate 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 MemoryLayout
The memory layout of the native struct.readData()
Read the value of the fielddata
.int
Read the value of the fieldminimum_size
.int
Read the value of the fieldnatural_size
.void
writeData
(MemorySegment data) Write a value in the fielddata
.void
writeMinimumSize
(int minimumSize) Write a value in the fieldminimum_size
.void
writeNaturalSize
(int naturalSize) Write a value in the fieldnatural_size
.Methods inherited from class io.github.jwharm.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 fielddata
minimumSize
- value for the fieldminimumSize
naturalSize
- value for the fieldnaturalSize
arena
- 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 fielddata
minimumSize
- value for the fieldminimumSize
naturalSize
- 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
-