Package org.gnome.gobject
Class FlagsValue
java.lang.Object
io.github.jwharm.javagi.base.ProxyInstance
org.gnome.gobject.FlagsValue
- All Implemented Interfaces:
Proxy
A structure which contains a single flags value, its name, and its
nickname.
-
Constructor Summary
ConstructorDescriptionAllocate a new FlagsValue.FlagsValue
(int value, String valueName, String valueNick) Allocate a new FlagsValue with the fields set to the provided values.FlagsValue
(int value, String valueName, String valueNick, Arena arena) Allocate a new FlagsValue with the fields set to the provided values.FlagsValue
(Arena arena) Allocate a new FlagsValue.FlagsValue
(MemorySegment address) Create a FlagsValue proxy instance for the provided memory address. -
Method Summary
Modifier and TypeMethodDescriptionstatic MemoryLayout
The memory layout of the native struct.int
Read the value of the fieldvalue
.Read the value of the fieldvalue_name
.Read the value of the fieldvalue_nick
.void
writeValue
(int value) Write a value in the fieldvalue
.void
writeValueName
(String valueName, Arena _arena) Write a value in the fieldvalue_name
.void
writeValueNick
(String valueNick, Arena _arena) Write a value in the fieldvalue_nick
.Methods inherited from class io.github.jwharm.javagi.base.ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
FlagsValue
Create a FlagsValue proxy instance for the provided memory address.- Parameters:
address
- the memory address of the native object
-
FlagsValue
Allocate a new FlagsValue.- Parameters:
arena
- to control the memory allocation scope
-
FlagsValue
public FlagsValue()Allocate a new FlagsValue. The memory is allocated withArena.ofAuto()
. -
FlagsValue
Allocate a new FlagsValue with the fields set to the provided values.- Parameters:
value
- value for the fieldvalue
valueName
- value for the fieldvalueName
valueNick
- value for the fieldvalueNick
arena
- to control the memory allocation scope
-
FlagsValue
Allocate a new FlagsValue with the fields set to the provided values. The memory is allocated withArena.ofAuto()
.- Parameters:
value
- value for the fieldvalue
valueName
- value for the fieldvalueName
valueNick
- value for the fieldvalueNick
-
-
Method Details
-
getMemoryLayout
The memory layout of the native struct.- Returns:
- the memory layout
-
readValue
public int readValue()Read the value of the fieldvalue
.- Returns:
- The value of the field
value
-
writeValue
public void writeValue(int value) Write a value in the fieldvalue
.- Parameters:
value
- The new value for the fieldvalue
-
readValueName
Read the value of the fieldvalue_name
.- Returns:
- The value of the field
value_name
-
writeValueName
-
readValueNick
Read the value of the fieldvalue_nick
.- Returns:
- The value of the field
value_nick
-
writeValueNick
-