Scenic.Scene.handle_input

You're seeing just the callback handle_input, go back to Scenic.Scene module for more information.
Link to this callback

handle_input(input, id, scene)

View Source (optional)

Specs

handle_input(input :: Scenic.ViewPort.Input.t(), id :: any(), scene :: t()) ::
  {:noreply, scene}
  | {:noreply, scene}
  | {:noreply, scene, timeout()}
  | {:noreply, scene, :hibernate}
  | {:noreply, scene, opts :: response_opts()}
  | {:halt, scene}
  | {:halt, scene, timeout()}
  | {:halt, scene, :hibernate}
  | {:halt, scene, opts :: response_opts()}
  | {:cont, input, scene}
  | {:cont, input, scene, timeout()}
  | {:cont, input, scene, :hibernate}
  | {:cont, input, scene, opts :: response_opts()}
  | {:stop, reason, scene}
when scene: t(), reason: term(), input: term()

Invoked when the Scene receives input from a driver.

Input is messages sent directly from a driver, usually based on some action by the user. This is opposed to "events", which are generated by other scenes.

When input arrives at a scene, you can consume it, or pass it along to the scene above you in the ViewPort's supervision structure.

To consume the input and have processing stop afterward, return either a {:halt, ...} or {:noreply, ...} value. They are effectively the same thing.

To allow the scene's parent to process the input, return {:cont, input, state, ...}. Note that you can pass along the input unchanged or transform it in the process if you wish.

The callback supports all the return values of the init callback in Genserver.

In addition to the normal return values defined by GenServer, a Scene can add an optional {push: graph} term, which pushes the graph to the viewport.

This has replaced push_graph() as the preferred way to push a graph.