pub struct CompositionCustomVisualHandler { /* private fields */ }Expand description
The state upstream’s abstract CompositionCustomVisualHandler keeps,
and its protected members: what a handler class embeds and returns from
ICompositionCustomVisualHandler::handler_base.
The handler is created on the UI thread and used on the server only: it is attached to the server-side custom visual when that visual is created.
Implementations§
Source§impl CompositionCustomVisualHandler
impl CompositionCustomVisualHandler
pub fn new() -> Self
Sourcepub fn effective_size(&self) -> Vector
pub fn effective_size(&self) -> Vector
The size of the visual.
Sourcepub fn composition_now(&self) -> Duration
pub fn composition_now(&self) -> Duration
The time of the server compositor.
Sourcepub fn invalidate(&self)
pub fn invalidate(&self)
Asks for the visual to be redrawn.
Sourcepub fn invalidate_rect(&self, rc: Rect)
pub fn invalidate_rect(&self, rc: Rect)
Asks for an area of the visual to be redrawn.
Sourcepub fn register_for_next_animation_frame_update(&self)
pub fn register_for_next_animation_frame_update(&self)
Asks for ICompositionCustomVisualHandler::on_animation_frame_update
to be called on the next frame.
Sourcepub fn render_clip_contains(&self, pt: Point) -> bool
pub fn render_clip_contains(&self, pt: Point) -> bool
Whether a point of the visual is inside the current clip.
Sourcepub fn render_clip_intersectes(&self, rc: Rect) -> bool
pub fn render_clip_intersectes(&self, rc: Rect) -> bool
Whether a rectangle of the visual intersects the current clip.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for CompositionCustomVisualHandler
impl !RefUnwindSafe for CompositionCustomVisualHandler
impl !Send for CompositionCustomVisualHandler
impl !Sync for CompositionCustomVisualHandler
impl !UnwindSafe for CompositionCustomVisualHandler
impl Unpin for CompositionCustomVisualHandler
impl UnsafeUnpin for CompositionCustomVisualHandler
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
Mutably borrows from an owned value. Read more
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
The static constructor of a type: work done once per thread, after
the properties of the type are registered and before its first
instance exists (class handlers,
affects_render, metadata
overrides). Read more