pub struct RawWindowChangedArgs {
pub timestamp: DInstant,
pub window_id: WindowId,
pub state: Option<WindowStateAll>,
pub position: Option<(PxPoint, DipPoint)>,
pub monitor: Option<MonitorId>,
pub size: Option<DipSize>,
pub safe_padding: Option<DipSideOffsets>,
pub cause: EventCause,
pub frame_wait_id: Option<FrameWaitId>,
pub propagation: EventPropagationHandle,
}Expand description
Arguments for the RAW_WINDOW_CHANGED_EVENT.
Fields§
§timestamp: DInstantInstant the event happened.
window_id: WindowIdWindow that has moved, resized or has a state change.
state: Option<WindowStateAll>New state if any part of it has changed.
position: Option<(PxPoint, DipPoint)>New window position if it was moved.
The values are (global_position, position_in_monitor).
monitor: Option<MonitorId>New window monitor.
The window’s monitor change when it is moved enough so that most of the client area is in the new monitor screen.
size: Option<DipSize>New window size if it was resized.
safe_padding: Option<DipSideOffsets>New window safe padding.
cause: EventCauseIf the app or operating system caused the change.
frame_wait_id: Option<FrameWaitId>If the view-process is blocking the event loop for a time waiting for a frame for the new size this
ID must be send with the frame to signal that it is the frame for the new size.
Event loop implementations can use this to resize without visible artifacts
like the clear color flashing on the window corners, there is a timeout to this delay but it
can be a noticeable stutter, a render or render_update request for the window unblocks the loop early
to continue the resize operation.
propagation: EventPropagationHandlePropagation handle associated with this event instance.
Cloned arguments share the same handle, some arguments may also share the handle of another event if they share the same cause.
Implementations§
Source§impl RawWindowChangedArgs
impl RawWindowChangedArgs
Sourcepub fn new(
timestamp: impl Into<DInstant>,
propagation: EventPropagationHandle,
window_id: impl Into<WindowId>,
state: impl Into<Option<WindowStateAll>>,
position: impl Into<Option<(PxPoint, DipPoint)>>,
monitor: impl Into<Option<MonitorId>>,
size: impl Into<Option<DipSize>>,
safe_padding: impl Into<Option<DipSideOffsets>>,
cause: impl Into<EventCause>,
frame_wait_id: impl Into<Option<FrameWaitId>>,
) -> Self
pub fn new( timestamp: impl Into<DInstant>, propagation: EventPropagationHandle, window_id: impl Into<WindowId>, state: impl Into<Option<WindowStateAll>>, position: impl Into<Option<(PxPoint, DipPoint)>>, monitor: impl Into<Option<MonitorId>>, size: impl Into<Option<DipSize>>, safe_padding: impl Into<Option<DipSideOffsets>>, cause: impl Into<EventCause>, frame_wait_id: impl Into<Option<FrameWaitId>>, ) -> Self
New args from values that convert into the argument types.
Sourcepub fn now(
window_id: impl Into<WindowId>,
state: impl Into<Option<WindowStateAll>>,
position: impl Into<Option<(PxPoint, DipPoint)>>,
monitor: impl Into<Option<MonitorId>>,
size: impl Into<Option<DipSize>>,
safe_padding: impl Into<Option<DipSideOffsets>>,
cause: impl Into<EventCause>,
frame_wait_id: impl Into<Option<FrameWaitId>>,
) -> Self
pub fn now( window_id: impl Into<WindowId>, state: impl Into<Option<WindowStateAll>>, position: impl Into<Option<(PxPoint, DipPoint)>>, monitor: impl Into<Option<MonitorId>>, size: impl Into<Option<DipSize>>, safe_padding: impl Into<Option<DipSideOffsets>>, cause: impl Into<EventCause>, frame_wait_id: impl Into<Option<FrameWaitId>>, ) -> Self
Arguments for event that happened now (INSTANT.now).
Trait Implementations§
Source§impl AnyEventArgs for RawWindowChangedArgs
impl AnyEventArgs for RawWindowChangedArgs
Source§fn is_in_target(&self, id: WidgetId) -> bool
fn is_in_target(&self, id: WidgetId) -> bool
Broadcast to all widgets.
Source§fn propagation(&self) -> &EventPropagationHandle
fn propagation(&self) -> &EventPropagationHandle
Source§fn clone_boxed(&self) -> Box<dyn AnyEventArgs>
fn clone_boxed(&self) -> Box<dyn AnyEventArgs>
Source§impl Clone for RawWindowChangedArgs
impl Clone for RawWindowChangedArgs
Source§fn clone(&self) -> RawWindowChangedArgs
fn clone(&self) -> RawWindowChangedArgs
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RawWindowChangedArgs
impl Debug for RawWindowChangedArgs
Source§impl PartialEq for RawWindowChangedArgs
impl PartialEq for RawWindowChangedArgs
impl EventArgs for RawWindowChangedArgs
impl StructuralPartialEq for RawWindowChangedArgs
Auto Trait Implementations§
impl Freeze for RawWindowChangedArgs
impl RefUnwindSafe for RawWindowChangedArgs
impl Send for RawWindowChangedArgs
impl Sync for RawWindowChangedArgs
impl Unpin for RawWindowChangedArgs
impl UnwindSafe for RawWindowChangedArgs
Blanket Implementations§
Source§impl<T> AnyVarValue for T
impl<T> AnyVarValue for T
Source§fn clone_boxed(&self) -> BoxAnyVarValue
fn clone_boxed(&self) -> BoxAnyVarValue
Source§fn eq_any(&self, other: &(dyn AnyVarValue + 'static)) -> bool
fn eq_any(&self, other: &(dyn AnyVarValue + 'static)) -> bool
self and other are equal.Source§fn try_swap(&mut self, other: &mut (dyn AnyVarValue + 'static)) -> bool
fn try_swap(&mut self, other: &mut (dyn AnyVarValue + 'static)) -> bool
other if both are of the same type.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> 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