Olivier Goffart
99b7b40b6f
BackendSelector: respect the SLINT_BACKEND env variable
...
... if the backend is not explicitly selected
2025-05-10 12:39:38 +02:00
Yuri Astrakhan
5356fdcf89
Fix clippy issues, plus a few manual cleanups
...
* Run `cargo clippy --fix`
* `BackendSelector` is easier to instantiate with auto `Default`
2025-02-06 17:28:51 +01:00
Yuri Astrakhan
61de4d56b0
Fix all format arg inlining
...
Ran this command:
```shell
cargo clippy --fix -- -A clippy::all -W clippy::uninlined_format_args
```
2025-02-06 10:16:20 +01:00
Simon Hausmann
0d36f88152
Revamp BackendSelector API
...
Based on API review, PlatformBuilder becomes BackendSelector with
a slightly smaller API surface but more options, such as selecting
Metal or Vulkan rendering.
2024-12-16 13:06:05 +01:00
Simon Hausmann
a2eacd77f4
Minor cleanup: femtovg -> FemtoVG
2024-10-23 13:25:05 +02:00
Ian Hattendorf
687e4ce95b
PlatformBuilder::build() impl requires winit feature
2024-10-23 11:13:49 +02:00
Ian Hattendorf
3cc44dc670
Add version to OpenGLAPI
2024-10-23 11:13:49 +02:00
Ian Hattendorf
97927ccee9
Don't allow fallback in PlatformBuilder
...
If we're explicitly requesting a platform with specific properties, we
should fail to allow the caller to react accordingly.
2024-10-23 11:13:49 +02:00
Ian Hattendorf
dedd396093
Allow choosing renderer via PlatformBuilder
2024-10-23 11:13:49 +02:00
Ian Hattendorf
ac9b85049a
Add PlatformBuilder API to allow selecting OpenGL API
...
Right now this just allows selecting between OpenGL and OpenGL ES.
2024-10-23 11:13:49 +02:00
Olivier Goffart
43c7f57b0f
spawn_local: initialize the platform if not initialized before the call
...
Take the opportunity to refactor a bit the way the global platform or
context is accessed
Fixes : #5871
2024-08-21 13:26:04 +02:00
Simon Hausmann
4591ad8d57
Add plumbing for system testing
2024-06-13 04:03:17 -07:00
Aurindam Jana
3523e86359
Simplify commercial license ( #3063 )
...
Base the commercial license on the Royalty-free license adding clauses pertaining to the fees.
2024-05-31 14:06:17 +02:00
Aurindam Jana
9a3aa265d5
Update Royalty-free license ( #5257 )
...
Add clarification that Application may not expose Slint APIs.
2024-05-31 10:53:19 +02:00
Aurindam Jana
0cfeec1a31
Update Slint Community License ( #4994 )
...
Updated the version from 1.1 to 1.2
Renamed the header to "Slint Royalty-free Desktop, Mobile, and Web Applications License"
Added definition of "Mobile Application" and grant of right
Moved "Limitations" to 3rd section and "License Conditions - Attributions" to 2nd section
Added flexibility to choose between showing "MadeWithSlint" as a dialog/splash screen or on a public webpage
Moved the para on copyright notices to section under "Limitations"
2024-04-15 15:18:55 +02:00
Olivier Goffart
83adb467c0
Only depends on i-slint-backend-linuxkms on linux, even if the feature is enabled
...
This allows to simplify the npm build as well
2024-01-26 13:46:11 +01:00
Olivier Goffart
cf9f9a4f15
Disable all backends on android
2023-10-31 16:22:11 +01:00
Simon Hausmann
7b4d9de590
Silence compiler warning
2023-10-26 14:41:07 +02:00
Simon Hausmann
3a8c64c946
Show errors from all backends of initialization fails
2023-10-24 15:47:08 +02:00
Simon Hausmann
6fb325ebea
Make it possible to run apps with linuxkms while winit is enabled
...
In the backend selector try all available backends.
2023-10-24 15:47:08 +02:00
Simon Hausmann
30c810be00
winit: Propagate errors when winit fails to initialize the event loop
...
For the backend selector, this means that when a backend is selected explicitly,
and initialization fails, don't try `create_default_backend()` but
propagate the error.
For the Rust code generator, propagate the first ensure_backend()
errors. Any subsequent onces (unlikely, since the first thing any
public new() calls is ensure_backend) will unwrap.
2023-10-24 15:47:08 +02:00
Simon Hausmann
dae978a0f9
Fix HighDPI rendering on Windows when using Qt as default backend
...
When not explicitly selected, we would construct the Backend struct as-is,
without calling `new()`. Therefore we would
miss the call to ensure_initialized() and
later set the Qt::AA_PluginApplication
application attribute, which screws up rendering.
2023-09-01 11:40:31 +02:00
Simon Hausmann
fee44f3f7d
Add basic support for libseat
...
This is not dynamic unfortunately, but at least it forwards device access for OpenGL and remove the need to run it as root.
2023-07-28 13:40:37 +02:00
Simon Hausmann
e40f6c253e
linuxkms: Add support for FemtoVG as renderer
2023-07-28 13:40:37 +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
Aurindam Jana
5a4a7fee63
Update royalty free license to 1.1 ( #2994 )
2023-07-10 10:12:11 +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
Tobias Hunger
8345c6cd79
Do automatic clippy fixes
2023-06-28 14:22:30 +02:00
Olivier Goffart
11dea135f7
Domain: slint-ui.com -> slint.dev
2023-06-16 10:55:08 +02:00
Aurindam Jana
039e54a5de
Add royalty free license to files except examples and docs ( #2888 )
2023-06-15 11:20:50 +02:00
Simon Hausmann
e663282c65
Fix support for High-DPI with Qt
...
Preserve the early backend initialization of commit
f0b047057b
2023-06-10 11:41:04 +02:00
Simon Hausmann
04262414b1
winit: Fix documentation for the crate
...
Despite this being an internal crate, provide some better docs and links
so that we _can_ recommend folks to use it.
2023-04-24 12:59:06 +02:00
Olivier Goffart
6889dfa5f5
Rust: Make new(), run() and show() report errors from the backend
...
Fixes #2198
2023-02-10 05:00:03 +01:00
Olivier Goffart
a0fb8bc771
Remove support of old SIXTYFPS_ env variable, and sixtyfps_widgets.60
2023-01-26 13:36:38 +01:00
Olivier Goffart
b3f346049f
Fix parsing the SLINT_BACKEND string
...
`SLINT_BACKEND="winit"` wouldn't work. So make `winit` and `femtovg` be
possible value for the backend string
2022-10-27 13:07:59 +02:00
Olivier Goffart
bbc5ce4375
Fix mcu build
2022-10-19 15:23:41 +02:00
Olivier Goffart
0ba468c236
Use a builtin function to access the dark-style
...
instead of a property on NativeStyleMetrics
2022-10-19 15:23:41 +02:00
Tobias Hunger
38350db9a0
Fixes pointed out by Olivier and CI
2022-08-29 16:53:47 +02:00
Tobias Hunger
10c3c9d16d
Api cleanup: Rename some remaining platform abstractions to platform
2022-08-29 16:53:47 +02:00
Tobias Hunger
53053683a1
API cleanup: Rename PlatformAbstraction to Platform
2022-08-29 13:26:36 +02:00
Olivier Goffart
7417422e3c
Make the PlatformAbstraction not Send using a EventLoopProxy trait
...
This changes the way the platform abstraction is initialized
2022-08-24 11:32:21 +02:00
Olivier Goffart
2e5ab86bea
Rename backend module to platform
...
and the Backend trait into PlatfromAbstraction trait
2022-08-23 19:39:49 +02:00
Olivier Goffart
a27806aca8
Add a feature to use the sofware renderer with the winit backend
...
Currently, you still need to pass some env variable at build time so it
embeds the font.
2022-08-22 19:02:28 +02:00
Simon Hausmann
771b122198
Add skia renderer skeleton
...
This one can render basically just plain rectangles.
2022-08-02 12:00:56 +02:00
Simon Hausmann
70781534f5
Delegate the renderer decision into the winit backend
2022-07-28 19:03:01 +02:00
Simon Hausmann
b782e43226
Make it possible to have multiple renderers in the winit crate
...
Make GLWindow generic over the renderer and canvas
2022-07-28 19:03:01 +02:00
Simon Hausmann
27bf9348e6
Rename the backend-gl crate into backend-winit
2022-07-26 17:43:51 +02:00
n-raine
beda5aca07
Add dark style detection support for GL backend
...
With the help of dark-light crate this is now exposed as dark-style
boolean property in NativeStyleMetrics.
Co-authored-by: Olivier Goffart <olivier@slint-ui.com>
Co-authored-by: Simon Hausmann <simon.hausmann@slint-ui.com>
2022-03-01 16:41:20 +01:00
Tobias Hunger
4230ac2572
Update copyright information to reflect name change
...
Also run resue over the codebase and fix complaints from that tool.
2022-02-09 10:27:47 +01:00
Olivier Goffart
1425ef63de
Change the Url from sixtyfps.io to slint-ui.com
...
Also, change the URL of the logo in the docs
2022-02-08 08:52:46 +01:00