NVDA Helper
In-process and lite high-speed utilities for NVDA
|
#include <cstdio>
#include <cwchar>
#include <windows.h>
#include <objbase.h>
#include <wil/resource.h>
#include <wil/win32_helpers.h>
#include <ia2.h>
#include <remote/nvdaControllerInternal.h>
#include <common/log.h>
#include "nvdaHelperRemote.h"
#include "dllmain.h"
#include "inProcess.h"
#include <remote/nvdaInProcUtils.h>
#include "IA2Support.h"
#include <atlcomcli.h>
#include "textFromIAccessible.h"
Go to the source code of this file.
Macros | |
#define | WIN32_LEAN_AND_MEAN |
#define | APPLICATION_USER_MODEL_ID_MAX_LENGTH 131 |
Functions | |
LONG WINAPI | GetCurrentApplicationUserModelId (UINT32 *pBufSize, PWSTR buf) |
bool | installIA2Support () |
pair< map< DWORD, IA2InstallData >::iterator, bool > | installIA2SupportForThread (DWORD threadID) |
bool | uninstallIA2Support () |
bool | uninstallIA2SupportForThread (DWORD threadID) |
void CALLBACK | IA2Support_winEventProcHook (HWINEVENTHOOK hookID, DWORD eventID, HWND hwnd, long objectID, long childID, DWORD threadID, DWORD time) |
LRESULT CALLBACK | IA2Support_uninstallerHook (int code, WPARAM wParam, LPARAM lParam) |
bool | isSuspendableProcess () |
bool | isAppContainerProcess () |
void | IA2Support_inProcess_initialize () |
void | IA2Support_inProcess_terminate () |
bool | findContentDescendant (IAccessible2 *pacc2, long what, long *descendantID, long *descendantOffset) |
CComPtr< IAccessible2 > | getIA2 (const HWND hwnd, const long parentID) |
error_status_t | nvdaInProcUtils_IA2Text_findContentDescendant (handle_t bindingHandle, const unsigned long windowHandle, long parentID, long what, long *descendantID, long *descendantOffset) |
error_status_t | nvdaInProcUtils_getTextFromIAccessible (handle_t bindingHandle, const unsigned long windowHandle, long parentID, BSTR *outBuf, const boolean recurse, const boolean includeTopLevelText) |
Variables | |
UINT | wm_uninstallIA2Support = 0 |
bool | isIA2SupportDisabled =false |
map< DWORD, IA2InstallData > | IA2InstallMap |
const long | FINDCONTENTDESCENDANT_FIRST =0 |
const long | FINDCONTENTDESCENDANT_CARET =1 |
const long | FINDCONTENTDESCENDANT_LAST =2 |
const long | FINDCONTENTDESCENDANT_SELECTIONSTART =3 |
const long | FINDCONTENTDESCENDANT_SELECTIONEND =4 |
#define WIN32_LEAN_AND_MEAN |
#define APPLICATION_USER_MODEL_ID_MAX_LENGTH 131 |
Referenced by isSuspendableProcess().
LONG WINAPI GetCurrentApplicationUserModelId | ( | UINT32 * | pBufSize, |
PWSTR | buf ) |
Referenced by isSuspendableProcess().
bool installIA2Support | ( | ) |
References installIA2SupportForThread().
pair< map< DWORD, IA2InstallData >::iterator, bool > installIA2SupportForThread | ( | DWORD | threadID | ) |
References HRESULT(), IA2InstallMap, IA2InstallData::IA2ProxyRegistration, LOG_ERROR, registerCOMProxy(), and wm_uninstallIA2Support.
Referenced by IA2Support_winEventProcHook(), and installIA2Support().
bool uninstallIA2Support | ( | ) |
References uninstallIA2SupportForThread().
bool uninstallIA2SupportForThread | ( | DWORD | threadID | ) |
References IA2InstallMap, LOG_ERROR, unregisterCOMProxy(), and wm_uninstallIA2Support.
Referenced by IA2Support_uninstallerHook(), and uninstallIA2Support().
void CALLBACK IA2Support_winEventProcHook | ( | HWINEVENTHOOK | hookID, |
DWORD | eventID, | ||
HWND | hwnd, | ||
long | objectID, | ||
long | childID, | ||
DWORD | threadID, | ||
DWORD | time ) |
References installIA2SupportForThread().
Referenced by IA2Support_inProcess_initialize(), and IA2Support_inProcess_terminate().
LRESULT CALLBACK IA2Support_uninstallerHook | ( | int | code, |
WPARAM | wParam, | ||
LPARAM | lParam ) |
References IA2InstallMap, uninstallIA2SupportForThread(), and wm_uninstallIA2Support.
Referenced by IA2Support_inProcess_terminate().
bool isSuspendableProcess | ( | ) |
References APPLICATION_USER_MODEL_ID_MAX_LENGTH, GetCurrentApplicationUserModelId(), LOG_DEBUGWARNING, and LOG_ERROR.
Referenced by IA2Support_inProcess_initialize().
bool isAppContainerProcess | ( | ) |
References LOG_DEBUGWARNING.
Referenced by IA2Support_inProcess_initialize().
void IA2Support_inProcess_initialize | ( | ) |
References IA2InstallMap, IA2Support_winEventProcHook(), isAppContainerProcess(), isIA2SupportDisabled, isSuspendableProcess(), LOG_DEBUGWARNING, and registerWinEventHook().
Referenced by inProcess_initialize().
void IA2Support_inProcess_terminate | ( | ) |
CComPtr< IAccessible2 > getIA2 | ( | const HWND | hwnd, |
const long | parentID ) |
error_status_t nvdaInProcUtils_IA2Text_findContentDescendant | ( | handle_t | bindingHandle, |
const unsigned long | windowHandle, | ||
long | parentID, | ||
long | what, | ||
long * | descendantID, | ||
long * | descendantOffset ) |
References execInThread(), findContentDescendant(), getIA2(), and LOG_DEBUGWARNING.
error_status_t nvdaInProcUtils_getTextFromIAccessible | ( | handle_t | bindingHandle, |
const unsigned long | windowHandle, | ||
long | parentID, | ||
BSTR * | outBuf, | ||
const boolean | recurse, | ||
const boolean | includeTopLevelText ) |
References execInThread(), getIA2(), getTextFromIAccessible(), LOG_DEBUG, LOG_DEBUGWARNING, and LOG_ERROR.
UINT wm_uninstallIA2Support = 0 |
bool isIA2SupportDisabled =false |
Referenced by IA2Support_inProcess_initialize().
map<DWORD, IA2InstallData> IA2InstallMap |
const long FINDCONTENTDESCENDANT_FIRST =0 |
Referenced by findContentDescendant().
const long FINDCONTENTDESCENDANT_CARET =1 |
Referenced by findContentDescendant().
const long FINDCONTENTDESCENDANT_LAST =2 |
Referenced by findContentDescendant().
const long FINDCONTENTDESCENDANT_SELECTIONSTART =3 |
Referenced by findContentDescendant().
const long FINDCONTENTDESCENDANT_SELECTIONEND =4 |
Referenced by findContentDescendant().