Start a new sixtyfps::Window API for Rust, C++, the interpreters and JS

The generated component now provides access to a Window type
via the window() accessor function.

This is part of #333
This commit is contained in:
Simon Hausmann 2021-07-21 18:38:05 +02:00 committed by Simon Hausmann
parent 5fd63b63f1
commit 66891a299c
14 changed files with 200 additions and 50 deletions

View file

@ -41,11 +41,15 @@ class Component {
}
show() {
this.comp.show();
this.window.show();
}
hide() {
this.comp.hide();
this.window.hide()
}
get window(): Window {
return this.comp.window();
}
send_mouse_click(x: number, y: number) {
@ -57,6 +61,11 @@ class Component {
}
}
interface Window {
show(): void;
hide(): void;
}
/**
* @hidden
*/