View.draw(): draw background, content, children in same order as AOSP

This commit is contained in:
Julian Winkler
2024-05-26 15:53:24 +02:00
committed by Mis012
parent e8eabb2027
commit c5e0f8a7fd
8 changed files with 61 additions and 24 deletions

View File

@@ -47,3 +47,10 @@ JNIEXPORT void JNICALL Java_android_view_ViewGroup_native_1removeView(JNIEnv *en
{
gtk_widget_unparent(gtk_widget_get_parent(GTK_WIDGET(_PTR(child))));
}
JNIEXPORT void JNICALL Java_android_view_ViewGroup_native_1drawChildren(JNIEnv *env, jobject this, jlong widget_ptr, jlong snapshot_ptr)
{
WrapperWidget *wrapper = WRAPPER_WIDGET(gtk_widget_get_parent(GTK_WIDGET(_PTR(widget_ptr))));
GdkSnapshot *snapshot = GDK_SNAPSHOT(_PTR(snapshot_ptr));
gtk_widget_snapshot_child(&wrapper->parent_instance, wrapper->child, snapshot);
}