Gio.SimpleAction.new

function new(name: String, parameter_type: GLib.VariantType): Gio.SimpleAction {
    // Gjs wrapper for g_simple_action_new()
}
  

Creates a new action.

The created action is stateless. See Gio.SimpleAction.new_stateful.

Since 2.28

name

the name of the action

parameter_type

the type of parameter to the activate function

Returns

a new Gio.SimpleAction