1 using System.Collections.Generic;
2 using System.Threading.Tasks;
3 using System.ComponentModel;
5 namespace Tizen.NUI.Binding
8 /// Interface abstracting platform-specific navigation.
10 [EditorBrowsable(EditorBrowsableState.Never)]
11 internal interface INavigation
14 /// Gets the modal navigation stack.
16 IReadOnlyList<Page> ModalStack { get; }
19 /// Gets the stack of pages in the navigation.
21 IReadOnlyList<Page> NavigationStack { get; }
24 /// Inserts a page in the navigation stack before an existing page in the stack.
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);
31 /// Asynchronously removes the most recent Page from the navigation stack.
33 /// <returns>The Page that had been at the top of the navigation stack.</returns>
34 Task<Page> PopAsync();
37 /// Asynchronously removes the most recent Page from the navigation stack, with optional animation.
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);
44 /// Asynchronously dismisses the most recent modally presented Page.
46 /// <returns>An awaitable instance, indicating the PopModalAsync completion. The Task.Result is the Page that has been popped.</returns>
47 Task<Page> PopModalAsync();
50 /// Asynchronously dismisses the most recent modally presented Page, with optional animation.
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);
57 /// Pops all but the root Page off the navigation stack.
59 /// <returns>A task representing the asynchronous dismiss operation.</returns>
60 Task PopToRootAsync();
63 /// Pops all but the root Page off the navigation stack, with optional animation.
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);
70 /// Asynchronously adds a Page to the top of the navigation stack.
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);
77 /// Asynchronously adds a Page to the top of the navigation stack, with optional animation.
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);
85 /// Presents a Page modally.
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);
92 /// Presents a Page modally, with optional animation.
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);
100 /// Removes the specified page from the navigation stack.
102 /// <param name="page">The page to remove.</param>
103 void RemovePage(Page page);