Julian Winkler
e3c0931714
prevent reference cycles between Java and native objects
2024-08-02 17:02:53 +02:00
Mis012
004ba4ff00
remove some old debugging prints, gate others behind verbose log
2024-06-22 14:35:56 +02:00
Julian Winkler
c5e0f8a7fd
View.draw(): draw background, content, children in same order as AOSP
2024-05-27 16:37:49 +00:00
Julian Winkler
6f02565920
GskCanavas: draw default content when custom View calls super.onDraw()
2024-05-27 16:37:49 +00:00
Julian Winkler
c56dd88fb6
fix View.getGlobalVisibleRect() for 0x0 allocated Views
...
fixes commit f82af6ecb7
2024-05-20 08:12:28 +02:00
Julian Winkler
0ebbfc9461
set GTK_OVERFLOW_HIDDEN again for WrapperWidgets with allocation
...
This is needed for RecyclerView, which will be allocated because of the
onTouch() listener.
2024-05-11 13:17:54 +02:00
Julian Winkler
e4a399f849
use AndroidLayout for all JavaWidgets
2024-05-11 07:07:24 +02:00
Julian Winkler
f82af6ecb7
allocate transparent {WrapperWidget / JavaWidget} 0x0 and draw children in overflow area
...
This prevents overlay widgets from blocking touch events.
Androids ViewGroup.dispatchTouchEvent() loops over all children and only breaks if an eventhandler returns true. Gtk on the other hand stops at the first sensitive child. Even if the eventhandler returned false.
2024-05-11 07:07:24 +02:00
Julian Winkler
64411c75aa
fix build on Debian 12 / GTK 4.8
2024-05-06 07:28:56 +02:00
Mis012
31929d2253
ignore deprecation warnings for per-widget css, switch gtk_widget_translate_coordinates to gtk_widget_compute_point
2024-04-20 16:34:01 +02:00
Julian Winkler
654d551377
View.setTranslationY(): queue allocate when called on CoordinatorLayout
...
androidx adjusts the translation a little bit and immediately
reverts it to trigger a layout pass on the CoordinatorLayout.
Calling gtk_widget_queue_allocate here makes CoordinatorLayout behave
correctly, but it causes strange issues with other Views. Therefore, it is
done only for CoordinatorLayouts for now.
2024-03-28 20:50:05 +01:00
Julian Winkler
66e5d77959
View: clear canceled_event pointer
...
This is needed, as GdkEvent pointers are not guaranteed to be unique
2024-03-28 20:50:05 +01:00
Julian Winkler
e477b56dec
OnTouchListener: attach event controllers to WrapperWidget
...
otherwise, the touch event positions would depend on the scroll offset.
This fixes the glitchy vertical scrolling in ViewPager
2024-03-25 19:50:29 +01:00
Julian Winkler
19f1747e0d
View.getGlobalVisibleRect(): surface transform needs to be added
2024-03-15 19:51:02 +01:00
Julian Winkler
95be104d5a
View: use WrapperWidget when computing transforms to avoid scroll offset
2024-03-15 18:57:49 +01:00
Julian Winkler
a67b973e67
MotionEvent: implement getRawX() / getRawY() properly
2024-03-15 18:57:49 +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
f852c2bbc9
remove View.haveComplexMeasure as it is redundant with haveCustomMeasure
...
Makes haveCustomMeasure true by default. And disable it for widgets
which previously set haveComplexMeasure
2024-03-15 18:57:49 +01:00
Julian Winkler
75e42e6bff
onInterceptTouchEvent: don't self propagate cancel
...
This is needed, to make Gravity Defied keyboard work again
2024-03-12 17:56:17 +01:00
Julian Winkler
1a97841579
onInterceptTouchEvent: propagate ACTION_CANCEL to child widgets
2024-02-27 22:02:36 +01:00
Julian Winkler
efa61afc71
implement View.OnLongClickListener as GtkGestureLongPress
2024-02-27 22:02:36 +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
Mis012
72d6ad9914
Drawable: stub 'ripple' as transparent ColorDrawable, fix view.setBackgroundColor for buttons
2024-02-18 00:30:36 +01:00
Julian Winkler
50ba9b952a
make invisible widgets insensitive
...
Otherwise they would still intercept event handling
2024-02-10 10:28:48 +01:00