Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::view::uia Namespace Reference

Classes

struct  PatternSet
 Pattern IDs the provider should advertise for a given role. More...
struct  RuntimeId
 Build the two-element runtime-id key for the fragment at index (its depth-first position among accessible fragments, root excluded). More...

Functions

constexpr int32_t role_to_control_type (View::AccessRole role)
 Map a Pulp AccessRole to the best-fit UIA control type.
constexpr PatternSet patterns_for_role (View::AccessRole role)
constexpr bool role_supports_range_value (View::AccessRole role)
 True if a role's pattern set advertises the RangeValue pattern, i.e.
constexpr bool role_supports_value (View::AccessRole role)
 True if a role advertises the Value pattern (IValueProvider).
constexpr bool exposes_range_value (View::AccessRole role, bool has_value_interface)
 IRangeValueProvider needs numeric min/max/current — i.e.
constexpr bool exposes_value (View::AccessRole role, bool has_value_interface, bool has_text_interface, bool has_value_string)
 IValueProvider::get_Value needs SOME string: a value interface's display string, a text interface's content, or the app-set access_value slot.
constexpr bool is_read_only (View::AccessRole role, bool has_value_interface, bool has_editable_text_interface)
 IsReadOnly must mean exactly "SetValue will fail".
constexpr RuntimeId runtime_id_for_index (int index)
constexpr double normalized_value_fraction (double current, double lo, double hi)
 Clamp a raw value into [lo, hi] then map to the [0, 1] fraction UIA's Value pattern reports for a range control when no value-string is available.

Variables

constexpr int32_t kControlTypeButton = 50000
constexpr int32_t kControlTypeCheckBox = 50002
constexpr int32_t kControlTypeComboBox = 50003
constexpr int32_t kControlTypeEdit = 50004
constexpr int32_t kControlTypeHyperlink = 50005
constexpr int32_t kControlTypeImage = 50006
constexpr int32_t kControlTypeListItem = 50007
constexpr int32_t kControlTypeList = 50008
constexpr int32_t kControlTypeMenu = 50009
constexpr int32_t kControlTypeMenuItem = 50011
constexpr int32_t kControlTypeProgressBar = 50012
constexpr int32_t kControlTypeRadioButton = 50013
constexpr int32_t kControlTypeScrollBar = 50014
constexpr int32_t kControlTypeSlider = 50015
constexpr int32_t kControlTypeTab = 50018
constexpr int32_t kControlTypeTabItem = 50019
constexpr int32_t kControlTypeText = 50020
constexpr int32_t kControlTypeCustom = 50025
constexpr int32_t kControlTypeGroup = 50026
constexpr int32_t kControlTypeDataItem = 50029
constexpr int32_t kControlTypeWindow = 50032
constexpr int32_t kControlTypeTable = 50036
constexpr int32_t kPatternValue = 10002
constexpr int32_t kPatternRangeValue = 10003
constexpr int32_t kUiaAppendRuntimeId = 3

Function Documentation

◆ exposes_range_value()

bool pulp::view::uia::exposes_range_value ( View::AccessRole role,
bool has_value_interface )
constexpr

IRangeValueProvider needs numeric min/max/current — i.e.

the View must implement AccessibilityValueInterface.

◆ exposes_value()

bool pulp::view::uia::exposes_value ( View::AccessRole role,
bool has_value_interface,
bool has_text_interface,
bool has_value_string )
constexpr

IValueProvider::get_Value needs SOME string: a value interface's display string, a text interface's content, or the app-set access_value slot.

◆ is_read_only()

bool pulp::view::uia::is_read_only ( View::AccessRole role,
bool has_value_interface,
bool has_editable_text_interface )
constexpr

IsReadOnly must mean exactly "SetValue will fail".

The provider can write through an AccessibilityValueInterface (on a role that advertises Value — a meter is read-only by role) or through an editable AccessibilityTextInterface. Anything else is read-only. Reporting VARIANT_FALSE ("editable") while SetValue returns UIA_E_NOTSUPPORTED told Narrator the field was editable and then rejected every edit.

◆ normalized_value_fraction()

double pulp::view::uia::normalized_value_fraction ( double current,
double lo,
double hi )
constexpr

Clamp a raw value into [lo, hi] then map to the [0, 1] fraction UIA's Value pattern reports for a range control when no value-string is available.

Degenerate ranges (hi <= lo) report 0. Pure arithmetic so the COM IValueProvider path stays trivial and is covered offline.

◆ patterns_for_role()

PatternSet pulp::view::uia::patterns_for_role ( View::AccessRole role)
constexpr

◆ role_supports_range_value()

bool pulp::view::uia::role_supports_range_value ( View::AccessRole role)
constexpr

True if a role's pattern set advertises the RangeValue pattern, i.e.

the per-widget fragment MAY expose IRangeValueProvider. Pure helper so the COM provider and the offline test agree on which roles are range roles.

◆ role_supports_value()

bool pulp::view::uia::role_supports_value ( View::AccessRole role)
constexpr

True if a role advertises the Value pattern (IValueProvider).

A slider exposes both Value and RangeValue per Win UIA convention so a reader can announce either a string ("-6 dB") or the normalized fraction. Meter is read-only progress and exposes RangeValue only.

◆ role_to_control_type()

int32_t pulp::view::uia::role_to_control_type ( View::AccessRole role)
constexpr

Map a Pulp AccessRole to the best-fit UIA control type.

Unknown / none → CustomControlType (the UIA spec's escape hatch).

◆ runtime_id_for_index()

RuntimeId pulp::view::uia::runtime_id_for_index ( int index)
constexpr

Variable Documentation

◆ kControlTypeButton

int32_t pulp::view::uia::kControlTypeButton = 50000
inlineconstexpr

◆ kControlTypeCheckBox

int32_t pulp::view::uia::kControlTypeCheckBox = 50002
inlineconstexpr

◆ kControlTypeComboBox

int32_t pulp::view::uia::kControlTypeComboBox = 50003
inlineconstexpr

◆ kControlTypeCustom

int32_t pulp::view::uia::kControlTypeCustom = 50025
inlineconstexpr

◆ kControlTypeDataItem

int32_t pulp::view::uia::kControlTypeDataItem = 50029
inlineconstexpr

◆ kControlTypeEdit

int32_t pulp::view::uia::kControlTypeEdit = 50004
inlineconstexpr

◆ kControlTypeGroup

int32_t pulp::view::uia::kControlTypeGroup = 50026
inlineconstexpr

◆ kControlTypeHyperlink

int32_t pulp::view::uia::kControlTypeHyperlink = 50005
inlineconstexpr

◆ kControlTypeImage

int32_t pulp::view::uia::kControlTypeImage = 50006
inlineconstexpr

◆ kControlTypeList

int32_t pulp::view::uia::kControlTypeList = 50008
inlineconstexpr

◆ kControlTypeListItem

int32_t pulp::view::uia::kControlTypeListItem = 50007
inlineconstexpr

◆ kControlTypeMenu

int32_t pulp::view::uia::kControlTypeMenu = 50009
inlineconstexpr

◆ kControlTypeMenuItem

int32_t pulp::view::uia::kControlTypeMenuItem = 50011
inlineconstexpr

◆ kControlTypeProgressBar

int32_t pulp::view::uia::kControlTypeProgressBar = 50012
inlineconstexpr

◆ kControlTypeRadioButton

int32_t pulp::view::uia::kControlTypeRadioButton = 50013
inlineconstexpr

◆ kControlTypeScrollBar

int32_t pulp::view::uia::kControlTypeScrollBar = 50014
inlineconstexpr

◆ kControlTypeSlider

int32_t pulp::view::uia::kControlTypeSlider = 50015
inlineconstexpr

◆ kControlTypeTab

int32_t pulp::view::uia::kControlTypeTab = 50018
inlineconstexpr

◆ kControlTypeTabItem

int32_t pulp::view::uia::kControlTypeTabItem = 50019
inlineconstexpr

◆ kControlTypeTable

int32_t pulp::view::uia::kControlTypeTable = 50036
inlineconstexpr

◆ kControlTypeText

int32_t pulp::view::uia::kControlTypeText = 50020
inlineconstexpr

◆ kControlTypeWindow

int32_t pulp::view::uia::kControlTypeWindow = 50032
inlineconstexpr

◆ kPatternRangeValue

int32_t pulp::view::uia::kPatternRangeValue = 10003
inlineconstexpr

◆ kPatternValue

int32_t pulp::view::uia::kPatternValue = 10002
inlineconstexpr

◆ kUiaAppendRuntimeId

int32_t pulp::view::uia::kUiaAppendRuntimeId = 3
inlineconstexpr