com.jniwrapper.win32.hook
Class LowLevelKeyboardHook

java.lang.Object
  extended by com.jniwrapper.win32.hook.Hook
      extended by com.jniwrapper.win32.hook.LowLevelKeyboardHook

public final class LowLevelKeyboardHook
extends Hook

Provides implementation of low-level keyboard hook.


Nested Class Summary
 
Nested classes/interfaces 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
LowLevelKeyboardHook()
           
 
Method Summary
 void addListener(HookEventListener listener)
          Adds a hook event listener.
 void install()
          Installs the hook.
 boolean isInstalled()
          Verifies if the hook is installed.
protected  long processEvent(long wParam, long lParam)
           
 void removeListener(HookEventListener listener)
          Removes a hook event listener.
 void uninstall()
          Uninstalls the hook.
 
Methods inherited from class com.jniwrapper.win32.hook.Hook
getDescriptor, getFilter, isSynchronous, notifyListeners, setFilter, setSynchronous
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LowLevelKeyboardHook

public LowLevelKeyboardHook()
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

addListener

public void addListener(HookEventListener listener)
Description copied from class: Hook
Adds a hook event listener.

Overrides:
addListener in class Hook
Parameters:
listener - a hook event listener.

removeListener

public void removeListener(HookEventListener listener)
Description copied from class: Hook
Removes a hook event listener.

Overrides:
removeListener in class Hook
Parameters:
listener - a hook event listener.