Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
third_party
accessibility
ax
ax_tree_data.h
Go to the documentation of this file.
1
// Copyright 2015 The Chromium Authors. All rights reserved.
2
// Use of this source code is governed by a BSD-style license that can be
3
// found in the LICENSE file.
4
5
#ifndef UI_ACCESSIBILITY_AX_TREE_DATA_H_
6
#define UI_ACCESSIBILITY_AX_TREE_DATA_H_
7
8
#include <cstdint>
9
#include <map>
10
#include <string>
11
#include <vector>
12
13
#include "
ax_enums.h
"
14
#include "
ax_export.h
"
15
#include "
ax_node.h
"
16
#include "
ax_tree_id_registry.h
"
17
18
namespace
ui
{
19
20
// The data associated with an accessibility tree that's global to the
21
// tree and not associated with any particular node in the tree.
22
struct
AX_EXPORT
AXTreeData
{
23
AXTreeData
();
24
AXTreeData
(
const
AXTreeData
& other);
25
virtual
~AXTreeData
();
26
27
// Return a string representation of this data, for debugging.
28
virtual
std::string
ToString
()
const
;
29
30
// This is a simple serializable struct. All member variables should be
31
// public and copyable.
32
33
// The globally unique ID of this accessibility tree.
34
AXTreeID
tree_id
;
35
36
// The ID of the accessibility tree that this tree is contained in, if any.
37
AXTreeID
parent_tree_id
;
38
39
// The ID of the accessibility tree that has focus. This is typically set
40
// on the root frame in a frame tree.
41
AXTreeID
focused_tree_id
;
42
43
// Attributes specific to trees that are web frames.
44
std::string
doctype
;
45
bool
loaded =
false
;
46
float
loading_progress = 0.0f;
47
std::string
mimetype
;
48
std::string
title
;
49
std::string
url
;
50
51
// The node with keyboard focus within this tree, if any, or
52
// AXNode::kInvalidAXID if no node in this tree has focus.
53
AXNode::AXID
focus_id = AXNode::kInvalidAXID;
54
55
// The current text selection within this tree, if any, expressed as the
56
// node ID and character offset of the anchor (selection start) and focus
57
// (selection end). If the offset could correspond to a position on two
58
// different lines, sel_upstream_affinity means the cursor is on the first
59
// line, otherwise it's on the second line.
60
// Most use cases will want to use ui::OwnerTree::GetUnignoredSelection.
61
bool
sel_is_backward =
false
;
62
AXNode::AXID
sel_anchor_object_id = AXNode::kInvalidAXID;
63
int32_t sel_anchor_offset = -1;
64
ax::mojom::TextAffinity
sel_anchor_affinity
;
65
AXNode::AXID
sel_focus_object_id = AXNode::kInvalidAXID;
66
int32_t sel_focus_offset = -1;
67
ax::mojom::TextAffinity
sel_focus_affinity
;
68
69
// The node that's used as the root scroller. On some platforms
70
// like Android we need to ignore accessibility scroll offsets for
71
// that node and get them from the viewport instead.
72
AXNode::AXID
root_scroller_id = AXNode::kInvalidAXID;
73
};
74
75
AX_EXPORT
bool
operator==
(
const
AXTreeData
& lhs,
const
AXTreeData
& rhs);
76
AX_EXPORT
bool
operator!=
(
const
AXTreeData
& lhs,
const
AXTreeData
& rhs);
77
78
}
// namespace ui
79
80
#endif
// UI_ACCESSIBILITY_AX_TREE_DATA_H_
ax_enums.h
ax_export.h
AX_EXPORT
#define AX_EXPORT
Definition
ax_export.h:29
ax_node.h
ax_tree_id_registry.h
ui::AXNode::AXID
int32_t AXID
Definition
ax_node.h:36
ui::AXTreeID
Definition
ax_tree_id.h:18
ax::mojom::TextAffinity
TextAffinity
Definition
ax_enums.h:1136
ui
Definition
window_binding_handler.h:18
ui::operator==
bool operator==(const AXEventIntent &a, const AXEventIntent &b)
Definition
ax_event_intent.cc:26
ui::ToString
const char * ToString(ax::mojom::Event event)
Definition
ax_enum_util.cc:9
ui::operator!=
bool operator!=(const AXEventIntent &a, const AXEventIntent &b)
Definition
ax_event_intent.cc:31
ui::AXTreeData
Definition
ax_tree_data.h:22
ui::AXTreeData::url
std::string url
Definition
ax_tree_data.h:49
ui::AXTreeData::focused_tree_id
AXTreeID focused_tree_id
Definition
ax_tree_data.h:41
ui::AXTreeData::sel_focus_affinity
ax::mojom::TextAffinity sel_focus_affinity
Definition
ax_tree_data.h:67
ui::AXTreeData::mimetype
std::string mimetype
Definition
ax_tree_data.h:47
ui::AXTreeData::doctype
std::string doctype
Definition
ax_tree_data.h:44
ui::AXTreeData::sel_anchor_affinity
ax::mojom::TextAffinity sel_anchor_affinity
Definition
ax_tree_data.h:64
ui::AXTreeData::parent_tree_id
AXTreeID parent_tree_id
Definition
ax_tree_data.h:37
ui::AXTreeData::AXTreeData
AXTreeData(const AXTreeData &other)
ui::AXTreeData::title
std::string title
Definition
ax_tree_data.h:48
ui::AXTreeData::tree_id
AXTreeID tree_id
Definition
ax_tree_data.h:34
ui::AXTreeData::~AXTreeData
virtual ~AXTreeData()
Generated on Fri Apr 26 2024 06:14:36 for Flutter Engine by
1.9.8