Package org.gnome.gio
Class ActionEntry
java.lang.Object
io.github.jwharm.javagi.base.ProxyInstance
org.gnome.gio.ActionEntry
- All Implemented Interfaces:
Proxy
This struct defines a single action. It is for use with
ActionMap.addActionEntries(org.gnome.gio.ActionEntry[], java.lang.foreign.MemorySegment)
.
The order of the items in the structure are intended to reflect
frequency of use. It is permissible to use an incomplete initialiser
in order to leave some of the later values as NULL
. All values
after name
are optional. Additional optional fields may be added in
the future.
See ActionMap.addActionEntries(org.gnome.gio.ActionEntry[], java.lang.foreign.MemorySegment)
for an example.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
Functional interface declaration of theActivateCallback
callback.static interface
Functional interface declaration of theChangeStateCallback
callback. -
Constructor Summary
ConstructorDescriptionAllocate a new ActionEntry.ActionEntry
(Arena arena) Allocate a new ActionEntry.ActionEntry
(MemorySegment address) Create a ActionEntry proxy instance for the provided memory address.ActionEntry
(String name, ActionEntry.ActivateCallback activate, String parameterType, String state, ActionEntry.ChangeStateCallback changeState) Allocate a new ActionEntry with the fields set to the provided values.ActionEntry
(String name, ActionEntry.ActivateCallback activate, String parameterType, String state, ActionEntry.ChangeStateCallback changeState, Arena arena) Allocate a new ActionEntry with the fields set to the provided values. -
Method Summary
Modifier and TypeMethodDescriptionstatic MemoryLayout
The memory layout of the native struct.void
overrideActivate
(ActionEntry.ActivateCallback activate, Arena _arena) Write a value in the fieldactivate
.void
overrideChangeState
(ActionEntry.ChangeStateCallback changeState, Arena _arena) Write a value in the fieldchange_state
.readName()
Read the value of the fieldname
.Read the value of the fieldparameter_type
.Read the value of the fieldstate
.void
Write a value in the fieldname
.void
writeParameterType
(String parameterType, Arena _arena) Write a value in the fieldparameter_type
.void
writeState
(String state, Arena _arena) Write a value in the fieldstate
.Methods inherited from class io.github.jwharm.javagi.base.ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
ActionEntry
Create a ActionEntry proxy instance for the provided memory address.- Parameters:
address
- the memory address of the native object
-
ActionEntry
Allocate a new ActionEntry.- Parameters:
arena
- to control the memory allocation scope
-
ActionEntry
public ActionEntry()Allocate a new ActionEntry. The memory is allocated withArena.ofAuto()
. -
ActionEntry
public ActionEntry(String name, ActionEntry.ActivateCallback activate, String parameterType, String state, ActionEntry.ChangeStateCallback changeState, Arena arena) Allocate a new ActionEntry with the fields set to the provided values.- Parameters:
name
- value for the fieldname
activate
- callback function for the fieldactivate
parameterType
- value for the fieldparameterType
state
- value for the fieldstate
changeState
- callback function for the fieldchangeState
arena
- to control the memory allocation scope
-
ActionEntry
public ActionEntry(String name, ActionEntry.ActivateCallback activate, String parameterType, String state, ActionEntry.ChangeStateCallback changeState) Allocate a new ActionEntry with the fields set to the provided values. The memory is allocated withArena.ofAuto()
.- Parameters:
name
- value for the fieldname
activate
- callback function for the fieldactivate
parameterType
- value for the fieldparameterType
state
- value for the fieldstate
changeState
- callback function for the fieldchangeState
-
-
Method Details
-
getMemoryLayout
The memory layout of the native struct.- Returns:
- the memory layout
-
readName
-
writeName
-
overrideActivate
Write a value in the fieldactivate
.- Parameters:
activate
- The new value for the fieldactivate
_arena
- to control the memory allocation scope
-
readParameterType
Read the value of the fieldparameter_type
.- Returns:
- The value of the field
parameter_type
-
writeParameterType
-
readState
-
writeState
-
overrideChangeState
Write a value in the fieldchange_state
.- Parameters:
changeState
- The new value for the fieldchange_state
_arena
- to control the memory allocation scope
-