Package org.gnome.gobject
Class EnumClass
java.lang.Object
io.github.jwharm.javagi.base.ProxyInstance
org.gnome.gobject.EnumClass
- All Implemented Interfaces:
Proxy
The class of an enumeration type holds information about its
possible values.
-
Constructor Summary
ConstructorDescriptionAllocate a new EnumClass.Allocate a new EnumClass.EnumClass
(MemorySegment address) Create a EnumClass proxy instance for the provided memory address.Allocate a new EnumClass with the fields set to the provided values.EnumClass
(TypeClass gTypeClass, int minimum, int maximum, int nValues, EnumValue values, Arena arena) Allocate a new EnumClass with the fields set to the provided values. -
Method Summary
Modifier and TypeMethodDescriptionstatic MemoryLayout
The memory layout of the native struct.Read the value of the fieldg_type_class
.int
Read the value of the fieldmaximum
.int
Read the value of the fieldminimum
.int
Read the value of the fieldn_values
.Read the value of the fieldvalues
.void
writeGTypeClass
(TypeClass gTypeClass) Write a value in the fieldg_type_class
.void
writeMaximum
(int maximum) Write a value in the fieldmaximum
.void
writeMinimum
(int minimum) Write a value in the fieldminimum
.void
writeNValues
(int nValues) Write a value in the fieldn_values
.void
writeValues
(EnumValue values) Write a value in the fieldvalues
.Methods inherited from class io.github.jwharm.javagi.base.ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
EnumClass
Create a EnumClass proxy instance for the provided memory address.- Parameters:
address
- the memory address of the native object
-
EnumClass
Allocate a new EnumClass.- Parameters:
arena
- to control the memory allocation scope
-
EnumClass
public EnumClass()Allocate a new EnumClass. The memory is allocated withArena.ofAuto()
. -
EnumClass
public EnumClass(TypeClass gTypeClass, int minimum, int maximum, int nValues, EnumValue values, Arena arena) Allocate a new EnumClass with the fields set to the provided values.- Parameters:
gTypeClass
- value for the fieldgTypeClass
minimum
- value for the fieldminimum
maximum
- value for the fieldmaximum
nValues
- value for the fieldnValues
values
- value for the fieldvalues
arena
- to control the memory allocation scope
-
EnumClass
Allocate a new EnumClass with the fields set to the provided values. The memory is allocated withArena.ofAuto()
.- Parameters:
gTypeClass
- value for the fieldgTypeClass
minimum
- value for the fieldminimum
maximum
- value for the fieldmaximum
nValues
- value for the fieldnValues
values
- value for the fieldvalues
-
-
Method Details
-
getMemoryLayout
The memory layout of the native struct.- Returns:
- the memory layout
-
readGTypeClass
Read the value of the fieldg_type_class
.- Returns:
- The value of the field
g_type_class
-
writeGTypeClass
Write a value in the fieldg_type_class
.- Parameters:
gTypeClass
- The new value for the fieldg_type_class
-
readMinimum
public int readMinimum()Read the value of the fieldminimum
.- Returns:
- The value of the field
minimum
-
writeMinimum
public void writeMinimum(int minimum) Write a value in the fieldminimum
.- Parameters:
minimum
- The new value for the fieldminimum
-
readMaximum
public int readMaximum()Read the value of the fieldmaximum
.- Returns:
- The value of the field
maximum
-
writeMaximum
public void writeMaximum(int maximum) Write a value in the fieldmaximum
.- Parameters:
maximum
- The new value for the fieldmaximum
-
readNValues
public int readNValues()Read the value of the fieldn_values
.- Returns:
- The value of the field
n_values
-
writeNValues
public void writeNValues(int nValues) Write a value in the fieldn_values
.- Parameters:
nValues
- The new value for the fieldn_values
-
readValues
Read the value of the fieldvalues
.- Returns:
- The value of the field
values
-
writeValues
Write a value in the fieldvalues
.- Parameters:
values
- The new value for the fieldvalues
-