Package org.gnome.gobject
Class EnumValue
java.lang.Object
io.github.jwharm.javagi.base.ProxyInstance
org.gnome.gobject.EnumValue
- All Implemented Interfaces:
Proxy
A structure which contains a single enum value, its name, and its
nickname.
-
Constructor Summary
ConstructorDescriptionAllocate a new EnumValue.Allocate a new EnumValue with the fields set to the provided values.Allocate a new EnumValue with the fields set to the provided values.Allocate a new EnumValue.EnumValue
(MemorySegment address) Create a EnumValue 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
-
EnumValue
Create a EnumValue proxy instance for the provided memory address.- Parameters:
address
- the memory address of the native object
-
EnumValue
Allocate a new EnumValue.- Parameters:
arena
- to control the memory allocation scope
-
EnumValue
public EnumValue()Allocate a new EnumValue. The memory is allocated withArena.ofAuto()
. -
EnumValue
Allocate a new EnumValue 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
-
EnumValue
Allocate a new EnumValue 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
-