From 565a40f8546f2cb09ea8b34c7886d67e66d4e9e9 Mon Sep 17 00:00:00 2001 From: Isaac Marovitz Date: Sun, 10 Mar 2024 14:04:35 +0000 Subject: [PATCH] More migration --- .../UI/Applet/GtkDynamicTextInputHandler.cs | 2 +- .../UI/Applet/GtkHostUIHandler.cs | 4 +- src/Ryujinx.Gtk3/UI/Applet/GtkHostUITheme.cs | 2 +- src/Ryujinx.HLE/HLEConfiguration.cs | 2 +- src/Ryujinx.HLE/HOS/Horizon.cs | 2 +- .../Services/Am/AppletAE/Types/AppletId.cs | 27 -------------- .../Types/AppletProcessLaunchReason.cs | 12 ------ .../Am/AppletAE/Types/LibraryAppletInfo.cs | 11 ------ .../Am/AppletAE/Types/LibraryAppletMode.cs | 14 ------- .../RootService/IApplicationDisplayService.cs | 1 - .../HOS/SystemState/AppletStateMgr.cs | 2 +- src/Ryujinx.HLE/HOS/UserChannelPersistence.cs | 1 - src/Ryujinx.HLE/Switch.cs | 2 +- src/Ryujinx.HLE/UI/Input/NpadButtonHandler.cs | 6 --- .../HeadlessDynamicTextInputHandler.cs | 2 +- .../HeadlessHostUiTheme.cs | 2 +- src/Ryujinx.Headless.SDL2/WindowBase.cs | 4 +- .../Am/Ipc}/Storage/StorageHelper.cs | 10 ++--- .../SoftwareKeyboardApplet.cs | 5 ++- .../Sdk/Am/AppletIdentifyInfo.cs} | 2 +- .../Sdk/Am/{Types => }/FocusState.cs | 2 +- .../Sdk/Am}/LaunchParameterKind.cs | 2 +- .../Sdk/Am/{Types => }/ProgramSpecifyKind.cs | 2 +- .../Sdk/Am/Types/AppletMessage.cs | 37 ------------------- .../UI/DynamicTextChangedHandler.cs | 2 +- .../UI/IDynamicTextInputHandler.cs | 2 +- .../UI/IHostUIHandler.cs | 4 +- .../UI/IHostUITheme.cs | 2 +- .../UI/Input/NpadButtonHandler.cs | 4 ++ .../UI/Input/NpadReader.cs | 5 +-- .../UI/KeyPressedHandler.cs | 2 +- .../UI/KeyReleasedHandler.cs | 2 +- .../UI/RenderingSurfaceInfo.cs | 3 +- .../UI/ThemeColor.cs | 2 +- src/Ryujinx/UI/Applet/AvaHostUIHandler.cs | 4 +- .../Applet/AvaloniaDynamicTextInputHandler.cs | 2 +- src/Ryujinx/UI/Applet/AvaloniaHostUITheme.cs | 2 +- .../UI/ViewModels/MainWindowViewModel.cs | 2 +- 38 files changed, 43 insertions(+), 151 deletions(-) delete mode 100644 src/Ryujinx.HLE/HOS/Services/Am/AppletAE/Types/AppletId.cs delete mode 100644 src/Ryujinx.HLE/HOS/Services/Am/AppletAE/Types/AppletProcessLaunchReason.cs delete mode 100644 src/Ryujinx.HLE/HOS/Services/Am/AppletAE/Types/LibraryAppletInfo.cs delete mode 100644 src/Ryujinx.HLE/HOS/Services/Am/AppletAE/Types/LibraryAppletMode.cs delete mode 100644 src/Ryujinx.HLE/UI/Input/NpadButtonHandler.cs rename src/{Ryujinx.HLE/HOS/Services/Am/AppletAE => Ryujinx.Horizon/Am/Ipc}/Storage/StorageHelper.cs (69%) rename src/{Ryujinx.HLE/HOS/Services/Am/AppletAE/Types/AppletIdentityInfo.cs => Ryujinx.Horizon/Sdk/Am/AppletIdentifyInfo.cs} (83%) rename src/Ryujinx.Horizon/Sdk/Am/{Types => }/FocusState.cs (69%) rename src/{Ryujinx.HLE/HOS/Services/Am/AppletOE/ApplicationProxyService/ApplicationProxy/Types => Ryujinx.Horizon/Sdk/Am}/LaunchParameterKind.cs (57%) rename src/Ryujinx.Horizon/Sdk/Am/{Types => }/ProgramSpecifyKind.cs (77%) delete mode 100644 src/Ryujinx.Horizon/Sdk/Am/Types/AppletMessage.cs rename src/{Ryujinx.HLE => Ryujinx.Horizon}/UI/DynamicTextChangedHandler.cs (80%) rename src/{Ryujinx.HLE => Ryujinx.Horizon}/UI/IDynamicTextInputHandler.cs (93%) rename src/{Ryujinx.HLE => Ryujinx.Horizon}/UI/IHostUIHandler.cs (97%) rename src/{Ryujinx.HLE => Ryujinx.Horizon}/UI/IHostUITheme.cs (92%) create mode 100644 src/Ryujinx.Horizon/UI/Input/NpadButtonHandler.cs rename src/{Ryujinx.HLE => Ryujinx.Horizon}/UI/Input/NpadReader.cs (96%) rename src/{Ryujinx.HLE => Ryujinx.Horizon}/UI/KeyPressedHandler.cs (77%) rename src/{Ryujinx.HLE => Ryujinx.Horizon}/UI/KeyReleasedHandler.cs (77%) rename src/{Ryujinx.HLE => Ryujinx.Horizon}/UI/RenderingSurfaceInfo.cs (94%) rename src/{Ryujinx.HLE => Ryujinx.Horizon}/UI/ThemeColor.cs (92%) diff --git a/src/Ryujinx.Gtk3/UI/Applet/GtkDynamicTextInputHandler.cs b/src/Ryujinx.Gtk3/UI/Applet/GtkDynamicTextInputHandler.cs index 0e560b789..ce59a8675 100644 --- a/src/Ryujinx.Gtk3/UI/Applet/GtkDynamicTextInputHandler.cs +++ b/src/Ryujinx.Gtk3/UI/Applet/GtkDynamicTextInputHandler.cs @@ -1,5 +1,5 @@ using Gtk; -using Ryujinx.HLE.UI; +using Ryujinx.Horizon.UI; using Ryujinx.Input.GTK3; using Ryujinx.UI.Widgets; using System.Threading; diff --git a/src/Ryujinx.Gtk3/UI/Applet/GtkHostUIHandler.cs b/src/Ryujinx.Gtk3/UI/Applet/GtkHostUIHandler.cs index 99d883b9d..7446ac01c 100644 --- a/src/Ryujinx.Gtk3/UI/Applet/GtkHostUIHandler.cs +++ b/src/Ryujinx.Gtk3/UI/Applet/GtkHostUIHandler.cs @@ -1,8 +1,8 @@ using Gtk; -using Ryujinx.HLE.UI; using Ryujinx.Horizon.Applets.Controller; using Ryujinx.Horizon.Applets.SoftwareKeyboard; -using Ryujinx.Horizon.Sdk.Am.Types; +using Ryujinx.Horizon.Sdk.Am; +using Ryujinx.Horizon.UI; using Ryujinx.UI.Widgets; using System; using System.Threading; diff --git a/src/Ryujinx.Gtk3/UI/Applet/GtkHostUITheme.cs b/src/Ryujinx.Gtk3/UI/Applet/GtkHostUITheme.cs index 52d1123bb..71a409416 100644 --- a/src/Ryujinx.Gtk3/UI/Applet/GtkHostUITheme.cs +++ b/src/Ryujinx.Gtk3/UI/Applet/GtkHostUITheme.cs @@ -1,5 +1,5 @@ using Gtk; -using Ryujinx.HLE.UI; +using Ryujinx.Horizon.UI; using System.Diagnostics; namespace Ryujinx.UI.Applet diff --git a/src/Ryujinx.HLE/HLEConfiguration.cs b/src/Ryujinx.HLE/HLEConfiguration.cs index 955fee4b5..ebc3f96cc 100644 --- a/src/Ryujinx.HLE/HLEConfiguration.cs +++ b/src/Ryujinx.HLE/HLEConfiguration.cs @@ -7,7 +7,7 @@ using Ryujinx.HLE.FileSystem; using Ryujinx.HLE.HOS; using Ryujinx.HLE.HOS.Services.Account.Acc; using Ryujinx.HLE.HOS.SystemState; -using Ryujinx.HLE.UI; +using Ryujinx.Horizon.UI; using System; namespace Ryujinx.HLE diff --git a/src/Ryujinx.HLE/HOS/Horizon.cs b/src/Ryujinx.HLE/HOS/Horizon.cs index ebaa9e2e5..f39f022f9 100644 --- a/src/Ryujinx.HLE/HOS/Horizon.cs +++ b/src/Ryujinx.HLE/HOS/Horizon.cs @@ -28,7 +28,7 @@ using Ryujinx.HLE.HOS.SystemState; using Ryujinx.HLE.Loaders.Executables; using Ryujinx.HLE.Loaders.Processes; using Ryujinx.Horizon; -using Ryujinx.Horizon.Sdk.Am.Types; +using Ryujinx.Horizon.Sdk.Am; using System; using System.Collections.Generic; using System.IO; diff --git a/src/Ryujinx.HLE/HOS/Services/Am/AppletAE/Types/AppletId.cs b/src/Ryujinx.HLE/HOS/Services/Am/AppletAE/Types/AppletId.cs deleted file mode 100644 index d9970341f..000000000 --- a/src/Ryujinx.HLE/HOS/Services/Am/AppletAE/Types/AppletId.cs +++ /dev/null @@ -1,27 +0,0 @@ -namespace Ryujinx.HLE.HOS.Services.Am.AppletAE -{ - enum AppletId - { - Application = 0x01, - OverlayDisplay = 0x02, - QLaunch = 0x03, - Starter = 0x04, - Auth = 0x0A, - Cabinet = 0x0B, - Controller = 0x0C, - DataErase = 0x0D, - Error = 0x0E, - NetConnect = 0x0F, - PlayerSelect = 0x10, - SoftwareKeyboard = 0x11, - MiiEdit = 0x12, - LibAppletWeb = 0x13, - LibAppletShop = 0x14, - PhotoViewer = 0x15, - Settings = 0x16, - LibAppletOff = 0x17, - LibAppletWhitelisted = 0x18, - LibAppletAuth = 0x19, - MyPage = 0x1A, - } -} diff --git a/src/Ryujinx.HLE/HOS/Services/Am/AppletAE/Types/AppletProcessLaunchReason.cs b/src/Ryujinx.HLE/HOS/Services/Am/AppletAE/Types/AppletProcessLaunchReason.cs deleted file mode 100644 index 461c84eaa..000000000 --- a/src/Ryujinx.HLE/HOS/Services/Am/AppletAE/Types/AppletProcessLaunchReason.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System.Runtime.InteropServices; - -namespace Ryujinx.HLE.HOS.Services.Am.AppletAE -{ - [StructLayout(LayoutKind.Sequential, Size = 0x4)] - struct AppletProcessLaunchReason - { - public byte Flag; - public ushort Unknown1; - public byte Unknown2; - } -} diff --git a/src/Ryujinx.HLE/HOS/Services/Am/AppletAE/Types/LibraryAppletInfo.cs b/src/Ryujinx.HLE/HOS/Services/Am/AppletAE/Types/LibraryAppletInfo.cs deleted file mode 100644 index f8a911d42..000000000 --- a/src/Ryujinx.HLE/HOS/Services/Am/AppletAE/Types/LibraryAppletInfo.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System.Runtime.InteropServices; - -namespace Ryujinx.HLE.HOS.Services.Am.AppletAE -{ - [StructLayout(LayoutKind.Sequential, Size = 0x8)] - struct LibraryAppletInfo - { - public AppletId AppletId; - public LibraryAppletMode LibraryAppletMode; - } -} diff --git a/src/Ryujinx.HLE/HOS/Services/Am/AppletAE/Types/LibraryAppletMode.cs b/src/Ryujinx.HLE/HOS/Services/Am/AppletAE/Types/LibraryAppletMode.cs deleted file mode 100644 index 629aee07d..000000000 --- a/src/Ryujinx.HLE/HOS/Services/Am/AppletAE/Types/LibraryAppletMode.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System; - -namespace Ryujinx.HLE.HOS.Services.Am.AppletAE -{ - [Flags] - enum LibraryAppletMode : uint - { - AllForeground, - PartialForeground, - NoUi, - PartialForegroundWithIndirectDisplay, - AllForegroundInitiallyHidden, - } -} diff --git a/src/Ryujinx.HLE/HOS/Services/Vi/RootService/IApplicationDisplayService.cs b/src/Ryujinx.HLE/HOS/Services/Vi/RootService/IApplicationDisplayService.cs index c01adde83..ca0cb0245 100644 --- a/src/Ryujinx.HLE/HOS/Services/Vi/RootService/IApplicationDisplayService.cs +++ b/src/Ryujinx.HLE/HOS/Services/Vi/RootService/IApplicationDisplayService.cs @@ -7,7 +7,6 @@ using Ryujinx.HLE.HOS.Services.SurfaceFlinger; using Ryujinx.HLE.HOS.Services.Vi.RootService.ApplicationDisplayService; using Ryujinx.HLE.HOS.Services.Vi.RootService.ApplicationDisplayService.Types; using Ryujinx.HLE.HOS.Services.Vi.Types; -using Ryujinx.HLE.UI; using Ryujinx.Horizon.Common; using System; using System.Collections.Generic; diff --git a/src/Ryujinx.HLE/HOS/SystemState/AppletStateMgr.cs b/src/Ryujinx.HLE/HOS/SystemState/AppletStateMgr.cs index 9bfb86b81..2d5da7f22 100644 --- a/src/Ryujinx.HLE/HOS/SystemState/AppletStateMgr.cs +++ b/src/Ryujinx.HLE/HOS/SystemState/AppletStateMgr.cs @@ -1,5 +1,5 @@ using Ryujinx.HLE.HOS.Kernel.Threading; -using Ryujinx.Horizon.Sdk.Am.Types; +using Ryujinx.Horizon.Sdk.Am; using System.Collections.Concurrent; namespace Ryujinx.HLE.HOS.SystemState diff --git a/src/Ryujinx.HLE/HOS/UserChannelPersistence.cs b/src/Ryujinx.HLE/HOS/UserChannelPersistence.cs index 933fccbe9..a01460509 100644 --- a/src/Ryujinx.HLE/HOS/UserChannelPersistence.cs +++ b/src/Ryujinx.HLE/HOS/UserChannelPersistence.cs @@ -1,5 +1,4 @@ using Ryujinx.Horizon.Sdk.Am; -using Ryujinx.Horizon.Sdk.Am.Types; using System; using System.Collections.Generic; diff --git a/src/Ryujinx.HLE/Switch.cs b/src/Ryujinx.HLE/Switch.cs index 81c3ab473..ec6a98ee1 100644 --- a/src/Ryujinx.HLE/Switch.cs +++ b/src/Ryujinx.HLE/Switch.cs @@ -7,7 +7,7 @@ using Ryujinx.HLE.HOS; using Ryujinx.HLE.HOS.Services.Apm; using Ryujinx.HLE.HOS.Services.Hid; using Ryujinx.HLE.Loaders.Processes; -using Ryujinx.HLE.UI; +using Ryujinx.Horizon.UI; using Ryujinx.Memory; using System; diff --git a/src/Ryujinx.HLE/UI/Input/NpadButtonHandler.cs b/src/Ryujinx.HLE/UI/Input/NpadButtonHandler.cs deleted file mode 100644 index 73c306614..000000000 --- a/src/Ryujinx.HLE/UI/Input/NpadButtonHandler.cs +++ /dev/null @@ -1,6 +0,0 @@ -using Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.Npad; - -namespace Ryujinx.HLE.UI.Input -{ - delegate void NpadButtonHandler(int npadIndex, NpadButton button); -} diff --git a/src/Ryujinx.Headless.SDL2/HeadlessDynamicTextInputHandler.cs b/src/Ryujinx.Headless.SDL2/HeadlessDynamicTextInputHandler.cs index 503874ff1..05983fa6a 100644 --- a/src/Ryujinx.Headless.SDL2/HeadlessDynamicTextInputHandler.cs +++ b/src/Ryujinx.Headless.SDL2/HeadlessDynamicTextInputHandler.cs @@ -1,4 +1,4 @@ -using Ryujinx.HLE.UI; +using Ryujinx.Horizon.UI; using System.Threading; using System.Threading.Tasks; diff --git a/src/Ryujinx.Headless.SDL2/HeadlessHostUiTheme.cs b/src/Ryujinx.Headless.SDL2/HeadlessHostUiTheme.cs index 78cd43ae5..c44b6ad12 100644 --- a/src/Ryujinx.Headless.SDL2/HeadlessHostUiTheme.cs +++ b/src/Ryujinx.Headless.SDL2/HeadlessHostUiTheme.cs @@ -1,4 +1,4 @@ -using Ryujinx.HLE.UI; +using Ryujinx.Horizon.UI; namespace Ryujinx.Headless.SDL2 { diff --git a/src/Ryujinx.Headless.SDL2/WindowBase.cs b/src/Ryujinx.Headless.SDL2/WindowBase.cs index d97b4857e..5a11d9454 100644 --- a/src/Ryujinx.Headless.SDL2/WindowBase.cs +++ b/src/Ryujinx.Headless.SDL2/WindowBase.cs @@ -5,10 +5,10 @@ using Ryujinx.Graphics.GAL; using Ryujinx.Graphics.GAL.Multithreading; using Ryujinx.Graphics.Gpu; using Ryujinx.Graphics.OpenGL; -using Ryujinx.HLE.UI; using Ryujinx.Horizon.Applets.Controller; using Ryujinx.Horizon.Applets.SoftwareKeyboard; -using Ryujinx.Horizon.Sdk.Am.Types; +using Ryujinx.Horizon.Sdk.Am; +using Ryujinx.Horizon.UI; using Ryujinx.Input; using Ryujinx.Input.HLE; using Ryujinx.SDL2.Common; diff --git a/src/Ryujinx.HLE/HOS/Services/Am/AppletAE/Storage/StorageHelper.cs b/src/Ryujinx.Horizon/Am/Ipc/Storage/StorageHelper.cs similarity index 69% rename from src/Ryujinx.HLE/HOS/Services/Am/AppletAE/Storage/StorageHelper.cs rename to src/Ryujinx.Horizon/Am/Ipc/Storage/StorageHelper.cs index 6c23720ee..2700a0336 100644 --- a/src/Ryujinx.HLE/HOS/Services/Am/AppletAE/Storage/StorageHelper.cs +++ b/src/Ryujinx.Horizon/Am/Ipc/Storage/StorageHelper.cs @@ -1,14 +1,14 @@ +using LibHac.Fs; using Ryujinx.Common.Memory; -using Ryujinx.HLE.HOS.Services.Account.Acc; using System.IO; -namespace Ryujinx.HLE.HOS.Services.Am.AppletAE.Storage +namespace Ryujinx.Horizon.Am.Ipc.Storage { - class StorageHelper + public class StorageHelper { private const uint LaunchParamsMagic = 0xc79497ca; - public static byte[] MakeLaunchParams(UserProfile userProfile) + public static byte[] MakeLaunchParams(UserId userId) { // Size needs to be at least 0x88 bytes otherwise application errors. using MemoryStream ms = MemoryStreamManager.Shared.GetStream(); @@ -18,7 +18,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletAE.Storage writer.Write(LaunchParamsMagic); writer.Write(1); // IsAccountSelected? Only lower 8 bits actually used. - userProfile.UserId.Write(writer); + writer.Write(userId.AsBytes()); return ms.ToArray(); } diff --git a/src/Ryujinx.Horizon/Applets/SoftwareKeyboard/SoftwareKeyboardApplet.cs b/src/Ryujinx.Horizon/Applets/SoftwareKeyboard/SoftwareKeyboardApplet.cs index 87e17c5b7..242f6840b 100644 --- a/src/Ryujinx.Horizon/Applets/SoftwareKeyboard/SoftwareKeyboardApplet.cs +++ b/src/Ryujinx.Horizon/Applets/SoftwareKeyboard/SoftwareKeyboardApplet.cs @@ -3,6 +3,7 @@ using Ryujinx.Common.Configuration.Hid; using Ryujinx.Common.Logging; using Ryujinx.Horizon.Common; using Ryujinx.Horizon.Sdk.Am; +using Ryujinx.Horizon.UI.Input; using Ryujinx.Memory; using System; using System.Diagnostics; @@ -107,7 +108,7 @@ namespace Ryujinx.Horizon.Applets.SoftwareKeyboard _keyboardRenderer = new SoftwareKeyboardRenderer(_device.UIHandler.HostUITheme); } - return ResultCode.Success; + return Result.Success; } else { @@ -494,7 +495,7 @@ namespace Ryujinx.Horizon.Applets.SoftwareKeyboard _npads.Update(true); - NpadButton buttons = _npads.GetCurrentButtonsOfAllNpads(); + NpadReader buttons = _npads.GetCurrentButtonsOfAllNpads(); // Block the input if the current accept key is pressed so the applet won't be instantly closed. _canAcceptController = (buttons & NpadButton.A) == 0; diff --git a/src/Ryujinx.HLE/HOS/Services/Am/AppletAE/Types/AppletIdentityInfo.cs b/src/Ryujinx.Horizon/Sdk/Am/AppletIdentifyInfo.cs similarity index 83% rename from src/Ryujinx.HLE/HOS/Services/Am/AppletAE/Types/AppletIdentityInfo.cs rename to src/Ryujinx.Horizon/Sdk/Am/AppletIdentifyInfo.cs index 1f04c7ebb..5f041f9bb 100644 --- a/src/Ryujinx.HLE/HOS/Services/Am/AppletAE/Types/AppletIdentityInfo.cs +++ b/src/Ryujinx.Horizon/Sdk/Am/AppletIdentifyInfo.cs @@ -1,6 +1,6 @@ using System.Runtime.InteropServices; -namespace Ryujinx.HLE.HOS.Services.Am.AppletAE +namespace Ryujinx.Horizon.Sdk.Am { [StructLayout(LayoutKind.Sequential, Size = 0x10)] struct AppletIdentifyInfo diff --git a/src/Ryujinx.Horizon/Sdk/Am/Types/FocusState.cs b/src/Ryujinx.Horizon/Sdk/Am/FocusState.cs similarity index 69% rename from src/Ryujinx.Horizon/Sdk/Am/Types/FocusState.cs rename to src/Ryujinx.Horizon/Sdk/Am/FocusState.cs index dddf04d5a..321c2f3cb 100644 --- a/src/Ryujinx.Horizon/Sdk/Am/Types/FocusState.cs +++ b/src/Ryujinx.Horizon/Sdk/Am/FocusState.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.Horizon.Sdk.Am.Types +namespace Ryujinx.Horizon.Sdk.Am { public enum FocusState { diff --git a/src/Ryujinx.HLE/HOS/Services/Am/AppletOE/ApplicationProxyService/ApplicationProxy/Types/LaunchParameterKind.cs b/src/Ryujinx.Horizon/Sdk/Am/LaunchParameterKind.cs similarity index 57% rename from src/Ryujinx.HLE/HOS/Services/Am/AppletOE/ApplicationProxyService/ApplicationProxy/Types/LaunchParameterKind.cs rename to src/Ryujinx.Horizon/Sdk/Am/LaunchParameterKind.cs index e3c90dc58..9b46a561f 100644 --- a/src/Ryujinx.HLE/HOS/Services/Am/AppletOE/ApplicationProxyService/ApplicationProxy/Types/LaunchParameterKind.cs +++ b/src/Ryujinx.Horizon/Sdk/Am/LaunchParameterKind.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.ApplicationProxy.Types +namespace Ryujinx.Horizon.Sdk.Am { public enum LaunchParameterKind : uint { diff --git a/src/Ryujinx.Horizon/Sdk/Am/Types/ProgramSpecifyKind.cs b/src/Ryujinx.Horizon/Sdk/Am/ProgramSpecifyKind.cs similarity index 77% rename from src/Ryujinx.Horizon/Sdk/Am/Types/ProgramSpecifyKind.cs rename to src/Ryujinx.Horizon/Sdk/Am/ProgramSpecifyKind.cs index 11ab323b0..f0bcbaf0b 100644 --- a/src/Ryujinx.Horizon/Sdk/Am/Types/ProgramSpecifyKind.cs +++ b/src/Ryujinx.Horizon/Sdk/Am/ProgramSpecifyKind.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.Horizon.Sdk.Am.Types +namespace Ryujinx.Horizon.Sdk.Am { public enum ProgramSpecifyKind : uint { diff --git a/src/Ryujinx.Horizon/Sdk/Am/Types/AppletMessage.cs b/src/Ryujinx.Horizon/Sdk/Am/Types/AppletMessage.cs deleted file mode 100644 index 641bd1bc1..000000000 --- a/src/Ryujinx.Horizon/Sdk/Am/Types/AppletMessage.cs +++ /dev/null @@ -1,37 +0,0 @@ -namespace Ryujinx.Horizon.Sdk.Am.Types -{ - public enum AppletMessage - { - None = 0, - ChangeIntoForeground = 1, - ChangeIntoBackground = 2, - Exit = 4, - ApplicationExited = 6, - FocusStateChanged = 15, - Resume = 16, - DetectShortPressingHomeButton = 20, - DetectLongPressingHomeButton = 21, - DetectShortPressingPowerButton = 22, - DetectMiddlePressingPowerButton = 23, - DetectLongPressingPowerButton = 24, - RequestToPrepareSleep = 25, - FinishedSleepSequence = 26, - SleepRequiredByHighTemperature = 27, - SleepRequiredByLowBattery = 28, - AutoPowerDown = 29, - OperationModeChanged = 30, - PerformanceModeChanged = 31, - DetectReceivingCecSystemStandby = 32, - SdCardRemoved = 33, - LaunchApplicationRequested = 50, - RequestToDisplay = 51, - ShowApplicationLogo = 55, - HideApplicationLogo = 56, - ForceHideApplicationLogo = 57, - FloatingApplicationDetected = 60, - DetectShortPressingCaptureButton = 90, - AlbumScreenShotTaken = 92, - AlbumRecordingSaved = 93, - } - -} diff --git a/src/Ryujinx.HLE/UI/DynamicTextChangedHandler.cs b/src/Ryujinx.Horizon/UI/DynamicTextChangedHandler.cs similarity index 80% rename from src/Ryujinx.HLE/UI/DynamicTextChangedHandler.cs rename to src/Ryujinx.Horizon/UI/DynamicTextChangedHandler.cs index c0945259b..6c88e3051 100644 --- a/src/Ryujinx.HLE/UI/DynamicTextChangedHandler.cs +++ b/src/Ryujinx.Horizon/UI/DynamicTextChangedHandler.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.UI +namespace Ryujinx.Horizon.UI { public delegate void DynamicTextChangedHandler(string text, int cursorBegin, int cursorEnd, bool overwriteMode); } diff --git a/src/Ryujinx.HLE/UI/IDynamicTextInputHandler.cs b/src/Ryujinx.Horizon/UI/IDynamicTextInputHandler.cs similarity index 93% rename from src/Ryujinx.HLE/UI/IDynamicTextInputHandler.cs rename to src/Ryujinx.Horizon/UI/IDynamicTextInputHandler.cs index 1ff451d10..e884489f8 100644 --- a/src/Ryujinx.HLE/UI/IDynamicTextInputHandler.cs +++ b/src/Ryujinx.Horizon/UI/IDynamicTextInputHandler.cs @@ -1,6 +1,6 @@ using System; -namespace Ryujinx.HLE.UI +namespace Ryujinx.Horizon.UI { public interface IDynamicTextInputHandler : IDisposable { diff --git a/src/Ryujinx.HLE/UI/IHostUIHandler.cs b/src/Ryujinx.Horizon/UI/IHostUIHandler.cs similarity index 97% rename from src/Ryujinx.HLE/UI/IHostUIHandler.cs rename to src/Ryujinx.Horizon/UI/IHostUIHandler.cs index f58400701..619786014 100644 --- a/src/Ryujinx.HLE/UI/IHostUIHandler.cs +++ b/src/Ryujinx.Horizon/UI/IHostUIHandler.cs @@ -1,8 +1,8 @@ using Ryujinx.Horizon.Applets.Controller; using Ryujinx.Horizon.Applets.SoftwareKeyboard; -using Ryujinx.Horizon.Sdk.Am.Types; +using Ryujinx.Horizon.Sdk.Am; -namespace Ryujinx.HLE.UI +namespace Ryujinx.Horizon.UI { public interface IHostUIHandler { diff --git a/src/Ryujinx.HLE/UI/IHostUITheme.cs b/src/Ryujinx.Horizon/UI/IHostUITheme.cs similarity index 92% rename from src/Ryujinx.HLE/UI/IHostUITheme.cs rename to src/Ryujinx.Horizon/UI/IHostUITheme.cs index 3b0544004..e872fabf0 100644 --- a/src/Ryujinx.HLE/UI/IHostUITheme.cs +++ b/src/Ryujinx.Horizon/UI/IHostUITheme.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.UI +namespace Ryujinx.Horizon.UI { public interface IHostUITheme { diff --git a/src/Ryujinx.Horizon/UI/Input/NpadButtonHandler.cs b/src/Ryujinx.Horizon/UI/Input/NpadButtonHandler.cs new file mode 100644 index 000000000..a59a78d4b --- /dev/null +++ b/src/Ryujinx.Horizon/UI/Input/NpadButtonHandler.cs @@ -0,0 +1,4 @@ +namespace Ryujinx.Horizon.UI.Input +{ + delegate void NpadButtonHandler(int npadIndex, NpadButton button); +} diff --git a/src/Ryujinx.HLE/UI/Input/NpadReader.cs b/src/Ryujinx.Horizon/UI/Input/NpadReader.cs similarity index 96% rename from src/Ryujinx.HLE/UI/Input/NpadReader.cs rename to src/Ryujinx.Horizon/UI/Input/NpadReader.cs index 8276d6160..4c7edd6d0 100644 --- a/src/Ryujinx.HLE/UI/Input/NpadReader.cs +++ b/src/Ryujinx.Horizon/UI/Input/NpadReader.cs @@ -1,7 +1,4 @@ -using Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.Common; -using Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.Npad; - -namespace Ryujinx.HLE.UI.Input +namespace Ryujinx.Horizon.UI.Input { /// /// Class that converts Hid entries for the Npad into pressed / released events. diff --git a/src/Ryujinx.HLE/UI/KeyPressedHandler.cs b/src/Ryujinx.Horizon/UI/KeyPressedHandler.cs similarity index 77% rename from src/Ryujinx.HLE/UI/KeyPressedHandler.cs rename to src/Ryujinx.Horizon/UI/KeyPressedHandler.cs index 6feb11bd8..7525d48d3 100644 --- a/src/Ryujinx.HLE/UI/KeyPressedHandler.cs +++ b/src/Ryujinx.Horizon/UI/KeyPressedHandler.cs @@ -1,6 +1,6 @@ using Ryujinx.Common.Configuration.Hid; -namespace Ryujinx.HLE.UI +namespace Ryujinx.Horizon.UI { public delegate bool KeyPressedHandler(Key key); } diff --git a/src/Ryujinx.HLE/UI/KeyReleasedHandler.cs b/src/Ryujinx.Horizon/UI/KeyReleasedHandler.cs similarity index 77% rename from src/Ryujinx.HLE/UI/KeyReleasedHandler.cs rename to src/Ryujinx.Horizon/UI/KeyReleasedHandler.cs index 3de89d0c7..39aaf2594 100644 --- a/src/Ryujinx.HLE/UI/KeyReleasedHandler.cs +++ b/src/Ryujinx.Horizon/UI/KeyReleasedHandler.cs @@ -1,6 +1,6 @@ using Ryujinx.Common.Configuration.Hid; -namespace Ryujinx.HLE.UI +namespace Ryujinx.Horizon.UI { public delegate bool KeyReleasedHandler(Key key); } diff --git a/src/Ryujinx.HLE/UI/RenderingSurfaceInfo.cs b/src/Ryujinx.Horizon/UI/RenderingSurfaceInfo.cs similarity index 94% rename from src/Ryujinx.HLE/UI/RenderingSurfaceInfo.cs rename to src/Ryujinx.Horizon/UI/RenderingSurfaceInfo.cs index af0a0d44e..513c436f2 100644 --- a/src/Ryujinx.HLE/UI/RenderingSurfaceInfo.cs +++ b/src/Ryujinx.Horizon/UI/RenderingSurfaceInfo.cs @@ -1,7 +1,6 @@ -using Ryujinx.HLE.HOS.Services.SurfaceFlinger; using System; -namespace Ryujinx.HLE.UI +namespace Ryujinx.Horizon.UI { /// /// Information about the indirect layer that is being drawn to. diff --git a/src/Ryujinx.HLE/UI/ThemeColor.cs b/src/Ryujinx.Horizon/UI/ThemeColor.cs similarity index 92% rename from src/Ryujinx.HLE/UI/ThemeColor.cs rename to src/Ryujinx.Horizon/UI/ThemeColor.cs index c5cfb1474..f1e11ca5f 100644 --- a/src/Ryujinx.HLE/UI/ThemeColor.cs +++ b/src/Ryujinx.Horizon/UI/ThemeColor.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.UI +namespace Ryujinx.Horizon.UI { public readonly struct ThemeColor { diff --git a/src/Ryujinx/UI/Applet/AvaHostUIHandler.cs b/src/Ryujinx/UI/Applet/AvaHostUIHandler.cs index a69310875..86db99c45 100644 --- a/src/Ryujinx/UI/Applet/AvaHostUIHandler.cs +++ b/src/Ryujinx/UI/Applet/AvaHostUIHandler.cs @@ -6,10 +6,10 @@ using Ryujinx.Ava.UI.Controls; using Ryujinx.Ava.UI.Helpers; using Ryujinx.Ava.UI.Windows; using Ryujinx.HLE; -using Ryujinx.HLE.UI; using Ryujinx.Horizon.Applets.Controller; using Ryujinx.Horizon.Applets.SoftwareKeyboard; -using Ryujinx.Horizon.Sdk.Am.Types; +using Ryujinx.Horizon.Sdk.Am; +using Ryujinx.Horizon.UI; using System; using System.Threading; diff --git a/src/Ryujinx/UI/Applet/AvaloniaDynamicTextInputHandler.cs b/src/Ryujinx/UI/Applet/AvaloniaDynamicTextInputHandler.cs index 531d00611..da6e0b1ba 100644 --- a/src/Ryujinx/UI/Applet/AvaloniaDynamicTextInputHandler.cs +++ b/src/Ryujinx/UI/Applet/AvaloniaDynamicTextInputHandler.cs @@ -5,7 +5,7 @@ using Avalonia.Threading; using Ryujinx.Ava.Input; using Ryujinx.Ava.UI.Helpers; using Ryujinx.Ava.UI.Windows; -using Ryujinx.HLE.UI; +using Ryujinx.Horizon.UI; using System; using System.Threading; using HidKey = Ryujinx.Common.Configuration.Hid.Key; diff --git a/src/Ryujinx/UI/Applet/AvaloniaHostUITheme.cs b/src/Ryujinx/UI/Applet/AvaloniaHostUITheme.cs index 016fb4842..5841d6a8a 100644 --- a/src/Ryujinx/UI/Applet/AvaloniaHostUITheme.cs +++ b/src/Ryujinx/UI/Applet/AvaloniaHostUITheme.cs @@ -1,6 +1,6 @@ using Avalonia.Media; using Ryujinx.Ava.UI.Windows; -using Ryujinx.HLE.UI; +using Ryujinx.Horizon.UI; using System; namespace Ryujinx.Ava.UI.Applet diff --git a/src/Ryujinx/UI/ViewModels/MainWindowViewModel.cs b/src/Ryujinx/UI/ViewModels/MainWindowViewModel.cs index 17bd69b14..e2cdaec56 100644 --- a/src/Ryujinx/UI/ViewModels/MainWindowViewModel.cs +++ b/src/Ryujinx/UI/ViewModels/MainWindowViewModel.cs @@ -25,7 +25,7 @@ using Ryujinx.HLE; using Ryujinx.HLE.FileSystem; using Ryujinx.HLE.HOS; using Ryujinx.HLE.HOS.Services.Account.Acc; -using Ryujinx.HLE.UI; +using Ryujinx.Horizon.UI; using Ryujinx.Input.HLE; using Ryujinx.Modules; using Ryujinx.UI.App.Common;