invoke_callback() function

Invoke a user callback for a given state.

Calling this function is equivalent to calling gui.invoke_callback(state_id, callback, args, module_context).

Parameters:

Name Type Description Default
gui Gui

The current Gui instance.

required
state_id str

The identifier of the state to use, as returned by get_state_id().

required
callback Callable[[State, ...], None]

The user-defined function that is invoked.
The first parameter of this function must be a State.

required
args Optional[Sequence]

The remaining arguments, as a List or a Tuple.

None
module_context Optional[str]

the name of the module that will be used.

None