You've already forked android_translation_layer
mirror of
https://gitlab.com/android_translation_layer/android_translation_layer.git
synced 2025-10-27 11:48:10 -07:00
View.draw(): draw background, content, children in same order as AOSP
This commit is contained in:
@@ -584,8 +584,17 @@ JNIEXPORT void JNICALL Java_android_view_View_native_1queueAllocate(JNIEnv *env,
|
||||
gtk_widget_queue_allocate(GTK_WIDGET(_PTR(widget_ptr)));
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_android_view_View_native_1onDraw(JNIEnv *env, jobject this, jlong widget_ptr, jlong snapshot_ptr)
|
||||
JNIEXPORT void JNICALL Java_android_view_View_native_1drawBackground(JNIEnv *env, jobject this, jlong widget_ptr, jlong snapshot_ptr)
|
||||
{
|
||||
WrapperWidget *wrapper = WRAPPER_WIDGET(gtk_widget_get_parent(GTK_WIDGET(_PTR(widget_ptr))));
|
||||
wrapper_widget_draw_children(wrapper, GDK_SNAPSHOT(_PTR(snapshot_ptr)));
|
||||
GdkSnapshot *snapshot = GDK_SNAPSHOT(_PTR(snapshot_ptr));
|
||||
if (wrapper->background)
|
||||
gtk_widget_snapshot_child(&wrapper->parent_instance, wrapper->background, snapshot);
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_android_view_View_native_1drawContent(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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user