Commit graph

15 commits

Author SHA1 Message Date
Julian Winkler
36b6132324 fix reference counting for GtkWidgets created from java
GtkWidgets extend GInitiallyUnowned and are automatically freed when
removing from parent widget. We need to add an extra reference, to make
sure the object keeps alive as long as the java widget has a reference
to it
2023-08-23 11:47:05 +02:00
Julian Winkler
4d90002ec6 Simplify native interface of widget implementations
Makes it easier to overwrite behavior in subclasses. Have a fallback
implementation for ViewGroup.
Save some _GET_LONG_FIELD / _SET_LONG_FIELD calls by directly passing
the native pointers to and from native methods.
2023-08-22 15:53:09 +02:00
Julian Winkler
82744e9e5e add bunch of new java APIs: mostly stubs or copied from AOSP
Many of these classes are only needed to be subclassed by androidx
support library, which is used in many android apps
2023-08-22 15:53:09 +02:00
Mis012
4a1159f5cb api-impl: add misc stubs 2023-08-12 13:09:33 +02:00
Julian Winkler
6b79adb2c3 add missing Context attribute to all View constructors 2023-08-08 14:18:20 +02:00
Julian Winkler
520569f7c7 implement View.invalidate() 2023-08-08 13:35:47 +02:00
Mis012
0a9591c474 src/api-impl: fix up code style, mainly for code imported from AOSP
used the following (plus manual edits):
`clang-format --style="{BasedOnStyle: LLVM, IndentWidth: 8, UseTab: Always, AllowShortIfStatementsOnASingleLine: false, IndentCaseLabels: true, ColumnLimit: 0}`
2023-06-22 11:45:46 +02:00
Julian Winkler
3709e30f64 load layout XMLs directly from apk file 2023-06-21 22:38:08 +02:00
Julian Winkler
0454dcbfd5 stub some APIs for Flappy Bird, mostly webview related 2023-06-18 11:28:40 +02:00
Mis012
4dd31731f9 src/api-impl: misc stubbing 2023-01-09 12:07:57 +01:00
Mis012
52ba443401 misc stubbing 2022-12-01 14:44:16 +01:00
Nikita Travkin
c7fcb0f84e Stub some stuff 2022-11-02 15:25:14 +01:00
Mis012
b801f0fb3c implement some stuff to make exaple SDL app run
NOTE: the main addition in this commit is WIP support for apps which
render on an EGL surface obtained using ANativeWindow_fromSurface

currently, this EGL surface is obtained by creating a 700x700 pixel
window with GLFW (the 700x700 size is hardcoded in several places)
and only Wayland is supported

ideally, we'd want to use a wayland subsurface to position the EGL
surface above the Surface widget it's associated with (and do
whatever for X11)
2022-10-26 18:39:04 +02:00
Mis012
3627f35bd5 fix wrong indentation of interfaces/stubs copied from AOSP 2022-10-18 18:35:29 +02:00
Mis012
449090143e refactor source tree organization, switch to meson 2022-10-09 22:59:16 +02:00