SoftwareKeyboardAppearEx.cs 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. using System.Runtime.InteropServices;
  2. namespace Ryujinx.HLE.HOS.Applets.SoftwareKeyboard
  3. {
  4. /// <summary>
  5. /// A structure with appearance configurations for the software keyboard when running in inline mode.
  6. /// </summary>
  7. [StructLayout(LayoutKind.Sequential, Pack = 1, CharSet = CharSet.Unicode)]
  8. struct SoftwareKeyboardAppearEx
  9. {
  10. public const int OkTextLength = 8;
  11. public KeyboardMode KeyboardMode;
  12. /// <summary>
  13. /// The string displayed in the Submit button.
  14. /// </summary>
  15. [MarshalAs(UnmanagedType.ByValTStr, SizeConst = OkTextLength + 1)]
  16. public string OkText;
  17. /// <summary>
  18. /// The character displayed in the left button of the numeric keyboard.
  19. /// </summary>
  20. public char LeftOptionalSymbolKey;
  21. /// <summary>
  22. /// The character displayed in the right button of the numeric keyboard.
  23. /// </summary>
  24. public char RightOptionalSymbolKey;
  25. /// <summary>
  26. /// When set, predictive typing is enabled making use of the system dictionary, and any custom user dictionary.
  27. /// </summary>
  28. [MarshalAs(UnmanagedType.I1)]
  29. public bool PredictionEnabled;
  30. /// <summary>
  31. /// When set, there is only the option to accept the input.
  32. /// </summary>
  33. [MarshalAs(UnmanagedType.I1)]
  34. public bool CancelButtonDisabled;
  35. /// <summary>
  36. /// Specifies prohibited characters that cannot be input into the text entry area.
  37. /// </summary>
  38. public InvalidCharFlags InvalidChars;
  39. /// <summary>
  40. /// Maximum text length allowed.
  41. /// </summary>
  42. public int TextMaxLength;
  43. /// <summary>
  44. /// Minimum text length allowed.
  45. /// </summary>
  46. public int TextMinLength;
  47. /// <summary>
  48. /// Indicates the return button is enabled in the keyboard. This allows for input with multiple lines.
  49. /// </summary>
  50. [MarshalAs(UnmanagedType.I1)]
  51. public bool UseNewLine;
  52. /// <summary>
  53. /// [10.0.0+] If value is 1 or 2, then keytopAsFloating=0 and footerScalable=1 in Calc.
  54. /// </summary>
  55. public KeyboardMiniaturizationMode MiniaturizationMode;
  56. public byte Reserved1;
  57. public byte Reserved2;
  58. /// <summary>
  59. /// Bit field with invalid buttons for the keyboard.
  60. /// </summary>
  61. public InvalidButtonFlags InvalidButtons;
  62. [MarshalAs(UnmanagedType.I1)]
  63. public bool UseSaveData;
  64. public uint Reserved3;
  65. public ushort Reserved4;
  66. public byte Reserved5;
  67. /// <summary>
  68. /// The id of the user associated with the appear request.
  69. /// </summary>
  70. public ulong Uid0;
  71. public ulong Uid1;
  72. /// <summary>
  73. /// The sampling number for the keyboard appearance.
  74. /// </summary>
  75. public ulong SamplingNumber;
  76. public ulong Reserved6;
  77. public ulong Reserved7;
  78. public ulong Reserved8;
  79. public ulong Reserved9;
  80. }
  81. }