Gnome::Gtk4::CallbackAction
#------------------------------------------------------------------------------- #--[Class Description]---------------------------------------------------------- #-------------------------------------------------------------------------------
Description
A Gnome::Gtk4::ShortcutAction that invokes a callback.
Uml Diagram =for image :src<asset_files/images/plantuml/CallbackAction.png> :width<70%> :class<inline>
#------------------------------------------------------------------------------- #--[Class Initialization]------------------------------------------------------- #-------------------------------------------------------------------------------
Class initialization
new
:native-object
Create an object using a native object from an object of the same type found elsewhere. See also Gnome::N::TopLevelSupportClass.
multi method new ( N-Object() :$native-object! )
#-------------------------------------------------------------------------------
new-callbackaction
Create a custom action that calls the given $callback when
activated.
method new-callbackaction ( GtkShortcutFunc &callback, gpointer $data, GDestroyNotify &destroy --> Gnome::Gtk4::CallbackAction )
GtkShortcutFunc &callback; the callback to call. The function must be specified with the following signature;
:( N-Object $widget, N-Object $args, gpointer $user-data ).$data; the data to be passed to
$callback.GDestroyNotify &destroy; the function to be called when the callback action is finalized. The function must be specified with the following signature;
:( gpointer $data ).