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 View.invalidate()
This commit is contained in:
@@ -205,6 +205,14 @@ JNIEXPORT void JNICALL Java_android_view_View_native_1constructor
|
||||
JNIEXPORT void JNICALL Java_android_view_View_native_1set_1size_1request
|
||||
(JNIEnv *, jobject, jint, jint);
|
||||
|
||||
/*
|
||||
* Class: android_view_View
|
||||
* Method: nativeInvalidate
|
||||
* Signature: (J)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_android_view_View_nativeInvalidate
|
||||
(JNIEnv *, jclass, jlong);
|
||||
|
||||
/*
|
||||
* Class: android_view_View
|
||||
* Method: setVisibility
|
||||
|
||||
@@ -231,3 +231,9 @@ JNIEXPORT void JNICALL Java_android_view_View_native_1constructor(JNIEnv *env, j
|
||||
|
||||
_SET_LONG_FIELD(this, "widget", (long)area);
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_android_view_View_nativeInvalidate(JNIEnv *env, jclass, jlong widget_ptr) {
|
||||
GtkWidget *widget = GTK_WIDGET(_PTR(widget_ptr));
|
||||
|
||||
gtk_widget_queue_draw(gtk_widget_get_parent(widget));
|
||||
}
|
||||
|
||||
@@ -802,7 +802,10 @@ public class View extends Object {
|
||||
|
||||
public void invalidate(Rect dirty) {}
|
||||
public void invalidate(int l, int t, int r, int b) {}
|
||||
public void invalidate() {}
|
||||
public void invalidate() {
|
||||
nativeInvalidate(widget);
|
||||
}
|
||||
private static native void nativeInvalidate(long widget);
|
||||
|
||||
public void setBackgroundColor(int color) {}
|
||||
public native void setVisibility(int visibility);
|
||||
|
||||
Reference in New Issue
Block a user