[][src]Trait screenruster_saver::Saver

pub trait Saver {
    fn start(&mut self);
fn stop(&mut self);
fn state(&self) -> State;
fn render<S: Surface>(&self, target: &mut S, screen: &Texture2d); fn config(&mut self, config: JsonValue) { ... }
fn initialize(&mut self, context: Rc<Context>) { ... }
fn resize(&mut self, context: Rc<Context>) { ... }
fn throttle(&mut self, value: bool) { ... }
fn blank(&mut self, value: bool) { ... }
fn safety(&mut self, value: Safety) { ... }
fn pointer(&mut self, value: Pointer) { ... }
fn password(&mut self, value: Password) { ... }
fn lock(&mut self) { ... }
fn update(&mut self) { ... } }

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.

Loading content...

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.

Loading content...

Implementors

Loading content...