IHostUIHandler.cs
1 using Ryujinx.HLE.HOS.Applets; 2 using Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.ApplicationProxy.Types; 3 4 namespace Ryujinx.HLE.UI 5 { 6 public interface IHostUIHandler 7 { 8 /// <summary> 9 /// Displays an Input Dialog box to the user and blocks until text is entered. 10 /// </summary> 11 /// <param name="userText">Text that the user entered. Set to `null` on internal errors</param> 12 /// <returns>True when OK is pressed, False otherwise. Also returns True on internal errors</returns> 13 bool DisplayInputDialog(SoftwareKeyboardUIArgs args, out string userText); 14 15 /// <summary> 16 /// Displays a Message Dialog box to the user and blocks until it is closed. 17 /// </summary> 18 /// <returns>True when OK is pressed, False otherwise.</returns> 19 bool DisplayMessageDialog(string title, string message); 20 21 /// <summary> 22 /// Displays a Message Dialog box specific to Controller Applet and blocks until it is closed. 23 /// </summary> 24 /// <returns>True when OK is pressed, False otherwise.</returns> 25 bool DisplayMessageDialog(ControllerAppletUIArgs args); 26 27 /// <summary> 28 /// Tell the UI that we need to transisition to another program. 29 /// </summary> 30 /// <param name="device">The device instance.</param> 31 /// <param name="kind">The program kind.</param> 32 /// <param name="value">The value associated to the <paramref name="kind"/>.</param> 33 void ExecuteProgram(Switch device, ProgramSpecifyKind kind, ulong value); 34 35 /// Displays a Message Dialog box specific to Error Applet and blocks until it is closed. 36 /// </summary> 37 /// <returns>False when OK is pressed, True when another button (Details) is pressed.</returns> 38 bool DisplayErrorAppletDialog(string title, string message, string[] buttonsText); 39 40 /// <summary> 41 /// Creates a handler to process keyboard inputs into text strings. 42 /// </summary> 43 /// <returns>An instance of the text handler.</returns> 44 IDynamicTextInputHandler CreateDynamicTextInputHandler(); 45 46 /// <summary> 47 /// Gets fonts and colors used by the host. 48 /// </summary> 49 IHostUITheme HostUITheme { get; } 50 } 51 }