Olivier Goffart
188806ef89
An empty sixtyfps! macro should compile
2021-07-29 17:50:57 +02:00
Olivier Goffart
c11d880424
Rerun the build scripts that compile .60 if the default style might have changed
2021-07-28 16:57:09 +02:00
Olivier Goffart
43e07320a5
Fix comments and naming found in review in #355
2021-07-28 16:57:09 +02:00
Olivier Goffart
7821926002
Rust: defaults to the native
style when Qt is available
...
This requires some gymnastics to get right as the information
need to be passed to the compiler despite having no direct dependency
between the compiler and the runtime or backends.
So use a file in the build directory to tell the default style
cc: #83
2021-07-28 16:57:09 +02:00
Olivier Goffart
fae6e0b52d
Document that angles are represented in degrees at run-time
2021-07-26 17:36:02 +02:00
Tobias Hunger
27b42687fa
Janitor: Fix clippy::redundant_closure
2021-07-23 13:48:52 +02:00
Simon Hausmann
3146fb7764
internal cleanup: Remove the sixtyfps::testing::HasWindow trait
...
and replace it with the internal, re-exported WindowHandleAccess
one.
Strictly speaking, this is a breaking change. In practice the
returned type of this trait was in `sixtyfps::re_exports`, so any
public use is questionable :)
2021-07-21 20:33:02 +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
ef184f7f1a
internal cleanup: Remove the rest of the ComponentWindow API
...
Now it just remains a wrapper around the Rc, and it can soon be moved to
the API crate hopefully.
2021-07-21 17:41:12 +02:00
Simon Hausmann
e005058285
internal cleanup: remove free_graphics_resource from the public ComponentWindow API
...
Use the WindowHandleAccess backdoor instead.
2021-07-21 17:41:12 +02:00
Olivier Goffart
3078285114
Add sixtyfps::Weak::upgrade_in_event_loop
2021-07-19 15:57:29 +02:00
Olivier Goffart
b3e58d58fe
Add a note in the doc that recomands resolver = "2"
2021-07-16 17:32:08 +02:00
Simon Hausmann
6e12b00b3f
Re-add new
constructor functions for ComponentCompiler and CompilerConfiguration
...
Amends commit dc51d4ccda
As discussed in #310
2021-07-12 13:26:17 +02:00
Tobias Hunger
dc51d4ccda
Use impl Default
instead of new()
constructors
2021-07-12 13:22:25 +02:00
Tobias Hunger
8f7d7afa94
Janitor: Replace Option::map
returning ()
with if let
2021-07-09 17:00:46 +02:00
Tobias Hunger
718126e148
Janitor: Remove useless into()
2021-07-09 17:00:46 +02:00
Tobias Hunger
a0c567d242
Janitor: Remove unnecessary return
2021-07-09 17:00:46 +02:00
Tobias Hunger
86e847fec0
Janitor: Prefer strip_prefix
over manual stripping
2021-07-09 17:00:46 +02:00
Tobias Hunger
b82ee6a470
Janitor: Replace a == ""
with a.is_empty()
2021-07-09 17:00:46 +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
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
Simon Hausmann
0236bbcf07
Avoid overriding rustdoc highlighting
...
Only run highlight.js on .60 code blocks, to not interfere with rustdoc
Relates to #282
2021-07-07 11:36:22 +02:00
Simon Hausmann
8ecddc120a
Try to add syntax highlighting for .60 snippets in Rust documentation
...
Load our highlight.js snippet that we also use for the mdbook tutorial.
Once change we need to apply on top is that the rustdoc CSS theme does
not currently provide hljs classes that change with the currently
selected theme, so instead we're mapping the classes to the CSS classes
that are used for Rust syntax highlighting. Those change with the
current theme.
Relates to #282
2021-07-07 11:13:54 +02:00
Tobias Hunger
ac207428dc
Janitor: CSpell fixes
...
Mark up some special words in documents (like C++ lingo in rust files).
2021-07-06 22:44:09 +02:00
Olivier Goffart
13bd828b96
Update license date
2021-07-02 15:55:54 +02:00
Olivier Goffart
1b9b583e3c
Move the published editor and wasm-interpreter to the snapshots directory
2021-07-01 10:12:53 +02:00
Simon Hausmann
b314bc9789
Fix up docs preview integration for dev builds
...
Use the wasm interpreter from the dev branch for dev docs
2021-06-30 18:49:04 +02:00
Olivier Goffart
423656d900
Update some more version number
...
Meaning that following the docs or tutorial won't work until the release is complete
2021-06-30 17:21:38 +02:00
Simon Hausmann
5d58d34e84
Document run_event_loop() and quit_event_loop()
...
The C++ versions were there before, but undocumented. The Rust version
for quit() was missing.
2021-06-29 16:12:00 +02:00
Olivier Goffart
16ba23ae47
Move StateInfo to the private namespace
2021-06-28 11:23:44 +02:00
Olivier Goffart
98cec35080
Increase version numbers
2021-06-28 10:39:43 +02:00
Tobias Hunger
e01bd87df8
Janitor: Fix warnings about markdown files
...
These might change the layout of the rendered markdown files. This will
also fix some typos along the way:-)
2021-06-28 08:32:25 +02:00
Tobias Hunger
13d7f5e7bd
Janitor: Fix typos in comments and user-facing strings
...
Also adapt tests for error messages containing the fixed strings.
No behavior change is intended!
2021-06-28 08:32:25 +02:00
Tobias Hunger
6b48373a01
Janitor: Fix typo in local variable name
...
No behavior change is intended here!
2021-06-28 08:32:00 +02:00
Olivier Goffart
dcbbd0cd7d
Update dependencies
2021-06-22 11:15:20 +02:00
Simon Hausmann
54c8c7761b
Refer to the tutorial from our front-pages that also refer to the reference docs
2021-06-17 16:38:19 +02:00
Simon Hausmann
7ebbf20467
Fix doc build with nightly in CI
...
The #[doc = include_str!("...")] syntax is now the new external file
syntax in rust nightly - the old syntax was removed.
2021-06-06 20:52:10 +02:00
Olivier Goffart
142a8dc185
Rename ImageReference to ImageInner and make Immage.0 private
2021-05-28 17:05:16 +02:00
Olivier Goffart
8e44ac2351
Image type: some more docs
2021-05-28 17:05:16 +02:00
Olivier Goffart
0b3fecf300
WIP: API to expose image loading from C++ and Rust
2021-05-28 17:05:16 +02:00
Simon Hausmann
7ffc5cf59a
Minor doc touch-up
2021-05-26 08:00:47 +02:00
Olivier Goffart
4fbab34ce3
Make sixtyfps::Weak
Send so we can send it to threads and back
...
Also edit the documentation
2021-05-25 15:53:49 +02:00
Simon Hausmann
73f647c2e1
Add the Rust equivalent of sixtyfps::invoke_from_event_loop
...
The same API exists in C++.
2021-05-25 15:53:49 +02:00
Olivier Goffart
720001a223
Remove the solve_layout from the component vtable
...
no longer required
2021-05-11 14:59:57 +02:00
Simon Hausmann
ef1a605953
Add support for showing warning diagnostics in the online editor
2021-04-30 15:43:05 +02:00
Simon Hausmann
9dcbf4b5ad
Revert "Change docs to point to the 0.0.6 version of the wasm interpreter"
...
This reverts commit 944c6e44af
because
we're past the release and should pointer back to master builds.
2021-04-27 17:43:45 +02:00
Simon Hausmann
944c6e44af
Change docs to point to the 0.0.6 version of the wasm interpreter
...
... in time for the release
2021-04-27 17:07:38 +02:00