14 files changed
+48
-52
No files matched your search
@@ -4,11 +4,13 @@ use wry::{
|
||||
webview::WebView,
|
||||
};
|
||||
|
||||
pub(crate) type DynEventHandlerFn = dyn Fn(&mut EventLoop<()>, &mut WebView);
|
||||
|
||||
pub struct DesktopConfig<'a> {
|
||||
pub window: WindowBuilder,
|
||||
pub(crate) manual_edits: Option<Vec<DomEdit<'a>>>,
|
||||
pub(crate) pre_rendered: Option<String>,
|
||||
pub(crate) event_handler: Option<Box<dyn Fn(&mut EventLoop<()>, &mut WebView)>>,
|
||||
pub(crate) event_handler: Option<Box<DynEventHandlerFn>>,
|
||||
}
|
||||
|
||||
impl<'a> DesktopConfig<'a> {
|
||||
@@ -55,3 +57,9 @@ impl<'a> DesktopConfig<'a> {
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> Default for DesktopConfig<'a> {
|
||||
fn default() -> Self {
|
||||
Self::new()
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user