From 710a28366de50e552717bd71abb6ab5be95c90b0 Mon Sep 17 00:00:00 2001 From: Col-E Date: Tue, 5 Jun 2018 14:15:55 -0400 Subject: [PATCH] Minor updates + convert to maven --- .gitignore | 21 ++------ pom.xml | 51 +++++++++++++++++++ .../simplejna/hook/key/KeyEventReceiver.java | 4 +- .../hook/mouse/MouseEventReceiver.java | 6 +++ 4 files changed, 63 insertions(+), 19 deletions(-) create mode 100644 pom.xml diff --git a/.gitignore b/.gitignore index 41f071a..c05d7ab 100644 --- a/.gitignore +++ b/.gitignore @@ -1,21 +1,8 @@ .metadata/** .recommenders/** -*.class -*.dtd -*.lst -*.lock -*.lo -*.jar +.settings/** +bin/** +target/** + *.project *.classpath -*.prefs -*.map -*.zip -*.sha -*.sha -**/build.xml -**/pom.xml -*.MF -*.sh -/bin/ -/target/ diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..bd4d7f3 --- /dev/null +++ b/pom.xml @@ -0,0 +1,51 @@ + + 4.0.0 + me.coley + simple-jna + 1.0 + Simple-JNA + Wrappers for JNA, ease of use. + + + + net.java.dev.jna + jna + 4.5.1 + + + + net.java.dev.jna + jna-platform + 4.5.1 + + + + src + + + maven-compiler-plugin + 3.6.1 + + 1.8 + 1.8 + + + + maven-assembly-plugin + + + package + + single + + + + + + jar-with-dependencies + + + + + + \ No newline at end of file diff --git a/src/me/coley/simplejna/hook/key/KeyEventReceiver.java b/src/me/coley/simplejna/hook/key/KeyEventReceiver.java index e747399..c8b0e97 100644 --- a/src/me/coley/simplejna/hook/key/KeyEventReceiver.java +++ b/src/me/coley/simplejna/hook/key/KeyEventReceiver.java @@ -56,7 +56,7 @@ public LRESULT callback(int nCode, WPARAM wParam, KBDLLHOOKSTRUCT info) { * * @author Matt */ - enum SystemState { + public enum SystemState { SYSTEM, STANDARD; public static SystemState from(int code) { @@ -69,7 +69,7 @@ public static SystemState from(int code) { * * @author Matt */ - enum PressState { + public enum PressState { UP, DOWN, UNKNOWN; public static PressState from(int code) { diff --git a/src/me/coley/simplejna/hook/mouse/MouseEventReceiver.java b/src/me/coley/simplejna/hook/mouse/MouseEventReceiver.java index 40d3636..62caecf 100644 --- a/src/me/coley/simplejna/hook/mouse/MouseEventReceiver.java +++ b/src/me/coley/simplejna/hook/mouse/MouseEventReceiver.java @@ -56,6 +56,8 @@ public LRESULT callback(int nCode, WPARAM wParam, MOUSEHOOKSTRUCT info) { * * @param type * Type is press (Left, Right, Middle) + * @param hwnd + * Window handle that receives the event. * @param info * Mouse information. * @return Event cancellation @@ -78,6 +80,8 @@ public LRESULT callback(int nCode, WPARAM wParam, MOUSEHOOKSTRUCT info) { * * @param down * Scroll event is down (Negative movement) + * @param hwnd + * Window handle that receives the event. * @param info * Mouse information. * @return Event cancellation @@ -87,6 +91,8 @@ public LRESULT callback(int nCode, WPARAM wParam, MOUSEHOOKSTRUCT info) { /** * Called when the mouse wheel is moved. Returning true will cancel the event. * + * @param hwnd + * Window handle that receives the event. * @param info * Mouse information. * @return Event cancellation