1 // Copyright 2013 The Chromium 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.
5 import "sample_import.mojom"
6 import "sample_import2.mojom"
8 [JavaPackage="org.chromium.mojo.bindings.test"]
13 TYPE_VERTICAL = 1 << 0,
14 TYPE_HORIZONTAL = (1 << 1) + 0,
15 TYPE_BOTH = TYPE_VERTICAL | TYPE_HORIZONTAL,
18 uint8 alpha = (0x100 - 1) @0;
21 Type type = sample.Bar.TYPE_VERTICAL @3;
26 string name = "Fooby" @8;
34 uint8[] data = [1,2,3] @6;
35 handle<message_pipe> source @9;
36 handle<data_pipe_consumer>[] input_streams @10;
37 handle<data_pipe_producer>[] output_streams @11;
38 bool[][] array_of_array_of_bools @12;
41 struct DefaultsTestInner {
43 string[] names = ["Jim"] @1;
44 int32 height = 6*12 @3;
48 sample.DefaultsTestInner[] people = [{32, ["Bob", "Bobby"]}] @1;
49 uint8[] data = [1, 2, 3] @2;
50 imported.Point point = {7, 15} @3;
51 int32[] shape_masks = [1 << imported.SHAPE_RECTANGLE] @4;
52 imported.Thing thing = {imported.SHAPE_CIRCLE, imported.COLOR_BLACK};
53 Bar.Type bar_type = Bar.TYPE_BOTH;
56 [Client=ServiceClient]
62 Frobinate@0(Foo foo @0, BazOptions baz @1, Port port @2);
65 interface ServiceClient {
66 DidFrobinate@0(int32 result @0);
69 // This interface is referenced above where it is defined. It also refers to
70 // itself from a method.
72 PostMessage@0(string message_text @0, Port port@1);