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

Function LBackend_ButtonUpdate

src/LBackend_Android.c:222–235  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

220}
221
222void LBackend_ButtonUpdate(struct LButton* w) {
223 JNIEnv* env; Java_GetCurrentEnv(env);
224 jvalue args[2];
225 if (!w->meta) return;
226
227 args[0].i = (int)w->meta;
228 args[1].l = Java_AllocString(env, &w->text);
229
230 // TODO share logic with LabelUpdate/ButtonUpdate
231 jmethodID method = Java_GetIMethod(env, "buttonUpdate", "(ILjava/lang/String;)V");
232 Java_ICall_Void(env, method, args);
233
234 Java_DeleteLocalRef(env, args[1].l);
235}
236void LBackend_ButtonDraw(struct LButton* w) { }
237
238static void JNICALL java_makeButtonActive(JNIEnv* env, jobject o, jobject bmp) {

Callers 1

ShowWidgetFunction · 0.70

Calls 1

Java_AllocStringFunction · 0.85

Tested by

no test coverage detected