diff options
author | George Hazan <george.hazan@gmail.com> | 2012-09-28 11:50:04 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-09-28 11:50:04 +0000 |
commit | eb93c9842bc5dae03d6cc6df7bef86b620329196 (patch) | |
tree | 79fb0a5d502139379c6adeb39d3bbc8ecac79f89 /src | |
parent | 2f25b32b58fcfc4322051b9a25d2adb211fb6de9 (diff) |
NotifyFastHook - new core function to call event hooks in the same thread, it never switches to the main thread to execute event's hooks
git-svn-id: http://svn.miranda-ng.org/main/trunk@1704 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src')
-rw-r--r-- | src/mir_core/mir_core.def | 2 | ||||
-rw-r--r-- | src/mir_core/modules.cpp | 10 |
2 files changed, 12 insertions, 0 deletions
diff --git a/src/mir_core/mir_core.def b/src/mir_core/mir_core.def index 0a13752fff..9e4253fc91 100644 --- a/src/mir_core/mir_core.def +++ b/src/mir_core/mir_core.def @@ -131,3 +131,5 @@ CmdLine_GetOption @128 CmdLine_Parse @129
Utf8CheckString @130
GetSubscribersCount @131
+NotifyFastHook @132
+
diff --git a/src/mir_core/modules.cpp b/src/mir_core/modules.cpp index 4e9a518d26..7ab515e469 100644 --- a/src/mir_core/modules.cpp +++ b/src/mir_core/modules.cpp @@ -275,6 +275,16 @@ MIR_CORE_DLL(int) NotifyEventHooks(HANDLE hEvent, WPARAM wParam, LPARAM lParam) return item->result;
}
+MIR_CORE_DLL(int) NotifyFastHook(HANDLE hEvent, WPARAM wParam, LPARAM lParam)
+{
+ switch ( checkHook((THook*)hEvent)) {
+ case hookInvalid: return -1;
+ case hookEmpty: return 0;
+ }
+
+ return CallHookSubscribers((THook*)hEvent, wParam, lParam);
+}
+
extern "C" MIR_CORE_DLL(int) GetSubscribersCount(THook* pHook)
{
switch ( checkHook(pHook)) {
|