Interface SimpleAction.OnActivate

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.

@FunctionalInterface public static interface SimpleAction.OnActivate
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    onActivate(Variant parameter)
    Indicates that the action was just activated.
  • Method Details

    • onActivate

      void onActivate(@Nullable Variant parameter)
      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.
      Parameters:
      parameter - the parameter to the activation, or %NULL if it has no parameter