Olivier Goffart
82e23a114b
Wasm: don't print fake keys in input box
...
We should only forward keys that are a single character. Other ones are
just virtual keys that should't be processed.
This regressed in commit 32d2ba7
Fix #2327
2023-03-09 10:46:03 +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
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
0f25000610
internal: Replace calls to the internal process_key_input with the public dispatch_event API
...
This can be done for key press and release events, for composition we
need to extend the API first.
2022-11-16 09:47:54 +01:00
Florian Blasius
61c39b5fa1
Add support for dispatching key events through the public platform API
...
This change adds `KeyPress` and `KeyRelease` variants to the
`WindowEvent` enum, along with the new `slint::Key` enum, that allows
encoding keys.
2022-11-15 10:34:17 +01:00
Simon Hausmann
54934d1f0b
Fix the cursor position when receiving composition update events
...
Since the DOM API doesn't provide the values, we can just place the
cursor ourselves.
2022-10-20 12:37:28 +02:00
Olivier Goffart
f3f34c3a02
wasm: Use the composition API
...
Pros: the composition shows up as selected
Cons: te cursor is shown at the begining of the preselection, and
clicking on the field commit the selection at the wrong place
2022-10-20 12:37:28 +02:00
Simon Hausmann
6d1497d7a2
Fix wasm build
2022-10-07 11:16:36 +02:00
Olivier Goffart
b3605cb4ec
Fix errors and warnings in the wasm build
2022-09-07 10:13:58 +02:00
Simon Hausmann
7967bf1ab0
Replace the internal WindowHandleAccess
trait with a helper function on WindowInner
...
The reversal of ownership removes the need for the glue trait in the
publicly visible API.
2022-09-06 16:17:06 +02:00
Tobias Hunger
107e3ed2e2
janitor: Fix some typos
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
Simon Hausmann
74289deb25
Remove the PlatformWindowWeak alias
...
... and use Weak<dyn PlatformWindow> directly.
2022-08-19 15:07:27 +02:00
Simon Hausmann
af86f36157
Invert slint: 🪟 :WindowInner and PlatformWindow ownership
...
Previously: Window is an Rc<WindowInner>, which has an Rc<dyn
PLatformWindow> - and weak references the other way around.
Now: Rc<dyn PlatformWindow> is the root of window ownership. The impl
PlatformWindow has a slint::api::Window, which just holds a WindowInner.
This change is incomplete on a few levels, mainly that neither of the
code generators nor the interpreter is ported.
2022-08-19 15:07:27 +02:00
Simon Hausmann
262c96af8c
Simplify receiver for WindowInner
...
Use &self consistently, instead of Rc<Self>, so that in the future we can
replace Window(Rc<WindowInner>) with Window(WindowInner).
2022-08-19 15:07:27 +02:00
Simon Hausmann
27bf9348e6
Rename the backend-gl crate into backend-winit
2022-07-26 17:43:51 +02:00