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>,
/* private fields */
}
Expand description
Arguments for the RAW_WINDOW_CHANGED_EVENT
.
Fields§
§timestamp: DInstant
Instant the event happened.
window_id: WindowId
Window 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: EventCause
If 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.
Implementations§
source§impl RawWindowChangedArgs
impl RawWindowChangedArgs
sourcepub fn new(
timestamp: impl Into<DInstant>,
propagation_handle: 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_handle: 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 delivery_list(&self, list: &mut UpdateDeliveryList)
fn delivery_list(&self, list: &mut UpdateDeliveryList)
Broadcast to all widgets.
source§fn clone_any(&self) -> Box<dyn AnyEventArgs>
fn clone_any(&self) -> Box<dyn AnyEventArgs>
source§fn propagation(&self) -> &EventPropagationHandle
fn propagation(&self) -> &EventPropagationHandle
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
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> 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,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§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