summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--graphics/src/compositor.rs2
-rw-r--r--runtime/src/multi_window/state.rs2
-rw-r--r--runtime/src/window/action.rs2
-rw-r--r--src/multi_window/application.rs2
-rw-r--r--winit/src/conversion.rs2
-rw-r--r--winit/src/multi_window.rs23
-rw-r--r--winit/src/multi_window/state.rs4
-rw-r--r--winit/src/settings.rs2
8 files changed, 12 insertions, 27 deletions
diff --git a/graphics/src/compositor.rs b/graphics/src/compositor.rs
index e0b1e20f..78731a98 100644
--- a/graphics/src/compositor.rs
+++ b/graphics/src/compositor.rs
@@ -24,7 +24,7 @@ pub trait Compositor: Sized {
compatible_window: Option<&W>,
) -> Result<(Self, Self::Renderer), Error>;
- /// Creates a [`Renderer`] for the [`Compositor`].
+ /// Creates a [`Self::Renderer`] for the [`Compositor`].
fn renderer(&self) -> Self::Renderer;
/// Crates a new [`Surface`] for the given window.
diff --git a/runtime/src/multi_window/state.rs b/runtime/src/multi_window/state.rs
index 05036a07..49f72c39 100644
--- a/runtime/src/multi_window/state.rs
+++ b/runtime/src/multi_window/state.rs
@@ -201,7 +201,7 @@ where
(uncaptured_events, commands)
}
- /// Applies [`widget::Operation`]s to the [`State`]
+ /// Applies widget [`Operation`]s to the [`State`].
pub fn operate(
&mut self,
renderer: &mut P::Renderer,
diff --git a/runtime/src/window/action.rs b/runtime/src/window/action.rs
index d631cee1..2a31bbd6 100644
--- a/runtime/src/window/action.rs
+++ b/runtime/src/window/action.rs
@@ -17,7 +17,7 @@ pub enum Action<T> {
Drag,
/// Spawns a new window.
Spawn {
- /// The settings of the [`Window`].
+ /// The settings of the window.
settings: Settings,
},
/// Resize the window.
diff --git a/src/multi_window/application.rs b/src/multi_window/application.rs
index 0486159e..b6f15149 100644
--- a/src/multi_window/application.rs
+++ b/src/multi_window/application.rs
@@ -62,6 +62,8 @@ pub use crate::style::application::{Appearance, StyleSheet};
/// }
/// }
/// ```
+///
+/// [`Sandbox`]: crate::Sandbox
pub trait Application: Sized {
/// The [`Executor`] that will run commands and subscriptions.
///
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<Message> {
- /// An internal event which contains an [`Application`] generated message.
+enum Event<Message> {
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<MonitorHandle>,
},
- /// 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<A, E, C>(
}
/// 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<A: Application, C, E: Executor>(
+fn update<A: Application, C, E: Executor>(
application: &mut A,
compositor: &mut C,
runtime: &mut Runtime<E, Proxy<Event<A::Message>>, Event<A::Message>>,
@@ -834,7 +819,7 @@ pub fn update<A: Application, C, E: Executor>(
}
/// Runs the actions of a [`Command`].
-pub fn run_command<A, C, E>(
+fn run_command<A, C, E>(
application: &A,
compositor: &mut C,
command: Command<A::Message>,
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<Flags> {
/// communicate with it through the windowing system.
pub id: Option<String>,
- /// The [`Window`] settings.
+ /// The [`window::Settings`].
pub window: window::Settings,
/// The data needed to initialize an [`Application`].