Skip to content

Commit

Permalink
Introduce multi_window to iced_glutin
Browse files Browse the repository at this point in the history
  • Loading branch information
derezzedex committed Sep 19, 2022
1 parent 4bc6608 commit 3969b8d
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ palette = ["iced_core/palette"]
# Enables querying system information
system = ["iced_winit/system"]
# Enables experimental multi-window support
multi_window = ["iced_winit/multi_window"]
multi_window = ["iced_winit/multi_window", "iced_glutin/multi_window"]

[badges]
maintenance = { status = "actively-developed" }
Expand Down
1 change: 1 addition & 0 deletions glutin/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ categories = ["gui"]
[features]
debug = ["iced_winit/debug"]
system = ["iced_winit/system"]
multi_window = ["iced_winit/multi_window"]

[dependencies.log]
version = "0.4"
Expand Down
3 changes: 3 additions & 0 deletions glutin/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,8 @@ pub use iced_winit::*;

pub mod application;

#[cfg(feature = "multi_window")]
pub mod multi_window;

#[doc(no_inline)]
pub use application::Application;
21 changes: 21 additions & 0 deletions glutin/src/multi_window.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
//! Create interactive, native cross-platform applications.
use crate::{Error, Executor};

pub use iced_winit::multi_window::{Application, StyleSheet};

use iced_winit::Settings;

/// Runs an [`Application`] with an executor, compositor, and the provided
/// settings.
pub fn run<A, E, C>(
_settings: Settings<A::Flags>,
_compositor_settings: C::Settings,
) -> Result<(), Error>
where
A: Application + 'static,
E: Executor + 'static,
C: iced_graphics::window::GLCompositor<Renderer = A::Renderer> + 'static,
<A::Renderer as iced_native::Renderer>::Theme: StyleSheet,
{
unimplemented!("iced_glutin not implemented!")
}

0 comments on commit 3969b8d

Please sign in to comment.