| // 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.viewsv1; |
| |
| using fuchsia.ui.viewsv1token; |
| using fuchsia.mem; |
| |
| // Defines an interface to take view snapshots. |
| [Discoverable] |
| interface ViewSnapshot { |
| // TODO(SCN-1019): Use zx::eventpair instead of koid. |
| // Takes a snapshot of a view and returns it in a callback. |
| // |
| // The |view_koid| identifies the view whose snapshot needs to be taken. |
| // |
| // The callback is invoked with the VMO buffer containing the snapshot. |
| // If successful, the buffer size is non-zero, otherwise it is 0. |
| 1: TakeSnapshot(uint64 view_koid) -> |
| (fuchsia.mem.Buffer snapshot); |
| }; |