-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcallbacks-handler.h
45 lines (31 loc) · 1012 Bytes
/
callbacks-handler.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
//
// Created by manes on 29/11/2024.
//
#ifndef CALLBACKS_HANDLER_H
#define CALLBACKS_HANDLER_H
#include <jni.h>
class CallbackHandler {
public:
CallbackHandler(JavaVM* jvm, JNIEnv* env, jobject xframes, jobject callbacks);
~CallbackHandler();
void logMessage(const char* message);
void onInit();
// onTextChanged callback
void onTextChanged(int id, const char* text);
// onComboChanged callback
void onComboChanged(int id, int value);
// onNumericValueChanged callback
void onNumericValueChanged(int id, float value);
// onBooleanValueChanged callback
void onBooleanValueChanged(int id, bool value);
// onMultipleNumericValuesChanged callback
void onMultipleNumericValuesChanged(int id, float* values, int numValues);
// onClick callback
void onClick(int id);
private:
JavaVM* m_jvm;
JNIEnv* m_env;
jobject m_xframes;
jobject m_callbacks;
};
#endif //CALLBACKS_HANDLER_H