using System.Runtime.InteropServices;
namespace Ryujinx.HLE.HOS.Applets.SoftwareKeyboard
{
/// <summary>
/// A structure with configuration options of the software keyboard when starting a new input request in inline mode.
/// </summary>
[StructLayout(LayoutKind.Sequential, Pack=1, CharSet = CharSet.Unicode)]
struct SoftwareKeyboardCalc
private const int InputTextLength = 505;
public uint Unknown;
/// The size of the Calc struct, as reported by the process communicating with the applet.
public ushort Size;
public byte Unknown1;
public byte Unknown2;
/// Configuration flags. Their purpose is currently unknown.
public ulong Flags;
/// The original parameters used when initializing the keyboard applet.
public SoftwareKeyboardInitialize Initialize;
/// The audio volume used by the sound effects of the keyboard.
public float Volume;
/// The initial position of the text cursor (caret) in the provided input text.
public int CursorPos;
/// Appearance configurations for the on-screen keyboard.
public SoftwareKeyboardAppear Appear;
/// The initial input text to be used by the software keyboard.
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = InputTextLength + 1)]
public string InputText;
/// When set, the strings communicated by software keyboard will be encoded as UTF-8 instead of UTF-16.
[MarshalAs(UnmanagedType.I1)]
public bool UseUtf8;
public byte Unknown3;
/// [5.0.0+] Enable the backspace key in the software keyboard.
public bool BackspaceEnabled;
public short Unknown4;
public byte Unknown5;
public bool KeytopAsFloating;
public bool FooterScalable;
public bool AlphaEnabledInInputMode;
public byte InputModeFadeType;
/// When set, the software keyboard ignores touch input.
public bool TouchDisabled;
/// When set, the software keyboard ignores hardware keyboard commands.
public bool HardwareKeyboardDisabled;
public uint Unknown6;
public uint Unknown7;
/// Default value is 1.0.
public float KeytopScale0;
public float KeytopScale1;
public float KeytopTranslate0;
public float KeytopTranslate1;
public float KeytopBgAlpha;
public float FooterBgAlpha;
public float BalloonScale;
public float Unknown8;
public uint Unknown9;
public uint Unknown10;
public uint Unknown11;
/// [5.0.0+] Enable sound effect.
public byte SeGroup;
/// [6.0.0+] Enables the Trigger field when Trigger is non-zero.
public byte TriggerFlag;
/// [6.0.0+] Always set to zero.
public byte Trigger;
public byte Padding;
}