| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 [DartPackage="mojo_services"] | 5 [DartPackage="mojo_services"] |
| 6 module mojo.ui; | 6 module mojo.ui; |
| 7 | 7 |
| 8 import "mojo/services/ui/views/interfaces/views.mojom"; | |
| 9 import "mojo/services/ui/views/interfaces/view_associates.mojom"; | 8 import "mojo/services/ui/views/interfaces/view_associates.mojom"; |
| 10 import "mojo/services/ui/views/interfaces/view_trees.mojom"; | 9 import "mojo/services/ui/views/interfaces/view_trees.mojom"; |
| 10 import "mojo/services/ui/views/interfaces/views.mojom"; |
| 11 | 11 |
| 12 // Maximum length for a view or view tree label. | 12 // Maximum length for a view or view tree label. |
| 13 const uint32 kLabelMaxLength = 32; | 13 const uint32 kLabelMaxLength = 32; |
| 14 | 14 |
| 15 // The view manager manages trees of views which represent user interface | 15 // The view manager manages trees of views which represent user interface |
| 16 // components. | 16 // components. |
| 17 // | 17 // |
| 18 // Applications create views to describe user interface components | 18 // Applications create views to describe user interface components |
| 19 // to present content to the user and support user interaction. | 19 // to present content to the user and support user interaction. |
| 20 // | 20 // |
| (...skipping 17 matching lines...) Expand all Loading... |
| 38 // as an argument to |View.AddChild()|. | 38 // as an argument to |View.AddChild()|. |
| 39 // | 39 // |
| 40 // The |view_listener| is used to receive events from the view. | 40 // The |view_listener| is used to receive events from the view. |
| 41 // | 41 // |
| 42 // The |label| is an optional name to associate with the view for | 42 // The |label| is an optional name to associate with the view for |
| 43 // diagnostic purposes. The label will be truncated if it is longer | 43 // diagnostic purposes. The label will be truncated if it is longer |
| 44 // than |kLabelMaxLength|. | 44 // than |kLabelMaxLength|. |
| 45 // | 45 // |
| 46 // To destroy the view and cause it to be removed from the view tree, | 46 // To destroy the view and cause it to be removed from the view tree, |
| 47 // simply close the |view|, |view_listener|, or |view_owner| message pipes. | 47 // simply close the |view|, |view_listener|, or |view_owner| message pipes. |
| 48 CreateView(mojo.ui.View& view, | 48 CreateView(mojo.ui.View& view, mojo.ui.ViewOwner& view_owner, mojo.ui.ViewList
ener view_listener, string? label); |
| 49 mojo.ui.ViewOwner& view_owner, | |
| 50 mojo.ui.ViewListener view_listener, | |
| 51 string? label); | |
| 52 | 49 |
| 53 // Creates a view tree. | 50 // Creates a view tree. |
| 54 // | 51 // |
| 55 // The |view_tree| is used to configure the view tree and interact | 52 // The |view_tree| is used to configure the view tree and interact |
| 56 // with the views it contains. The view tree is private to the view | 53 // with the views it contains. The view tree is private to the view |
| 57 // and should not be shared with anyone else. | 54 // and should not be shared with anyone else. |
| 58 // | 55 // |
| 59 // The |view_tree_listener| is used to receive events from the view tree. | 56 // The |view_tree_listener| is used to receive events from the view tree. |
| 60 // | 57 // |
| 61 // The |label| is an optional name to associate with the view tree for | 58 // The |label| is an optional name to associate with the view tree for |
| 62 // diagnostic purposes. The label will be truncated if it is longer | 59 // diagnostic purposes. The label will be truncated if it is longer |
| 63 // than |kLabelMaxLength|. | 60 // than |kLabelMaxLength|. |
| 64 // | 61 // |
| 65 // To destroy the view tree simply close the |view_tree| or | 62 // To destroy the view tree simply close the |view_tree| or |
| 66 // |view_tree_listener| message pipes. | 63 // |view_tree_listener| message pipes. |
| 67 CreateViewTree(mojo.ui.ViewTree& view_tree, | 64 CreateViewTree(mojo.ui.ViewTree& view_tree, mojo.ui.ViewTreeListener view_tree
_listener, string? label); |
| 68 mojo.ui.ViewTreeListener view_tree_listener, | |
| 69 string? label); | |
| 70 }; | 65 }; |
| OLD | NEW |