Commit graph

16 commits

Author SHA1 Message Date
Tobias Hunger
bfca0e3573 Mass update copyright messages to be more REUSE compliant 2021-12-22 10:06:12 +01:00
Olivier Goffart
ffe561f8d8 Use SharedVector internally in SharedString
Get rid of the triomphe dependency
2021-12-02 12:42:30 +01:00
Simon Hausmann
7d12fd7b4e Add support for tracking the length of a model in C++
Similar to the parent commit, the model tracks changes to the rows and
marks an internal property dirty. Since we have a base class this is a
little less intrusive.

cc #98
2021-10-20 15:25:28 +02:00
Simon Hausmann
4eef8c7688 Add API to sixtyfps::Image in Rust and C++ to access the optional path 2021-09-28 08:52:27 +02:00
Tobias Hunger
aea4ecca99 Apply pre-commit hooks to all files 2021-08-17 22:38:16 +02:00
Simon Hausmann
a752c798b8 Changed C++'s SharedVector::clear() to not preserve capacity when shared 2021-08-12 13:41:08 +02:00
Simon Hausmann
511027dad0 Implement SharedVector::clear() for C++ 2021-08-12 13:41:08 +02:00
Simon Hausmann
eaddbe664e internal cleanup: Rename ComponentWindow to WindowRc
That's all it is nowadays, it's a wrapper around Rc<Window>. It's not an
alias because we need to also "wrap" it to C++ via cbindgen, but that's
about it.
2021-07-21 20:33:02 +02:00
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