public final class CBTHook extends Hook
Hook.Descriptor
_listeners, CALLWNDPROC, CALLWNDPROCRET, CBT, FOREGROUNDIDLE, GETMESSAGE, JOURNALRECORD, KEYBOARD, KEYBOARD_LL, MOUSE, MOUSE_LL, SHELL, SYSMSGFILTER
Modifier and Type | Method and Description |
---|---|
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. |
addListener, getDescriptor, getFilter, install, isInstalled, isSynchronous, notifyListeners, removeListener, setFilter, uninstall
public void addListener(CBTHookListener listener)
CBTHookListener
to this hook.listener
- CBT hook listenerpublic void removeListener(CBTHookListener listener)
CBTHookListener
from this hook.listener
- CBT hook listenerpublic void setSynchronous(boolean synchronous)
Hook
setSynchronous
in class Hook
synchronous
- specifies the mode of the hook; if true then hook works in synchronous mode; false otherwise.