Commit graph

8 commits

Author SHA1 Message Date
Olivier Goffart
13bd828b96 Update license date 2021-07-02 15:55:54 +02:00
Simon Hausmann
7f8f1b3105 Hide Property<T> and PropertyTracker<T> from the public C++ API
Move those two classes into the private_api namespace, which is excluded
from the API reference documentation.

For generate code the explicit qualification of Property<T> is changed,
for the cbindgen generated item types the private_api namespace is
pulled into the cbindgen_private namespace.
2021-06-21 15:50:58 +02:00
Simon Hausmann
85474f7670 Add support for sixtyfps::Image::size() in C++
Also added a unit test for the C++ implementation.
2021-06-20 11:18:28 +02:00
Olivier Goffart
aabd320e83 C++ Api to run a functor from a thread 2021-05-11 16:42:59 +02:00
Olivier Goffart
3ab11b62e6 C++ SharedString API: allow assigning from const char *
There is already a constructor that takes a char*, so there should be an
assignment operator as well
2021-04-27 10:37:27 +02:00
Simon Hausmann
4cbcf2611f Fix recurring C++ timers
* sixtyfps_timer_start needs to *take* the timer id out of the Rust
  timer to avoid that the subsequent drop stops the timer again
* For the Qt event loop, call `timer_event()` once before entering
  QCoreApplication::exec(), to schedule any timers that were started
  beforehand.
* Added a way to quit the event loop gently, in order to use that
  from the C++ unit test.
2021-03-25 20:07:12 +01:00
Simon Hausmann
3bd5b0eadf Add support for recursive dependency tracking across PropertyTracker instances
By default PropertyTracker::evaluate() registers the currently
evaluating binding/tracker as a dependency. This should help with
repeaters and other scenarios where in the run-time we use property
trackers but want to track the overall "dirtyness" in the window with
regards to whether a redraw is needed or not.

The new evaluate_as_dependency_root() function allows skipping this
mechanism and is used for the two trackers in the window.
2021-03-25 12:29:19 +01:00
Olivier Goffart
d79131f18f Split the tests into two files for the interpreter and others 2021-03-22 11:24:11 +01:00