NVDA Helper
In-process and lite high-speed utilities for NVDA
|
#include <cstdio>
#include <list>
#include <set>
#include <map>
#include <windows.h>
#include "winword.h"
#include "inputLangChange.h"
#include "typedCharacter.h"
#include "tsf.h"
#include "ime.h"
#include "IA2Support.h"
#include "ia2LiveRegions.h"
#include <common/log.h>
#include "gdiHooks.h"
#include "nvdaHelperRemote.h"
#include "inProcess.h"
Go to the source code of this file.
Macros | |
#define | WIN32_LEAN_AND_MEAN |
Typedefs | |
typedef map< WINEVENTPROC, size_t > | winEventHookRegistry_t |
typedef map< HOOKPROC, size_t > | windowsHookRegistry_t |
Functions | |
void | inProcess_initialize () |
void | inProcess_terminate () |
bool | registerWinEventHook (WINEVENTPROC hookProc) |
Registers a callback function to be called with in future win events for this process. | |
bool | unregisterWinEventHook (WINEVENTPROC hookProc) |
Unregisters a previously registered callback function for a win event for this process. | |
bool | registerWindowsHook (int hookType, HOOKPROC hookProc) |
Registers a callback function to be called with in future windows hooks fired for this process. | |
bool | unregisterWindowsHook (int hookType, HOOKPROC hookProc) |
Unregisters a previously registered callback function for a windows hook for this process. | |
LRESULT CALLBACK | inProcess_getMessageHook (int code, WPARAM wParam, LPARAM lParam) |
LRESULT CALLBACK | inProcess_callWndProcHook (int code, WPARAM wParam, LPARAM lParam) |
void CALLBACK | inProcess_winEventCallback (HWINEVENTHOOK hookID, DWORD eventID, HWND hwnd, long objectID, long childID, DWORD threadID, DWORD time) |
bool | execInThread (long threadID, execInThread_funcType func) |
#define WIN32_LEAN_AND_MEAN |
typedef map<WINEVENTPROC,size_t> winEventHookRegistry_t |
typedef map<HOOKPROC,size_t> windowsHookRegistry_t |
void inProcess_initialize | ( | ) |
References gdiHooks_inProcess_initialize(), ia2LiveRegions_inProcess_initialize(), IA2Support_inProcess_initialize(), IME_inProcess_initialize(), inputLangChange_inProcess_initialize(), TSF_inProcess_initialize(), typedCharacter_inProcess_initialize(), winword_inProcess_initialize(), and wm_execInThread.
Referenced by inprocMgrThreadFunc().
void inProcess_terminate | ( | ) |
References gdiHooks_inProcess_terminate(), ia2LiveRegions_inProcess_terminate(), IA2Support_inProcess_terminate(), IME_inProcess_terminate(), inputLangChange_inProcess_terminate(), TSF_inProcess_terminate(), typedCharacter_inProcess_terminate(), and winword_inProcess_terminate().
Referenced by inprocMgrThreadFunc().
bool registerWinEventHook | ( | WINEVENTPROC | hookProc | ) |
Registers a callback function to be called with in future win events for this process.
procHook | the callback function which should be called |
References inProcess_registeredWinEventHooks.
Referenced by ia2LiveRegions_inProcess_initialize(), IA2Support_inProcess_initialize(), AdobeAcrobatVBufBackend_t::renderThread_initialize(), GeckoVBufBackend_t::renderThread_initialize(), lotusNotesRichTextVBufBackend_t::renderThread_initialize(), VBufBackend_t::renderThread_initialize(), WebKitVBufBackend_t::renderThread_initialize(), and TSF_inProcess_initialize().
bool unregisterWinEventHook | ( | WINEVENTPROC | hookProc | ) |
Unregisters a previously registered callback function for a win event for this process.
It may be possible for the winEvent hook to fire one more time after unregistration if the unregistration happens within a winEvent hook.
hookProc | the callback function to be unregistered |
References inProcess_registeredWinEventHooks, and nhAssert.
Referenced by ia2LiveRegions_inProcess_terminate(), IA2Support_inProcess_terminate(), AdobeAcrobatVBufBackend_t::renderThread_terminate(), GeckoVBufBackend_t::renderThread_terminate(), lotusNotesRichTextVBufBackend_t::renderThread_terminate(), VBufBackend_t::renderThread_terminate(), WebKitVBufBackend_t::renderThread_terminate(), and TSF_inProcess_terminate().
bool registerWindowsHook | ( | int | hookType, |
HOOKPROC | hookProc ) |
Registers a callback function to be called with in future windows hooks fired for this process.
hookType | the type of windows hook (WH_CALLWNDPROC, WH_GETMESSAGE) |
procHook | the callback function which should be called |
References inProcess_registeredCallWndProcWindowsHooks, and inProcess_registeredGetMessageWindowsHooks.
Referenced by IA2Support_inProcess_terminate(), IME_inProcess_initialize(), VBufBackend_t::initialize(), inputLangChange_inProcess_initialize(), typedCharacter_inProcess_initialize(), and winword_inProcess_initialize().
bool unregisterWindowsHook | ( | int | hookType, |
HOOKPROC | hookProc ) |
Unregisters a previously registered callback function for a windows hook for this process.
It may be possible for the windows hook to fire one more time after unregistration if the unregistration happens within a windows hook.
hookType | the type of windows hook |
hookProc | the callback function to be unregistered |
References inProcess_registeredCallWndProcWindowsHooks, inProcess_registeredGetMessageWindowsHooks, and nhAssert.
Referenced by IA2Support_inProcess_terminate(), IME_inProcess_terminate(), inputLangChange_inProcess_terminate(), VBufBackend_t::terminate(), typedCharacter_inProcess_terminate(), and winword_inProcess_terminate().
LRESULT CALLBACK inProcess_getMessageHook | ( | int | code, |
WPARAM | wParam, | ||
LPARAM | lParam ) |
References inProcess_registeredGetMessageWindowsHooks, and wm_execInThread.
Referenced by fake_SetWindowsHookExA(), and inproc_winEventCallback().
LRESULT CALLBACK inProcess_callWndProcHook | ( | int | code, |
WPARAM | wParam, | ||
LPARAM | lParam ) |
References inProcess_registeredCallWndProcWindowsHooks.
Referenced by fake_SetWindowsHookExA(), and inproc_winEventCallback().
void CALLBACK inProcess_winEventCallback | ( | HWINEVENTHOOK | hookID, |
DWORD | eventID, | ||
HWND | hwnd, | ||
long | objectID, | ||
long | childID, | ||
DWORD | threadID, | ||
DWORD | time ) |
References inProcess_registeredWinEventHooks.
Referenced by inproc_winEventCallback().
bool execInThread | ( | long | threadID, |
execInThread_funcType | func ) |
winEventHookRegistry_t inProcess_registeredWinEventHooks |
Referenced by inProcess_winEventCallback(), registerWinEventHook(), and unregisterWinEventHook().
windowsHookRegistry_t inProcess_registeredCallWndProcWindowsHooks |
Referenced by inProcess_callWndProcHook(), registerWindowsHook(), and unregisterWindowsHook().
windowsHookRegistry_t inProcess_registeredGetMessageWindowsHooks |
Referenced by inProcess_getMessageHook(), registerWindowsHook(), and unregisterWindowsHook().
UINT wm_execInThread |
Referenced by execInThread(), inProcess_getMessageHook(), and inProcess_initialize().