Package org.gnome.gobject
Class EnumValue
java.lang.Object
org.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
ConstructorsConstructorDescriptionAllocate 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 MemoryLayoutThe memory layout of the native struct.intRead the value of the fieldvalue.Read the value of the fieldvalue_name.Read the value of the fieldvalue_nick.voidwriteValue(int value) Write a value in the fieldvalue.voidwriteValueName(String valueName, Arena _arena) Write a value in the fieldvalue_name.voidwriteValueNick(String valueNick, Arena _arena) Write a value in the fieldvalue_nick.Methods inherited from class org.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 fieldvaluevalueName- value for the fieldvalueNamevalueNick- value for the fieldvalueNickarena- 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 fieldvaluevalueName- value for the fieldvalueNamevalueNick- 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
-