NVDA Helper
In-process and lite high-speed utilities for NVDA
IA2Support.cpp File Reference
#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, IA2InstallDataIA2InstallMap
 
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
 

Macro Definition Documentation

◆ WIN32_LEAN_AND_MEAN

#define WIN32_LEAN_AND_MEAN

◆ APPLICATION_USER_MODEL_ID_MAX_LENGTH

#define APPLICATION_USER_MODEL_ID_MAX_LENGTH   131

Referenced by isSuspendableProcess().

Function Documentation

◆ GetCurrentApplicationUserModelId()

LONG WINAPI GetCurrentApplicationUserModelId ( UINT32 * pBufSize,
PWSTR buf )

Referenced by isSuspendableProcess().

◆ installIA2Support()

bool installIA2Support ( )

◆ installIA2SupportForThread()

pair< map< DWORD, IA2InstallData >::iterator, bool > installIA2SupportForThread ( DWORD threadID)

◆ uninstallIA2Support()

bool uninstallIA2Support ( )

◆ uninstallIA2SupportForThread()

bool uninstallIA2SupportForThread ( DWORD threadID)

◆ IA2Support_winEventProcHook()

void CALLBACK IA2Support_winEventProcHook ( HWINEVENTHOOK hookID,
DWORD eventID,
HWND hwnd,
long objectID,
long childID,
DWORD threadID,
DWORD time )

◆ IA2Support_uninstallerHook()

LRESULT CALLBACK IA2Support_uninstallerHook ( int code,
WPARAM wParam,
LPARAM lParam )

◆ isSuspendableProcess()

◆ isAppContainerProcess()

bool isAppContainerProcess ( )

◆ IA2Support_inProcess_initialize()

◆ IA2Support_inProcess_terminate()

◆ findContentDescendant()

◆ getIA2()

CComPtr< IAccessible2 > getIA2 ( const HWND hwnd,
const long parentID )

◆ nvdaInProcUtils_IA2Text_findContentDescendant()

error_status_t nvdaInProcUtils_IA2Text_findContentDescendant ( handle_t bindingHandle,
const unsigned long windowHandle,
long parentID,
long what,
long * descendantID,
long * descendantOffset )

◆ nvdaInProcUtils_getTextFromIAccessible()

error_status_t nvdaInProcUtils_getTextFromIAccessible ( handle_t bindingHandle,
const unsigned long windowHandle,
long parentID,
BSTR * outBuf,
const boolean recurse,
const boolean includeTopLevelText )

Variable Documentation

◆ wm_uninstallIA2Support

◆ isIA2SupportDisabled

bool isIA2SupportDisabled =false

◆ IA2InstallMap

◆ FINDCONTENTDESCENDANT_FIRST

const long FINDCONTENTDESCENDANT_FIRST =0

Referenced by findContentDescendant().

◆ FINDCONTENTDESCENDANT_CARET

const long FINDCONTENTDESCENDANT_CARET =1

Referenced by findContentDescendant().

◆ FINDCONTENTDESCENDANT_LAST

const long FINDCONTENTDESCENDANT_LAST =2

Referenced by findContentDescendant().

◆ FINDCONTENTDESCENDANT_SELECTIONSTART

const long FINDCONTENTDESCENDANT_SELECTIONSTART =3

Referenced by findContentDescendant().

◆ FINDCONTENTDESCENDANT_SELECTIONEND

const long FINDCONTENTDESCENDANT_SELECTIONEND =4

Referenced by findContentDescendant().