Olivier Goffart
8b16509422
Fix wasm build
2021-05-21 16:41:51 +02:00
Olivier Goffart
2265dd04e4
interpreter: wrap ComponentDescription in a ErasedComponentDescription
...
I'll need that for globals
2021-05-21 12:25:37 +02:00
Olivier Goffart
21a80f4562
WIP: Layout refactoring
...
Instead of using a solve_layout function in the component, use property to hold
a layout cache.
This commit only implement the GridLayout and only the interpreter part
2021-05-11 14:59:57 +02:00
Olivier Goffart
7ae850d564
Rename Type::Length -> Type::PhysicalLength
2021-04-21 17:15:19 +02:00
Simon Hausmann
794d3ec6ec
Revert "Add a nodejs testing function for apply_layout"
...
This reverts commit beb5d63d1b
.
Oops, the more modern style *is* to use send_mouse_click.
2021-04-08 16:58:37 +02:00
Simon Hausmann
beb5d63d1b
Add a nodejs testing function for apply_layout
...
This will allow making the JS test code more similar to the C++/Rust code,
allowing replacing synthetic mouse clicks.
2021-04-08 16:51:51 +02:00
Olivier Goffart
c3ab89dd3e
Refactor import opening and its hook
...
This way the hook is called regardless if the file exist in the import path or not
2021-04-06 12:27:59 +02:00
Simon Hausmann
1e4921de13
Fix LSP server staying alive when closing preview window
...
* Provide an internal behavior parameter to run_event_loop() that we can use
from the preview to not quit when the last window was closed.
* Fix Drop for the winit event loop GraphicsWindow to drop the backend window correctly
when unmapping, not when the graphics window dies. Otherwise QuitOnLastWindowClosed doesn't work.
2021-04-06 12:11:55 +02:00
Olivier Goffart
162944b8c9
Add ability in the interpreter to re-use an existing window
2021-04-03 10:00:12 +02:00
Simon Hausmann
342f77139b
Add public Rust interpreter API to introspect the public properties
2021-03-31 08:42:54 +02:00
Simon Hausmann
9a6e9c3a53
Simplify internal interpreter property descriptor API
...
Return an iterator when querying the properties. This requires a
one-time copy of the property declarations out of the compiler data
structure, which is read-only.
2021-03-31 08:42:54 +02:00
Simon Hausmann
bb6020496e
Hide Value::ImageReferenc
from the public interpreter API for now
2021-03-30 10:46:51 +02:00
Simon Hausmann
2904ee71e0
Move ValueType
into the public Rust interpreter API
...
That way we can use it to expose the list of public properties
2021-03-30 10:38:02 +02:00
Simon Hausmann
8e05a15704
Polish the ComponentDefinition docs a little bit
2021-03-23 17:21:36 +01:00
Simon Hausmann
90d3953d42
Polish the ComponentDefinition docs a little bit
2021-03-23 17:10:14 +01:00
Simon Hausmann
c06b0e10e1
Add/sync class summary docs for interpreter::Struct
2021-03-23 12:57:40 +01:00
Simon Hausmann
2fed4ddaed
Split the interpreter ffi module into a separate file
2021-03-22 15:15:07 +01:00
Simon Hausmann
e1f9347aaa
Add a diagnostics getter to ComponentCompiler
2021-03-19 18:34:39 +01:00
Olivier Goffart
f2ffc0ebf6
ComponentDefinition::create in C++
...
Note thate there is a hack so `ComponentHandle<ComponentInstance>` (which is
binary compatible with `VRc<ComponentVTable, ErasedComponentBox>` works
2021-03-19 18:10:38 +01:00
Simon Hausmann
3ad41a551b
Minor cleanup
...
When getting the include paths, avoid one intermediate String allocation
and go straight from str to SharedString
2021-03-19 18:08:53 +01:00
Simon Hausmann
9eecdefb35
Add ComponentCompiler::build_from_path
2021-03-19 17:26:19 +01:00
Simon Hausmann
fd9d154b27
Add getter/setter for the style
2021-03-19 17:17:57 +01:00
Simon Hausmann
4705c455b9
Remove CompilerConfiguration
from the interpreter API
...
It's not needed anymore with `ComponentCompiler` (I forgot to remove it)
2021-03-19 17:02:19 +01:00
Simon Hausmann
2d790c202f
Revert accidental publishing of internal ffi functions
...
Not needed as long as everything is within ffi
2021-03-19 16:53:27 +01:00
Simon Hausmann
3588d6ffbe
Start exposing ComponentDefinition to C++
2021-03-19 16:50:12 +01:00
Simon Hausmann
591ae8557b
Add include_paths setter/getter to ComponentCompiler
2021-03-19 09:56:46 +01:00
Simon Hausmann
14cda0a9b4
Use Self::foo
instead of LongerTypeName::foo
in the Rust API docs
2021-03-19 09:28:44 +01:00
Simon Hausmann
7af77839ad
Add the skeleton for CompilerCompiler in C++
2021-03-19 09:26:42 +01:00
Simon Hausmann
de8ad46633
Fix doc warnings
2021-03-18 18:31:42 +01:00
Simon Hausmann
4a9cd954b8
Rework the Rust entry point API for the interpreter
...
Switch to the stateful `ComponentCompiler` concept that we discussed for the C++ API.
2021-03-18 18:20:50 +01:00
Olivier Goffart
63460c1a24
ComponentInstance show/hide/run
2021-03-18 16:37:01 +01:00
Olivier Goffart
09b7b92dbe
Value comparison in C++
2021-03-18 15:26:53 +01:00
Olivier Goffart
3335ff8da5
C++ API to put a model in the interpreter::Value
2021-03-18 12:17:01 +01:00
Simon Hausmann
02c1150fa7
Add the boilerplate for Struct in C++
2021-03-18 12:12:48 +01:00
Simon Hausmann
e539d03007
Add C++ Value Brush support
2021-03-17 17:22:57 +01:00
Olivier Goffart
a4837207e6
Expose the ComponentInstance
2021-03-17 17:11:23 +01:00
Simon Hausmann
f09ea8bf6f
Fix size assertion between OpaqueValue and Value
...
Make it an equals check, to match the comments further down
when using transmute.
2021-03-17 16:58:15 +01:00
Simon Hausmann
79612d7354
Add C++ Value Array construction/extraction
2021-03-17 16:52:30 +01:00
Olivier Goffart
e20dd384f5
Expose an iterator to interpreter::Struct
2021-03-17 15:29:03 +01:00
Simon Hausmann
e16e2d8d4f
Fix doc test
2021-03-17 15:27:05 +01:00
Simon Hausmann
d6edb8016a
Fix compilation
2021-03-17 15:03:48 +01:00
Olivier Goffart
8866d116fe
Expose the sixtyfps_interpreter::Struct
2021-03-17 14:51:55 +01:00
Simon Hausmann
831bf58baa
Add Value bool conversion to C++
2021-03-17 14:15:48 +01:00
Simon Hausmann
0877f0c82a
Add C++ Value number construction & conversion
2021-03-17 14:07:49 +01:00
Simon Hausmann
8e72d29669
Expose Value::to_string()
conversion and construction in C++
2021-03-17 13:28:53 +01:00
Olivier Goffart
6e9d4f9e8d
Fix linking of the interpreter
...
I don't know why, byt the 'crate-type = "lib"' seem to fix the problem
2021-03-17 12:38:05 +01:00
Olivier Goffart
9e66ec71ce
Expose conversion functions
2021-03-17 12:19:59 +01:00
Olivier Goffart
6c6efbdab0
expose the value type to C++
2021-03-17 12:06:24 +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