Package org.gnome.gio
Interface SimpleAction.ActivateCallback
- All Superinterfaces:
FunctionPointer
- Enclosing class:
SimpleAction
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Functional interface declaration of the
ActivateCallback
callback.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Indicates that the action was just activated.default MemorySegment
toCallback
(Arena arena) Creates a native function pointer to theupcall(java.lang.foreign.MemorySegment, java.lang.foreign.MemorySegment)
method.default void
upcall
(MemorySegment sourceSimpleAction, MemorySegment parameter) Theupcall
method is called from native code.
-
Method Details
-
run
Indicates that the action was just activated.parameter
will always be of the expected type, i.e. the parameter type specified when the action was created. If an incorrect type is given when activating the action, this signal is not emitted.Since GLib 2.40, if no handler is connected to this signal then the default behaviour for boolean-stated actions with a
null
parameter type is to toggle them via theGSimpleAction
::change-state signal. For stateful actions where the state type is equal to the parameter type, the default is to forward them directly toGSimpleAction
::change-state. This should allow almost all users ofGSimpleAction
to connect only one handler or the other. -
upcall
Theupcall
method is called from native code. The parameters are marshaled andrun(org.gnome.glib.Variant)
is executed. -
toCallback
Creates a native function pointer to theupcall(java.lang.foreign.MemorySegment, java.lang.foreign.MemorySegment)
method.- Specified by:
toCallback
in interfaceFunctionPointer
- Parameters:
arena
- the function pointer will be allocated in this arena- Returns:
- the native function pointer
-