Remove inconsistent `input` module in `iced_native`
This commit is contained in:
parent
137664ca88
commit
bb9ccc4f62
|
@ -1,7 +1,4 @@
|
|||
use crate::{
|
||||
input::{keyboard, mouse},
|
||||
window,
|
||||
};
|
||||
use crate::{keyboard, mouse, window};
|
||||
|
||||
/// A user interface event.
|
||||
///
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
//! Map your system events into input events that the runtime can understand.
|
||||
pub mod keyboard;
|
||||
pub mod mouse;
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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,
|
||||
};
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use crate::{
|
||||
input::keyboard,
|
||||
keyboard,
|
||||
pane_grid::{node::Node, Axis, Direction, Pane, Split},
|
||||
Hasher, Point, Rectangle, Size,
|
||||
};
|
||||
|
|
|
@ -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,
|
||||
};
|
||||
|
|
|
@ -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};
|
||||
|
|
|
@ -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};
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -1,6 +1,2 @@
|
|||
//! Listen and react to keyboard events.
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
pub use iced_winit::input::keyboard::{KeyCode, ModifiersState};
|
||||
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
pub use iced_web::keyboard::{KeyCode, ModifiersState};
|
||||
pub use crate::runtime::keyboard::{Event, KeyCode, ModifiersState};
|
||||
|
|
|
@ -1,3 +1,2 @@
|
|||
//! Listen and react to mouse events.
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
pub use iced_winit::input::mouse::{Button, Event, ScrollDelta};
|
||||
pub use crate::runtime::mouse::{Button, Event, ScrollDelta};
|
||||
|
|
|
@ -74,8 +74,8 @@ pub use dodrio;
|
|||
pub use element::Element;
|
||||
pub use hasher::Hasher;
|
||||
pub use iced_core::{
|
||||
keyboard, Align, Background, Color, Font, HorizontalAlignment, Length,
|
||||
MouseCursor, Point, Rectangle, Size, Vector, VerticalAlignment,
|
||||
keyboard, mouse, Align, Background, Color, Font, HorizontalAlignment,
|
||||
Length, MouseCursor, Point, Rectangle, Size, Vector, VerticalAlignment,
|
||||
};
|
||||
pub use iced_futures::{executor, futures, Command};
|
||||
pub use subscription::Subscription;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
use iced_native::input::mouse;
|
||||
use iced_native::mouse;
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq)]
|
||||
pub enum Event {
|
||||
|
|
|
@ -3,11 +3,8 @@
|
|||
//! [`winit`]: https://github.com/rust-windowing/winit
|
||||
//! [`iced_native`]: https://github.com/hecrj/iced/tree/master/native
|
||||
use crate::{
|
||||
input::{
|
||||
keyboard::{self, KeyCode, ModifiersState},
|
||||
mouse,
|
||||
},
|
||||
window, Event, Mode, MouseCursor,
|
||||
keyboard::{self, KeyCode, ModifiersState},
|
||||
mouse, window, Event, Mode, MouseCursor,
|
||||
};
|
||||
|
||||
/// Converts a winit window event into an iced event.
|
||||
|
|
Loading…
Reference in New Issue