OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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.services.view_manager { | 5 module mojo.services.view_manager { |
6 | 6 |
7 struct INode { | 7 struct INode { |
8 uint32 parent_id; | 8 uint32 parent_id; |
9 uint32 node_id; | 9 uint32 node_id; |
10 uint32 view_id; | 10 uint32 view_id; |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 | 46 |
47 // Creates a new view with the specified id. It is up to the client to ensure | 47 // Creates a new view with the specified id. It is up to the client to ensure |
48 // the id is unique to the connection (the id need not be globally unique). | 48 // the id is unique to the connection (the id need not be globally unique). |
49 CreateView(uint16 view_id) => (bool success); | 49 CreateView(uint16 view_id) => (bool success); |
50 | 50 |
51 // Deletes the view with the specified id. | 51 // Deletes the view with the specified id. |
52 DeleteView(uint32 view_id, uint32 change_id) => (bool success); | 52 DeleteView(uint32 view_id, uint32 change_id) => (bool success); |
53 | 53 |
54 // Sets the view a node is showing. | 54 // Sets the view a node is showing. |
55 SetView(uint32 node_id, uint32 view_id, uint32 change_id) => (bool success); | 55 SetView(uint32 node_id, uint32 view_id, uint32 change_id) => (bool success); |
56 | |
57 // Shows the specified image (png encoded) in the specified view. | |
58 SetViewContents(uint32 view_id, | |
59 handle<shared_buffer> buffer, | |
60 uint32 buffer_size); | |
61 }; | 56 }; |
62 | 57 |
63 [Peer=IViewManager] | 58 [Peer=IViewManager] |
64 interface IViewManagerClient { | 59 interface IViewManagerClient { |
65 // Invoked once the connection has been established. |connection_id| is the id | 60 // Invoked once the connection has been established. |connection_id| is the id |
66 // used to uniquely identify the connection. | 61 // used to uniquely identify the connection. |
67 OnConnectionEstablished(uint16 connection_id); | 62 OnConnectionEstablished(uint16 connection_id); |
68 | 63 |
69 // Invoked when a change is done to the hierarchy. A value of 0 is used to | 64 // Invoked when a change is done to the hierarchy. A value of 0 is used to |
70 // identify a null node. For example, if the old_parent is NULL, 0 is | 65 // identify a null node. For example, if the old_parent is NULL, 0 is |
71 // supplied. See description above ViewManager for details on |change_id|. | 66 // supplied. See description above ViewManager for details on |change_id|. |
72 OnNodeHierarchyChanged(uint32 node, | 67 OnNodeHierarchyChanged(uint32 node, |
73 uint32 new_parent, | 68 uint32 new_parent, |
74 uint32 old_parent, | 69 uint32 old_parent, |
75 uint32 change_id); | 70 uint32 change_id); |
76 | 71 |
77 // Invoked when the view associated with a node is replaced by another view. | 72 // Invoked when the view associated with a node is replaced by another view. |
78 // 0 is used to identify a null view. | 73 // 0 is used to identify a null view. |
79 OnNodeViewReplaced(uint32 node, | 74 OnNodeViewReplaced(uint32 node, |
80 uint32 new_view_id, | 75 uint32 new_view_id, |
81 uint32 old_view_id, | 76 uint32 old_view_id, |
82 uint32 change_id); | 77 uint32 change_id); |
83 }; | 78 }; |
84 | 79 |
85 } | 80 } |
OLD | NEW |