aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/OSX/src/native/JNIWrapper.java
diff options
context:
space:
mode:
authorgregorypierce <[email protected]>2003-07-26 04:50:27 +0000
committergregorypierce <[email protected]>2003-07-26 04:50:27 +0000
commitcb83933dd8de7b3a1e73fe5e7547b129b29d25ff (patch)
treeeafa442c545130452fdf548adf5b995e212ef796 /plugins/OSX/src/native/JNIWrapper.java
parent350be7ec818bad8d267c14af3be4417501a17a10 (diff)
Initial revision
git-svn-id: file:///home/sven/projects/JOGL/git-svn/svn-server-sync/jinput/trunk@14 e343933a-64c8-49c5-92b1-88f2ce3e89e8
Diffstat (limited to 'plugins/OSX/src/native/JNIWrapper.java')
-rw-r--r--plugins/OSX/src/native/JNIWrapper.java44
1 files changed, 44 insertions, 0 deletions
diff --git a/plugins/OSX/src/native/JNIWrapper.java b/plugins/OSX/src/native/JNIWrapper.java
new file mode 100644
index 0000000..34a8692
--- /dev/null
+++ b/plugins/OSX/src/native/JNIWrapper.java
@@ -0,0 +1,44 @@
+//
+// JNIWrapper.java
+//
+// Created by Gregory Pierce on Wed Jul 23 2003.
+// Copyright (c) 2003 __MyCompanyName__. All rights reserved.
+//
+
+import java.util.*;
+
+public class JNIWrapper {
+
+ static {
+ // Ensure native JNI library is loaded
+ System.loadLibrary("hidinput");
+ }
+
+ public JNIWrapper() {
+ System.out.println("JNIWrapper instance created");
+ }
+
+ native void hidCreate();
+ native void hidDispose();
+ native void enumDevices();
+
+ native int native_method(String arg);
+
+ public static void main (String args[])
+ {
+ System.out.println("Started JNIWrapper");
+ JNIWrapper newjni = new JNIWrapper();
+
+ System.out.println("Creating HID engine");
+ newjni.hidCreate();
+
+ System.out.println("Enumerating devices");
+ newjni.enumDevices();
+
+ System.out.println("Disposing HID engine");
+ newjni.hidDispose();
+
+ System.out.println("Done");
+ }
+
+}