The slint::Window struct has a fairly limited API so far compared to what winit and other framework offer.
We should either duplicate most of their capabilities so it can be used from Rust/CPP/JavaScript/Python/...
Some features of the window that relates to the UI itself can be done on the .60 Window element in a declarative way:
[x] Window title (already done with title property)
[x] Window icon (#339)
[ ] Scale factor (read only?)
[x] cursor (not a window property, more like an element property)
The more imperative UI can be done via API:
One would need to expose what is currently the ComponentWindow into a public sixtyfps::Window which has function to do a bunch of things.
This include:
[x] Setting the window state: maximized, minimized, fullscreen, normal (#325)
[x] Setting some windows flag (e.g stay_always_on_top (#324), or request_attention, or border_less)
[x] Setting the geometry (#323)
[x] Show/hide which are currently on the component, but also allow setting a callback when the window is requesting to be closed in order to show another dialog and cancel and a getter to know if it is currently shown or hidden.
The items::Window need to be renamed WindowItem to avoid duplicated name (just like ImageItem)
The slint::Window struct has a fairly limited API so far compared to what winit and other framework offer. We should either duplicate most of their capabilities so it can be used from Rust/CPP/JavaScript/Python/...
Some features of the window that relates to the UI itself can be done on the .60
Window
element in a declarative way:title
property)The more imperative UI can be done via API: One would need to expose what is currently the
ComponentWindow
into a publicsixtyfps::Window
which has function to do a bunch of things.This include:
The
items::Window
need to be renamedWindowItem
to avoid duplicated name (just likeImageItem
)