Commit Graph

14 Commits

Author SHA1 Message Date
Elias Naur 04e605c1b2 app/internal/window: [Android] implement scroll factor fallback for < API 26
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2020-06-15 13:40:13 +02:00
Elias Naur feacd1e2df app/internal/window: [Android] implement mouse scrolling
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2020-06-13 18:52:29 +02:00
Elias Naur 8688ed95c2 app/internal/window: [Android] replace RegisterFragment with Do
Do is a function for accessing the underlying Android View in a safe
context, the main thread. Do is

- more general than RegisterFragment and may be expanded to other platforms
- simpler to implement (from the Gio side)

and as a bonus, the Do implementation avoids a race condition where
a call to RegisterFragment during an Activity re-create would be ignored.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2020-06-13 17:47:58 +02:00
Elias Naur f36674ddb3 app/internal/window: [Android] make runOnThread independent of a valid GioView
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2020-06-13 17:47:58 +02:00
Elias Naur 2f521899c9 app/internal/window: [Android] use app context for clipboard access
The Activity context may not be available, so it's safer and simpler
to use the always available app context.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2020-06-13 16:41:28 +02:00
Elias Naur 6d5fbcba3f app/internal/window: [Android] unregister focus listener on destroy
Updates github.com/tailscale/tailscale/issues/431

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2020-06-11 15:39:33 +02:00
Elias Naur 6fbcae07cb app/internal/window: fix multitouch action on Android
Fixes #122

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2020-06-01 00:04:44 +02:00
Elias Naur 503534e84e app/internal/window: [Android] move main thread dispatching to Go
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2020-05-17 19:12:45 +02:00
Elias Naur 1e934673d7 app/internal/window: [Android] implement clipboard
Updates gio#31

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2020-05-17 15:43:12 +02:00
Elias Naur 33493501a6 app/internal/headless: [Android] expose Java initialization method
Android apps may want to run Go code independent of the Gio Android Activity.
Expose a Gio.init Java method public for early loading and initialization of
the Go library.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2020-05-05 19:22:11 +02:00
Greg Pomerantz 2ca2e5462f app: add RegisterFragment method on *Window for Android
RegisterFragment creates an instance of a Java class and registers
it as a Fragment in the window's Context.

Signed-off-by: Greg Pomerantz <gmp.gio@wow.st>
2019-11-26 18:52:43 +01:00
Elias Naur dc7f9bab23 io/pointer,gesture: report right and middle mouse button events
Updates gio#60

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-11-09 17:41:39 +01:00
Greg Pomerantz 5ef176af81 app: add Handle type and PlatformHandle()
On Android, allow access to JVM and Application context.

Signed-off-by: Greg Pomerantz <gmp.gio@wow.st>
2019-10-18 20:16:17 +02:00
Elias Naur 10c1b2cb8d app,internal/window: extract native window code to separate package
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-10-14 16:39:32 +02:00