Commit graph

25 commits

Author SHA1 Message Date
Olivier Goffart
6f4f5aeefa Replace no_mangle with unsafe(no_mangle) in example and docs
We can't just do `s/#\[no_mangle]/#[unsafe(no_mangle)]/g`
because the version of cbingen we use doesn't understand the unsafe
attribute yet.

Part of #7998
2025-03-31 17:35:22 +02:00
Olivier Goffart
7390df1b47
ContextMenuArea: Intercept long press on Android 2025-02-24 18:27:25 +01:00
Olivier Goffart
cbc28b1f1b Android: handle properly the Destroy event
Destroy means we need to exit the event loop.
And android_main will be called again from another thread, so we need to
support reseting the proxy

There is also a bug in the timer when exiting the app that this worked
around

Fix #6626
2024-10-23 14:30:55 +02: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
Olivier Goffart
ebc4a14602 Update the android-activity crate by adding a new feature
The android-activity 0.5 no longer works with Rust 1.78 because it
asserts with
> slice::from_raw_parts requires the pointer to be aligned and non-null, and the total size of the slice not to exceed `isize::MAX`

Note that the documentation is build with the 05 feature because it also
build the winit backend crate in the same command that still depends on
android-activity 0.5 via winit
2024-05-07 12:48:49 +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
1f961a997b android: add the menu with cut/copy/paste when there is a selection
Also implement clipboard in the backend (Fixes #4865)
2024-03-26 14:50:55 +01:00
Olivier Goffart
b8f302464c Android: fix first frame not being translated after a rotation 2024-02-26 15:51:23 +01:00
Olivier Goffart
d76631431e Android: Split the backend into modules
lib.rs started to be a bit big
2024-01-31 14:56:42 +01:00
Olivier Goffart
fb78bbd702 Android: Don't draw the UI under the system bars or the keyboard 2024-01-31 09:20:19 +01:00
Olivier Goffart
0f14b24cc6 janitor: android: fix warnings and group args together 2024-01-30 18:08:06 +01:00
Olivier Goffart
25925b55fd android: detect dark or light style 2024-01-26 15:26:21 +01:00
Olivier Goffart
168654fa29 Android: Implement InputConnection
So that we can use text prediction and other input method features
2024-01-21 09:21:41 +01:00
Olivier Goffart
daa40f43cd Android: Use java code to show or hide the keyboard
instead of coding it all in JNI

This uses build.rs to compile the java code into bytecode that is then
embedded in the binary and loaded at runtime
2024-01-21 09:21:41 +01:00
Olivier Goffart
b90047599e Android: Fix delete and backspace being inverted 2024-01-05 17:35:49 +01:00
Olivier Goffart
950ffb0041 Android: make the show/hide keyboard work with native-activity 2024-01-05 16:11:28 +01:00
Simon Hausmann
f5bf6e5dc0 Skia: Clean up pre present notify callback API
Move this back out of render() again and make it stateful in the renderer. Reduces the amount of book-keeping required and it's always the same callback anyway.
2024-01-04 10:35:09 +01:00
Simon Hausmann
3069e8e503 Add support for frame throttling on Wayland
Use winit's pre_present_notify() API to allow for the compositor to throttle rendering.

Fixes #4200
cc #1695
2024-01-04 09:21:53 +01:00
Olivier Goffart
c4a91982db Janitor: fix docs links 2024-01-03 16:29:03 +01:00
Jocelyn Turcotte
82916bc2ec Implement KeyEvent.repeat
Now that winit was upgraded do 0.29 we can use its KeyEvent::repeat field.
Also feed Qt's QKeyEvent::isAutoRepeat() in the Qt backend.
2023-11-29 09:31:31 +01:00
Olivier Goffart
f03507ee6a Fix CI build: intra links don't work on non-android in the android backend 2023-11-02 17:53:57 +01:00
Olivier Goffart
5f36eaca9a Android: handle InputEvent::TextEvent 2023-11-02 12:16:40 +01:00
Olivier Goffart
51dbd441b0 android-activity backend: Don't use the public slint crate 2023-10-31 16:22:11 +01:00
Olivier Goffart
d63ff9c4c6 WIP: introduce an android-activity backend 2023-10-31 16:22:11 +01:00