summaryrefslogtreecommitdiff
path: root/WebInterface/wasm/webhogg/src/app.rs
diff options
context:
space:
mode:
Diffstat (limited to 'WebInterface/wasm/webhogg/src/app.rs')
-rw-r--r--WebInterface/wasm/webhogg/src/app.rs22
1 files changed, 22 insertions, 0 deletions
diff --git a/WebInterface/wasm/webhogg/src/app.rs b/WebInterface/wasm/webhogg/src/app.rs
new file mode 100644
index 0000000..7931418
--- /dev/null
+++ b/WebInterface/wasm/webhogg/src/app.rs
@@ -0,0 +1,22 @@
+use crate::webhogg_exception::WebhoggException;
+use crate::page::Page;
+use crate::canvas::Canvas;
+
+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(self) -> Result<(), WebhoggException> {
+ Ok(())
+ }
+}