CallbackAction#

class CallbackAction(**properties: Any)#

Superclasses: ShortcutAction, Object

A GtkShortcutAction that invokes a callback.

Constructors#

class CallbackAction
classmethod new(callback: Callable[[...], bool], *data: Any) CallbackAction#

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

Parameters:
  • callback – the callback to call when the action is activated

  • data – the data to be passed to callback