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
implement some Canvas methods needed for composeUI
This commit is contained in:
@@ -54,3 +54,12 @@ JNIEXPORT void JNICALL Java_android_view_ViewGroup_native_1drawChildren(JNIEnv *
|
||||
GdkSnapshot *snapshot = GDK_SNAPSHOT(_PTR(snapshot_ptr));
|
||||
gtk_widget_snapshot_child(&wrapper->parent_instance, wrapper->child, snapshot);
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_android_view_ViewGroup_native_1drawChild(JNIEnv *env, jobject this, jlong widget_ptr, jlong child_ptr, jlong snapshot_ptr)
|
||||
{
|
||||
GtkWidget *widget = GTK_WIDGET(_PTR(widget_ptr));
|
||||
GtkWidget *child = gtk_widget_get_parent(GTK_WIDGET(_PTR(child_ptr)));
|
||||
GdkSnapshot *snapshot = GDK_SNAPSHOT(_PTR(snapshot_ptr));
|
||||
gtk_widget_queue_draw(child); // FIXME: why didn't compose UI invalidate the child?
|
||||
gtk_widget_snapshot_child(widget, child, snapshot);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user