Commit graph

16 commits

Author SHA1 Message Date
Simon Hausmann
8372d3f6d8 Rename call_* to invoke_* for callbacks
Fixes #187
2021-03-15 17:01:05 +01:00
Simon Hausmann
2fdaa44d51 Load the Noto Sans font from the nodejs printer demo 2021-02-22 11:17:39 +01:00
Olivier Goffart
5a21f1bd81 Rename emit_ to call_ for callback
Signal was renamed to Callback, but one does not emit a callback, one calls it
2021-01-25 15:59:10 +01:00
Simon Hausmann
5f265ffc09 Split up ComponentWindow::run() into show(), hide() and sixtyfps::run_event_loop()
This allows creating multiple windows for example, and it will allow for
showing windows in those tests that require a mapped window.

As a bonus, the run() function on generated components is not consuming
anymore.
2021-01-19 09:50:22 +01:00
Olivier Goffart
0d2d48be4f Rename "signal" to "callback" 2020-12-18 09:51:01 +01:00
Simon Hausmann
c2a0cd7000 Added a node version of the memory puzzle game
This also implements a basic single shot timer support, which has
one caveat: it leaks the closures right now.
2020-12-11 17:17:28 +01:00
Olivier Goffart
bff55d4f1b Return value for signal 2020-12-01 18:52:51 +01:00
Simon Hausmann
68e35ab332 Fix removing todo items in node
After removal the index is wrong and I mistakely thought entries() adjuts.
2020-10-21 14:18:33 +02:00
Simon Hausmann
c59b1e61ac Fix a bug in sixtyfps.ArrayModel.remove
Report the correct index/size to the runtime.

Also added convenience entries()/values() functions that forward to the array.
2020-10-21 13:48:13 +02:00
Olivier Goffart
ac6d4007ab Node: Add setHandler features on signals 2020-10-21 12:22:22 +02:00
Simon Hausmann
e7d8455c49 Some more array model docs 2020-10-21 11:26:18 +02:00
Simon Hausmann
27972145a7 Add some documentation to the Model and ModelPeer
Also in this change:

 * Make ArrayModel<T> implement Model<T>.
 * Switch from jsdoc/better-docs to typedoc, which has much better
   support for type annotations.
2020-10-21 11:14:24 +02:00
Simon Hausmann
f6d8f78e3f Hide the private API of the NodeJS integration
Hide it behind a `private_api` property in the module export.
2020-10-20 16:52:28 +02:00
Simon Hausmann
ce7d0c98e0 Use a base class for components in the Node API
In the event that a property is called "show" this theoretically still allows calling the show function through the
prototype chain.
2020-10-20 16:46:38 +02:00
Simon Hausmann
7905285562 Change the Model API for the NodeJS Integration to use CamelCase 2020-10-20 16:40:49 +02:00
Simon Hausmann
279ce560f9 Convert NodeJS API to use & export TypeScript
This will make the types available to API consumers and makes the
documentation clearer.
2020-10-20 15:57:50 +02:00
Renamed from api/sixtyfps-node/lib/index.js (Browse further)