1// Copyright 2013 The Flutter 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#include "flutter/lib/ui/semantics/semantics_node.h"
6
7#include <string.h>
8
9namespace flutter {
10
11constexpr int32_t kMinPlatformViewId = -1;
12
13SemanticsNode::SemanticsNode() = default;
14
15SemanticsNode::SemanticsNode(const SemanticsNode& other) = default;
16
17SemanticsNode::~SemanticsNode() = default;
18
19bool SemanticsNode::HasAction(SemanticsAction action) const {
20 return (actions & static_cast<int32_t>(action)) != 0;
21}
22
23bool SemanticsNode::HasFlag(SemanticsFlags flag) const {
24 return (flags & static_cast<int32_t>(flag)) != 0;
25}
26
27bool SemanticsNode::IsPlatformViewNode() const {
28 return platformViewId > kMinPlatformViewId;
29}
30
31} // namespace flutter
32