SimpleAction.connectActivate

Connect to Activate signal.

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 the #GSimpleAction::change-state signal. For stateful actions where the state type is equal to the parameter type, the default is to forward them directly to #GSimpleAction::change-state. This should allow almost all users of #GSimpleAction to connect only one handler or the other.

class SimpleAction
ulong
connectActivate
(
T
)
(,
Flag!"After" after = No.After
)
if (
isCallable!T &&
is(ReturnType!T == void)
&&
(
Parameters!T.length < 1 ||
(
ParameterStorageClassTuple!T[0] == ParameterStorageClass.none &&
is(Parameters!T[0] == glib.variant.VariantG)
)
)
&&
(
Parameters!T.length < 2 ||
(
ParameterStorageClassTuple!T[1] == ParameterStorageClass.none &&
)
)
&&
Parameters!T.length < 3
)

Parameters

callback T

signal callback delegate or function to connect

void callback(glib.variant.VariantG parameter, gio.simple_action.SimpleAction simpleAction)

parameter the parameter to the activation, or null if it has no parameter (optional)

simpleAction the instance the signal is connected to (optional)

after Flag!"After"

Yes.After to execute callback after default handler, No.After to execute before (default)

Return Value

Type: ulong

Signal ID