Removing direct winit access

This was a holdover while I was still implementing the PlatformWindow
interface. Cushy widgets shouldn't be able to access winit directly,
otherwise they could cause unwanted effects when not running in a
standalone Cushy app but rather embedded in a game.
This commit is contained in:
Jonathan Johnson 2024-01-05 18:17:44 -08:00
parent a3e76f6472
commit 1b608b39af
No known key found for this signature in database
GPG key ID: A66D6A34D6620579

View file

@ -201,8 +201,6 @@ impl PlatformWindowImplementation for kludgine::app::Window<'_, WindowCommand> {
pub trait PlatformWindow {
/// Marks the window to close as soon as possible.
fn close(&mut self);
/// Returns the underlying `winit` window, if one exists.
fn winit(&self) -> Option<&winit::window::Window>;
/// Returns a handle for the window.
fn handle(&self) -> WindowHandle;
/// Returns the unique id of the [`Kludgine`] instance used by this window.
@ -362,10 +360,6 @@ where
self.window.close();
}
fn winit(&self) -> Option<&winit::window::Window> {
self.window.winit()
}
fn handle(&self) -> WindowHandle {
self.window.handle(self.invalidation_status.clone())
}