pub struct WindowControls { /* private fields */ }Expand description
Optional application-owned window/cursor requests.
Register WindowControls::default() as an Application Resource and mutate
through AppResMut<WindowControls>. Desktop consumes requests after the
logical frame; headless retains them without OS calls. Requests are immediate,
not transactional Commands, and survive World replacement. Last request wins
before consumption; there is no growing queue or automatic F11 binding.
Native cursor themes may substitute the default for an unavailable shape.
Implementations§
Source§impl WindowControls
impl WindowControls
Sourcepub fn request_mode(&mut self, mode: WindowMode)
pub fn request_mode(&mut self, mode: WindowMode)
Requests a mode, or explicitly retries a previously ignored request.
Sourcepub fn request_cursor(&mut self, shape: CursorShape)
pub fn request_cursor(&mut self, shape: CursorShape)
Requests a cursor; repeating an acknowledged value does no OS work.
Sourcepub const fn pending_mode(&self) -> Option<WindowMode>
pub const fn pending_mode(&self) -> Option<WindowMode>
Returns the not-yet-submitted mode request, if any.
Sourcepub const fn mode_status(&self) -> WindowModeStatus
pub const fn mode_status(&self) -> WindowModeStatus
Returns the native submission outcome. Headless never fabricates success.
Sourcepub const fn pending_cursor(&self) -> Option<CursorShape>
pub const fn pending_cursor(&self) -> Option<CursorShape>
Returns the not-yet-submitted cursor request, if any.
Sourcepub const fn submitted_cursor(&self) -> Option<CursorShape>
pub const fn submitted_cursor(&self) -> Option<CursorShape>
Returns the cursor last sent to the backend, not a theme-support guarantee.
Trait Implementations§
Source§impl Debug for WindowControls
impl Debug for WindowControls
Auto Trait Implementations§
impl Freeze for WindowControls
impl RefUnwindSafe for WindowControls
impl Send for WindowControls
impl Sync for WindowControls
impl Unpin for WindowControls
impl UnsafeUnpin for WindowControls
impl UnwindSafe for WindowControls
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> ConditionalSend for Twhere
T: Send,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§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.Source§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.Source§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.Source§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.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> FromWorld for Twhere
T: Default,
impl<T> FromWorld for Twhere
T: Default,
Source§fn from_world(_world: &mut World) -> T
fn from_world(_world: &mut World) -> T
Creates Self using default().