Tobias Hunger
e45635656d
Janitor: Fix clippy::redundant_closure
2021-07-22 16:05:08 +02:00
Tobias Hunger
e8aa79e762
Janitor: Fix clippy::redundant_clone
2021-07-22 16:05:02 +02:00
Tobias Hunger
4763d4611b
Janitor: Fix clippy::assign_op_pattern
2021-07-22 16:04:28 +02:00
Tobias Hunger
fd745550b3
Janitor: Fix clippy::redundant_static_lifetimes
2021-07-22 14:21:01 +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
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
673c0ce81c
Add a as_any to the Model trait to allow getting a reference to the original model
2021-07-20 15:38:10 +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
Tobias Hunger
efc0d63e8b
Janitor: iter().cloned().collect()
on a slice to create a Vec
== to_vec()
...
This is clippy::iter_cloned_collect
2021-07-15 07:55:06 +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
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
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
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
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
Simon Hausmann
9784415a7e
Fix invalid CMake package config files when using different build types
...
As we try to copy the different location target properties from the
corrosion target into the package config file, we need to take all the
usual build types into account, not only Debug/Release.
Especially RelWithDebInfo is popular among packagers.
2021-07-06 23:07:35 +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
Tobias Hunger
39984b27db
Janitor: Fix spelling in comments
2021-07-03 15:49:43 +02:00
Simon Hausmann
5a7ac1735d
C++ docs: minor cleanup in generated code sample
...
Encode the return type only once, not twice
2021-07-02 22:13:52 +02:00
Simon Hausmann
c74af8cb1a
C++ docs: Remove the horizontal scrollbar from the cmake example
2021-07-02 16:22:21 +02:00
Simon Hausmann
8f9a723e75
C++ docs: Add a getting started section
...
This combines the tutorial sub-section from the intro (a bit weird as sub-section there)
and the usage part of the cmake section into a getting started that
has a complete little C++ example.
2021-07-02 16:22:21 +02:00
Olivier Goffart
13bd828b96
Update license date
2021-07-02 15:55:54 +02:00
Simon Hausmann
570ccc20e9
C++ docs: remove the vtable namespace from the list of namespaces in the API
2021-07-02 15:40:43 +02:00
Simon Hausmann
3323ec8b1b
C++ docs: Bump the copyright year
2021-07-02 15:39:33 +02:00
Simon Hausmann
adeb192f6e
C++ API: Make LinearGradientBrush and GradientStop private API
2021-07-02 15:34:16 +02:00
Simon Hausmann
9819f7f6b7
C++ docs: Fix one more sphinx warning about unused input .md file
2021-07-02 14:20:29 +02:00
Simon Hausmann
e61c62d340
C++ docs: cut down on sphinx warnings
...
Excludes files we are not using in the toctree
2021-07-02 14:20:29 +02:00
Simon Hausmann
a77fbcc310
C++ docs: fix warning about misplaced ::note::
...
We don't really need it and in fact don't even want the light bulb style,
even if it worked :)
2021-07-02 12:32:28 +02:00
Simon Hausmann
f8abd57c3b
C++ docs: For the model bits, link to the for-in and ListView docs
...
Using an rst epiloge we can define global references that are even formatted
(using rst substitutions)
2021-07-02 12:32:28 +02:00