MCPcopy Create free account
hub / github.com/ClassiCube/ClassiCube / LBackend_InputUpdate

Function LBackend_InputUpdate

src/LBackend_Android.c:346–358  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

344}
345
346void LBackend_InputUpdate(struct LInput* w) {
347 JNIEnv* env; Java_GetCurrentEnv(env);
348 jvalue args[2];
349 if (!w->meta) return;
350
351 args[0].i = (int)w->meta;
352 args[1].l = Java_AllocString(env, &w->text);
353
354 // TODO share logic with LabelUpdate/ButtonUpdate
355 jmethodID method = Java_GetIMethod(env, "inputUpdate", "(ILjava/lang/String;)V");
356 Java_ICall_Void(env, method, args);
357 Java_DeleteLocalRef(env, args[1].l);
358}
359
360void LBackend_InputTick(struct LInput* w) { }
361void LBackend_InputSelect(struct LInput* w, int idx, cc_bool wasSelected) { }

Callers 1

ShowWidgetFunction · 0.70

Calls 1

Java_AllocStringFunction · 0.85

Tested by

no test coverage detected