com.jniwrapper.win32.hook
Class CBTHook

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

public final class CBTHook
extends Hook

Implementation of CBT 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
 
Method Summary
 void addListener(CBTHookListener listener)
          Adds CBTHookListener to this hook.
 void removeListener(CBTHookListener listener)
          Removes CBTHookListener from this hook.
 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.
 
Methods inherited from class com.jniwrapper.win32.hook.Hook
addListener, getDescriptor, getFilter, install, isInstalled, isSynchronous, notifyListeners, removeListener, setFilter, uninstall
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

addListener

public void addListener(CBTHookListener listener)
Adds CBTHookListener to this hook.

Parameters:
listener - CBT hook listener

removeListener

public void removeListener(CBTHookListener listener)
Removes CBTHookListener from this hook.

Parameters:
listener - CBT hook listener

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.