Struct freya_renderer::WindowEnv
source · pub struct WindowEnv<T: Clone> { /* private fields */ }
Expand description
Manager for a Window
Implementations§
source§impl<T: Clone> WindowEnv<T>
impl<T: Clone> WindowEnv<T>
sourcepub fn from_config(
window_config: WindowConfig<T>,
event_loop: &EventLoop<EventMessage>
) -> Self
pub fn from_config( window_config: WindowConfig<T>, event_loop: &EventLoop<EventMessage> ) -> Self
Create a Window environment from a set of configuration
sourcepub fn process_layout(
&mut self,
rdom: &FreyaDOM,
font_collection: &mut FontCollection
) -> (Layers, Viewports)
pub fn process_layout( &mut self, rdom: &FreyaDOM, font_collection: &mut FontCollection ) -> (Layers, Viewports)
Measure the layout
pub fn canvas(&mut self) -> &Canvas
sourcepub fn start_render(
&mut self,
layers: &Layers,
viewports: &Viewports,
font_collection: &mut FontCollection,
hovered_node: &HoveredNode,
rdom: &FreyaDOM
)
pub fn start_render( &mut self, layers: &Layers, viewports: &Viewports, font_collection: &mut FontCollection, hovered_node: &HoveredNode, rdom: &FreyaDOM )
Start rendering the RealDOM to Window
sourcepub fn finish_render(&mut self)
pub fn finish_render(&mut self)
Finish all rendering in the Window
pub fn window(&mut self) -> &mut Window
sourcepub fn run_on_setup(&mut self)
pub fn run_on_setup(&mut self)
Run the on_setup
callback that was passed to the launch function
sourcepub fn run_on_exit(&mut self)
pub fn run_on_exit(&mut self)
Run the on_exit
callback that was passed to the launch function
Trait Implementations§
Auto Trait Implementations§
impl<T> !RefUnwindSafe for WindowEnv<T>
impl<T> !Send for WindowEnv<T>
impl<T> !Sync for WindowEnv<T>
impl<T> Unpin for WindowEnv<T>where T: Unpin,
impl<T> !UnwindSafe for WindowEnv<T>
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