d3b98e37fee800707b223a339f837d646afa97c4
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / internal / XamlBinding / INavigation.cs
1 using System.Collections.Generic;
2 using System.Threading.Tasks;
3 using System.ComponentModel;
4
5 namespace Tizen.NUI.Binding
6 {
7     /// <summary>
8     /// Interface abstracting platform-specific navigation.
9     /// </summary>
10     [EditorBrowsable(EditorBrowsableState.Never)]
11     internal interface INavigation
12     {
13         /// <summary>
14         /// Gets the modal navigation stack.
15         /// </summary>
16         IReadOnlyList<Page> ModalStack { get; }
17
18         /// <summary>
19         /// Gets the stack of pages in the navigation.
20         /// </summary>
21         IReadOnlyList<Page> NavigationStack { get; }
22
23         /// <summary>
24         /// Inserts a page in the navigation stack before an existing page in the stack.
25         /// </summary>
26         /// <param name="page">The page to add.</param>
27         /// <param name="before">The existing page, before which page will be inserted.</param>
28         void InsertPageBefore(Page page, Page before);
29
30         /// <summary>
31         /// Asynchronously removes the most recent Page from the navigation stack.
32         /// </summary>
33         /// <returns>The Page that had been at the top of the navigation stack.</returns>
34         Task<Page> PopAsync();
35
36         /// <summary>
37         /// Asynchronously removes the most recent Page from the navigation stack, with optional animation.
38         /// </summary>
39         /// <param name="animated">Whether to animate the pop.</param>
40         /// <returns>The Page that had been at the top of the navigation stack.</returns>
41         Task<Page> PopAsync(bool animated);
42
43         /// <summary>
44         /// Asynchronously dismisses the most recent modally presented Page.
45         /// </summary>
46         /// <returns>An awaitable instance, indicating the PopModalAsync completion. The Task.Result is the Page that has been popped.</returns>
47         Task<Page> PopModalAsync();
48
49         /// <summary>
50         /// Asynchronously dismisses the most recent modally presented Page, with optional animation.
51         /// </summary>
52         /// <param name="animated">Whether to animate the pop.</param>
53         /// <returns>An awaitable, indicating the PopModalAsync completion. The Task.Result is the Page that has been popped.</returns>
54         Task<Page> PopModalAsync(bool animated);
55
56         /// <summary>
57         /// Pops all but the root Page off the navigation stack.
58         /// </summary>
59         /// <returns>A task representing the asynchronous dismiss operation.</returns>
60         Task PopToRootAsync();
61
62         /// <summary>
63         /// Pops all but the root Page off the navigation stack, with optional animation.
64         /// </summary>
65         /// <param name="animated">Whether to animate the pop.</param>
66         /// <returns>A task representing the asynchronous dismiss operation.</returns>
67         Task PopToRootAsync(bool animated);
68
69         /// <summary>
70         /// Asynchronously adds a Page to the top of the navigation stack.
71         /// </summary>
72         /// <param name="page">The Page to be pushed on top of the navigation stack.</param>
73         /// <returns>A task that represents the asynchronous push operation.</returns>
74         Task PushAsync(Page page);
75
76         /// <summary>
77         /// Asynchronously adds a Page to the top of the navigation stack, with optional animation.
78         /// </summary>
79         /// <param name="page">The page to push.</param>
80         /// <param name="animated">Whether to animate the push.</param>
81         /// <returns>A task that represents the asynchronous push operation.</returns>
82         Task PushAsync(Page page, bool animated);
83
84         /// <summary>
85         /// Presents a Page modally.
86         /// </summary>
87         /// <param name="page">The Page to present modally.</param>
88         /// <returns>An awaitable Task, indicating the PushModal completion.</returns>
89         Task PushModalAsync(Page page);
90
91         /// <summary>
92         /// Presents a Page modally, with optional animation.
93         /// </summary>
94         /// <param name="page">The page to push.</param>
95         /// <param name="animated">Whether to animate the push.</param>
96         /// <returns>An awaitable Task, indicating the PushModal completion.</returns>
97         Task PushModalAsync(Page page, bool animated);
98
99         /// <summary>
100         /// Removes the specified page from the navigation stack.
101         /// </summary>
102         /// <param name="page">The page to remove.</param>
103         void RemovePage(Page page);
104     }
105 }