class SemanticTree
Defined at line 4535 of file fidling/gen/sdk/fidl/fuchsia.accessibility.semantics/fuchsia.accessibility.semantics/hlcpp/fuchsia/accessibility/semantics/cpp/fidl.h
Interface to update the semantic tree for a particular view. Nodes can be added, updated or
deleted. Because the size of an update may exceed FIDL transfer limits, clients are responsible
for breaking up changes into multiple update and delete calls that conform to these limits. The
commit function must always be called at the end of a full update push to signal the end of an
update.
The client may make several calls to UpdateSemanticNodes(...) or DeleteSemanticNodes(...)
before calling CommitUpdates(), and must wait for the semantics manager to reply to the
CommitUpdates() method to know whether an update has been processed. This allows the client to
break up a set of changes (e.g. a re-computed semantic tree) to the semantic tree into
FIDL-compatible chunks, but commit them all at once.
If the semantics manager ever receives inconsistent state from the client, such as an
invalid tree or unrecognized parent node id, the server will close the channel. The client is
responsible for reconnecting and re-sending its state from scratch.
Public Methods
void ~SemanticTree ()
void UpdateSemanticNodes (::std::vector< ::fuchsia::accessibility::semantics::Node> nodes)
Sends new/updated nodes to the root to add to the cache on the next commit.
void DeleteSemanticNodes (::std::vector<uint32_t> node_ids)
Tells the root to remove nodes with node_ids from the semantic tree on the next commit.
void CommitUpdates (CommitUpdatesCallback callback)
Commits pending changes to node tree associated with the view using UpdateSemanticNodes and
DeleteSemanticNodes. Updates are processed in the order in which they are received. If the
committed updates result in an ill-formed tree (for example a missing root node or a cycle)
the semantic manager will close the channel.
void SendSemanticEvent (::fuchsia::accessibility::semantics::SemanticEvent semantic_event, SendSemanticEventCallback callback)
Sends a Semantic Event related to this tree. This applies immediately
and does not wait for CommitUpdates(). It is the caller's
responsibility to fire events on nodes that have been already commited.
The return callback is invoked to acknowledge that the event was received.