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