Commit graph

62 commits

Author SHA1 Message Date
Julian Winkler
7ee4effb86 implement android.widget.Spinner using GtkDropDown
Helper classes from ListView implementation are reused. The declarations
have been moved to a new header file AdaperView.h
2024-03-22 21:02:22 +01:00
Mis012
d122b2a528 api-impl: implement vibrator using evdev
we use the first vibrator that is marked for use with feedbackd in udev
2024-03-22 13:17:29 +01:00
Julian Winkler
45de09a191 notification support using libportal 2024-03-18 07:26:25 +01:00
Julian Winkler
b14549e639 implement ConnectivityManager using GNetworkMonitor 2024-03-17 22:39:13 +01:00
Julian Winkler
14217e8724 simple implementation of PopupMenu using GtkPopoverMenu 2024-03-17 22:39:13 +01:00
Julian Winkler
276b5ca7ef add more APIs needed for NewPipe 2024-03-17 20:02:50 +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
Mis012
2e864adc0f implement drawing into Bitmaps with Canvas, make BitmapDrawable use use paintable, misc Bitmap improvements 2024-03-16 15:00:22 +01:00
Mis012
fa1aa36f6b api-impl: add stubs, put Vibrator.java in meson.build (oops), sort sources with LC_ALL=C sort -h 2024-03-16 10:13:55 +01:00
Julian Winkler
796742c0fc implement android.graphics.Matrix and View.getMatrix()
This is needed for androidx CoordinatorLayout and will also be required
for VectorDrawables
2024-03-15 18:57:49 +01:00
Julian Winkler
9509289ee5 implement SeekBar using GtkScale 2024-03-10 23:00:42 +01:00
Julian Winkler
d22d083eb8 implement CheckBox and RadioButton using GtkCheckButton 2024-03-10 17:49:11 +01:00
Julian Winkler
005e2299bd automatically enable UI_MODE_NIGHT when gtk-theme-name contains "dark"
gtk-theme-name is only checked once at start up
2024-03-10 12:05:33 +01:00
Julian Winkler
9c684ee906 implement PopupWindow using GtkPopover 2024-02-18 10:08:43 +01:00
Julian Winkler
2d6694d695 implement CompoundButton using GtkSwitch 2024-02-16 20:46:55 +01:00
Julian Winkler
3aed86b83a implement ListView using GtkListView
There is not much difference between GTKs ListView and Androids
ListView. So, we use GTKs implementation instead of copying from AOSP
2024-02-16 15:28:04 +01:00
Julian Winkler
88254d822f replace LinearLayout with AOSPs implementation
Also update QuickHelp.md, as LinearLayout was the last custom
implemented ViewGroup
2024-02-10 10:28:48 +01:00
Julian Winkler
3284518418 AssetManager: use libandroidfw instead of ARSClib for resources.arsc parsing
This reduces startup time and RAM usage. Not yet feature complete with
the ARSClib based implementation, but Gravity Defied runs already
2024-02-06 16:41:48 +01:00
Julian Winkler
176405ed45 NinePatchPaintable: new GdkPaintable class to render .9.png files 2023-12-30 23:38:56 +01:00
Julian Winkler
ca3c17d773 implement DrawableContainer and copy StateListDrawable from AOSP 2023-12-30 23:38:56 +01:00
Julian Winkler
8c7dbf6ceb start implementing Drawable using underlying GdkPaintable 2023-12-30 23:38:48 +01:00
Julian Winkler
32f344c301 meson.build: libavcodec version 59 is sufficient 2023-12-29 11:40:52 +01:00
Mis012
1acbdc7339 meson.build: properly note down required versions of gtk and avcodec 2023-12-19 14:34:34 +01:00
Nikita Travkin
0860da34c8 libandroid: add trace 2023-11-25 20:15:00 +01:00
Julian Winkler
b0fdf53f9b implement android.widget.ProgressBar using GtkProgressBar 2023-11-12 12:16:23 +01:00
Julian Winkler
d025fd3ce3 FrameLayout: replace with AOSPs implementation
There are many Widgets extending FrameLayout and adding custom behaviour
on top. For example NavigationView. This didn't realy work with our
custom implementation
2023-11-08 22:44:39 +01:00
Julian Winkler
8b6de0e83a move AndroidLayout class to own file 2023-11-01 17:55:02 +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
Julian Winkler
b340032e9f impement android.media.MediaCodec using libavcodec
The current implementation requires a VA-API driver and a Wayland
compositor with YUV-buffer support. GNOME supports YUV-buffers
since the recent version 45 release
2023-10-14 18:29:33 +02:00
Mis012
4628cfc66d /api-impl-jni: remove remains of experimental ninepatch implementation, will use skia 2023-09-16 16:30:14 +02:00
Mis012
e1cf5c7047 libandroid/native_window.c: make Vulkan work, add refcount 2023-09-14 21:48:15 +02:00
Mis012
24353378be api-impl: implement Canvas text drawing as used by Gravity Defied
implements android.graphics.Typeface (always uses default
typeface for now), one version of Canvas.drawText, one version
of Paint.measureText, and Paint.ascend
2023-09-12 19:30:29 +02:00
Mis012
90cb1c925a api-impl: use liblog for android.util.Log; use Log.v for debugging prints and Log.w for stub tracing 2023-09-12 13:41:52 +02:00
Mis012
1e47824a79 src/api-impl: use skia instead of cairo
Using the C API provided by SkiaSharp's skia fork instead of using cairo
significantly improves performance. The API is also closer to the android
Canvas API, which makes the implementation more straightforward.
2023-09-12 13:37:41 +02:00
Julian Winkler
a35879c633 RelativeLayout: copy AOSP implementation
As we already support custom ViewGroups, there is no need to reimplement
this highly complex class.
2023-09-01 16:05:26 +02:00
Julian Winkler
ceb5df9d39 implement BitmapFactory.decodeStream() using gdk_pixbuf_new_from_stream
The java InputStream is wrapped into a custom GInputStream
implementation
2023-09-01 16:05:26 +02:00
Julian Winkler
d81c6800b2 add JNI implementation of android.database.SQLiteConnection
This is based on the implementation from https://www.sqlite.org/android,
which is equal to the AOSP implementation besides not depending private
Android APIs.
The code has been rewritten from C++ to C.
2023-08-27 11:40:46 +02:00
Julian Winkler
0f7548f189 refactor Dialog implementation to support custom content 2023-08-23 14:52:56 +02:00
Julian Winkler
4434de4a58 implement android.widget.EditText using GtkEntry 2023-08-23 11:47:05 +02:00
Julian Winkler
f9a85017c1 implement android.widget.ImageButton using GtkButton 2023-08-23 11:47:05 +02:00
Julian Winkler
f2e71cd50f implement android.widget.Button using GtkButton 2023-08-23 11:47:05 +02:00
Julian Winkler
6547e66d4f implement android.app.AlertDialog using GtkDialog 2023-08-22 19:39:57 +02:00
Julian Winkler
18ca242096 support multiple Activities 2023-08-11 18:15:19 +02:00
Julian Winkler
0282e9fbcb build and install framework-res.apk from source
fall back to prebuilt if aapt command is not available
2023-08-09 12:22:16 +02:00
Julian Winkler
696e0ce714 implement LocationManager and orientation sensor using libportal 2023-08-08 14:18:20 +02:00
Mis012
08998b0076 make Looper, Handler, and MessageQueue work properly
this for example makes Unity apps not steal the main thread,
hanging Gtk.
2023-07-25 14:27:21 +02:00
Julian Winkler
83a2647637 Add rpath to find art libraries 2023-06-21 22:38:08 +02:00
Julian Winkler
db53d3679f replace arsc_parser with ARSClib 2023-06-21 22:38:08 +02:00
Julian Winkler
0baddd9fe8 fixes for android-8 rebase of dalvik_standalone
detect bootclasspath jar path automatically from dalvik_standalone
2023-06-21 22:38:07 +02:00
Julian Winkler
9e706927de implement android.media.SoundPool using GtkMediaStream 2023-06-18 11:31:01 +02:00