From 6740c2c5d6b24399dab1343abdfec5daf4b03c98 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Wed, 29 Nov 2023 22:46:47 +0100 Subject: Fix broken intra-doc links --- winit/src/conversion.rs | 2 +- winit/src/multi_window.rs | 23 ++++------------------- winit/src/multi_window/state.rs | 4 +--- winit/src/settings.rs | 2 +- 4 files changed, 7 insertions(+), 24 deletions(-) (limited to 'winit/src') diff --git a/winit/src/conversion.rs b/winit/src/conversion.rs index 22e6b9be..68c2b905 100644 --- a/winit/src/conversion.rs +++ b/winit/src/conversion.rs @@ -272,7 +272,7 @@ pub fn window_level(level: window::Level) -> winit::window::WindowLevel { } } -/// Converts a [`Position`] to a [`winit`] logical position for a given monitor. +/// Converts a [`window::Position`] to a [`winit`] logical position for a given monitor. /// /// [`winit`]: https://github.com/rust-windowing/winit pub fn position( diff --git a/winit/src/multi_window.rs b/winit/src/multi_window.rs index b233564a..0e08a081 100644 --- a/winit/src/multi_window.rs +++ b/winit/src/multi_window.rs @@ -23,34 +23,19 @@ use std::mem::ManuallyDrop; use std::time::Instant; use winit::monitor::MonitorHandle; -/// This is a wrapper around the `Application::Message` associate type -/// to allows the `shell` to create internal messages, while still having -/// the current user-specified custom messages. #[derive(Debug)] -pub enum Event { - /// An internal event which contains an [`Application`] generated message. +enum Event { Application(Message), - /// An internal event which spawns a new window. NewWindow { - /// The [window::Id] of the newly spawned [`Window`]. id: window::Id, - /// The [settings::Window] of the newly spawned [`Window`]. settings: window::Settings, - /// The title of the newly spawned [`Window`]. title: String, - /// The monitor on which to spawn the window. If `None`, will use monitor of the last window - /// spawned. monitor: Option, }, - /// An internal event for closing a window. CloseWindow(window::Id), - /// An internal event for when the window has finished being created. WindowCreated { - /// The internal ID of the window. id: window::Id, - /// The raw window. window: winit::window::Window, - /// Whether or not the window should close when a user requests it does. exit_on_close_request: bool, }, } @@ -771,7 +756,7 @@ async fn run_instance( } /// Builds a window's [`UserInterface`] for the [`Application`]. -pub fn build_user_interface<'a, A: Application>( +fn build_user_interface<'a, A: Application>( application: &'a A, cache: user_interface::Cache, renderer: &mut A::Renderer, @@ -795,7 +780,7 @@ where /// Updates a multi-window [`Application`] by feeding it messages, spawning any /// resulting [`Command`], and tracking its [`Subscription`]. -pub fn update( +fn update( application: &mut A, compositor: &mut C, runtime: &mut Runtime>, Event>, @@ -834,7 +819,7 @@ pub fn update( } /// Runs the actions of a [`Command`]. -pub fn run_command( +fn run_command( application: &A, compositor: &mut C, command: Command, diff --git a/winit/src/multi_window/state.rs b/winit/src/multi_window/state.rs index f2741c3c..e9a9f91a 100644 --- a/winit/src/multi_window/state.rs +++ b/winit/src/multi_window/state.rs @@ -200,9 +200,7 @@ where /// window. /// /// Normally, an [`Application`] should be synchronized with its [`State`] - /// and window after calling [`Application::update`]. - /// - /// [`Application::update`]: crate::Program::update + /// and window after calling [`State::update`]. pub fn synchronize( &mut self, application: &A, diff --git a/winit/src/settings.rs b/winit/src/settings.rs index dc0f65a5..2e541128 100644 --- a/winit/src/settings.rs +++ b/winit/src/settings.rs @@ -12,7 +12,7 @@ pub struct Settings { /// communicate with it through the windowing system. pub id: Option, - /// The [`Window`] settings. + /// The [`window::Settings`]. pub window: window::Settings, /// The data needed to initialize an [`Application`]. -- cgit