From cee712105850ac3385cd0091a923438167433f9f Mon Sep 17 00:00:00 2001
From: TSR Berry <20988865+TSRBerry@users.noreply.github.com>
Date: Sat, 8 Apr 2023 01:22:00 +0200
Subject: Move solution and projects to src
---
.../SoftwareKeyboard/SoftwareKeyboardConfig.cs | 138 +++++++++++++++++++++
1 file changed, 138 insertions(+)
create mode 100644 src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardConfig.cs
(limited to 'src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardConfig.cs')
diff --git a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardConfig.cs b/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardConfig.cs
new file mode 100644
index 00000000..fd462382
--- /dev/null
+++ b/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardConfig.cs
@@ -0,0 +1,138 @@
+using System.Runtime.InteropServices;
+
+namespace Ryujinx.HLE.HOS.Applets.SoftwareKeyboard
+{
+ ///
+ /// A structure that defines the configuration options of the software keyboard.
+ ///
+ [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
+ struct SoftwareKeyboardConfig
+ {
+ private const int SubmitTextLength = 8;
+ private const int HeaderTextLength = 64;
+ private const int SubtitleTextLength = 128;
+ private const int GuideTextLength = 256;
+
+ ///
+ /// Type of keyboard.
+ ///
+ public KeyboardMode Mode;
+
+ ///
+ /// The string displayed in the Submit button.
+ ///
+ [MarshalAs(UnmanagedType.ByValTStr, SizeConst = SubmitTextLength + 1)]
+ public string SubmitText;
+
+ ///
+ /// The character displayed in the left button of the numeric keyboard.
+ /// This is ignored when Mode is not set to NumbersOnly.
+ ///
+ public char LeftOptionalSymbolKey;
+
+ ///
+ /// The character displayed in the right button of the numeric keyboard.
+ /// This is ignored when Mode is not set to NumbersOnly.
+ ///
+ public char RightOptionalSymbolKey;
+
+ ///
+ /// When set, predictive typing is enabled making use of the system dictionary,
+ /// and any custom user dictionary.
+ ///
+ [MarshalAs(UnmanagedType.I1)]
+ public bool PredictionEnabled;
+
+ ///
+ /// Specifies prohibited characters that cannot be input into the text entry area.
+ ///
+ public InvalidCharFlags InvalidCharFlag;
+
+ ///
+ /// The initial position of the text cursor displayed in the text entry area.
+ ///
+ public InitialCursorPosition InitialCursorPosition;
+
+ ///
+ /// The string displayed in the header area of the keyboard.
+ ///
+ [MarshalAs(UnmanagedType.ByValTStr, SizeConst = HeaderTextLength + 1)]
+ public string HeaderText;
+
+ ///
+ /// The string displayed in the subtitle area of the keyboard.
+ ///
+ [MarshalAs(UnmanagedType.ByValTStr, SizeConst = SubtitleTextLength + 1)]
+ public string SubtitleText;
+
+ ///
+ /// The placeholder string displayed in the text entry area when no text is entered.
+ ///
+ [MarshalAs(UnmanagedType.ByValTStr, SizeConst = GuideTextLength + 1)]
+ public string GuideText;
+
+ ///
+ /// When non-zero, specifies the maximum allowed length of the string entered into the text entry area.
+ ///
+ public int StringLengthMax;
+
+ ///
+ /// When non-zero, specifies the minimum allowed length of the string entered into the text entry area.
+ ///
+ public int StringLengthMin;
+
+ ///
+ /// When enabled, hides input characters as dots in the text entry area.
+ ///
+ public PasswordMode PasswordMode;
+
+ ///
+ /// Specifies whether the text entry area is displayed as a single-line entry, or a multi-line entry field.
+ ///
+ public InputFormMode InputFormMode;
+
+ ///
+ /// When set, enables or disables the return key. This value is ignored when single-line entry is specified as the InputFormMode.
+ ///
+ [MarshalAs(UnmanagedType.I1)]
+ public bool UseNewLine;
+
+ ///
+ /// When set, the software keyboard will return a UTF-8 encoded string, rather than UTF-16.
+ ///
+ [MarshalAs(UnmanagedType.I1)]
+ public bool UseUtf8;
+
+ ///
+ /// When set, the software keyboard will blur the game application rendered behind the keyboard.
+ ///
+ [MarshalAs(UnmanagedType.I1)]
+ public bool UseBlurBackground;
+
+ ///
+ /// Offset into the work buffer of the initial text when the keyboard is first displayed.
+ ///
+ public int InitialStringOffset;
+
+ ///
+ /// Length of the initial text.
+ ///
+ public int InitialStringLength;
+
+ ///
+ /// Offset into the work buffer of the custom user dictionary.
+ ///
+ public int CustomDictionaryOffset;
+
+ ///
+ /// Number of entries in the custom user dictionary.
+ ///
+ public int CustomDictionaryCount;
+
+ ///
+ /// When set, the text entered will be validated on the application side after the keyboard has been submitted.
+ ///
+ [MarshalAs(UnmanagedType.I1)]
+ public bool CheckText;
+ }
+}
--
cgit v1.2.3