IHostUiHandler.cs 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. using Ryujinx.HLE.HOS.Applets;
  2. using Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.ApplicationProxy.Types;
  3. namespace Ryujinx.HLE
  4. {
  5. public interface IHostUiHandler
  6. {
  7. /// <summary>
  8. /// Displays an Input Dialog box to the user and blocks until text is entered.
  9. /// </summary>
  10. /// <param name="userText">Text that the user entered. Set to `null` on internal errors</param>
  11. /// <returns>True when OK is pressed, False otherwise. Also returns True on internal errors</returns>
  12. bool DisplayInputDialog(SoftwareKeyboardUiArgs args, out string userText);
  13. /// <summary>
  14. /// Displays a Message Dialog box to the user and blocks until it is closed.
  15. /// </summary>
  16. /// <returns>True when OK is pressed, False otherwise.</returns>
  17. bool DisplayMessageDialog(string title, string message);
  18. /// <summary>
  19. /// Displays a Message Dialog box specific to Controller Applet and blocks until it is closed.
  20. /// </summary>
  21. /// <returns>True when OK is pressed, False otherwise.</returns>
  22. bool DisplayMessageDialog(ControllerAppletUiArgs args);
  23. /// <summary>
  24. /// Tell the UI that we need to transisition to another program.
  25. /// </summary>
  26. /// <param name="device">The device instance.</param>
  27. /// <param name="kind">The program kind.</param>
  28. /// <param name="value">The value associated to the <paramref name="kind"/>.</param>
  29. void ExecuteProgram(Switch device, ProgramSpecifyKind kind, ulong value);
  30. /// Displays a Message Dialog box specific to Error Applet and blocks until it is closed.
  31. /// </summary>
  32. /// <returns>False when OK is pressed, True when another button (Details) is pressed.</returns>
  33. bool DisplayErrorAppletDialog(string title, string message, string[] buttonsText);
  34. }
  35. }