blob: cec39bf1a146423c3d822f32bbc014d763ec87a8 [file]
// 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 banjo.examples.simple;
using zx;
type Point = struct {
x int32;
y int32;
};
type StructWithZxField = struct {
status zx.status;
};
type Direction = strict enum : uint32 {
Up = 0;
Down = 1;
Left = 2;
Right = 3;
};
@transport("Banjo")
@banjo_layout("ddk-protocol")
protocol Drawing {
Draw(struct {
p Point;
d Direction;
}) -> ();
DrawLots(resource struct {
commands zx.handle:VMO;
}) -> (struct {
result zx.status;
p Point;
});
DrawArray(struct {
points array<Point, 4>;
}) -> (struct {
rv zx.status;
});
Describe(struct {
one string:64;
}) -> (struct {
two string:128;
});
};