huangcm
2025-08-30 0269911b91ed7e03c24005924cc6423abf245fb8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// Copyright 2018 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
 
library fuchsia.ui.views;
 
using fuchsia.ui.gfx;
 
union Event {
  ChildViewAttachedEvent child_view_attached;
  ChildViewUnavailableEvent child_view_unavailable;
};
 
// Called when a child view is attached.
struct ChildViewAttachedEvent {
  uint32 view_holder_id;
};
 
// Called when a child view has become unavailable.
//
// A child may become unavailable for many reasons such being unregistered
// by its application, abnormal termination of its application, or
// cycles being introduced in the view tree.
//
// To complete removal of an unavailable child, this view component must
// call RemoveChild() on its view with |child_key|.
//
// The implementation should invoke the callback once the event has
// been handled.
struct ChildViewUnavailableEvent {
  uint32 view_holder_id;
};