Commit graph

601 commits

Author SHA1 Message Date
Simon Hausmann
54182ff54b Add a section to the C++ intepreter intro about global singletons
Also minor fixes to the generated C++ global singleton docs.
2021-08-27 17:14:57 +02:00
Simon Hausmann
3212cda271 Add a section to the C++ docs about accessing global singletons 2021-08-27 17:08:57 +02:00
Simon Hausmann
8de3075270 C++ docs: rework the entry points
Move the sixtyfps::namespace entry into a dedicated C++ integration overview
page. Also duplicate and specialize the instantiation and model bits, which
differ between the compiled code and the interpreter.

Finally, fix the generated C++ docs to not mention that there's a constructor,
instead we generate a constructor function.
2021-08-27 16:56:36 +02:00
Simon Hausmann
499f75455e Re-order the side bar in the C++ docs
The new order is

    1. Getting Started
    2. C++ / .60 Integration
    3. Reference

The second section will host a broader introduction that is currently hiding
in the namespace.
2021-08-27 14:44:33 +02:00
Simon Hausmann
6d05959c93 Complete the generated C++ code docs to mention globals
But there's an entire section still missing with an example.
2021-08-27 14:28:33 +02:00
Simon Hausmann
4b8259017b Doc fixes
Try to use the term "global singleton" consistently. That's also the
term we use in the language reference.
2021-08-27 13:46:44 +02:00
Simon Hausmann
0bb586e70f Minor documentation fixes for the globals access API 2021-08-27 13:36:48 +02:00
Olivier Goffart
70c57844b7 Add invoke_global_callback to the C++ interpreter API 2021-08-27 13:36:48 +02:00
Olivier Goffart
0fad27e23e Add set_global_callback in the C++ interpreter API 2021-08-27 13:36:48 +02:00
Olivier Goffart
81688906f7 C++ Interpreter: add API to get/set global value 2021-08-27 13:36:48 +02:00
Olivier Goffart
59e1361388 Fix compilation with C++20
Fixes #428
2021-08-20 18:49:15 +02:00
Olivier Goffart
071c1ea92f Update version number in README 2021-08-19 10:46:25 +02:00
Olivier Goffart
7c3555e280 Update the version number that shows in the documentation
It does not update the version number in the README because
these are either not part of the versionized documentation
or the demantic versioning make it work anyway
2021-08-19 09:57:13 +02:00
Olivier Goffart
c31ff31460 Update sixtyfps-cpp/README 2021-08-18 15:02:08 +02:00
Simon Hausmann
bcb200c547 Add an example for invoke_from_event_loop in C++
This way we can link from it from the blog and it looks maybe as good as in Rust :)
2021-08-18 10:12:34 +02:00
Tobias Hunger
09e272abb6 Janitor: Fix clippy::useless_conversion 2021-08-18 00:24:51 +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
Olivier Goffart
7cc13d78c3 C++ Make the stron_ref and weak_ref of VRc atomic
To match the equivalent in rust
2021-08-12 12:59:50 +02:00
Olivier Goffart
9b869f2dc0 C++ Add a few asserts that the non-thread safe API is not called in a thread 2021-08-12 12:59:50 +02:00
Olivier Goffart
532827b646 Fix the C++ interpreter API compatibility after the change from _ to -
Property name with _ should still be supported by set_property/get_property
2021-08-10 22:21:01 +02:00
ogoffart
53f286258c Bump version number to 0.1.1 2021-08-10 08:06:20 +00:00
Olivier Goffart
74c00b1cec Add a github action to bump version numbers 2021-08-10 09:03:29 +02:00
Simon Hausmann
661f23760b Fix build: Add missing non-const arrow/deref operators for VRc/Component 2021-08-03 10:32:04 +02:00
Simon Hausmann
e97ecea480 Fix constness in generated C++ API
run(), show() and hide() should not be const, as well as the window() accessor.
2021-08-03 10:32:04 +02:00
Simon Hausmann
9e4b067f38 Provide sixtyfps::Window by reference in the C++ interpreter API 2021-08-03 10:32:04 +02:00
Simon Hausmann
341387c8d0 Provide sixtyfps::Window by reference in the generated C++ API 2021-08-03 10:32:04 +02:00
Simon Hausmann
23da97bc75 minor cleanup
Rename window_ to window_rc for the private window member in the generated C++ struct.
2021-08-03 10:32:04 +02:00
Simon Hausmann
66891a299c Start a new sixtyfps::Window API for Rust, C++, the interpreters and JS
The generated component now provides access to a Window type
via the window() accessor function.

This is part of #333
2021-08-03 10:32:04 +02:00
Olivier Goffart
9ffcd34d1b Test for angle in the C++ interpreter API 2021-07-26 17:36:02 +02:00
Olivier Goffart
fae6e0b52d Document that angles are represented in degrees at run-time 2021-07-26 17:36:02 +02:00
Olivier Goffart
07bf0974d7 C++: Expose conversion betwen Value and Image
Closes #350
2021-07-26 14:12:32 +02:00
Olivier Goffart
0a46b367e2 C++: fix creating a gradient from a const reference to a color 2021-07-22 14:38:58 +02:00
Simon Hausmann
b8f208100c Minor doc fix: Link to the run_event_loop function mentioned in the docs
The formatting is not a code block, but I could not figure out how to do
that. A link is still better IMO than a difference in formatting.
2021-07-22 10:55:13 +02:00
Simon Hausmann
8658e50e27 Fix typo 2021-07-22 09:04:55 +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
Simon Hausmann
1c285694d7 internal cleanup: Remove the use of ComponentWindow in the interpreter 2021-07-21 17:41:12 +02:00
Simon Hausmann
8ef8cb90ec Remove unused file 2021-07-10 08:23:01 +02:00
Simon Hausmann
e321bece70 Add missing license header 2021-07-10 08:13:13 +02:00
Simon Hausmann
4f8c9b4378 Add a badge for GH discussions as forum 2021-07-10 08:13:13 +02:00
Simon Hausmann
163625fcd3 C++ docs: finish re-organzing the C++ docs entry
Instead of repeating the table of contents, provide a proper intro
page - based on the Github README - and group the remaining content
into Getting Started, Reference and Integration sections.
2021-07-10 08:13:13 +02:00
Simon Hausmann
cb9a89d112 C++ docs: Fix the index page
Remove the namespace prefix to make the page readable
2021-07-09 17:18:37 +02:00
Simon Hausmann
16ef842856 C++ docs: remove non-existent module index 2021-07-09 17:16:11 +02:00
Simon Hausmann
9e57262487 C++ docs: Fix showing of the version in the theme
Not sure where the "release" variable came from :)
2021-07-09 09:59:20 +02:00
Simon Hausmann
be47f708d9 Cleanup: Move docs/html to docs/resources 2021-07-08 07:01:51 +02:00
Simon Hausmann
ad321c7735 Use one shared html file for the syntax highlighting
Using Olivier's idea to check the meta tag, we can distinguish rustdoc
from "the rest". The html is included in mdbook by directly by
symlinking head.hbs.
2021-07-08 07:01:51 +02:00
Simon Hausmann
8003c06f3a Move all HTML/CSS/JS related to preview and syntax highlighting in the docs into a shared folder
This will also be the place where the .60 language definition for
highlight.js can go.
2021-07-08 07:01:51 +02:00
Simon Hausmann
43d20dece9 Add support for .60 syntax highlighting in C++ docs
Relates to #281
2021-07-07 14:00:04 +02:00
Simon Hausmann
77898796da Rust docs: Split up the preview from the syntax highlighting
The preview is now in sixtyfps-docs-preview.html and the highlighting in
sixtyfps-docs-highlight.html. This faciliates reusing the preview from
C++ while using a different HTML file later for syntax highlighting.

Relates to #282
Needed for #281
2021-07-07 14:00:04 +02:00