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
add more APIs needed for NewPipe
This commit is contained in:
@@ -177,11 +177,3 @@ JNIEXPORT void JNICALL Java_android_app_Activity_nativeOpenURI(JNIEnv *env, jcla
|
||||
}
|
||||
|
||||
extern GtkWindow *window; // TODO: get this in a better way
|
||||
|
||||
JNIEXPORT void JNICALL Java_android_app_Activity_nativeShare(JNIEnv *env, jclass class, jstring text_jstring)
|
||||
{
|
||||
const char *text = (*env)->GetStringUTFChars(env, text_jstring, NULL);
|
||||
GdkClipboard *clipboard = gdk_display_get_clipboard(gtk_root_get_display(GTK_ROOT(window)));
|
||||
gdk_clipboard_set_text(clipboard, text);
|
||||
(*env)->ReleaseStringUTFChars(env, text_jstring, text);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user