1// Copyright 2018 The Fuchsia 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
5library fidl.examples.test;
6
7struct Point {
8    int32 x;
9    int32 y;
10};
11
12enum Direction : uint32 {
13    Up = 0;
14    Down = 1;
15    Left = 2;
16    Right = 3;
17};
18
19struct ArraysOfPoints {
20    array<Point>:4 p;
21    ArraysOfPoints? more_points;
22};
23
24struct VectorOfPoints {
25    vector<Point>:4 p;
26};
27
28struct VectorOfDirections {
29    vector<Direction>:4 d;
30};
31
32union Points {
33    Point one_point;
34    ArraysOfPoints many_points;
35};
36
37const uint32 NumberOfDirections = 4;
38
39interface Drawing {
40    1: Draw(Point p, Direction d);
41    2: DrawLots(Points ps);
42    3: -> DrawSucceeded(uint32 draws);
43};
44