SoftwareKeyboardAppear.cs 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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, CharSet = CharSet.Unicode)]
  8. struct SoftwareKeyboardAppear
  9. {
  10. private const int OkTextLength = 8;
  11. /// <summary>
  12. /// Some games send a Calc without intention of showing the keyboard, a
  13. /// common trend observed is that this field will be != 0 in such cases.
  14. /// </summary>
  15. public uint ShouldBeHidden;
  16. /// <summary>
  17. /// The string displayed in the Submit button.
  18. /// </summary>
  19. [MarshalAs(UnmanagedType.ByValTStr, SizeConst = OkTextLength + 1)]
  20. public string OkText;
  21. /// <summary>
  22. /// The character displayed in the left button of the numeric keyboard.
  23. /// </summary>
  24. public char LeftOptionalSymbolKey;
  25. /// <summary>
  26. /// The character displayed in the right button of the numeric keyboard.
  27. /// </summary>
  28. public char RightOptionalSymbolKey;
  29. /// <summary>
  30. /// When set, predictive typing is enabled making use of the system dictionary, and any custom user dictionary.
  31. /// </summary>
  32. [MarshalAs(UnmanagedType.I1)]
  33. public bool PredictionEnabled;
  34. public byte Empty;
  35. /// <summary>
  36. /// Specifies prohibited characters that cannot be input into the text entry area.
  37. /// </summary>
  38. public InvalidCharFlags InvalidCharFlag;
  39. public int Padding1;
  40. public int Padding2;
  41. /// <summary>
  42. /// Indicates the return button is enabled in the keyboard. This allows for input with multiple lines.
  43. /// </summary>
  44. [MarshalAs(UnmanagedType.I1)]
  45. public bool UseNewLine;
  46. /// <summary>
  47. /// [10.0.0+] If value is 1 or 2, then keytopAsFloating=0 and footerScalable=1 in Calc.
  48. /// </summary>
  49. public byte Unknown1;
  50. public byte Padding4;
  51. public byte Padding5;
  52. /// <summary>
  53. /// Bitmask 0x1000 of the Calc and DirectionalButtonAssignEnabled in bitmask 0x10000000.
  54. /// </summary>
  55. public uint CalcFlags;
  56. public uint Padding6;
  57. public uint Padding7;
  58. public uint Padding8;
  59. public uint Padding9;
  60. public uint Padding10;
  61. public uint Padding11;
  62. }
  63. }