WIP: Dioxus-webview

This commit is contained in:
Jonathan Kelley committed 2021-01-21 03:22:08 -05:00
1 parent 28ac37a8b2
commit 9c01736895
9 files changed
+113 -20

No files matched your search

+20
View File
@@ -149,9 +149,29 @@ pub mod virtual_dom {
/// }
/// ```
pub struct Context<'source, T> {
/// Direct access to the properties used to create this component.
pub props: &'source T,
}
impl<'a, T> Context<'a, T> {
/// Access a parent context
pub fn parent_context<C>(&self) -> C {
todo!("Context API is not ready yet")
}
/// Create a subscription that schedules a future render for the reference component
pub fn subscribe(&self) -> impl FnOnce() -> () {
todo!("Subscription API is not ready yet");
|| {}
}
/// The `Enter` API is an internal way of tracking the location in the Dioxus Virtual DOM
/// The Context object consumes itself, producing a new lifetime without reallocating
fn enter(self) -> Self {
todo!("Entrance API for reusing Context object not ready yet")
}
}
pub trait Properties {}
// Auto derive for pure components