Commit graph

8 commits

Author SHA1 Message Date
Simon Hausmann
f087cc18bc Remove extern "C" functions from wasm module
We don't need these functions and their export. They account for ~20kb in
the optimized .wasm - plus JS glue code.
2021-02-26 17:04:49 +01:00
Simon Hausmann
57d3a34996 Prospective fix for doc errors
In the nightly it appears that `no_mangle` is now considered "unsafe",
so we need to allow that in the ffi modules. For the layout code this
patch also creates that ffi module with prefixed function names, like in
the other modules and only allows unsafe in there.
2021-02-10 11:26:28 +01:00
Olivier Goffart
a949570c57 Timer in C++ 2020-12-10 13:08:58 +01:00
Simon Hausmann
1e683de64d Simplify Rust Timer API
Don't require the caller to Box the closure. With the assumption that
the majority of callers *want* the closure to be boxed (i.e. it's not
already boxed), the API becomes easier to use.
2020-12-04 10:57:19 +01:00
Simon Hausmann
2cc86d3753 Add support for standalone singleshot timers
This allows registering an FcOnce callback for single timer use.
2020-12-03 18:54:16 +01:00
Olivier Goffart
807dbb3c00 Puzzle: Kick animation
Also support timer that can be cancelled from the timer event
2020-11-23 13:38:44 +01:00
Olivier Goffart
0672f4b3cd Expose Timer API to rust API
And use it in the puzzle demo to implement the auto play mode
2020-11-16 12:17:02 +01:00
Simon Hausmann
0d751e6627 Render a text cursor for TextInput items
It doesn't look quite perfect yet, but it's a start.
2020-09-18 17:58:14 +02:00