OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 module mojo { | 5 module mojo { |
6 | 6 |
7 struct Point { | 7 struct Point { |
8 float x; | 8 float x; |
9 float y; | 9 float y; |
10 }; | 10 }; |
(...skipping 19 matching lines...) Expand all Loading... |
30 | 30 |
31 struct Event { | 31 struct Event { |
32 int32 action; | 32 int32 action; |
33 int32 flags; | 33 int32 flags; |
34 int64 time_stamp; | 34 int64 time_stamp; |
35 Point location; | 35 Point location; |
36 KeyData key_data; | 36 KeyData key_data; |
37 TouchData touch_data; | 37 TouchData touch_data; |
38 }; | 38 }; |
39 | 39 |
40 [Peer=NativeViewportClient] | 40 [Client=NativeViewportClient] |
41 interface NativeViewport { | 41 interface NativeViewport { |
42 Create(Rect bounds); | 42 Create(Rect bounds); |
43 Show(); | 43 Show(); |
44 Hide(); | 44 Hide(); |
45 Close(); | 45 Close(); |
46 SetBounds(Rect bounds); | 46 SetBounds(Rect bounds); |
47 CreateGLES2Context(handle<message_pipe> gles2_client); | 47 CreateGLES2Context(handle<message_pipe> gles2_client); |
48 }; | 48 }; |
49 | 49 |
50 [Peer=NativeViewport] | |
51 interface NativeViewportClient { | 50 interface NativeViewportClient { |
52 OnCreated(); | 51 OnCreated(); |
53 OnBoundsChanged(Rect bounds); | 52 OnBoundsChanged(Rect bounds); |
54 OnDestroyed(); | 53 OnDestroyed(); |
55 OnEvent(Event event) => (); | 54 OnEvent(Event event) => (); |
56 }; | 55 }; |
57 | 56 |
58 } | 57 } |
OLD | NEW |