Write documentation for new iced_winit API

This commit is contained in:
Héctor Ramón Jiménez 2020-05-28 02:49:32 +02:00
parent 508128436c
commit ef28347f1c
5 changed files with 14 additions and 1 deletions

View file

@ -1,3 +1,4 @@
//! Create interactive, native cross-platform applications.
use crate::{
conversion, mouse, Clipboard, Command, Debug, Executor, Mode, Proxy,
Runtime, Settings, Size, Subscription,
@ -72,6 +73,10 @@ pub trait Application: Program {
}
}
/// Runs an [`Application`] with an executor, compositor, and the provided
/// settings.
///
/// [`Application`]: trait.Application.html
pub fn run<A, E, C>(
settings: Settings<A::Flags>,
compositor_settings: C::Settings,
@ -254,6 +259,8 @@ pub fn run<A, E, C>(
})
}
/// Handles a `WindowEvent` and mutates the provided control flow, keyboard
/// modifiers, viewport, and resized flag accordingly.
pub fn handle_window_event(
event: &winit::event::WindowEvent<'_>,
window: &winit::window::Window,