Struct components::foundation::MaterialApplicationHost
source · [−]Fields
painter: Rc<Painter>
Trait Implementations
sourceimpl<T> AsyncActivity<MaterialApplication> for MaterialApplicationHost<T>
impl<T> AsyncActivity<MaterialApplication> for MaterialApplicationHost<T>
sourcefn resized(
&mut self,
runner: &mut MaterialApplication,
context: &mut Self::Context,
width: u32,
height: u32
) -> Pin<Box<dyn Future<Output = ()> + Send>>
fn resized(
&mut self,
runner: &mut MaterialApplication,
context: &mut Self::Context,
width: u32,
height: u32
) -> Pin<Box<dyn Future<Output = ()> + Send>>
Resize the application when the framebuffer gets resized. Read more
sourcefn render(
&mut self,
runner: &mut MaterialApplication,
context: &mut Self::Context,
t: Time
) -> Pin<Box<dyn Future<Output = bool> + Send>>
fn render(
&mut self,
runner: &mut MaterialApplication,
context: &mut Self::Context,
t: Time
) -> Pin<Box<dyn Future<Output = bool> + Send>>
Render the application at a given time. Read more
sourcefn suspend(
&mut self,
runner: &mut MaterialApplication,
context: &mut Self::Context
) -> Pin<Box<dyn Future<Output = ()> + Send>>
fn suspend(
&mut self,
runner: &mut MaterialApplication,
context: &mut Self::Context
) -> Pin<Box<dyn Future<Output = ()> + Send>>
Notify the application has been suspended.
sourcefn resume(
&mut self,
runner: &mut MaterialApplication,
context: &mut Self::Context
) -> Pin<Box<dyn Future<Output = ()> + Send>>
fn resume(
&mut self,
runner: &mut MaterialApplication,
context: &mut Self::Context
) -> Pin<Box<dyn Future<Output = ()> + Send>>
Notify the application has been resumed.
sourcefn moved(
&mut self,
runner: &mut MaterialApplication,
context: &mut Self::Context,
x: i32,
y: i32
) -> Pin<Box<dyn Future<Output = ()> + Send>>
fn moved(
&mut self,
runner: &mut MaterialApplication,
context: &mut Self::Context,
x: i32,
y: i32
) -> Pin<Box<dyn Future<Output = ()> + Send>>
The position of the window has changed. Contains the window’s new position.
sourcefn close(
&mut self,
runner: &mut MaterialApplication,
context: &mut Self::Context
) -> Pin<Box<dyn Future<Output = ControlFlow> + Send>>
fn close(
&mut self,
runner: &mut MaterialApplication,
context: &mut Self::Context
) -> Pin<Box<dyn Future<Output = ControlFlow> + Send>>
The window has been requested to close. Read more
sourcefn destroyed(
&mut self,
runner: &mut MaterialApplication,
context: &mut Self::Context
) -> Pin<Box<dyn Future<Output = ()> + Send>>
fn destroyed(
&mut self,
runner: &mut MaterialApplication,
context: &mut Self::Context
) -> Pin<Box<dyn Future<Output = ()> + Send>>
The window has been destroyed.
sourcefn dropped_file(
&mut self,
runner: &mut MaterialApplication,
context: &mut Self::Context,
path: &PathBuf
) -> Pin<Box<dyn Future<Output = ()> + Send>>
fn dropped_file(
&mut self,
runner: &mut MaterialApplication,
context: &mut Self::Context,
path: &PathBuf
) -> Pin<Box<dyn Future<Output = ()> + Send>>
A file has been dropped into the window. Read more
sourcefn hovered_file(
&mut self,
runner: &mut MaterialApplication,
context: &mut Self::Context,
path: &PathBuf
) -> Pin<Box<dyn Future<Output = ()> + Send>>
fn hovered_file(
&mut self,
runner: &mut MaterialApplication,
context: &mut Self::Context,
path: &PathBuf
) -> Pin<Box<dyn Future<Output = ()> + Send>>
A file is being hovered over the window. Read more
sourcefn hovered_file_cancelled(
&mut self,
runner: &mut MaterialApplication,
context: &mut Self::Context
) -> Pin<Box<dyn Future<Output = ()> + Send>>
fn hovered_file_cancelled(
&mut self,
runner: &mut MaterialApplication,
context: &mut Self::Context
) -> Pin<Box<dyn Future<Output = ()> + Send>>
A file was hovered, but has exited the window. Read more
sourcefn received_character(
&mut self,
runner: &mut MaterialApplication,
context: &mut Self::Context,
character: char
) -> Pin<Box<dyn Future<Output = ()> + Send>>
fn received_character(
&mut self,
runner: &mut MaterialApplication,
context: &mut Self::Context,
character: char
) -> Pin<Box<dyn Future<Output = ()> + Send>>
The window received a unicode character.
sourcefn focused(
&mut self,
runner: &mut MaterialApplication,
context: &mut Self::Context,
is_focused: bool
) -> Pin<Box<dyn Future<Output = ()> + Send>>
fn focused(
&mut self,
runner: &mut MaterialApplication,
context: &mut Self::Context,
is_focused: bool
) -> Pin<Box<dyn Future<Output = ()> + Send>>
The window gained or lost focus. Read more
sourcefn keyboard_input(
&mut self,
runner: &mut MaterialApplication,
context: &mut Self::Context,
device_id: &DeviceId,
input: &KeyboardInput,
is_synthetic: bool
) -> Pin<Box<dyn Future<Output = ControlFlow> + Send>>
fn keyboard_input(
&mut self,
runner: &mut MaterialApplication,
context: &mut Self::Context,
device_id: &DeviceId,
input: &KeyboardInput,
is_synthetic: bool
) -> Pin<Box<dyn Future<Output = ControlFlow> + Send>>
An event from the keyboard has been received. Read more
sourcefn modifiers_changed(
&mut self,
runner: &mut MaterialApplication,
context: &mut Self::Context,
state: &ModifiersState
) -> Pin<Box<dyn Future<Output = ()> + Send>>
fn modifiers_changed(
&mut self,
runner: &mut MaterialApplication,
context: &mut Self::Context,
state: &ModifiersState
) -> Pin<Box<dyn Future<Output = ()> + Send>>
The keyboard modifiers have changed. Read more
sourcefn cursor_moved(
&mut self,
runner: &mut MaterialApplication,
context: &mut Self::Context,
device_id: &DeviceId,
position: &PhysicalPosition<f64>
) -> Pin<Box<dyn Future<Output = ()> + Send>>
fn cursor_moved(
&mut self,
runner: &mut MaterialApplication,
context: &mut Self::Context,
device_id: &DeviceId,
position: &PhysicalPosition<f64>
) -> Pin<Box<dyn Future<Output = ()> + Send>>
The cursor has moved on the window. Read more
sourcefn cursor_entered(
&mut self,
runner: &mut MaterialApplication,
context: &mut Self::Context,
device_id: &DeviceId
) -> Pin<Box<dyn Future<Output = ()> + Send>>
fn cursor_entered(
&mut self,
runner: &mut MaterialApplication,
context: &mut Self::Context,
device_id: &DeviceId
) -> Pin<Box<dyn Future<Output = ()> + Send>>
The cursor has entered the window.
sourcefn cursor_left(
&mut self,
runner: &mut MaterialApplication,
context: &mut Self::Context,
device_id: &DeviceId
) -> Pin<Box<dyn Future<Output = ()> + Send>>
fn cursor_left(
&mut self,
runner: &mut MaterialApplication,
context: &mut Self::Context,
device_id: &DeviceId
) -> Pin<Box<dyn Future<Output = ()> + Send>>
The cursor has left the window.
sourcefn mouse_wheel(
&mut self,
runner: &mut MaterialApplication,
context: &mut Self::Context,
device_id: &DeviceId,
delta: &MouseScrollDelta,
phase: &TouchPhase
) -> Pin<Box<dyn Future<Output = ()> + Send>>
fn mouse_wheel(
&mut self,
runner: &mut MaterialApplication,
context: &mut Self::Context,
device_id: &DeviceId,
delta: &MouseScrollDelta,
phase: &TouchPhase
) -> Pin<Box<dyn Future<Output = ()> + Send>>
A mouse wheel movement or touchpad scroll occurred.
sourcefn mouse_input(
&mut self,
runner: &mut MaterialApplication,
context: &mut Self::Context,
device_id: &DeviceId,
state: &ElementState,
button: &MouseButton
) -> Pin<Box<dyn Future<Output = ()> + Send>>
fn mouse_input(
&mut self,
runner: &mut MaterialApplication,
context: &mut Self::Context,
device_id: &DeviceId,
state: &ElementState,
button: &MouseButton
) -> Pin<Box<dyn Future<Output = ()> + Send>>
An mouse button press has been received.
sourcefn touchpad_pressure(
&mut self,
runner: &mut MaterialApplication,
context: &mut Self::Context,
device_id: &DeviceId,
pressure: f32,
stage: i64
) -> Pin<Box<dyn Future<Output = ()> + Send>>
fn touchpad_pressure(
&mut self,
runner: &mut MaterialApplication,
context: &mut Self::Context,
device_id: &DeviceId,
pressure: f32,
stage: i64
) -> Pin<Box<dyn Future<Output = ()> + Send>>
Touchpad pressure event. Read more
sourcefn axis_motion(
&mut self,
runner: &mut MaterialApplication,
context: &mut Self::Context,
device_id: &DeviceId,
axis: &AxisId,
value: f64
) -> Pin<Box<dyn Future<Output = ()> + Send>>
fn axis_motion(
&mut self,
runner: &mut MaterialApplication,
context: &mut Self::Context,
device_id: &DeviceId,
axis: &AxisId,
value: f64
) -> Pin<Box<dyn Future<Output = ()> + Send>>
Motion on some analog axis. May report data redundant to other, more specific events.
sourcefn touch(
&mut self,
runner: &mut MaterialApplication,
context: &mut Self::Context,
touch: &Touch
) -> Pin<Box<dyn Future<Output = ()> + Send>>
fn touch(
&mut self,
runner: &mut MaterialApplication,
context: &mut Self::Context,
touch: &Touch
) -> Pin<Box<dyn Future<Output = ()> + Send>>
Touch event has been received
sourcefn scale_factor_changed(
&mut self,
runner: &mut MaterialApplication,
context: &mut Self::Context,
scale_factor: f64,
new_inner_size: &&mut PhysicalSize<u32>
) -> Pin<Box<dyn Future<Output = ()> + Send>>
fn scale_factor_changed(
&mut self,
runner: &mut MaterialApplication,
context: &mut Self::Context,
scale_factor: f64,
new_inner_size: &&mut PhysicalSize<u32>
) -> Pin<Box<dyn Future<Output = ()> + Send>>
The window’s scale factor has changed. Read more
sourcefn theme_changed(
&mut self,
runner: &mut MaterialApplication,
context: &mut Self::Context,
theme: &Theme
) -> Pin<Box<dyn Future<Output = ()> + Send>>
fn theme_changed(
&mut self,
runner: &mut MaterialApplication,
context: &mut Self::Context,
theme: &Theme
) -> Pin<Box<dyn Future<Output = ()> + Send>>
The system window theme has changed. Read more
sourcefn main_events_cleared(
&mut self,
runner: &mut MaterialApplication,
context: &mut Self::Context
) -> Pin<Box<dyn Future<Output = bool> + Send>>
fn main_events_cleared(
&mut self,
runner: &mut MaterialApplication,
context: &mut Self::Context
) -> Pin<Box<dyn Future<Output = bool> + Send>>
Analogue of winit::MainEventsCleared
sourcefn before_event(
&mut self,
runner: &mut MaterialApplication,
context: &mut Self::Context,
event: &WindowEvent<'_>
) -> Pin<Box<dyn Future<Output = ()> + Send>>
fn before_event(
&mut self,
runner: &mut MaterialApplication,
context: &mut Self::Context,
event: &WindowEvent<'_>
) -> Pin<Box<dyn Future<Output = ()> + Send>>
Used to route winit :: WindowEvent to external handlers (third party UI handlers, etc.). Called before internal matching Read more
sourcefn after_event(
&mut self,
runner: &mut MaterialApplication,
context: &mut Self::Context,
event: &WindowEvent<'_>
) -> Pin<Box<dyn Future<Output = ()> + Send>>
fn after_event(
&mut self,
runner: &mut MaterialApplication,
context: &mut Self::Context,
event: &WindowEvent<'_>
) -> Pin<Box<dyn Future<Output = ()> + Send>>
Used to route winit :: WindowEvent to external handlers (third party UI handlers, etc.). Called after internal matching Read more
sourceimpl<T> AsyncActivityHost<MaterialApplication> for MaterialApplicationHost<T>
impl<T> AsyncActivityHost<MaterialApplication> for MaterialApplicationHost<T>
sourceimpl<T> Context for MaterialApplicationHost<T>
impl<T> Context for MaterialApplicationHost<T>
type Context = T
type Context = T
Context carried around with the application.
Auto Trait Implementations
impl<T> !RefUnwindSafe for MaterialApplicationHost<T>
impl<T> !Send for MaterialApplicationHost<T>
impl<T> !Sync for MaterialApplicationHost<T>
impl<T> Unpin for MaterialApplicationHost<T> where
T: Unpin,
impl<T> !UnwindSafe for MaterialApplicationHost<T>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<'a, T, C, M> Inspect<'a, C, &'a C, M> for T
impl<'a, T, C, M> Inspect<'a, C, &'a C, M> for T
impl<'a, T, C, M> Inspect<'a, C, &'a mut C, M> for T
impl<'a, T, C, M> Inspect<'a, C, &'a mut C, M> for T
impl<Fr, To> IntoColor<To> for Fr where
To: FromColor<Fr>,
impl<Fr, To> IntoColor<To> for Fr where
To: FromColor<Fr>,
fn into_color(self) -> To
fn into_color(self) -> To
Convert into color
impl<T> Pointable for T
impl<T> Pointable for T
impl<T> SetParameter for T
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
Sets value
as a parameter of self
.