pub trait Signal: Any {
// Provided methods
fn init(&mut self, _engine: &mut Engine) { ... }
fn device_events(&mut self, _engine: &mut Engine, _events: &DeviceEvent) { ... }
fn window_events(&mut self, _engine: &mut Engine, _events: &WindowEvent) { ... }
fn frame(
&mut self,
_engine: &mut Engine,
_encoder: &mut CommandEncoder,
_view: &TextureView,
) { ... }
}
Expand description
Allows all events to be fetched directly, making it easier to add custom additions to the engine.
Provided Methods§
Sourcefn init(&mut self, _engine: &mut Engine)
fn init(&mut self, _engine: &mut Engine)
This is ran as soon as the engine is properly initialized and all components are ready
Sourcefn device_events(&mut self, _engine: &mut Engine, _events: &DeviceEvent)
fn device_events(&mut self, _engine: &mut Engine, _events: &DeviceEvent)
This is ran at the device events when available
Sourcefn window_events(&mut self, _engine: &mut Engine, _events: &WindowEvent)
fn window_events(&mut self, _engine: &mut Engine, _events: &WindowEvent)
This is ran at the window events when available
Sourcefn frame(
&mut self,
_engine: &mut Engine,
_encoder: &mut CommandEncoder,
_view: &TextureView,
)
fn frame( &mut self, _engine: &mut Engine, _encoder: &mut CommandEncoder, _view: &TextureView, )
ran before the frame is rendered