diff options
Diffstat (limited to '')
-rw-r--r-- | src/native.rs | 68 | ||||
-rw-r--r-- | src/native/executor.rs | 23 |
2 files changed, 0 insertions, 91 deletions
diff --git a/src/native.rs b/src/native.rs deleted file mode 100644 index 86ccffab..00000000 --- a/src/native.rs +++ /dev/null @@ -1,68 +0,0 @@ -pub use iced_winit::{ - Align, Background, Color, Command, Font, HorizontalAlignment, Length, - Space, Subscription, Vector, VerticalAlignment, -}; - -pub mod executor; - -pub mod widget { - //! Display information and interactive controls in your application. - //! - //! # Re-exports - //! For convenience, the contents of this module are available at the root - //! module. Therefore, you can directly type: - //! - //! ``` - //! use iced::{button, Button}; - //! ``` - //! - //! # Stateful widgets - //! Some widgets need to keep track of __local state__. - //! - //! These widgets have their own module with a `State` type. For instance, a - //! [`TextInput`] has some [`text_input::State`]. - //! - //! [`TextInput`]: text_input/struct.TextInput.html - //! [`text_input::State`]: text_input/struct.State.html - pub use iced_wgpu::widget::*; - - pub mod image { - //! Display images in your user interface. - pub use iced_winit::image::{Handle, Image}; - } - - pub mod svg { - //! Display vector graphics in your user interface. - pub use iced_winit::svg::{Handle, Svg}; - } - - pub use iced_winit::Text; - - #[doc(no_inline)] - pub use { - button::Button, checkbox::Checkbox, container::Container, image::Image, - progress_bar::ProgressBar, radio::Radio, scrollable::Scrollable, - slider::Slider, svg::Svg, text_input::TextInput, - }; - - /// A container that distributes its contents vertically. - /// - /// This is an alias of an `iced_native` column with a default `Renderer`. - pub type Column<'a, Message> = - iced_winit::Column<'a, Message, iced_wgpu::Renderer>; - - /// A container that distributes its contents horizontally. - /// - /// This is an alias of an `iced_native` row with a default `Renderer`. - pub type Row<'a, Message> = - iced_winit::Row<'a, Message, iced_wgpu::Renderer>; -} - -#[doc(no_inline)] -pub use widget::*; - -/// A generic widget. -/// -/// This is an alias of an `iced_native` element with a default `Renderer`. -pub type Element<'a, Message> = - iced_winit::Element<'a, Message, iced_wgpu::Renderer>; diff --git a/src/native/executor.rs b/src/native/executor.rs deleted file mode 100644 index 68a1d280..00000000 --- a/src/native/executor.rs +++ /dev/null @@ -1,23 +0,0 @@ -//! Choose your preferred executor to power your application. -pub use iced_winit::{executor::Null, Executor}; -use iced_winit::{executor::ThreadPool, futures}; - -/// The default cross-platform executor. -/// -/// - On native platforms, it will use a `ThreadPool`. -/// - On the Web, it will use `wasm-bindgen-futures::spawn_local`. -#[derive(Debug)] -pub struct Default(ThreadPool); - -impl Executor for Default { - fn new() -> Result<Self, futures::io::Error> { - Ok(Default(ThreadPool::new()?)) - } - - fn spawn( - &self, - future: impl futures::Future<Output = ()> + Send + 'static, - ) { - self.0.spawn(future); - } -} |