diff options
Diffstat (limited to 'WebInterface/wasm/webhogg/src/app.rs')
-rw-r--r-- | WebInterface/wasm/webhogg/src/app.rs | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/WebInterface/wasm/webhogg/src/app.rs b/WebInterface/wasm/webhogg/src/app.rs index bee7c08..7931418 100644 --- a/WebInterface/wasm/webhogg/src/app.rs +++ b/WebInterface/wasm/webhogg/src/app.rs @@ -1,15 +1,22 @@ use crate::webhogg_exception::WebhoggException; +use crate::page::Page; +use crate::canvas::Canvas; -pub struct WebhoggApplication { +pub(crate) struct WebhoggApplication { + page: Page, + canvas: Canvas, } impl WebhoggApplication { pub fn new() -> Result<Self, WebhoggException> { + let page = Page::obtain()?; + let canvas = Canvas::from_existing("canvas", &page)?; Ok(Self { + page, canvas, }) } - pub fn run(&mut self) -> Result<(), WebhoggException> { + pub fn run(self) -> Result<(), WebhoggException> { Ok(()) } } |