Flutter Engine
The Flutter Engine
ax_action_data.h
Go to the documentation of this file.
1// Copyright 2016 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_ACTION_DATA_H_
6#define UI_ACCESSIBILITY_AX_ACTION_DATA_H_
7
8#include "ax_enums.h"
9#include "ax_export.h"
10#include "ax_tree_id.h"
11#include "gfx/geometry/point.h"
12#include "gfx/geometry/rect.h"
13
14namespace ui {
15
16// A compact representation of an accessibility action and the arguments
17// associated with that action.
22
23 // This is a simple serializable struct. All member variables should be
24 // public and copyable.
25
26 // See the ax::mojom::Action enums in ax_enums.mojom for explanations of which
27 // parameters apply.
28
29 // The action to take.
31
32 // The ID of the tree that this action should be performed on.
34
35 // The source extension id (if any) of this action.
37
38 // The ID of the node that this action should be performed on.
39 int target_node_id = -1;
40
41 // The request id of this action tracked by the client.
42 int request_id = -1;
43
44 // Use enums from ax::mojom::ActionFlags
45 int flags = 0;
46
47 // For an action that creates a selection, the selection anchor and focus
48 // (see ax_tree_data.h for definitions).
49 int anchor_node_id = -1;
50 int anchor_offset = -1;
51
52 int focus_node_id = -1;
53 int focus_offset = -1;
54
55 // Start index of the text which should be queried for.
56 int32_t start_index = -1;
57
58 // End index of the text which should be queried for.
59 int32_t end_index = -1;
60
61 // For custom action.
62 int custom_action_id = -1;
63
64 // The target rect for the action.
66
67 // The target point for the action.
69
70 // The new value for a node, for the SET_VALUE action. UTF-8 encoded.
71 std::string value;
72
73 // The event to fire in response to a HIT_TEST action.
75
76 // The scroll alignment to use for a SCROLL_TO_MAKE_VISIBLE action. The
77 // scroll alignment controls where a node is scrolled within the viewport.
80
81 // The behavior to use for a SCROLL_TO_MAKE_VISIBLE. This controls whether or
82 // not the viewport is scrolled when the node is already visible.
84};
85
86} // namespace ui
87
88#endif // UI_ACCESSIBILITY_AX_ACTION_DATA_H_
#define AX_EXPORT
Definition: ax_export.h:29
Definition: rect.h:36
FlutterSemanticsFlag flags
ScrollBehavior
Definition: ax_enums.h:475
ScrollAlignment
Definition: ax_enums.h:460
const AXTreeID & AXTreeIDUnknown()
Definition: ax_tree_id.cc:103
ax::mojom::ScrollBehavior scroll_behavior
std::string value
ax::mojom::ScrollAlignment vertical_scroll_alignment
std::string source_extension_id
ax::mojom::Event hit_test_event_to_fire
gfx::Rect target_rect
AXActionData(const AXActionData &other)
ax::mojom::Action action
gfx::Point target_point
ax::mojom::ScrollAlignment horizontal_scroll_alignment