// Path: src/main/java/com/trezoragent/sshagent/Kernel32.java
// public interface Kernel32 extends com.sun.jna.platform.win32.Kernel32 {
// 
//     public Kernel32 INSTANCE
//             = (Kernel32) Native.loadLibrary("Kernel32",
//                     Kernel32.class,
//                     W32APIOptions.DEFAULT_OPTIONS);
// 
//     public HANDLE CreateMutex(Object sa, boolean initialOwner, String name);
// }


import com.sun.jna.Native;
import com.sun.jna.Platform;
import com.sun.jna.Pointer;
import com.sun.jna.Structure;
import com.sun.jna.platform.win32.BaseTSD;
import com.sun.jna.platform.win32.WinDef;
import com.sun.jna.platform.win32.WinDef.LPARAM;
import com.sun.jna.platform.win32.WinUser;
import com.sun.jna.win32.W32APIOptions;
import com.trezoragent.sshagent.Kernel32;
import java.awt.*;
import java.awt.event.MouseEvent;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
package com.trezoragent.mouselistener;



/**
 * @author Martin Lizner
 *
 * JNI Listener to register mouse clicks on desktop. If mouse click is outside
 * of the component, {@link MouseClickOutsideComponentEvent} event is called.
 *
 */
public class JNIMouseHook {

    private final JNIMouseHook.User32 USER32INST;
// Path: src/main/java/com/trezoragent/sshagent/Kernel32.java
// public interface Kernel32 extends com.sun.jna.platform.win32.Kernel32 {
// 
//     public Kernel32 INSTANCE
//             = (Kernel32) Native.loadLibrary("Kernel32",
//                     Kernel32.class,
//                     W32APIOptions.DEFAULT_OPTIONS);
// 
//     public HANDLE CreateMutex(Object sa, boolean initialOwner, String name);
// }


// Path: src/main/java/com/trezoragent/mouselistener/JNIMouseHook.java
import com.sun.jna.Native;
import com.sun.jna.Platform;
import com.sun.jna.Pointer;
import com.sun.jna.Structure;
import com.sun.jna.platform.win32.BaseTSD;
import com.sun.jna.platform.win32.WinDef;
import com.sun.jna.platform.win32.WinDef.LPARAM;
import com.sun.jna.platform.win32.WinUser;
import com.sun.jna.win32.W32APIOptions;
import com.trezoragent.sshagent.Kernel32;
import java.awt.*;
import java.awt.event.MouseEvent;
import java.util.Arrays;
import java.util.Date;
import java.util.List;

package com.trezoragent.mouselistener;



/**
 * @author Martin Lizner
 *
 * JNI Listener to register mouse clicks on desktop. If mouse click is outside
 * of the component, {@link MouseClickOutsideComponentEvent} event is called.
 *
 */
public class JNIMouseHook {

    private final JNIMouseHook.User32 USER32INST;
    private final Kernel32 KERNEL32INST;