com.jniwrapper.win32.hook
Class LowLevelMouseHook

java.lang.Object
  extended bycom.jniwrapper.win32.hook.Hook
      extended bycom.jniwrapper.win32.hook.LowLevelHook
          extended bycom.jniwrapper.win32.hook.LowLevelMouseHook

public final class LowLevelMouseHook
extends com.jniwrapper.win32.hook.LowLevelHook

Provides implementation of low-level mouse hook.


Nested Class Summary
 
Nested classes inherited from class com.jniwrapper.win32.hook.Hook
Hook.Descriptor
 
Field Summary
 
Fields inherited from class com.jniwrapper.win32.hook.Hook
_listeners, CALLWNDPROC, CALLWNDPROCRET, CBT, FOREGROUNDIDLE, GETMESSAGE, JOURNALRECORD, KEYBOARD, KEYBOARD_LL, MOUSE, MOUSE_LL, SHELL, SYSMSGFILTER
 
Constructor Summary
LowLevelMouseHook()
           
 
Method Summary
 void install()
          Installs the hook.
 boolean isInstalled()
          Verifies if the hook is installed.
 boolean isSynchronous()
          Returns the mode of this hook.
protected  long processEvent(long wParam, long lParam)
           
 void setSynchronous(boolean synchronous)
          This method allows to swith between synchronous/asynchronous modes of the hook.
Note: synchronous mode may significatly reduce the performance of the system, so use this mode carefully.
 void uninstall()
          Uninstalls the hook.
 
Methods inherited from class com.jniwrapper.win32.hook.Hook
addListener, getDescriptor, getFilter, notifyListeners, removeListener, setFilter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LowLevelMouseHook

public LowLevelMouseHook()
Method Detail

processEvent

protected long processEvent(long wParam,
                            long lParam)

isInstalled

public boolean isInstalled()
Description copied from class: Hook
Verifies if the hook is installed.

Overrides:
isInstalled in class Hook
Returns:
true if the hook is installed.

install

public void install()
Description copied from class: Hook
Installs the hook.

Overrides:
install in class Hook

uninstall

public void uninstall()
Description copied from class: Hook
Uninstalls the hook.

Overrides:
uninstall in class Hook

setSynchronous

public void setSynchronous(boolean synchronous)
Description copied from class: Hook
This method allows to swith between synchronous/asynchronous modes of the hook.
Note: synchronous mode may significatly reduce the performance of the system, so use this mode carefully.

Overrides:
setSynchronous in class Hook
Parameters:
synchronous - specifies the mode of the hook; if true then hook works in synchronous mode; false otherwise.

isSynchronous

public boolean isSynchronous()
Description copied from class: Hook
Returns the mode of this hook.

Overrides:
isSynchronous in class Hook
Returns:
true if this hook works in synchronous mode; false - in asynchronous mode.