Olivier Goffart
aa2d5fa324
We must update animations before the timers
...
In case a timer start an animation, the starting time need to be correct
2023-02-17 15:27:43 +01: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
f34b1bda2e
Add primary keyboard support on unix (selection copy, middle click paste)
...
Closes #2146
2023-01-31 16:39:22 +01:00
Simon Hausmann
32d2ba70ca
Change WindowEvent::KeyPressed/Released to use a SharedString instead of a char ( #2148 )
...
Also, `WindowEvent` is not `Copy` anymore.
Closes #1749
2023-01-31 15:44:54 +01:00
Florian Blasius
d84de623b4
TextEdit select text with double and dribble click ( #2088 )
...
* Select word in `TextEdit` by double click
* Select paragraph in `TextEdit` by dribble click
2023-01-31 15:04:19 +01:00
Olivier Goffart
a3ec320bfb
Remove some deprecated stuff
...
CC #2024
2023-01-26 11:19:21 +01:00
Olivier Goffart
30a81d856a
documentation: fix formatting of the backend selection
2022-12-08 08:05:27 +01:00
Simon Hausmann
247772104a
Move WindowEvent
, PointerEventButton
and Key
to the platform
module
...
For `Key` this is a move, as it is a new type. For `WindowEvent` and `PointerEventButton` deprecated aliases
are provided.
2022-11-24 11:34:28 +01:00
Simon Hausmann
a875c532ba
Improve internal default logging behavior with std
...
Previously, any use of our internal debug_log!() macro would require a
platform backend to be initialized. This was confusing when debugging
something in the (headless) wasm lsp implementation and nothing showed
up on the console.
Now if we can, we will always log. If a platform backend exists, we
route through it, otherwise we can do the fallback ourselves.
2022-09-30 11:13:32 +02:00
Olivier Goffart
adb1b24c28
Fix the slint_mock_elapsed_time when not using the testing backend
...
The nodejs tests don't use the testing backend, as a result, calling
`platform::update_timers_and_animations` would use the real time instead
of the fake time.
So call `maybe_activate_timers` with the fake time instead
2022-09-16 19:14:15 +02:00
Simon Hausmann
6875e35ec9
Polish the platform module level-docs ( #1616 )
...
Various edits and tweaks.
2022-09-09 09:24:59 +02:00
Simon Hausmann
8ee88a53c1
MCU Doc fixes ( #1615 )
...
Various edits to the introduction of how to use Slint on MCUs.
2022-09-09 08:35:01 +02:00
Olivier Goffart
6ede77436b
api: Return an error from invoke_from_event_loop and quit_event_loop
2022-09-07 10:13:58 +02:00
Tobias Hunger
625546304c
Remove software-renderer feature more aggressively
...
I missed some instances as the CI and @ogoffart both pointed out. Fix
that.
Also make the `text_layout`and `ìnteger-sqrt` features that were set by
the `swrenderer` feature mandatory -- by removing them completely.
2022-09-07 10:11:11 +02:00
Tobias Hunger
639dcaf702
api: Rename module swrenderer
to software_renderer
...
Also rename the `swrenderer` feature to `software-renderer`.
2022-09-07 10:11:11 +02:00
Simon Hausmann
ea94089b05
Provide an error enum for the error case of slint::platform::set_platform
...
cc #1502
2022-09-06 15:42:16 +02:00
Olivier Goffart
9a2b1c7b6b
Don't export PLATFORM_INSTANCE in the public API
...
Use a hidden internal helper function instead
2022-09-03 11:45:54 +02:00
Olivier Goffart
ec19ef77f1
platform: don't re-export types that are no longer needed
2022-09-03 11:11:43 +02:00
Simon Hausmann
f648f152f9
Improve debug_log interface in the Platform
...
Pass Arguments and let the caller decide how/when to convert to a string.
2022-09-02 20:13:41 +02:00
Simon Hausmann
437218db70
Replace the built-in defmt debug logging to the platform trait
...
This way we don't have to add defmt, esp32-println and others as features to corelib and the slint api crate
(which would also expose them as public dependencies),
but instead this can be simply delegated to the Platform trait.
2022-09-02 20:13:41 +02:00
Olivier Goffart
1237285fef
Fixup some documentaion links
...
And add a test in the CI that checks for warnings in the internal
crates
(Also changed --exlcude in the test to be matching the one from build,
since c++ test are tested separately)
2022-09-01 12:16:24 +02:00
Olivier Goffart
fcca38e0f6
Rename set_event_loop_quit_on_last_window_closed to remove EventLoopQuitBehavior
...
For the winit backend, also make the function work after a call to run()
2022-09-01 12:08:05 +02:00
Olivier Goffart
b9c2dec922
API: seal the WindowAdaptor trait
...
And hide most of its functions in the sealed trait.
2022-08-30 22:21:24 +02:00
Tobias Hunger
3430a13bf8
API cleanup: Remove quit behavior parameter from run_event_loop
2022-08-30 08:34:45 +02:00
Olivier Goffart
cb8a59683f
Fix formating
2022-08-29 19:45:29 +02:00
Olivier Goffart
3ed8ca6fc8
Introduce MinimalSoftwareWindow
...
This simplifies the implementation of the pico and STM, as they both
have the same PlatformWindow implementation, and is likely to be the
same for every MCU
2022-08-29 19:45:29 +02:00
Tobias Hunger
10c3c9d16d
Api cleanup: Rename some remaining platform abstractions to platform
2022-08-29 16:53:47 +02:00
Tobias Hunger
88cf874d03
API cleanup: Rename create_window to create_window_adapter
2022-08-29 16:53:47 +02:00
Tobias Hunger
1e6ffeaa0f
API cleanup: Rename PlatformWindow to WindowAdapter
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
Tobias Hunger
3557e92a84
API cleanup: Fix typos in comments/documentation
2022-08-29 13:26:36 +02:00
Tobias Hunger
259457eff8
API cleanup: Fix typo in variable name
2022-08-29 13:26:36 +02:00
Tobias Hunger
13701b4b3f
API cleanup: Rename set_paltrom_abstraction to set_platform
2022-08-29 13:26:36 +02:00
Olivier Goffart
8fba65a282
Rename and expose the unsafe-single-threaded feature
2022-08-25 16:47:53 +02:00
Olivier Goffart
13c9c3bbab
Re-export the platform module as public api in slint::platform
...
Tweek some documentation
2022-08-24 14:28:51 +02:00
Olivier Goffart
c14e2d41d8
Rename PlatformAbstraction::event_loop_proxy to new_event_loop_proxy
2022-08-24 11:32:21 +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