mirror of
https://github.com/slint-ui/slint.git
synced 2025-11-01 12:24:16 +00:00
Clean up wasm-interpreter / winit interface
Use the window attributes hook instead of a private function in the winit backend.
This commit is contained in:
parent
ca0c75bfe1
commit
4e65998016
5 changed files with 62 additions and 46 deletions
|
|
@ -983,22 +983,6 @@ impl ComponentDefinition {
|
|||
})
|
||||
}
|
||||
|
||||
/// Instantiate the component for wasm using the given canvas id
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
pub fn create_with_canvas_id(
|
||||
&self,
|
||||
canvas_id: &str,
|
||||
) -> Result<ComponentInstance, PlatformError> {
|
||||
generativity::make_guard!(guard);
|
||||
Ok(ComponentInstance {
|
||||
inner: self
|
||||
.inner
|
||||
.unerase(guard)
|
||||
.clone()
|
||||
.create(WindowOptions::CreateWithCanvasId(canvas_id.into()))?,
|
||||
})
|
||||
}
|
||||
|
||||
/// Instantiate the component using an existing window.
|
||||
#[doc(hidden)]
|
||||
#[cfg(feature = "internal")]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue