Remove inconsistent input module in iced_native

This commit is contained in:
Héctor Ramón Jiménez 2020-04-30 05:04:45 +02:00
parent 137664ca88
commit bb9ccc4f62
20 changed files with 27 additions and 45 deletions

View file

@ -1,7 +1,4 @@
use crate::{
input::{keyboard, mouse},
window,
};
use crate::{keyboard, mouse, window};
/// A user interface event.
///

View file

@ -1,3 +0,0 @@
//! Map your system events into input events that the runtime can understand.
pub mod keyboard;
pub mod mouse;

View file

@ -39,8 +39,9 @@
#![deny(unused_results)]
#![forbid(unsafe_code)]
#![forbid(rust_2018_idioms)]
pub mod input;
pub mod keyboard;
pub mod layout;
pub mod mouse;
pub mod renderer;
pub mod subscription;
pub mod widget;

View file

@ -1,6 +1,4 @@
use crate::{
input::mouse, layout, Clipboard, Element, Event, Layout, Point, Size,
};
use crate::{layout, mouse, Clipboard, Element, Event, Layout, Point, Size};
use std::hash::Hasher;

View file

@ -5,8 +5,8 @@
//! [`Button`]: struct.Button.html
//! [`State`]: struct.State.html
use crate::{
input::mouse, layout, Clipboard, Element, Event, Hasher, Layout, Length,
Point, Rectangle, Widget,
layout, mouse, Clipboard, Element, Event, Hasher, Layout, Length, Point,
Rectangle, Widget,
};
use std::hash::Hash;

View file

@ -2,7 +2,7 @@
use std::hash::Hash;
use crate::{
input::mouse, layout, row, text, Align, Clipboard, Element, Event, Hasher,
layout, mouse, row, text, Align, Clipboard, Element, Event, Hasher,
HorizontalAlignment, Layout, Length, Point, Rectangle, Row, Text,
VerticalAlignment, Widget,
};

View file

@ -22,9 +22,8 @@ pub use split::Split;
pub use state::{Focus, State};
use crate::{
input::{keyboard, mouse},
layout, Clipboard, Element, Event, Hasher, Layout, Length, Point, Size,
Widget,
keyboard, layout, mouse, Clipboard, Element, Event, Hasher, Layout, Length,
Point, Size, Widget,
};
/// A collection of panes distributed using either vertical or horizontal splits

View file

@ -1,5 +1,5 @@
use crate::{
input::keyboard,
keyboard,
pane_grid::{node::Node, Axis, Direction, Pane, Split},
Hasher, Point, Rectangle, Size,
};

View file

@ -1,6 +1,6 @@
//! Create choices using radio buttons.
use crate::{
input::mouse, layout, row, text, Align, Clipboard, Element, Event, Hasher,
layout, mouse, row, text, Align, Clipboard, Element, Event, Hasher,
HorizontalAlignment, Layout, Length, Point, Rectangle, Row, Text,
VerticalAlignment, Widget,
};

View file

@ -1,7 +1,7 @@
//! Navigate an endless amount of content with a scrollbar.
use crate::{
column, input::mouse, layout, Align, Clipboard, Column, Element, Event,
Hasher, Layout, Length, Point, Rectangle, Size, Widget,
column, layout, mouse, Align, Clipboard, Column, Element, Event, Hasher,
Layout, Length, Point, Rectangle, Size, Widget,
};
use std::{f32, hash::Hash, u32};

View file

@ -5,8 +5,8 @@
//! [`Slider`]: struct.Slider.html
//! [`State`]: struct.State.html
use crate::{
input::mouse, layout, Clipboard, Element, Event, Hasher, Layout, Length,
Point, Rectangle, Size, Widget,
layout, mouse, Clipboard, Element, Event, Hasher, Layout, Length, Point,
Rectangle, Size, Widget,
};
use std::{hash::Hash, ops::RangeInclusive};

View file

@ -15,12 +15,10 @@ pub use value::Value;
use editor::Editor;
use crate::{
input::{
keyboard,
mouse::{self, click},
},
layout, Clipboard, Element, Event, Font, Hasher, Layout, Length, Point,
Rectangle, Size, Widget,
keyboard, layout,
mouse::{self, click},
Clipboard, Element, Event, Font, Hasher, Layout, Length, Point, Rectangle,
Size, Widget,
};
use std::u32;
@ -739,7 +737,7 @@ fn find_cursor_position<Renderer: self::Renderer>(
}
mod platform {
use crate::input::keyboard;
use crate::keyboard;
pub fn is_jump_modifier_pressed(
modifiers: keyboard::ModifiersState,