Class VarNum
java.lang.Object
org.javagi.base.ProxyInstance
org.freedesktop.harfbuzz.VarNum
- All Implemented Interfaces:
Proxy
-
Constructor Summary
ConstructorsConstructorDescriptionVarNum()Allocate a new VarNum.VarNum(float f, int u32, int i32, short[] u16, short[] i16, byte[] u8, byte[] i8) Allocate a new VarNum with the fields set to the provided values.Allocate a new VarNum with the fields set to the provided values.Allocate a new VarNum.VarNum(MemorySegment address) Create a VarNum proxy instance for the provided memory address. -
Method Summary
Modifier and TypeMethodDescriptionstatic MemoryLayoutThe memory layout of the native struct.floatreadF()Read the value of the fieldf.@Nullable short @Nullable []readI16()Read the value of the fieldi16.intreadI32()Read the value of the fieldi32.@Nullable byte @Nullable []readI8()Read the value of the fieldi8.@Nullable short @Nullable []readU16()Read the value of the fieldu16.intreadU32()Read the value of the fieldu32.@Nullable byte @Nullable []readU8()Read the value of the fieldu8.voidwriteF(float f) Write a value in the fieldf.voidWrite a value in the fieldi16.voidwriteI32(int i32) Write a value in the fieldi32.voidWrite a value in the fieldi8.voidWrite a value in the fieldu16.voidwriteU32(int u32) Write a value in the fieldu32.voidWrite a value in the fieldu8.Methods inherited from class ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
VarNum
Create a VarNum proxy instance for the provided memory address.- Parameters:
address- the memory address of the native object
-
VarNum
Allocate a new VarNum.- Parameters:
arena- to control the memory allocation scope
-
VarNum
public VarNum()Allocate a new VarNum. The memory is allocated withArena.ofAuto(). -
VarNum
public VarNum(float f, int u32, int i32, short[] u16, short[] i16, byte[] u8, byte[] i8, Arena arena) Allocate a new VarNum with the fields set to the provided values.- Parameters:
f- value for the fieldfu32- value for the fieldu32i32- value for the fieldi32u16- value for the fieldu16i16- value for the fieldi16u8- value for the fieldu8i8- value for the fieldi8arena- to control the memory allocation scope
-
VarNum
public VarNum(float f, int u32, int i32, short[] u16, short[] i16, byte[] u8, byte[] i8) Allocate a new VarNum with the fields set to the provided values. The memory is allocated withArena.ofAuto().- Parameters:
f- value for the fieldfu32- value for the fieldu32i32- value for the fieldi32u16- value for the fieldu16i16- value for the fieldi16u8- value for the fieldu8i8- value for the fieldi8
-
-
Method Details
-
getMemoryLayout
The memory layout of the native struct.- Returns:
- the memory layout
-
readF
public float readF()Read the value of the fieldf.- Returns:
- The value of the field
f
-
writeF
public void writeF(float f) Write a value in the fieldf.- Parameters:
f- The new value for the fieldf
-
readU32
public int readU32()Read the value of the fieldu32.- Returns:
- The value of the field
u32
-
writeU32
public void writeU32(int u32) Write a value in the fieldu32.- Parameters:
u32- The new value for the fieldu32
-
readI32
public int readI32()Read the value of the fieldi32.- Returns:
- The value of the field
i32
-
writeI32
public void writeI32(int i32) Write a value in the fieldi32.- Parameters:
i32- The new value for the fieldi32
-
readU16
public @Nullable short @Nullable [] readU16()Read the value of the fieldu16.- Returns:
- The value of the field
u16
-
writeU16
Write a value in the fieldu16.- Parameters:
u16- The new value for the fieldu16
-
readI16
public @Nullable short @Nullable [] readI16()Read the value of the fieldi16.- Returns:
- The value of the field
i16
-
writeI16
Write a value in the fieldi16.- Parameters:
i16- The new value for the fieldi16
-
readU8
public @Nullable byte @Nullable [] readU8()Read the value of the fieldu8.- Returns:
- The value of the field
u8
-
writeU8
Write a value in the fieldu8.- Parameters:
u8- The new value for the fieldu8
-
readI8
public @Nullable byte @Nullable [] readI8()Read the value of the fieldi8.- Returns:
- The value of the field
i8
-
writeI8
Write a value in the fieldi8.- Parameters:
i8- The new value for the fieldi8
-