About all my projects
Gnome::Gtk4::CallbackAction

Gnome::Gtk4::CallbackAction

Description

A Gnome::Gtk4::ShortcutAction that invokes a callback.

Class initialization

new

:native-object

Create an object using a native object from elsewhere. See also Gnome::N::TopLevelSupportClass.

multi method new ( N-Object :$native-object! )

new-callbackaction This function is not yet available

Create a custom action that calls the given $callback when activated.

method new-callbackaction ( &callback, gpointer $data, … --> Gnome::Gtk4::CallbackAction \)
  • &callback; the callback to call. Tthe function must be specified with following signature; :( N-Object $widget, N-Object $args, gpointer $user-data -- gboolean )>.

  • $data; the data to be passed to $callback.

  • destroy; the function to be called when the callback action is finalized. Note that each argument must be specified as a type followed by its value!