Package org.gnome.gio
Class ActionEntry
java.lang.Object
org.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
Nested ClassesModifier and TypeClassDescriptionstatic interfaceFunctional interface declaration of theActivateCallbackcallback.static interfaceFunctional interface declaration of theChangeStateCallbackcallback. -
Constructor Summary
ConstructorsConstructorDescriptionAllocate 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 MemoryLayoutThe memory layout of the native struct.voidoverrideActivate(ActionEntry.ActivateCallback activate, Arena _arena) Write a value in the fieldactivate.voidoverrideChangeState(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.voidWrite a value in the fieldname.voidwriteParameterType(String parameterType, Arena _arena) Write a value in the fieldparameter_type.voidwriteState(String state, Arena _arena) Write a value in the fieldstate.Methods inherited from class org.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 fieldnameactivate- callback function for the fieldactivateparameterType- value for the fieldparameterTypestate- value for the fieldstatechangeState- callback function for the fieldchangeStatearena- 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 fieldnameactivate- callback function for the fieldactivateparameterType- value for the fieldparameterTypestate- value for the fieldstatechangeState- 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
-