Olivier Goffart
ba1aff84d0
Layout refactoring: C++ part
2021-05-11 14:59:57 +02:00
Simon Hausmann
28701d2f90
Fix item vtable usage on Windows
...
The item tree is intended to be initialized with pointers to the item
vtables, which are implemented using data relocation records that
resolve to the symbols exported by the sixtyfps_cpp shared library.
On windows, according to
https://docs.microsoft.com/en-us/cpp/c-language/rules-and-limitations-for-dllimport-dllexport?view=msvc-160
such data relocations are not supported, so this patch implements the
fallback through getter functions.
2021-05-10 22:54:06 +02:00
Simon Hausmann
98a91ec3e5
Generate item vtable symbol declarations via cbindgen xtask
...
... instead of declaring them by hand in sixtyfps.h
This will make it easier to introduce an indirection in one place.
2021-05-10 22:54:06 +02:00
Simon Hausmann
140b054de5
Fix up license check
...
Those two sublime config files don't need a license header
2021-05-03 10:30:15 +02:00
Jocelyn Turcotte
beadd38b3e
Add Sublime Text files to the license check configuration
2021-05-03 10:30:15 +02:00
Olivier Goffart
3380383787
Bump version number
...
(Does not include docs and README yet)
2021-04-26 13:16:48 +02:00
Olivier Goffart
feadcfa25a
Update cbindgen
2021-04-23 16:18:52 +02:00
Olivier Goffart
0b5723bb47
Add definition for kate syntax highlighting
...
I did not know in which directory to put it, so i put it there for now
2021-04-22 20:15:07 +02:00
Olivier Goffart
ba2f2d5719
Add an Opacity element that does nothing
2021-04-15 10:17:52 +02:00
Olivier Goffart
9416b0a3d9
Upgrade version of cbindgen
2021-04-07 13:39:58 +02:00
Olivier Goffart
6742241d34
Fix abort of xtask with cbindgen
...
cbindgen uses proc-macro2, which will try to detect if proc-macro is
available in a panic-hook.
But since we want to compile everything in panic=abort mode, this will
cause the whole process to abort and we don't want that, so work around
that by forcinf the use of the fallback
2021-04-07 13:20:51 +02:00
Simon Hausmann
3f6bbaf53a
Make it possible to use the C++ headers without CMake
...
Detect the pointer size solely via the pre-processor
2021-03-31 08:42:54 +02:00
Simon Hausmann
272a87ccf1
Fix C++ build
...
Map the target_pointer_width cfg's used for the opaque ffi interpreter
data structures to #ifdefs in CMake, to avoid that cbindgen generates
them multiple times without guard.
2021-03-25 09:37:34 +01:00
Simon Hausmann
715c9f407e
Don't require a license for Qt .ui files
2021-03-23 17:33:39 +01:00
Simon Hausmann
2b21e7f827
Add support for showing doxygen warnings
...
By using the --show-warnings option
2021-03-23 12:56:24 +01:00
Olivier Goffart
bd6cace54c
Test and fix C++ invokation of callback
2021-03-22 14:30:00 +01:00
Simon Hausmann
d6c109d456
Don't crash when encounting the spin_on conditionaly dependency
...
I need to see if this is correct, but meanwhile this should fix the CI
2021-03-19 17:30:44 +01:00
Simon Hausmann
9a8c6bf9f7
Move the string_to_slice
helper into sixtyfps_string.h
for easier editing
2021-03-19 14:16:30 +01:00
Simon Hausmann
3bb4b87bc7
Use a free-standing function for the string_view to slice conversion
2021-03-19 13:13:08 +01:00
Simon Hausmann
0c21008861
Add internal convenience API to construct a C++ slice from a string view
2021-03-19 12:54:22 +01:00
Olivier Goffart
dbf06f73cc
Link the C++ lib against the interpreter
2021-03-17 11:44:45 +01:00
Olivier Goffart
e7cbc716ed
Generate a header file for the interpreter API
2021-03-17 11:26:44 +01:00
Olivier Goffart
0e351de1a6
Create a new crate to expose the C++
2021-03-16 16:34:02 +01:00
Olivier Goffart
6f88d78303
Rename Resource
to ImageReference
in the runtime
2021-03-11 10:06:23 +01:00
Simon Hausmann
391d0152f0
Add Color::brighter/darker functions
...
These are exposed in .60 as well as in Rust and C++ and implemented by
converting to HSV color space and adjusting the brightness (value).
2021-02-24 10:49:27 +01:00
Simon Hausmann
508adb838a
Fix missing license headers
2021-02-22 11:17:39 +01:00
Simon Hausmann
500919745e
Add an internal Rotate element
...
This is just a starting point, to be turned into a real Transform
element later, along with syntactic sugar to turn rotation, etc. into a
transform matrix in the generated output.
2021-02-12 17:31:06 +01:00
Simon Hausmann
2dd5ea61bb
Add support for Path.fill-rule
...
For some reason it's not working with the Qt renderer though
2021-02-10 14:08:32 +01:00
Simon Hausmann
7982325da4
Change Rectangle::background's type to be a brush
...
This also introduces the brush type in the compiler and generators. At the
moment only conversion from Color is implemented.
2021-02-03 12:49:44 +01:00
Olivier Goffart
54c979d9e6
Make it so that you don't need to run xtask through cargo
2021-02-02 08:39:06 +01:00
Olivier Goffart
09ce4142a5
Some reorganization of the testdriver
2021-02-01 18:13:19 +01:00
Olivier Goffart
efd6a5479c
don't make xtask depends on the test driver lib
2021-02-01 18:13:08 +01:00
Simon Hausmann
de67b865dc
Implement basic font fallbacks for WASM and macOS
...
Our demos use some symbols such as the back arrow and the ugly style
uses a down arrow for the combo box. These symbols are not in Roboto and
also not in the default font font_kit gives us on macOS.
Therefore for WASM we switch over to DejaVu, which is bigger than
Roboto.
For macOS this patch implements rudimentary fallback list generation
using CTFontCopyDefaultCascadeListForLanguages. This needs further work
to respect the locale and correctly translate styles - eventually this
should go into font-kit.
A general aspect with the font fallback handling is that femtovg doesn't
support on-demand loading yet. Instead it uses owned_ttf_parser, so
every font will be read entirely off disk. That's why for macOS we trim
the list. We could perhaps do the analysis ourselves.
Linux and Windows are to follow.
2021-01-14 08:53:14 +01:00
Simon Hausmann
e74159f993
Fix license header check
2021-01-14 08:53:13 +01:00
Olivier Goffart
16f5a03c14
Run cargo fmt
2020-12-18 10:29:15 +01:00
Olivier Goffart
0d2d48be4f
Rename "signal" to "callback"
2020-12-18 09:51:01 +01:00
Olivier Goffart
c77109d257
Fix the extension of the npm package
2020-12-09 16:15:08 +01:00
Olivier Goffart
05b33968ad
Fix license check
2020-12-08 16:51:21 +01:00
Simon Hausmann
1591049c64
Fix license check after moving files around
2020-11-27 16:00:03 +01:00
Simon Hausmann
a4807d03ce
Fix license check
2020-11-27 14:51:52 +01:00
Olivier Goffart
5b93fe4b7c
Fix license check
2020-11-13 14:28:35 +01:00
Simon Hausmann
b782038aad
Avoid including the tarball for npm
...
Don't include the package inside itself if it's there.
2020-10-22 13:22:26 +02:00
Simon Hausmann
008455a106
Include a license file in the node source package
2020-10-22 13:14:56 +02:00
Olivier Goffart
2f2e76cfd5
Missing license header
2020-10-22 11:54:59 +02:00
Simon Hausmann
f3d87f00a6
Added a little xtask to create a source package in one go
...
This is a wrapper around `npm pack` that temporarily edits the relative
paths out of `Cargo.toml` to make the package work outside of the git
repo.
2020-10-22 10:58:20 +02:00
Olivier Goffart
eb73f987e0
Update cargo-metadata dependency
2020-10-21 08:58:48 +02:00
Olivier Goffart
4d4aa81007
Revert the commit than pins aho-corasick version
...
This reverts commit 0c8a31211e
.
aho-corasick 0.7.14
2020-10-13 07:57:02 +02:00
Olivier Goffart
1138c9dbed
Normalize the spelling of SixtyFPS
2020-10-13 07:48:55 +02:00
Simon Hausmann
0c8a31211e
Work around build failure on macOS
...
I keep running into https://github.com/BurntSushi/aho-corasick/issues/64
on macOS, so pin aho-corasick to 0.7.4.
2020-10-12 14:46:21 +02:00
Olivier Goffart
ce3fa5e7cf
Fix license header check
2020-10-07 11:51:55 +02:00