Trait rin_window::events::Events[][src]

pub trait Events<'a> {
    fn keys(self) -> Stream<'a, KeyEvent>;
fn keys_partition(self) -> (Stream<'a, KeyEvent>, Stream<'a, Event>);
fn mouse(self) -> Stream<'a, MouseEvent>;
fn mouse_partition(self) -> (Stream<'a, MouseEvent>, Stream<'a, Event>);
fn window(self) -> Stream<'a, WindowEvent>;
fn window_partition(self) -> (Stream<'a, WindowEvent>, Stream<'a, Event>);
fn update(self) -> Stream<'a, f64>;
fn update_partition(self) -> (Stream<'a, f64>, Stream<'a, Event>);
fn dropped(self) -> Stream<'a, Vec<PathBuf>>;
fn dropped_partition(self) -> (Stream<'a, Vec<PathBuf>>, Stream<'a, Event>);
fn with_viewport(
        self,
        viewport: Property<'a, Rect<i32>>
    ) -> Stream<'a, Event>; }

Trait to transform a general window event into specific mouse, key…

Required methods

fn keys(self) -> Stream<'a, KeyEvent>[src]

Selects only key events

fn keys_partition(self) -> (Stream<'a, KeyEvent>, Stream<'a, Event>)[src]

Partitions events into keys and non keys events.

fn mouse(self) -> Stream<'a, MouseEvent>[src]

Selects only mouse events

fn mouse_partition(self) -> (Stream<'a, MouseEvent>, Stream<'a, Event>)[src]

Selects only mouse events and returns the rest through the second stream

fn window(self) -> Stream<'a, WindowEvent>[src]

Selects only window events

fn window_partition(self) -> (Stream<'a, WindowEvent>, Stream<'a, Event>)[src]

Selects only window events and returns the rest through the second stream

fn update(self) -> Stream<'a, f64>[src]

Selects only the update event

fn update_partition(self) -> (Stream<'a, f64>, Stream<'a, Event>)[src]

Selects only the update event and returns the rest through the second stream

fn dropped(self) -> Stream<'a, Vec<PathBuf>>[src]

Selects only the dropped event

fn dropped_partition(self) -> (Stream<'a, Vec<PathBuf>>, Stream<'a, Event>)[src]

Selects only the dropped event and returns the rest through the second stream

fn with_viewport(self, viewport: Property<'a, Rect<i32>>) -> Stream<'a, Event>[src]

Transforms events into events inside a viewport

Only affects mouse events

Loading content...

Implementors

impl<'a, S: StreamExt<'a, Event>> Events<'a> for S[src]

Loading content...