[−][src]Trait screenruster_saver::Saver
Required methods
fn start(&mut self)
The saver has been started, useful to implement a fade in or animation to only show at the beginning.
fn stop(&mut self)
The saver has been stopped, useful to implement a fade out or animation to show at the end.
fn state(&self) -> State
Return the current saver state.
fn render<S: Surface>(&self, target: &mut S, screen: &Texture2d)
Render the saver.
Provided methods
fn config(&mut self, config: JsonValue)
Initialize configuration.
fn initialize(&mut self, context: Rc<Context>)
Initialize any graphics related stuff.
fn resize(&mut self, context: Rc<Context>)
Resize the viewport.
fn throttle(&mut self, value: bool)
Whether to try and reduce power usage or not.
fn blank(&mut self, value: bool)
Whether the screen has been blanked or unblanked.
fn safety(&mut self, value: Safety)
Whether the screen is actually safe.
fn pointer(&mut self, value: Pointer)
The pointer moved or clicked.
fn password(&mut self, value: Password)
The password is being interacted with.
fn lock(&mut self)
The screen has been locked.
fn update(&mut self)
Called every 15 milliseconds.