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_update_builder.h" 6 7 #include <memory> 8 9 #include "flutter/lib/ui/painting/matrix.h" 10 11 namespace flutter { 12 13 IMPLEMENT_WRAPPERTYPEINFO(ui, SemanticsUpdate); 14 15 #define FOR_EACH_BINDING(V) V(SemanticsUpdate, dispose) 16 DART_BIND_ALL(SemanticsUpdate,FOR_EACH_BINDING)17DART_BIND_ALL(SemanticsUpdate, FOR_EACH_BINDING) 18 19 fml::RefPtr<SemanticsUpdate> SemanticsUpdate::create( 20 SemanticsNodeUpdates nodes, 21 CustomAccessibilityActionUpdates actions) { 22 return fml::MakeRefCounted<SemanticsUpdate>(std::move(nodes), 23 std::move(actions)); 24 } 25 SemanticsUpdate(SemanticsNodeUpdates nodes,CustomAccessibilityActionUpdates actions)26SemanticsUpdate::SemanticsUpdate(SemanticsNodeUpdates nodes, 27 CustomAccessibilityActionUpdates actions) 28 : nodes_(std::move(nodes)), actions_(std::move(actions)) {} 29 30 SemanticsUpdate::~SemanticsUpdate() = default; 31 takeNodes()32SemanticsNodeUpdates SemanticsUpdate::takeNodes() { 33 return std::move(nodes_); 34 } 35 takeActions()36CustomAccessibilityActionUpdates SemanticsUpdate::takeActions() { 37 return std::move(actions_); 38 } 39 dispose()40void SemanticsUpdate::dispose() { 41 ClearDartWrapper(); 42 } 43 44 } // namespace flutter 45