5#ifndef UI_ACCESSIBILITY_AX_EVENT_GENERATOR_H_
6#define UI_ACCESSIBILITY_AX_EVENT_GENERATOR_H_
29 ACTIVE_DESCENDANT_CHANGED,
34 ATK_TEXT_OBJECT_ATTRIBUTE_CHANGED,
36 AUTO_COMPLETE_CHANGED,
38 CHECKED_STATE_CHANGED,
45 DOCUMENT_SELECTION_CHANGED,
46 DOCUMENT_TITLE_CHANGED,
55 HIERARCHICAL_LEVEL_CHANGED,
57 IMAGE_ANNOTATION_CHANGED,
58 INVALID_STATUS_CHANGED,
59 KEY_SHORTCUTS_CHANGED,
65 LIVE_REGION_NODE_CHANGED,
66 LIVE_RELEVANT_CHANGED,
71 MULTILINE_STATE_CHANGED,
72 MULTISELECTABLE_STATE_CHANGED,
74 OBJECT_ATTRIBUTE_CHANGED,
75 OTHER_ATTRIBUTE_CHANGED,
78 POSITION_IN_SET_CHANGED,
81 REQUIRED_STATE_CHANGED,
84 SCROLL_HORIZONTAL_POSITION_CHANGED,
85 SCROLL_VERTICAL_POSITION_CHANGED,
87 SELECTED_CHILDREN_CHANGED,
92 TEXT_ATTRIBUTE_CHANGED,
101 WIN_IACCESSIBLE_STATE_CHANGED,
111 const std::vector<AXEventIntent>& event_intents);
129 :
public std::iterator<std::input_iterator_tag, TargetedEvent> {
142 const std::map<AXNode*, std::set<EventParams>>& map_;
143 std::map<AXNode*, std::set<EventParams>>::const_iterator map_iter_;
144 std::set<EventParams>::const_iterator set_iter_;
156 std::bitset<static_cast<size_t>(IgnoredChangedState::kCount)>;
176 void SetTree(
AXTree* new_tree);
182 return Iterator(tree_events_, tree_events_.begin());
199 always_fire_load_complete_ = val;
204 void OnNodeDataChanged(
AXTree* tree,
207 void OnRoleChanged(
AXTree* tree,
211 void OnStateChanged(
AXTree* tree,
214 bool new_value)
override;
215 void OnStringAttributeChanged(
AXTree* tree,
218 const std::string& old_value,
219 const std::string& new_value)
override;
220 void OnIntAttributeChanged(
AXTree* tree,
224 int32_t new_value)
override;
225 void OnFloatAttributeChanged(
AXTree* tree,
229 float new_value)
override;
230 void OnBoolAttributeChanged(
AXTree* tree,
233 bool new_value)
override;
234 void OnIntListAttributeChanged(
238 const std::vector<int32_t>& old_value,
239 const std::vector<int32_t>& new_value)
override;
240 void OnTreeDataChanged(
AXTree* tree,
243 void OnNodeWillBeDeleted(
AXTree* tree,
AXNode* node)
override;
244 void OnSubtreeWillBeDeleted(
AXTree* tree,
AXNode* node)
override;
245 void OnNodeWillBeReparented(
AXTree* tree,
AXNode* node)
override;
246 void OnSubtreeWillBeReparented(
AXTree* tree,
AXNode* node)
override;
247 void OnAtomicUpdateFinished(
AXTree* tree,
249 const std::vector<Change>& changes)
override;
252 void FireLiveRegionEvents(
AXNode* node);
253 void FireActiveDescendantEvents();
254 void FireRelationSourceEvents(
AXTree* tree,
AXNode* target_node);
255 bool ShouldFireLoadEvents(
AXNode* node);
270 void TrimEventsDueToAncestorIgnoredChanged(
272 std::map<AXNode*, IgnoredChangedStatesBitset>&
273 ancestor_ignored_changed_map);
274 void PostprocessEvents();
280 static std::vector<int32_t> ComputeIntListDifference(
281 const std::vector<int32_t>& lhs,
282 const std::vector<int32_t>& rhs);
285 std::map<AXNode*, std::set<EventParams>> tree_events_;
289 std::vector<AXNode*> active_descendant_changed_;
291 bool always_fire_load_complete_ =
false;
Iterator(const Iterator &other)
void set_always_fire_load_complete(bool val)
~AXEventGenerator() override
std::bitset< static_cast< size_t >(IgnoredChangedState::kCount)> IgnoredChangedStatesBitset
static bool is_readonly(const InterfaceBlock &block)
constexpr Color operator*(T value, const Color &c)
SI auto map(std::index_sequence< I... >, Fn &&fn, const Args &... args) -> skvx::Vec< sizeof...(I), decltype(fn(args[0]...))>
bool operator==(const AXEventIntent &a, const AXEventIntent &b)
const char * ToString(ax::mojom::Event event)
std::ostream & operator<<(std::ostream &os, AXEventGenerator::Event event)
bool operator!=(const AXEventIntent &a, const AXEventIntent &b)
bool operator<(const AXPosition< AXPositionType, AXNodeType > &first, const AXPosition< AXPositionType, AXNodeType > &second)
static Target * is_enabled(Benchmark *bench, const Config &config)
ax::mojom::EventFrom event_from
std::vector< AXEventIntent > event_intents
const EventParams & event_params