summaryrefslogtreecommitdiffstats
path: root/winit/src/application/state.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2023-03-04 05:37:11 +0100
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2023-03-04 05:37:11 +0100
commit3a0d34c0240f4421737a6a08761f99d6f8140d02 (patch)
treec9a4a6b8e9c1db1b8fcd05bc98e3f131d5ef4bd5 /winit/src/application/state.rs
parentc54409d1711e1f615c7ea4b02c082954e340632a (diff)
downloadiced-3a0d34c0240f4421737a6a08761f99d6f8140d02.tar.gz
iced-3a0d34c0240f4421737a6a08761f99d6f8140d02.tar.bz2
iced-3a0d34c0240f4421737a6a08761f99d6f8140d02.zip
Create `iced_widget` subcrate and re-organize the whole codebase
Diffstat (limited to 'winit/src/application/state.rs')
-rw-r--r--winit/src/application/state.rs14
1 files changed, 9 insertions, 5 deletions
diff --git a/winit/src/application/state.rs b/winit/src/application/state.rs
index 8d6a1df1..b727e03c 100644
--- a/winit/src/application/state.rs
+++ b/winit/src/application/state.rs
@@ -1,6 +1,10 @@
use crate::application::{self, StyleSheet as _};
use crate::conversion;
-use crate::{Application, Color, Debug, Point, Size, Viewport};
+use crate::core;
+use crate::core::{Color, Point, Size};
+use crate::graphics::Viewport;
+use crate::native::Debug;
+use crate::Application;
use std::marker::PhantomData;
use winit::event::{Touch, WindowEvent};
@@ -10,7 +14,7 @@ use winit::window::Window;
#[allow(missing_debug_implementations)]
pub struct State<A: Application>
where
- <A::Renderer as crate::Renderer>::Theme: application::StyleSheet,
+ <A::Renderer as core::Renderer>::Theme: application::StyleSheet,
{
title: String,
scale_factor: f64,
@@ -18,14 +22,14 @@ where
viewport_version: usize,
cursor_position: winit::dpi::PhysicalPosition<f64>,
modifiers: winit::event::ModifiersState,
- theme: <A::Renderer as crate::Renderer>::Theme,
+ theme: <A::Renderer as core::Renderer>::Theme,
appearance: application::Appearance,
application: PhantomData<A>,
}
impl<A: Application> State<A>
where
- <A::Renderer as crate::Renderer>::Theme: application::StyleSheet,
+ <A::Renderer as core::Renderer>::Theme: application::StyleSheet,
{
/// Creates a new [`State`] for the provided [`Application`] and window.
pub fn new(application: &A, window: &Window) -> Self {
@@ -98,7 +102,7 @@ where
}
/// Returns the current theme of the [`State`].
- pub fn theme(&self) -> &<A::Renderer as crate::Renderer>::Theme {
+ pub fn theme(&self) -> &<A::Renderer as core::Renderer>::Theme {
&self.theme
}