M0: WIT package, MoonBit components, JS host, docs, CI (#1)
CI / test (push) Successful in 19s
CI / test (push) Successful in 19s
This commit was merged in pull request #1.
This commit is contained in:
1 parent
e5548fc067
commit
880ecd4102
141 files changed
+9681
-1
No files matched your search
@@ -0,0 +1,29 @@
|
||||
///| Implementation of `moonplasma:desktop/plasmoid` for the binary clock.
|
||||
/// All logic lives in lib/clock; this file only adapts host capabilities.
|
||||
|
||||
///|
|
||||
pub fn info() -> PlasmoidInfo {
|
||||
let (id, name, w, h, min_w) = @logic.binary_info()
|
||||
{
|
||||
id,
|
||||
name,
|
||||
preferred: { w: w.reinterpret_as_uint(), h: h.reinterpret_as_uint() },
|
||||
min_width: min_w.reinterpret_as_uint(),
|
||||
stretch: false,
|
||||
}
|
||||
}
|
||||
|
||||
///|
|
||||
pub fn render(size : @types.Size) -> Array[@types.DrawOp] {
|
||||
@logic.render_binary(size, @theme.get_tokens(), @clock.now())
|
||||
}
|
||||
|
||||
///|
|
||||
pub fn popup() -> PopupSurface? {
|
||||
None
|
||||
}
|
||||
|
||||
///|
|
||||
pub fn on_event(_target : Surface, _event : @types.InputEvent) -> Bool {
|
||||
false
|
||||
}
|
||||
Reference in new issue
Block a user