Skip to content
This repository has been archived by the owner on Sep 8, 2020. It is now read-only.

Commit

Permalink
Minor updates + convert to maven
Browse files Browse the repository at this point in the history
  • Loading branch information
Col-E committed Jun 5, 2018
1 parent 42ba283 commit 710a283
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 19 deletions.
21 changes: 4 additions & 17 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -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/
51 changes: 51 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>me.coley</groupId>
<artifactId>simple-jna</artifactId>
<version>1.0</version>
<name>Simple-JNA</name>
<description>Wrappers for JNA, ease of use.</description>
<dependencies>
<!-- https://mvnrepository.com/artifact/net.java.dev.jna/jna -->
<dependency>
<groupId>net.java.dev.jna</groupId>
<artifactId>jna</artifactId>
<version>4.5.1</version>
</dependency>
<!-- https://mvnrepository.com/artifact/net.java.dev.jna/jna-platform -->
<dependency>
<groupId>net.java.dev.jna</groupId>
<artifactId>jna-platform</artifactId>
<version>4.5.1</version>
</dependency>
</dependencies>
<build>
<sourceDirectory>src</sourceDirectory>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.6.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</plugin>
</plugins>
</build>
</project>
4 changes: 2 additions & 2 deletions src/me/coley/simplejna/hook/key/KeyEventReceiver.java
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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) {
Expand Down
6 changes: 6 additions & 0 deletions src/me/coley/simplejna/hook/mouse/MouseEventReceiver.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ public LRESULT callback(int nCode, WPARAM wParam, MOUSEHOOKSTRUCT info) {
*
* @param type
* Type is press <i>(Left, Right, Middle)</i>
* @param hwnd
* Window handle that receives the event.
* @param info
* Mouse information.
* @return Event cancellation
Expand All @@ -78,6 +80,8 @@ public LRESULT callback(int nCode, WPARAM wParam, MOUSEHOOKSTRUCT info) {
*
* @param down
* Scroll event is down <i>(Negative movement)</i>
* @param hwnd
* Window handle that receives the event.
* @param info
* Mouse information.
* @return Event cancellation
Expand All @@ -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
Expand Down

0 comments on commit 710a283

Please sign in to comment.