pub struct UsePlatform { /* private fields */ }
Implementations§
Source§impl UsePlatform
impl UsePlatform
Sourcepub fn current() -> UsePlatform
pub fn current() -> UsePlatform
Get the current UsePlatform.
Sourcepub fn send(&self, event: EventLoopMessage) -> Result<(), UsePlatformError>
pub fn send(&self, event: EventLoopMessage) -> Result<(), UsePlatformError>
You most likely dont want to use this method. Check the other methods in UsePlatform.
Sourcepub fn set_cursor(&self, cursor_icon: CursorIcon)
pub fn set_cursor(&self, cursor_icon: CursorIcon)
Update the CursorIcon.
Sourcepub fn with_window(&self, cb: impl FnOnce(&Window) + Send + Sync + 'static)
pub fn with_window(&self, cb: impl FnOnce(&Window) + Send + Sync + 'static)
Send a callback that will be called with the Window once this is available to get read.
For a Sync
+ Send
version of this method you can use UsePlatform::sender.
Sourcepub fn drag_window(&self)
pub fn drag_window(&self)
Shortcut for Window::drag_window.
Sourcepub fn set_maximize_window(&self, maximize: bool)
pub fn set_maximize_window(&self, maximize: bool)
Shortcut for Window::set_maximized.
Sourcepub fn toggle_maximize_window(&self)
pub fn toggle_maximize_window(&self)
Shortcut for Window::set_maximized.
Toggles the maximized state of the Window.
Sourcepub fn set_minimize_window(&self, minimize: bool)
pub fn set_minimize_window(&self, minimize: bool)
Shortcut for Window::set_minimized.
Sourcepub fn toggle_minimize_window(&self)
pub fn toggle_minimize_window(&self)
Shortcut for Window::set_minimized.
Toggles the minimized state of the Window.
Sourcepub fn set_fullscreen_window(&self, fullscreen: bool)
pub fn set_fullscreen_window(&self, fullscreen: bool)
Shortcut for Window::set_fullscreen.
Sourcepub fn toggle_fullscreen_window(&self)
pub fn toggle_fullscreen_window(&self)
Shortcut for Window::set_fullscreen.
Toggles the fullscreen state of the Window.
Sourcepub fn invalidate_drawing_area(&self, area: Rect<f32, Measure>)
pub fn invalidate_drawing_area(&self, area: Rect<f32, Measure>)
Invalidates a drawing area.
You most likely dont want to use this unless you are dealing with advanced images/canvas rendering.
Sourcepub fn request_animation_frame(&self)
pub fn request_animation_frame(&self)
Requests a new animation frame.
You most likely dont want to use this unless you are dealing animations or canvas rendering.
Sourcepub fn request_focus(&self, strategy: AccessibilityFocusStrategy)
pub fn request_focus(&self, strategy: AccessibilityFocusStrategy)
Request focus with a given AccessibilityFocusStrategy.
Sourcepub fn new_ticker(&self) -> Ticker
pub fn new_ticker(&self) -> Ticker
Create a new frame Ticker.
You most likely dont want to use this unless you are dealing animations or canvas rendering.
Sourcepub fn sender(&self) -> PlatformSender
pub fn sender(&self) -> PlatformSender
Get a PlatformSender that you can use to send events from other threads.
Trait Implementations§
Source§impl Clone for UsePlatform
impl Clone for UsePlatform
Source§fn clone(&self) -> UsePlatform
fn clone(&self) -> UsePlatform
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl PartialEq for UsePlatform
impl PartialEq for UsePlatform
impl Copy for UsePlatform
impl StructuralPartialEq for UsePlatform
Auto Trait Implementations§
impl Freeze for UsePlatform
impl !RefUnwindSafe for UsePlatform
impl !Send for UsePlatform
impl !Sync for UsePlatform
impl Unpin for UsePlatform
impl !UnwindSafe for UsePlatform
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> InitializeFromFunction<T> for T
impl<T> InitializeFromFunction<T> for T
§fn initialize_from_function(f: fn() -> T) -> T
fn initialize_from_function(f: fn() -> T) -> T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more