Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.equinox.executable/library/eclipseJNI.h')
-rw-r--r--bundles/org.eclipse.equinox.executable/library/eclipseJNI.h88
1 files changed, 88 insertions, 0 deletions
diff --git a/bundles/org.eclipse.equinox.executable/library/eclipseJNI.h b/bundles/org.eclipse.equinox.executable/library/eclipseJNI.h
new file mode 100644
index 000000000..e961f47f1
--- /dev/null
+++ b/bundles/org.eclipse.equinox.executable/library/eclipseJNI.h
@@ -0,0 +1,88 @@
+/*******************************************************************************
+ * Copyright (c) 2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+#ifndef ECLIPSE_JNI_H
+#define ECLIPSE_JNI_H
+
+#include "eclipseUnicode.h"
+#include <jni.h>
+
+#ifdef UNICODE
+#define loadVMLibrary loadVMLibraryW
+#define unloadVMLibrary unloadVMLibraryW
+#define getInvocationFunction getInvocationFunctionW
+#define launchJavaVM launchJavaVMW
+#define startJavaVM startJavaVMW
+#endif
+
+#ifdef UNICODE
+#define JNI_GetStringChars(env, s) (*env)->GetStringChars(env, s, 0)
+#define JNI_ReleaseStringChars(env, s, data) (*env)->ReleaseStringChars(env, s, data)
+#else
+#define JNI_GetStringChars(env, s) (*env)->GetStringUTFChars(env, s, 0)
+#define JNI_ReleaseStringChars(env, s, data) (*env)->ReleaseStringUTFChars(env, s, data)
+#endif
+
+typedef jint (JNICALL *JNI_createJavaVM)(JavaVM **pvm, JNIEnv **env, void *args);
+
+/* JNI Callback methods */
+/* Use name mangling since we may be linking these from java with System.LoadLibrary */
+#define set_exit_data Java_org_eclipse_core_launcher_JNIBridge__1set_1exit_1data
+#define update_splash Java_org_eclipse_core_launcher_JNIBridge__1update_1splash
+#define show_splash Java_org_eclipse_core_launcher_JNIBridge__1show_1splash
+#define get_splash_handle Java_org_eclipse_core_launcher_JNIBridge__1get_1splash_1handle
+#define takedown_splash Java_org_eclipse_core_launcher_JNIBridge__1takedown_1splash
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+/*
+ * org_eclipse_core_launcher_JNIBridge#_set_exit_data
+ * Signature: (Ljava/lang/String;)V
+ */
+JNIEXPORT void JNICALL set_exit_data(JNIEnv *, jobject, jstring);
+
+/*
+ * org_eclipse_core_launcher_JNIBridge#_update_splash
+ * Signature: ()V
+ */
+JNIEXPORT void JNICALL update_splash(JNIEnv *, jobject);
+
+/*
+ * org_eclipse_core_launcher_JNIBridge#_get_splash_handle
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL get_splash_handle(JNIEnv *, jobject);
+
+/*
+ * org_eclipse_core_launcher_JNIBridge#_show_splash
+ * Signature: (Ljava/lang/String;)V
+ */
+JNIEXPORT void JNICALL show_splash(JNIEnv *, jobject, jstring);
+
+/*
+ * org_eclipse_core_launcher_JNIBridge#_takedown_splash
+ * Signature: ()V
+ */
+JNIEXPORT void JNICALL takedown_splash(JNIEnv *, jobject);
+
+#ifdef __cplusplus
+}
+#endif
+
+/* Start the Java VM and Wait For It to Terminate
+ *
+ * This method is responsible for starting the Java VM and for
+ * detecting its termination. The resulting JVM exit code should
+ * be returned to the main launcher, which will display a message if
+ * the termination was not normal.
+ */
+extern int startJavaVM( _TCHAR* libPath, _TCHAR* vmArgs[], _TCHAR* progArgs[] );
+#endif

Back to the top