Commit graph

127 commits

Author SHA1 Message Date
Olivier Goffart
329d43a51a txt files don't need a license header 2021-10-22 14:55:09 +02:00
Simon Hausmann
c564482343 Update dependencies as per release checklist 2021-09-30 14:58:49 +02:00
Simon Hausmann
4f158618a1 Fix make install in the C++ build running cbindgen
Make install would still trigger the generated_headers_target CMake
custom command - due to the use of add_dependencies - and that would end
up running cbindgen. That in turn breaks "make install" when it's run in
an environment that doesn't have cargo in PATH (for example when using
"sudo make install").

This patch folds the generation of the C++ header files into the build
of the sixtyfps-cpp crate - via build.rs. By default the headers are
placed in api/sixtyfps-cpp/generated_include but the CMake build
redirects that into the build directory.

Note: Due to the way that corrosion works, cargo is still run when
running "make install", but it's path is absolute and there should not
be any reliance on the PATH environment variable.
2021-09-18 07:32:53 +02:00
Olivier Goffart
4f1eacd6d8 LineEdit is now able to scroll to keep the cursor visible 2021-09-02 17:20:44 +02:00
Simon Hausmann
761d1fcf37 Don't require a license header in a future /.pre-commit-config.yaml
cc #404
2021-08-12 18:33:21 +02:00
Simon Hausmann
ddbe704764 Fix C++ build
The tests include headers that exposed that we do need SharedImageBuffer
in the internal C++ types namespace.
2021-08-10 15:56:01 +02:00
Simon Hausmann
a2860b389e internal cleanup: remove cbindgen workaround for name clash
Since cbindgen strips the module name, we ended up with an RGB8 type and the RGB8 (and alpha) variants
in the generated code, which made the SharedImageBuffer
constructor ambiguous.

That's not needed anymore now that we use RGB8Pixel and RGBA8Pixel.
2021-08-10 15:56:01 +02:00
Simon Hausmann
f25f85844d Remove SharedImageBuffer from the public Rust API
and instead fold the constructor functions into Image as `new_rgb8`/`new_rgba8` and `new_rgba8_premultiplied`.
2021-08-10 15:56:01 +02:00
Simon Hausmann
12916e7488 Fix C++ build after Image API changes
Export missing types
2021-08-10 15:56:01 +02:00
Olivier Goffart
74c00b1cec Add a github action to bump version numbers 2021-08-10 09:03:29 +02:00
Olivier Goffart
5d9608a565 Keep the Rotate element as internal 2021-08-09 17:43:22 +02:00
Olivier Goffart
29e0ae913c TabBar: implement something in the ugly style
and change the TabImpl API
2021-08-06 15:58:13 +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
492af0f67c Rename the implementation of the Window item to WindowItem
If we were to add `sixtyfps:🪟:Window` to the re_exports, then
this clashes. We might rename the former, but this is a cleaner naming
in any case.

Relates to #333
2021-07-20 17:50:17 +02:00
Simon Hausmann
2d3ae8390a Fix interpreter ffi generated by cbindgen
Make sure to never export the Value enum. It might drag in all sorts of
unrelated types (as it happened in #311). We have ValueOpaque for that,
so exclude Value from the export config explicitly. However since we
expose the Value *pointers* for the struct iterators, at least provide a
forward declaration.
2021-07-12 14:08:20 +02:00
Tobias Hunger
2d1afbd926 Janitor: Rename some variables to av oid triggering cspell 2021-07-08 21:48:31 +02:00
Tobias Hunger
2c5589ff9b Janitor: Remove unnecessary format! 2021-07-08 21:48:31 +02:00
Tobias Hunger
4a9206f2de Janitor: Remove unnecessary lifetime 2021-07-08 21:48:31 +02:00
Tobias Hunger
287c96386e Janitor: Remove unnecessary ? 2021-07-08 21:48:31 +02:00
Tobias Hunger
da324e5505 Janitor: Silence cspell some more:-) 2021-07-08 21:48:31 +02:00
Tobias Hunger
d6e297ddac Janitor: Rename test to avoid triggering cspell 2021-07-08 21:48:31 +02:00
Tobias Hunger
094883208c Janitor: Remove some more unnecessary & 2021-07-08 21:48:31 +02:00
Tobias Hunger
52ddf7882c Janitor: Remove some more needles clones 2021-07-08 21:48:31 +02:00
Tobias Hunger
eac109d168 Janitor: Fix spelling in error message 2021-07-08 21:48:31 +02:00
Tobias Hunger
b8f44ebc9b Janitor: cspell:ignore some words in cppdocs.rs 2021-07-08 21:48:31 +02:00
Tobias Hunger
ef5301f3c2 Janitor: Fix some more clippy warnings about iterator use 2021-07-08 21:48:31 +02:00
Tobias Hunger
3e1312fed1 Janitor: Make cspell ignore some words in a source file 2021-07-08 21:48:31 +02:00
Tobias Hunger
4d712b3f4f Janitor: Clippy suggests to collapse these ifs 2021-07-06 22:34:21 +02:00
Jocelyn Turcotte
f12abe1bec LSP: Enable comment toggling in Sublime Text
It needs a .tmPreferences file to be able to know how to
generate comments.
https://sublime-text-unofficial-documentation.readthedocs.io/en/latest/reference/comments.html
2021-07-05 09:47:41 +02:00
Tobias Hunger
8b688c52d0 clone of && clones the ref, not the value
This is probably not what you intended to do.
2021-07-02 23:18:14 +02:00
Olivier Goffart
13bd828b96 Update license date 2021-07-02 15:55:54 +02:00
Olivier Goffart
98cec35080 Increase version numbers 2021-06-28 10:39:43 +02:00
Simon Hausmann
df25fc0582 Clean up inclusion of private types into cbindgen_private namespace
Instead of importing all of private_api, import only what we need: Property and PathData.

Amends 11d46bcc23 and cdde8b30a2
2021-06-21 15:50:58 +02:00
Simon Hausmann
7f8f1b3105 Hide Property<T> and PropertyTracker<T> from the public C++ API
Move those two classes into the private_api namespace, which is excluded
from the API reference documentation.

For generate code the explicit qualification of Property<T> is changed,
for the cbindgen generated item types the private_api namespace is
pulled into the cbindgen_private namespace.
2021-06-21 15:50:58 +02:00
Simon Hausmann
85474f7670 Add support for sixtyfps::Image::size() in C++
Also added a unit test for the C++ implementation.
2021-06-20 11:18:28 +02:00
Simon Hausmann
0a3ec534ae Hide CallbackHelper and CallbackSignatureHelper from the API docs
There's no hide-from-docs tag for doxygen, so move these into the
private_api namespace.
2021-06-18 13:49:05 +02:00
Simon Hausmann
9d7dd958b4 Fix license check 2021-06-17 14:04:47 +02:00
Olivier Goffart
142a8dc185 Rename ImageReference to ImageInner and make Immage.0 private 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
Olivier Goffart
4584c40544 Rename items::Image to ImageItem
Because there will be soon a sixtyfps::Image and the names
can't clash
2021-05-28 17:05:16 +02:00
Olivier Goffart
3e9e060dce Fix C++ build 2021-05-28 10:00:15 +02:00
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
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
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