NVDA Helper
In-process and lite high-speed utilities for NVDA
utils.h File Reference
#include <concepts>
#include <vector>
#include <algorithm>
#include <ranges>
#include <variant>
#include <uiautomation.h>
#include <comutil.h>

Go to the source code of this file.

Concepts

concept  supports_alternative
 

Functions

std::vector< intSafeArrayToVector (SAFEARRAY *pSafeArray)
 creates a vector of ints from a SAFEARRAY.
 
std::vector< intgetRuntimeIDFromElement (IUIAutomationElement *pElement)
 Fetches the runtimeID from a given uI Automation element.
 
template<typename T , typename V , std::size_t... indexes>
constexpr bool supports_alternative_impl (std::index_sequence< indexes... >)
 

Function Documentation

◆ SafeArrayToVector()

std::vector< int > SafeArrayToVector ( SAFEARRAY * pSafeArray)

creates a vector of ints from a SAFEARRAY.

Parameters
pSafeArray
Returns
the vector of ints.

References HRESULT().

Referenced by getRuntimeIDFromElement().

◆ getRuntimeIDFromElement()

std::vector< int > getRuntimeIDFromElement ( IUIAutomationElement * pElement)

Fetches the runtimeID from a given uI Automation element.

Parameters
pElementthe UI Automation element whose runtime ID should be fetched.
Returns
the runtime ID from the element.

References HRESULT(), and SafeArrayToVector().

Referenced by ActiveTextPositionChangedEventRecord_t::generateCoalescingKey(), AutomationEventRecord_t::generateCoalescingKey(), FocusChangedEventRecord_t::generateCoalescingKey(), NotificationEventRecord_t::generateCoalescingKey(), and PropertyChangedEventRecord_t::generateCoalescingKey().

◆ supports_alternative_impl()

template<typename T , typename V , std::size_t... indexes>
bool supports_alternative_impl ( std::index_sequence< indexes... > )
constexpr