diff options
author | 2020-04-30 05:04:45 +0200 | |
---|---|---|
committer | 2020-04-30 05:04:45 +0200 | |
commit | bb9ccc4f62ceea08dc1ef0c6c4d3d219897e44a1 (patch) | |
tree | 5741bbfd344137f88deb8d87584cc70fb0a9f80b /native | |
parent | 137664ca88a9bf2398380fd1c04b00c62c868383 (diff) | |
download | iced-bb9ccc4f62ceea08dc1ef0c6c4d3d219897e44a1.tar.gz iced-bb9ccc4f62ceea08dc1ef0c6c4d3d219897e44a1.tar.bz2 iced-bb9ccc4f62ceea08dc1ef0c6c4d3d219897e44a1.zip |
Remove inconsistent `input` module in `iced_native`
Diffstat (limited to 'native')
-rw-r--r-- | native/src/event.rs | 5 | ||||
-rw-r--r-- | native/src/input.rs | 3 | ||||
-rw-r--r-- | native/src/keyboard.rs (renamed from native/src/input/keyboard.rs) | 0 | ||||
-rw-r--r-- | native/src/lib.rs | 3 | ||||
-rw-r--r-- | native/src/mouse.rs (renamed from native/src/input/mouse.rs) | 0 | ||||
-rw-r--r-- | native/src/mouse/click.rs (renamed from native/src/input/mouse/click.rs) | 0 | ||||
-rw-r--r-- | native/src/user_interface.rs | 4 | ||||
-rw-r--r-- | native/src/widget/button.rs | 4 | ||||
-rw-r--r-- | native/src/widget/checkbox.rs | 2 | ||||
-rw-r--r-- | native/src/widget/pane_grid.rs | 5 | ||||
-rw-r--r-- | native/src/widget/pane_grid/state.rs | 2 | ||||
-rw-r--r-- | native/src/widget/radio.rs | 2 | ||||
-rw-r--r-- | native/src/widget/scrollable.rs | 4 | ||||
-rw-r--r-- | native/src/widget/slider.rs | 4 | ||||
-rw-r--r-- | native/src/widget/text_input.rs | 12 |
15 files changed, 20 insertions, 30 deletions
diff --git a/native/src/event.rs b/native/src/event.rs index b2550ead..606a71d6 100644 --- a/native/src/event.rs +++ b/native/src/event.rs @@ -1,7 +1,4 @@ -use crate::{ - input::{keyboard, mouse}, - window, -}; +use crate::{keyboard, mouse, window}; /// A user interface event. /// diff --git a/native/src/input.rs b/native/src/input.rs deleted file mode 100644 index ad8ed252..00000000 --- a/native/src/input.rs +++ /dev/null @@ -1,3 +0,0 @@ -//! Map your system events into input events that the runtime can understand. -pub mod keyboard; -pub mod mouse; diff --git a/native/src/input/keyboard.rs b/native/src/keyboard.rs index 012538e3..012538e3 100644 --- a/native/src/input/keyboard.rs +++ b/native/src/keyboard.rs diff --git a/native/src/lib.rs b/native/src/lib.rs index a3b581b3..88bf4423 100644 --- a/native/src/lib.rs +++ b/native/src/lib.rs @@ -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; diff --git a/native/src/input/mouse.rs b/native/src/mouse.rs index 9ee406cf..9ee406cf 100644 --- a/native/src/input/mouse.rs +++ b/native/src/mouse.rs diff --git a/native/src/input/mouse/click.rs b/native/src/mouse/click.rs index d27bc67e..d27bc67e 100644 --- a/native/src/input/mouse/click.rs +++ b/native/src/mouse/click.rs diff --git a/native/src/user_interface.rs b/native/src/user_interface.rs index 5d9221e9..48cd6111 100644 --- a/native/src/user_interface.rs +++ b/native/src/user_interface.rs @@ -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; diff --git a/native/src/widget/button.rs b/native/src/widget/button.rs index 5d414023..c932da2b 100644 --- a/native/src/widget/button.rs +++ b/native/src/widget/button.rs @@ -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; diff --git a/native/src/widget/checkbox.rs b/native/src/widget/checkbox.rs index c49ac707..5fb13290 100644 --- a/native/src/widget/checkbox.rs +++ b/native/src/widget/checkbox.rs @@ -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, }; diff --git a/native/src/widget/pane_grid.rs b/native/src/widget/pane_grid.rs index fe2bbe07..c398a30b 100644 --- a/native/src/widget/pane_grid.rs +++ b/native/src/widget/pane_grid.rs @@ -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 diff --git a/native/src/widget/pane_grid/state.rs b/native/src/widget/pane_grid/state.rs index 0a8b8419..ed2813b8 100644 --- a/native/src/widget/pane_grid/state.rs +++ b/native/src/widget/pane_grid/state.rs @@ -1,5 +1,5 @@ use crate::{ - input::keyboard, + keyboard, pane_grid::{node::Node, Axis, Direction, Pane, Split}, Hasher, Point, Rectangle, Size, }; diff --git a/native/src/widget/radio.rs b/native/src/widget/radio.rs index deea7034..ab5bcf32 100644 --- a/native/src/widget/radio.rs +++ b/native/src/widget/radio.rs @@ -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, }; diff --git a/native/src/widget/scrollable.rs b/native/src/widget/scrollable.rs index da11c50c..3c8e5e5b 100644 --- a/native/src/widget/scrollable.rs +++ b/native/src/widget/scrollable.rs @@ -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}; diff --git a/native/src/widget/slider.rs b/native/src/widget/slider.rs index a00d7c8d..8cdfc3de 100644 --- a/native/src/widget/slider.rs +++ b/native/src/widget/slider.rs @@ -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}; diff --git a/native/src/widget/text_input.rs b/native/src/widget/text_input.rs index b11269db..1cdbe007 100644 --- a/native/src/widget/text_input.rs +++ b/native/src/widget/text_input.rs @@ -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, |