diff options
Diffstat (limited to '')
-rw-r--r-- | winit/src/program/state.rs (renamed from winit/src/multi_window/state.rs) | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/winit/src/multi_window/state.rs b/winit/src/program/state.rs index dfd8e696..a7fa2788 100644 --- a/winit/src/multi_window/state.rs +++ b/winit/src/program/state.rs @@ -2,16 +2,16 @@ use crate::conversion; use crate::core::{mouse, window}; use crate::core::{Color, Size}; use crate::graphics::Viewport; -use crate::multi_window::{self, Application}; +use crate::program::{self, Program}; use std::fmt::{Debug, Formatter}; use winit::event::{Touch, WindowEvent}; use winit::window::Window; -/// The state of a multi-windowed [`Application`]. -pub struct State<A: Application> +/// The state of a multi-windowed [`Program`]. +pub struct State<P: Program> where - A::Theme: multi_window::DefaultStyle, + P::Theme: program::DefaultStyle, { title: String, scale_factor: f64, @@ -19,13 +19,13 @@ where viewport_version: u64, cursor_position: Option<winit::dpi::PhysicalPosition<f64>>, modifiers: winit::keyboard::ModifiersState, - theme: A::Theme, - appearance: multi_window::Appearance, + theme: P::Theme, + appearance: program::Appearance, } -impl<A: Application> Debug for State<A> +impl<P: Program> Debug for State<P> where - A::Theme: multi_window::DefaultStyle, + P::Theme: program::DefaultStyle, { fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { f.debug_struct("multi_window::State") @@ -39,13 +39,13 @@ where } } -impl<A: Application> State<A> +impl<P: Program> State<P> where - A::Theme: multi_window::DefaultStyle, + P::Theme: program::DefaultStyle, { - /// Creates a new [`State`] for the provided [`Application`]'s `window`. + /// Creates a new [`State`] for the provided [`Program`]'s `window`. pub fn new( - application: &A, + application: &P, window_id: window::Id, window: &Window, ) -> Self { @@ -121,7 +121,7 @@ where } /// Returns the current theme of the [`State`]. - pub fn theme(&self) -> &A::Theme { + pub fn theme(&self) -> &P::Theme { &self.theme } @@ -195,14 +195,14 @@ where } } - /// Synchronizes the [`State`] with its [`Application`] and its respective + /// Synchronizes the [`State`] with its [`Program`] and its respective /// window. /// - /// Normally, an [`Application`] should be synchronized with its [`State`] + /// Normally, a [`Program`] should be synchronized with its [`State`] /// and window after calling [`State::update`]. pub fn synchronize( &mut self, - application: &A, + application: &P, window_id: window::Id, window: &Window, ) { |