From ef28347f1c816d8ad9e772303467de489efb802b Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Thu, 28 May 2020 02:49:32 +0200 Subject: Write documentation for new `iced_winit` API --- winit/src/application.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'winit/src/application.rs') diff --git a/winit/src/application.rs b/winit/src/application.rs index fcba47b3..df6e4eec 100644 --- a/winit/src/application.rs +++ b/winit/src/application.rs @@ -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( settings: Settings, compositor_settings: C::Settings, @@ -254,6 +259,8 @@ pub fn run( }) } +/// 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, -- cgit