MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / set_clipboard

Method set_clipboard

platform/android/java_godot_wrapper.cpp:283–291  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

281}
282
283void GodotJavaWrapper::set_clipboard(const String &p_text) {
284 if (_set_clipboard) {
285 JNIEnv *env = get_jni_env();
286 ERR_FAIL_NULL(env);
287 jstring jStr = env->NewStringUTF(p_text.utf8().get_data());
288 env->CallVoidMethod(godot_instance, _set_clipboard, jStr);
289 env->DeleteLocalRef(jStr);
290 }
291}
292
293bool GodotJavaWrapper::has_has_clipboard() {
294 return _has_clipboard != nullptr;

Callers 1

clipboard_setMethod · 0.80

Calls 3

get_jni_envFunction · 0.85
get_dataMethod · 0.45
utf8Method · 0.45

Tested by

no test coverage detected