Package org.gnome.gobject
Class EnumClass
java.lang.Object
org.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
ConstructorsConstructorDescriptionAllocate 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 MemoryLayoutThe memory layout of the native struct.@Nullable TypeClassRead the value of the fieldg_type_class.intRead the value of the fieldmaximum.intRead the value of the fieldminimum.intRead the value of the fieldn_values.Read the value of the fieldvalues.voidwriteGTypeClass(@Nullable TypeClass gTypeClass) Write a value in the fieldg_type_class.voidwriteMaximum(int maximum) Write a value in the fieldmaximum.voidwriteMinimum(int minimum) Write a value in the fieldminimum.voidwriteNValues(int nValues) Write a value in the fieldn_values.voidwriteValues(EnumValue values) Write a value in the fieldvalues.Methods inherited from class org.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 fieldgTypeClassminimum- value for the fieldminimummaximum- value for the fieldmaximumnValues- value for the fieldnValuesvalues- value for the fieldvaluesarena- 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 fieldgTypeClassminimum- value for the fieldminimummaximum- value for the fieldmaximumnValues- value for the fieldnValuesvalues- 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
-