Package org.gnome.glib
Class OptionEntry
java.lang.Object
io.github.jwharm.javagi.base.ProxyInstance
org.gnome.glib.OptionEntry
- All Implemented Interfaces:
Proxy
A GOptionEntry struct defines a single option. To have an effect, they
must be added to a
GOptionGroup
with g_option_context_add_main_entries()
or g_option_group_add_entries().-
Constructor Summary
ConstructorDescriptionAllocate a new OptionEntry.OptionEntry
(Arena arena) Allocate a new OptionEntry.OptionEntry
(MemorySegment address) Create a OptionEntry proxy instance for the provided memory address.OptionEntry
(String longName, byte shortName, int flags, OptionArg arg, MemorySegment argData, String description, String argDescription) Allocate a new OptionEntry with the fields set to the provided values.OptionEntry
(String longName, byte shortName, int flags, OptionArg arg, MemorySegment argData, String description, String argDescription, Arena arena) Allocate a new OptionEntry with the fields set to the provided values. -
Method Summary
Modifier and TypeMethodDescriptionstatic MemoryLayout
The memory layout of the native struct.readArg()
Read the value of the fieldarg
.Read the value of the fieldarg_data
.Read the value of the fieldarg_description
.Read the value of the fielddescription
.int
Read the value of the fieldflags
.Read the value of the fieldlong_name
.byte
Read the value of the fieldshort_name
.void
Write a value in the fieldarg
.void
writeArgData
(MemorySegment argData) Write a value in the fieldarg_data
.void
writeArgDescription
(String argDescription, Arena _arena) Write a value in the fieldarg_description
.void
writeDescription
(String description, Arena _arena) Write a value in the fielddescription
.void
writeFlags
(int flags) Write a value in the fieldflags
.void
writeLongName
(String longName, Arena _arena) Write a value in the fieldlong_name
.void
writeShortName
(byte shortName) Write a value in the fieldshort_name
.Methods inherited from class io.github.jwharm.javagi.base.ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
OptionEntry
Create a OptionEntry proxy instance for the provided memory address.- Parameters:
address
- the memory address of the native object
-
OptionEntry
Allocate a new OptionEntry.- Parameters:
arena
- to control the memory allocation scope
-
OptionEntry
public OptionEntry()Allocate a new OptionEntry. The memory is allocated withArena.ofAuto()
. -
OptionEntry
public OptionEntry(String longName, byte shortName, int flags, OptionArg arg, MemorySegment argData, String description, String argDescription, Arena arena) Allocate a new OptionEntry with the fields set to the provided values.- Parameters:
longName
- value for the fieldlongName
shortName
- value for the fieldshortName
flags
- value for the fieldflags
arg
- value for the fieldarg
argData
- value for the fieldargData
description
- value for the fielddescription
argDescription
- value for the fieldargDescription
arena
- to control the memory allocation scope
-
OptionEntry
public OptionEntry(String longName, byte shortName, int flags, OptionArg arg, MemorySegment argData, String description, String argDescription) Allocate a new OptionEntry with the fields set to the provided values. The memory is allocated withArena.ofAuto()
.- Parameters:
longName
- value for the fieldlongName
shortName
- value for the fieldshortName
flags
- value for the fieldflags
arg
- value for the fieldarg
argData
- value for the fieldargData
description
- value for the fielddescription
argDescription
- value for the fieldargDescription
-
-
Method Details
-
getMemoryLayout
The memory layout of the native struct.- Returns:
- the memory layout
-
readLongName
Read the value of the fieldlong_name
.- Returns:
- The value of the field
long_name
-
writeLongName
-
readShortName
public byte readShortName()Read the value of the fieldshort_name
.- Returns:
- The value of the field
short_name
-
writeShortName
public void writeShortName(byte shortName) Write a value in the fieldshort_name
.- Parameters:
shortName
- The new value for the fieldshort_name
-
readFlags
public int readFlags()Read the value of the fieldflags
.- Returns:
- The value of the field
flags
-
writeFlags
public void writeFlags(int flags) Write a value in the fieldflags
.- Parameters:
flags
- The new value for the fieldflags
-
readArg
-
writeArg
Write a value in the fieldarg
.- Parameters:
arg
- The new value for the fieldarg
-
readArgData
Read the value of the fieldarg_data
.- Returns:
- The value of the field
arg_data
-
writeArgData
Write a value in the fieldarg_data
.- Parameters:
argData
- The new value for the fieldarg_data
-
readDescription
Read the value of the fielddescription
.- Returns:
- The value of the field
description
-
writeDescription
-
readArgDescription
Read the value of the fieldarg_description
.- Returns:
- The value of the field
arg_description
-
writeArgDescription
-