Commit Graph

47 Commits

Author SHA1 Message Date
Julian Winkler
036b5510d3 implement dispatchKeyEvent callback 2024-12-01 14:15:00 +00:00
Julian Winkler
e9cf5e7002 API stubs and fixes for composeUI 2024-12-01 14:15:00 +00:00
Mis012
d5bc4ea9a6 implement instrumentation 2024-11-30 18:57:03 +01:00
Daniel Panero
eba9c7037c JavaWidget: add debug info for GTK Inspector 2024-11-19 16:14:36 +01:00
Daniel Panero
5f6943fd81 Add backbutton 2024-11-17 23:37:10 +00:00
Julian Winkler
1b46d728e3 implement Activity.onPostCreate() and onPostResume()
These are used by androidx to handle the Fragment lifecycle
2024-10-05 22:45:17 +02:00
Julian Winkler
4f4fd15fef WebView: implement WebViewClient callbacks 2024-10-04 15:23:34 +02:00
Julian Winkler
633f1e6f96 WebView: implement file:///android_asset/... URIs 2024-10-04 15:23:34 +02:00
Julian Winkler
e3c0931714 prevent reference cycles between Java and native objects 2024-08-02 17:02:53 +02:00
Mis012
54dd61da3d main-executable: add '-e' cmdline option
Some multi-platform apps accept cmdline options using the `-e` option
of `am`. For example, you can now use `-e unity='<unity cmdline>'`
to pass cmdline arguments to a unity game.
2024-05-22 17:06:28 +02:00
Mis012
14e870c9b5 util: add _gdb_force_java_stack_trace 2024-05-21 23:16:39 +02:00
Julian Winkler
dd3965df8a WrapperWidget: create SkArea also for Views with custom draw() method
Previously we only handled custom onDraw() methods
2024-05-20 08:12:02 +02:00
Julian Winkler
ad266c7821 add support for custom Java Drawables
This is made possible, by adding a second Canvas implementation which
can be used to render directly to GdkSnapshot objects

For now the only implemented method is drawBitmap(), this is already
enough to make VectorDrawableCompat functional
2024-03-24 22:13:28 +01:00
Mis012
20b179387b api-impl: implement accelerometer support, no backend yet
currently x,y,z values are hardcoded and can only be changed with gdb
2024-03-16 15:06:06 +01:00
Julian Winkler
a67b973e67 MotionEvent: implement getRawX() / getRawY() properly 2024-03-15 18:57:49 +01:00
Julian Winkler
bcf252d3a6 implement MotionView.eventTime and VelocityTracker
This is needed to make androidx ViewPager work with touch input
2024-02-27 22:02:36 +01:00
Julian Winkler
8dafa41ea9 implement View.onInterceptTouchEvent() callback
This is needed to support nested scrolling

A second GtkEventControllerLegacy gets registerd with GTK_PHASE_CAPTURE
2024-02-25 18:18:45 +01:00
Julian Winkler
f107328bf4 MediaCodec: don't use JNI after GetPrimitiveArrayCritical()
this was found, because of having -Xcheck:jni enabled
2024-02-08 14:22:30 +01:00
Mis012
bcd2617c9e add -Xcheck:jni, fix some errors it finds 2024-01-23 22:32:09 +01:00
Julian Winkler
bcfb384ba4 implement EditText.setOnEditorActionListener()
This makes the NewPipe search work again
2023-11-08 22:44:39 +01:00
Julian Winkler
3c03223085 android_layout_measure(): refactor to respect LayoutParams
This is needed when a Java widget gets measured from GTK
2023-11-02 08:20:13 +01:00
Julian Winkler
3bdffe7ce9 View: prevent redundant measuring for performance reasons
No need to remeasure or relayout when nothing has changed
2023-10-29 15:28:06 +01:00
Mis012
9ef2151c5e GLSurfaceView: remove old implementation, import the one from AOSP
Now that we have a reasonably well working SurfaceView implementation,
it is actually cleaner to just implement GLSurfaceView the way AOSP
does. In fact, their code doesn't have any weird dependencies, and
can mostly be used as-is.

The AOSP code is pure Java, which means we had to implement some
EGL wrappers.

This change fixes issues with Wayland (it only ever worked because
the pbuffers were allocated using an XWayland EGLDisplay), and
with resizing (which we simply didn't support), all while getting
rid of quite some (arguably not very readable) LoC.
2023-10-20 20:54:37 +02:00
Mis012
621cb866c1 api-impl{-jni}: fix code style issues missed during review 2023-10-17 21:57:48 +02:00
Mis012
4a0755c6e0 api-impl{-jni}: make view.onTouchEvent work, misc stuff to make input work for Unity games
onTouchEvent was previously incorrectly handled in GLSurfaceView; move it
to View so that it works properly with any of it's descendants.

This is done by reusing the existing setOnTouchListener implementation
and changing it to use GtkEventControllerLegacy which provides motion
events.

Technically some of the code is in WrapperWidget.c since every widget
calls wrapper_widget_set_jobject and we already have related code
there.
2023-10-17 21:33:59 +02:00