Split crates
Some checks failed
Build legacy Nix package on Ubuntu / build (push) Failing after 7m49s
Some checks failed
Build legacy Nix package on Ubuntu / build (push) Failing after 7m49s
This commit is contained in:
parent
99be029ff8
commit
b977f446d3
16 changed files with 84 additions and 110 deletions
23
crates/engine_window/src/raw_handle.rs
Normal file
23
crates/engine_window/src/raw_handle.rs
Normal file
|
@ -0,0 +1,23 @@
|
|||
use std::sync::Arc;
|
||||
|
||||
use bevy_ecs::resource::Resource;
|
||||
use winit::{event_loop::EventLoopProxy, window::Window};
|
||||
|
||||
#[derive(Resource)]
|
||||
pub struct EventLoopProxyWrapper<T: 'static>(EventLoopProxy<T>);
|
||||
|
||||
impl<T: 'static> EventLoopProxyWrapper<T> {
|
||||
pub fn new(event_loop: EventLoopProxy<T>) -> Self {
|
||||
Self(event_loop)
|
||||
}
|
||||
|
||||
pub fn proxy(&self) -> &EventLoopProxy<T> {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Resource)]
|
||||
pub struct DisplayHandleWrapper(pub winit::event_loop::OwnedDisplayHandle);
|
||||
|
||||
#[derive(Resource)]
|
||||
pub struct WindowWrapper(pub Arc<Window>);
|
Loading…
Add table
Add a link
Reference in a new issue