pub struct FrameHook<'a, A: Stores> {
pub session: &'a Session<A>,
pub published: &'a Publication,
pub alpha: f32,
pub sections: &'a [Section],
pub ui: Option<&'a Context>,
pub size: (u32, u32),
pub sender: &'a CommandSender<A>,
pub capture: CaptureControl<'a>,
/* private fields */
}Expand description
Runs between publication and presentation.
Fields§
§session: &'a Session<A>§published: &'a Publication§alpha: f32The alpha published was drawn at; pass it to drawn_pose for anything drawn beside the instances.
sections: &'a [Section]§ui: Option<&'a Context>§size: (u32, u32)§sender: &'a CommandSender<A>§capture: CaptureControl<'a>Implementations§
Source§impl<A: Stores> FrameHook<'_, A>
impl<A: Stores> FrameHook<'_, A>
pub fn capture_cursor(&mut self, enabled: bool, policy: CursorPolicy)
pub fn cursor_locked(&self) -> bool
Sourcepub fn set_background(&mut self, rgb: [f32; 3])
pub fn set_background(&mut self, rgb: [f32; 3])
Linear light; the present clear shows wherever no Background pass paints.
Sourcepub fn post(&mut self, topic: &'static str, values: &[f32])
pub fn post(&mut self, topic: &'static str, values: &[f32])
Sent to the page as one loam-post event after this frame (native hosts discard it); positions belong in normalized canvas coordinates in [0, 1].
Sourcepub fn request_redraw(&mut self)
pub fn request_redraw(&mut self)
Draws this frame under Redraw::OnChange.
Auto Trait Implementations§
impl<'a, A> Freeze for FrameHook<'a, A>
impl<'a, A> !RefUnwindSafe for FrameHook<'a, A>
impl<'a, A> !Send for FrameHook<'a, A>
impl<'a, A> !Sync for FrameHook<'a, A>
impl<'a, A> Unpin for FrameHook<'a, A>
impl<'a, A> UnsafeUnpin for FrameHook<'a, A>
impl<'a, A> !UnwindSafe for FrameHook<'a, A>
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
§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>
Convert
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>
Convert
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)
Convert
&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)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.