Establishing repository
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
#ifndef __VUE_H__
|
||||
#define __VUE_H__
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* API management */
|
||||
#ifndef VUEAPI
|
||||
#define VUEAPI extern
|
||||
#endif
|
||||
|
||||
/* Header includes */
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* __VUE_H__ */
|
||||
@@ -0,0 +1,2 @@
|
||||
#define VUEAPI
|
||||
#include <vue.h>
|
||||
@@ -0,0 +1,9 @@
|
||||
// Desktop application primary class
|
||||
public class Main {
|
||||
|
||||
// Program entry point
|
||||
public static void main(String[] args) {
|
||||
System.out.println("Hello, world!");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
#include <jni.h>
|
||||
#include "vue_NativeVUE.h"
|
||||
|
||||
JNIEXPORT jint JNICALL Java_vue_NativeVUE_test(JNIEnv *env, jobject obj,
|
||||
jint x, jint y) {
|
||||
return x * y;
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package vue;
|
||||
|
||||
// Native-backed emulation core implementation
|
||||
class NativeVUE extends VUE {
|
||||
|
||||
// Retrieve the implementation's name
|
||||
public String getName() {
|
||||
return "Native";
|
||||
}
|
||||
|
||||
native int test(int x, int y);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package vue;
|
||||
|
||||
// Template class for emulation core implementations
|
||||
public abstract class VUE {
|
||||
|
||||
// Retrieve the implementation's name
|
||||
public abstract String getName();
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user