Move emulator-base native code into its own non-Gradle directory.
[SquirrelJME.git] / emulators / emulator-base-native / c / nativebinding.c
blobfd94fd5e3c1109f334722f699f7353473e64ee2f
1 /* ---------------------------------------------------------------------------
2 // SquirrelJME
3 // Copyright (C) Stephanie Gawroriski <xer@multiphasicapps.net>
4 // ---------------------------------------------------------------------------
5 // SquirrelJME is under the Mozilla Public License Version 2.0.
6 // See license.mkd for licensing and copyright information.
7 // --------------------------------------------------------------------------*/
9 #include <stdio.h>
10 #include <stdlib.h>
11 #include <stdint.h>
13 #include "jni.h"
14 #include "cc_squirreljme_emulator_NativeBinding.h"
15 #include "squirreljme.h"
17 JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM* vm, void* reserved)
19 JNIEnv* env;
21 // Used to indicate that something might be happened
22 fprintf(stderr, "JNI Sub-Level: Loading Library...\n");
24 // Support Java 7!
25 return JNI_VERSION_1_6;
28 JNIEXPORT jint JNICALL Java_cc_squirreljme_emulator_NativeBinding__1_1bindMethods
29 (JNIEnv* env, jclass classy)
31 jint rv = 0;
33 // It is happening!
34 fprintf(stderr, "JNI Sub-Level: Binding Methods...\n");
36 rv |= mleDebugInit(env, classy);
37 rv |= mleFormInit(env, classy);
38 rv |= mleJarInit(env, classy);
39 rv |= mleMathInit(env, classy);
40 rv |= mleMidiInit(env, classy);
41 rv |= mleNativeArchiveInit(env, classy);
42 rv |= mleObjectInit(env, classy);
43 rv |= mlePencilInit(env, classy);
44 rv |= mleReflectionInit(env, classy);
45 rv |= mleRuntimeInit(env, classy);
46 rv |= mleTaskInit(env, classy);
47 rv |= mleTerminalInit(env, classy);
48 rv |= mleTypeInit(env, classy);
49 rv |= mleThreadInit(env, classy);
51 // It happened!
52 fprintf(stderr, "JNI Sub-Level: Methods are now bound!\n");
54 return rv;