Skip to content

Commit

Permalink
Updated copyright dates.
Browse files Browse the repository at this point in the history
Added logging instead of stdout for message output.
Moved copyright output to java to avoid delayed printing on Windows.
  • Loading branch information
kwhat committed Jan 14, 2014
1 parent 0c49c4e commit e8902b2
Show file tree
Hide file tree
Showing 31 changed files with 166 additions and 225 deletions.
20 changes: 19 additions & 1 deletion src/java/org/jnativehook/GlobalScreen.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* JNativeHook: Global keyboard and mouse hooking for Java.
* Copyright (C) 2006-2013 Alexander Barker. All Rights Received.
* Copyright (C) 2006-2014 Alexander Barker. All Rights Received.
* http://code.google.com/p/jnativehook/
*
* JNativeHook is free software: you can redistribute it and/or modify
Expand Down Expand Up @@ -445,6 +445,24 @@ public final void setEventDispatcher(ExecutorService dispatcher) {
* include unpacking and loading the library into the Java Virtual Machine.
*/
private static void loadNativeLibrary() {
System.out.println(
"JNativeHook: Global keyboard and mouse hooking for Java.\n" +
"Copyright (C) 2006-2014 Alexander Barker. All Rights Received.\n" +
"https://github.com/kwhat/libuiohook/\n" +
"\n" +
"JNativeHook is free software: you can redistribute it and/or modify\n" +
"it under the terms of the GNU Lesser General Public License as published\n" +
"by the Free Software Foundation, either version 3 of the License, or\n" +
"(at your option) any later version.\n" +
"\n" +
"JNativeHook is distributed in the hope that it will be useful,\n" +
"but WITHOUT ANY WARRANTY; without even the implied warranty of\n" +
"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" +
"GNU General Public License for more details.\n" +
"\n" +
"You should have received a copy of the GNU Lesser General Public License\n" +
"along with this program. If not, see <http://www.gnu.org/licenses/>.\n");

String libName = "JNativeHook";

try {
Expand Down
2 changes: 1 addition & 1 deletion src/java/org/jnativehook/NativeHookException.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* JNativeHook: Global keyboard and mouse hooking for Java.
* Copyright (C) 2006-2013 Alexander Barker. All Rights Received.
* Copyright (C) 2006-2014 Alexander Barker. All Rights Received.
* http://code.google.com/p/jnativehook/
*
* JNativeHook is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion src/java/org/jnativehook/NativeInputEvent.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* JNativeHook: Global keyboard and mouse hooking for Java.
* Copyright (C) 2006-2013 Alexander Barker. All Rights Received.
* Copyright (C) 2006-2014 Alexander Barker. All Rights Received.
* http://code.google.com/p/jnativehook/
*
* JNativeHook is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion src/java/org/jnativehook/NativeSystem.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* JNativeHook: Global keyboard and mouse hooking for Java.
* Copyright (C) 2006-2013 Alexander Barker. All Rights Received.
* Copyright (C) 2006-2014 Alexander Barker. All Rights Received.
* http://code.google.com/p/jnativehook/
*
* JNativeHook is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion src/java/org/jnativehook/example/NativeHookDemo.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* JNativeHook: Global keyboard and mouse hooking for Java.
* Copyright (C) 2006-2013 Alexander Barker. All Rights Received.
* Copyright (C) 2006-2014 Alexander Barker. All Rights Received.
* http://code.google.com/p/jnativehook/
*
* JNativeHook is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion src/java/org/jnativehook/keyboard/NativeKeyEvent.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* JNativeHook: Global keyboard and mouse hooking for Java.
* Copyright (C) 2006-2013 Alexander Barker. All Rights Received.
* Copyright (C) 2006-2014 Alexander Barker. All Rights Received.
* http://code.google.com/p/jnativehook/
*
* JNativeHook is free software: you can redistribute it and/or modify
Expand Down
5 changes: 3 additions & 2 deletions src/java/org/jnativehook/keyboard/NativeKeyListener.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* JNativeHook: Global keyboard and mouse hooking for Java.
* Copyright (C) 2006-2013 Alexander Barker. All Rights Received.
* Copyright (C) 2006-2014 Alexander Barker. All Rights Received.
* http://code.google.com/p/jnativehook/
*
* JNativeHook is free software: you can redistribute it and/or modify
Expand All @@ -18,9 +18,10 @@
package org.jnativehook.keyboard;

//Imports
import java.util.EventListener;
import org.jnativehook.GlobalScreen;

import java.util.EventListener;

/**
* The listener interface for receiving global <code>NativeKeyEvents</code>.
* <p/>
Expand Down
5 changes: 3 additions & 2 deletions src/java/org/jnativehook/mouse/NativeMouseEvent.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* JNativeHook: Global keyboard and mouse hooking for Java.
* Copyright (C) 2006-2013 Alexander Barker. All Rights Received.
* Copyright (C) 2006-2014 Alexander Barker. All Rights Received.
* http://code.google.com/p/jnativehook/
*
* JNativeHook is free software: you can redistribute it and/or modify
Expand All @@ -18,10 +18,11 @@
package org.jnativehook.mouse;

//Imports
import java.awt.Point;
import org.jnativehook.GlobalScreen;
import org.jnativehook.NativeInputEvent;

import java.awt.*;

/**
* An event which indicates that a mouse action occurred on the system.
* This event is not limited to a particular component's scope or visibility.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* JNativeHook: Global keyboard and mouse hooking for Java.
* Copyright (C) 2006-2013 Alexander Barker. All Rights Received.
* Copyright (C) 2006-2014 Alexander Barker. All Rights Received.
* http://code.google.com/p/jnativehook/
*
* JNativeHook is free software: you can redistribute it and/or modify
Expand Down
5 changes: 3 additions & 2 deletions src/java/org/jnativehook/mouse/NativeMouseListener.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* JNativeHook: Global keyboard and mouse hooking for Java.
* Copyright (C) 2006-2013 Alexander Barker. All Rights Received.
* Copyright (C) 2006-2014 Alexander Barker. All Rights Received.
* http://code.google.com/p/jnativehook/
*
* JNativeHook is free software: you can redistribute it and/or modify
Expand All @@ -18,9 +18,10 @@
package org.jnativehook.mouse;

//Imports
import java.util.EventListener;
import org.jnativehook.GlobalScreen;

import java.util.EventListener;

/**
* The listener interface for receiving systemwide <code>NativeMouseEvents</code>.
* (To track native mouse moves, use the <code>NativeMouseMotionListener</code>.)
Expand Down
5 changes: 3 additions & 2 deletions src/java/org/jnativehook/mouse/NativeMouseMotionListener.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* JNativeHook: Global keyboard and mouse hooking for Java.
* Copyright (C) 2006-2013 Alexander Barker. All Rights Received.
* Copyright (C) 2006-2014 Alexander Barker. All Rights Received.
* http://code.google.com/p/jnativehook/
*
* JNativeHook is free software: you can redistribute it and/or modify
Expand All @@ -18,9 +18,10 @@
package org.jnativehook.mouse;

//Imports
import java.util.EventListener;
import org.jnativehook.GlobalScreen;

import java.util.EventListener;

/**
* The listener interface for receiving native mouse motion events.
* (For clicks and other mouse events, use the <code>NativeMouseListener</code>.)
Expand Down
2 changes: 1 addition & 1 deletion src/java/org/jnativehook/mouse/NativeMouseWheelEvent.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* JNativeHook: Global keyboard and mouse hooking for Java.
* Copyright (C) 2006-2013 Alexander Barker. All Rights Received.
* Copyright (C) 2006-2014 Alexander Barker. All Rights Received.
* http://code.google.com/p/jnativehook/
*
* JNativeHook is free software: you can redistribute it and/or modify
Expand Down
5 changes: 3 additions & 2 deletions src/java/org/jnativehook/mouse/NativeMouseWheelListener.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* JNativeHook: Global keyboard and mouse hooking for Java.
* Copyright (C) 2006-2013 Alexander Barker. All Rights Received.
* Copyright (C) 2006-2014 Alexander Barker. All Rights Received.
* http://code.google.com/p/jnativehook/
*
* JNativeHook is free software: you can redistribute it and/or modify
Expand All @@ -18,9 +18,10 @@
package org.jnativehook.mouse;

//Imports
import java.util.EventListener;
import org.jnativehook.GlobalScreen;

import java.util.EventListener;

/**
* The listener interface for receiving native mouse wheel events.
* (For clicks and other mouse events, use the <code>NativeMouseListener</code>.)
Expand Down
2 changes: 1 addition & 1 deletion src/jni/include/org_jnativehook_NativeInputEvent.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* JNativeHook: Global keyboard and mouse hooking for Java.
* Copyright (C) 2006-2013 Alexander Barker. All Rights Received.
* Copyright (C) 2006-2014 Alexander Barker. All Rights Received.
* http://code.google.com/p/jnativehook/
*
* JNativeHook is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion src/jni/include/org_jnativehook_keyboard_NativeKeyEvent.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* JNativeHook: Global keyboard and mouse hooking for Java.
* Copyright (C) 2006-2013 Alexander Barker. All Rights Received.
* Copyright (C) 2006-2014 Alexander Barker. All Rights Received.
* http://code.google.com/p/jnativehook/
*
* JNativeHook is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion src/jni/include/org_jnativehook_mouse_NativeMouseEvent.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* JNativeHook: Global keyboard and mouse hooking for Java.
* Copyright (C) 2006-2013 Alexander Barker. All Rights Received.
* Copyright (C) 2006-2014 Alexander Barker. All Rights Received.
* http://code.google.com/p/jnativehook/
*
* JNativeHook is free software: you can redistribute it and/or modify
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* JNativeHook: Global keyboard and mouse hooking for Java.
* Copyright (C) 2006-2013 Alexander Barker. All Rights Received.
* Copyright (C) 2006-2014 Alexander Barker. All Rights Received.
* http://code.google.com/p/jnativehook/
*
* JNativeHook is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion src/jni/jni_Converter.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* JNativeHook: Global keyboard and mouse hooking for Java.
* Copyright (C) 2006-2013 Alexander Barker. All Rights Received.
* Copyright (C) 2006-2014 Alexander Barker. All Rights Received.
* http://code.google.com/p/jnativehook/
*
* JNativeHook is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion src/jni/jni_Converter.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* JNativeHook: Global keyboard and mouse hooking for Java.
* Copyright (C) 2006-2013 Alexander Barker. All Rights Received.
* Copyright (C) 2006-2014 Alexander Barker. All Rights Received.
* http://code.google.com/p/jnativehook/
*
* JNativeHook is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion src/jni/jni_Errors.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* JNativeHook: Global keyboard and mouse hooking for Java.
* Copyright (C) 2006-2013 Alexander Barker. All Rights Received.
* Copyright (C) 2006-2014 Alexander Barker. All Rights Received.
* http://code.google.com/p/jnativehook/
*
* JNativeHook is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion src/jni/jni_Errors.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* JNativeHook: Global keyboard and mouse hooking for Java.
* Copyright (C) 2006-2013 Alexander Barker. All Rights Received.
* Copyright (C) 2006-2014 Alexander Barker. All Rights Received.
* http://code.google.com/p/jnativehook/
*
* JNativeHook is free software: you can redistribute it and/or modify
Expand Down
13 changes: 6 additions & 7 deletions src/jni/jni_EventDispatcher.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* JNativeHook: Global keyboard and mouse hooking for Java.
* Copyright (C) 2006-2013 Alexander Barker. All Rights Received.
* Copyright (C) 2006-2014 Alexander Barker. All Rights Received.
* http://code.google.com/p/jnativehook/
*
* JNativeHook is free software: you can redistribute it and/or modify
Expand All @@ -22,6 +22,7 @@

#include "jni_Converter.h"
#include "jni_Globals.h"
#include "jni_Logger.h"
#include "org_jnativehook_NativeInputEvent.h"
#include "org_jnativehook_keyboard_NativeKeyEvent.h"
#include "org_jnativehook_mouse_NativeMouseEvent.h"
Expand Down Expand Up @@ -197,16 +198,14 @@ void jni_EventDispatcher(virtual_event * const event) {
else {
// FIXME an exception should be thrown!

#ifdef DEBUG
fprintf(stderr, "jni_EventDispatcher(): Failed to acquire GlobalScreen singleton!\n");
#endif
jni_Logger(LOG_LEVEL_ERROR, "%s [%u]: Failed to acquire GlobalScreen singleton!\n",
__FUNCTION__, __LINE__);
}
}
else {
// FIXME an exception should be thrown!

#ifdef DEBUG
fprintf(stderr, "jni_EventDispatcher(): AttachCurrentThread() failed!\n");
#endif
jni_Logger(LOG_LEVEL_ERROR, "%s [%u]: AttachCurrentThread() failed!\n",
__FUNCTION__, __LINE__);
}
}
2 changes: 1 addition & 1 deletion src/jni/jni_EventDispathcer.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* JNativeHook: Global keyboard and mouse hooking for Java.
* Copyright (C) 2006-2013 Alexander Barker. All Rights Received.
* Copyright (C) 2006-2014 Alexander Barker. All Rights Received.
* http://code.google.com/p/jnativehook/
*
* JNativeHook is free software: you can redistribute it and/or modify
Expand Down
Loading

0 comments on commit e8902b2

Please sign in to comment.