Olivier Goffart
fde561a56a
Some improvements to Window visibility
...
- From C++, always call the Window::show() and hide() function instead
of going through set_visible directly as it doesn't set the size of
the WindowItem
- show() should also call resize on the renderer
- remove the is_visible in the WindowAdapterInternal as it is no longer
needed
2023-08-30 13:05:35 +02:00
Simon Hausmann
3ea9c6249f
Document how SetPropertyError::WrongType can be produced when assigning structs
...
Closes #3210
2023-08-24 13:25:43 +02:00
Tobias Hunger
09d3eaf00a
Update license symlinks
...
run `cargo xtask check_reuse_compliance --fix-symlinks`
2023-08-16 11:46:15 +02:00
Florian Blasius
94ba420c01
napi: Added global support to ComponentInstance ( #3246 )
...
* napi: Added global support to ComponentInstance
* code review feedback.
* Update api/napi/__test__/globals.spec.ts
Co-authored-by: Simon Hausmann <simon.hausmann@slint-ui.com>
* Update api/napi/__test__/globals.spec.ts
Co-authored-by: Simon Hausmann <simon.hausmann@slint-ui.com>
* Update api/napi/__test__/globals.spec.ts
Co-authored-by: Simon Hausmann <simon.hausmann@slint-ui.com>
* Update api/napi/__test__/globals.spec.ts
Co-authored-by: Simon Hausmann <simon.hausmann@slint-ui.com>
* Update api/napi/__test__/globals.spec.ts
Co-authored-by: Simon Hausmann <simon.hausmann@slint-ui.com>
* Update api/napi/__test__/globals.spec.ts
Co-authored-by: Simon Hausmann <simon.hausmann@slint-ui.com>
* Code review feedback
* Code review feedback
---------
Co-authored-by: Simon Hausmann <simon.hausmann@slint-ui.com>
2023-08-09 16:04:08 +02:00
darknight
37488f015d
Refactoring: define macro rules to group builtin structs
...
apply new macro for struct declaration, type register,
doc generation, cpp header generation, struct-value conversion.
2023-08-03 11:01:18 +02:00
Florian Blasius
d3bfdf7e7f
Added test for LangType to ValueType conversion
2023-08-01 12:24:32 +02:00
Florian Blasius
b3b6126f4b
Added missing brush type to ValueType from LangType.
2023-08-01 12:24:32 +02:00
Simon Hausmann
7ff7c2f875
Fix let-else formatting
...
Nightly now supports it and thus `cargo +nightly fmt` yields a
difference.
2023-07-28 13:43:21 +02:00
Simon Hausmann
5c9eed62f1
Add a new backend that supports rendering fullscreen with Vulkan
...
This doesn't require a windowing system, just Linux and Vulkan drivers
that supports the display extensions.
It's called linuxkms as soon this will go beyond Vulkan and also support
EGL and perhaps dumb buffers for software rendering.
2023-07-28 13:40:37 +02:00
Olivier Goffart
3a807e46c1
Renderer feature refactor
2023-07-27 19:11:24 +02:00
Olivier Goffart
627deb1e9f
interpreter: Hide the ComponentFactory from the public API
...
(also re-order the types in the docs of api/rs/slint/lib.rs to make the
non-literal types appart)
2023-07-27 12:04:16 +02:00
Tobias Hunger
baa4eb1ea3
Get rid of the window when building an embedded component
...
... now that we can get the WindowAdapter from the parent component when
we embed it.
2023-07-27 12:04:16 +02:00
Tobias Hunger
a362b7a1ae
Add window_adapter
to ComponentVTable
...
Make it duplicate as `maybe_window_adapter` with a boolean `do_create`
parameter.
2023-07-27 12:04:16 +02:00
Tobias Hunger
de96455dda
No more panic when the interpreter runs into an ComponentContainer
...
... in one of the components it manages.
2023-07-27 12:04:16 +02:00
Tobias Hunger
9de515b768
Implement embedding in rust
2023-07-27 12:04:16 +02:00
Tobias Hunger
5db78b6dd2
Implement LLR code lowering for ComponentContainer
2023-07-27 12:04:16 +02:00
Tobias Hunger
d47d52bf52
ItemVTable::init(...): Take an ItemRc so that the itan can know where in the Item Tree it is located
2023-07-27 12:04:16 +02:00
Tobias Hunger
a866c6cf57
Implement embed_component
in the interpreter
2023-07-27 12:04:16 +02:00
Tobias Hunger
74ef877f70
Add embed_component to ComponentVTable
2023-07-27 12:04:16 +02:00
Tobias Hunger
05e9ce078a
Add a simplistic ComponentContainer
element
...
It just registers the type, nothing more.
2023-07-27 12:04:16 +02:00
Tobias Hunger
2840886d28
Add component-factory type to Slint language
...
Add a type "component-factory" to the Slint language.
2023-07-27 12:04:16 +02:00
Simon Hausmann
af97435463
Replace show()/hide() in the WindowAdapter with set_visible(bool)
...
This makes for a smaller interface.
2023-07-26 13:53:45 +02:00
ogoffart
aebaa7d6c9
Bump version number to 1.2.0
2023-07-25 10:44:53 +00:00
Olivier Goffart
da55f4591a
Silence nightly warning
...
```
warning: private item shadows public glob re-export
--> internal/interpreter/api.rs:9:37
|
9 | use i_slint_core::{Brush, PathData, SharedString, SharedVector};
| ^^^^^^^^^^^^
|
note: the name `SharedString` in the type namespace is supposed to be publicly re-exported here
--> internal/interpreter/api.rs:19:9
|
19 | pub use i_slint_core::api::*;
| ^^^^^^^^^^^^^^^^^^^^
note: but the private item here shadows it
--> internal/interpreter/api.rs:9:37
|
9 | use i_slint_core::{Brush, PathData, SharedString, SharedVector};
| ^^^^^^^^^^^^
= note: `#[warn(hidden_glob_reexports)]` on by default
```
2023-07-24 12:20:03 +02:00
Guiguiprim
ef8ddaaa1d
Add native support for min/max
2023-07-21 16:26:41 +02:00
Simon Hausmann
667d071ec0
doc: Minor expansion on the properties() docs in the interpreter
2023-07-17 15:52:42 +02:00
Aurindam Jana
5a4a7fee63
Update royalty free license to 1.1 ( #2994 )
2023-07-10 10:12:11 +02:00
Olivier Goffart
eb257774e8
Add modifiers to PointerEvent
...
* Add modifiers to PointerEvent
Closes #2686
2023-07-06 09:54:43 +02:00
Olivier Goffart
9afadf50be
Get rid of the "use_modules" workaround
...
This doesn't seem to be needed anymore with newer rust version.
As long as one symbol from the crate is used, all exported function
from the crate are available.
The reason why some symbols in some module were gone was a bug in rust
that has been fixed, it seems
2023-07-05 13:41:06 +02:00
Guilhem Vallat
555e191ab4
remove clippy::needless_borrow warnings
2023-06-30 12:28:13 +02:00
Olivier Goffart
7a88dba2e7
Add clear-selection()
to all our input fields
2023-06-28 17:07:55 +02:00
Tobias Hunger
4ab19f3011
Incorporate feedback from code review
2023-06-28 14:22:30 +02:00
Tobias Hunger
e81a3d40f0
Get rid of more clippy warnings
...
* Configure clippy to not report about type complexity until *much*
later
* Configure clippy to only complain about more than 10 function
arguments
* Properly format safety sections
* Allow unnecessary main functions in doctests in the slint API crate
* AccessKit: Move big block of code before if condition
2023-06-28 14:22:30 +02:00
Tobias Hunger
e02c360000
Clippy polish
2023-06-28 14:22:30 +02:00
Olivier Goffart
9177916b9d
Fix select-all in the interpreter
...
(The js test wasn't call because of its name, also, js don't support
callign funciton at the moment)
2023-06-27 16:02:03 +02:00
ogoffart
c8c9496722
Bump version number to 1.1.1
2023-06-26 12:50:02 +00:00
Olivier Goffart
9b59036816
Add licenses symlinks
2023-06-26 13:12:29 +02:00
Olivier Goffart
bf8bbeda40
Take self by value in JoinHandle::abort
2023-06-20 11:36:36 +02:00
Olivier Goffart
11dea135f7
Domain: slint-ui.com -> slint.dev
2023-06-16 10:55:08 +02:00
Tobias Hunger
04d1229685
Fix licnese information using xtask
2023-06-16 09:14:20 +02:00
ogoffart
641cab0e75
Bump version number to 1.1.0
2023-06-15 16:01:28 +00:00
Simon Hausmann
2e7cc49567
Initial AccessKit support
...
This change adds initial accessibility support for the winit backend
through use of AccessKit.
2023-06-15 13:20:14 +02:00
Aurindam Jana
039e54a5de
Add royalty free license to files except examples and docs ( #2888 )
2023-06-15 11:20:50 +02:00
Olivier Goffart
0e31f097a4
Un-seal the WindowAdapter trait
2023-06-13 17:44:04 +02:00
Olivier Goffart
d428a981b7
interpreter ffi: ensure that the size of the opaque structs are equal
...
...to their rust counter-part
CC #2859
2023-06-13 10:18:29 +02:00
Olivier Goffart
ac6f473a64
WIP: support for enum in slint
...
Parser and interpreter part
2023-06-12 13:02:14 +02:00
Olivier Goffart
a017265376
Fix 32bit build
...
The alignment of a HashMap within a Struct is 8 bytes because of the
RandomState.
This is important because the C++ allocated `interpreter::Struct` could
be mis-aligned
2023-06-12 10:40:56 +02:00
Olivier Goffart
85f32ca014
fixup previous commit
2023-06-12 08:57:28 +02:00
Olivier Goffart
690dbd723b
C++: ensure that the alignment if the Opaque structures is big enough
...
CC: #2859
2023-06-12 08:53:15 +02:00
Simon Hausmann
ca3a6bd586
Fix Qt High-DPI support with the interpreter
...
See parent commit for details.
2023-06-10 11:41:04 +02:00