Infra: Capitalisation Consistency (#6296)

* Rename Ryujinx.UI.Common

* Rename Ryujinx.UI.LocaleGenerator

* Update in Files

AboutWindow

* Configuration State

* Rename projects

* Ryujinx/UI

* Fix build

* Main remaining inconsistencies

* HLE.UI Namespace

* HLE.UI Files

* Namespace

* Ryujinx.UI.Common.Configuration.UI

* Ryujinx.UI.Common,Configuration.UI Files

* More instances
This commit is contained in:
Isaac Marovitz 2024-02-11 02:09:18 +00:00 committed by GitHub
parent 84d6e8d121
commit f06d22d6f0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
189 changed files with 648 additions and 648 deletions

View file

@ -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.HLE.UI;
using System;
namespace Ryujinx.HLE
@ -63,7 +63,7 @@ namespace Ryujinx.HLE
/// The handler for various UI related operations needed outside of HLE.
/// </summary>
/// <remarks>This cannot be changed after <see cref="Switch"/> instantiation.</remarks>
internal readonly IHostUiHandler HostUiHandler;
internal readonly IHostUIHandler HostUIHandler;
/// <summary>
/// Control the memory configuration used by the emulation context.
@ -177,7 +177,7 @@ namespace Ryujinx.HLE
IRenderer gpuRenderer,
IHardwareDeviceDriver audioDeviceDriver,
MemoryConfiguration memoryConfiguration,
IHostUiHandler hostUiHandler,
IHostUIHandler hostUIHandler,
SystemLanguage systemLanguage,
RegionCode region,
bool enableVsync,
@ -204,7 +204,7 @@ namespace Ryujinx.HLE
GpuRenderer = gpuRenderer;
AudioDeviceDriver = audioDeviceDriver;
MemoryConfiguration = memoryConfiguration;
HostUiHandler = hostUiHandler;
HostUIHandler = hostUIHandler;
SystemLanguage = systemLanguage;
Region = region;
EnableVsync = enableVsync;

View file

@ -86,7 +86,7 @@ namespace Ryujinx.HLE.HOS.Applets
PlayerIndex primaryIndex;
while (!_system.Device.Hid.Npads.Validate(playerMin, playerMax, (ControllerType)privateArg.NpadStyleSet, out configuredCount, out primaryIndex))
{
ControllerAppletUiArgs uiArgs = new()
ControllerAppletUIArgs uiArgs = new()
{
PlayerCountMin = playerMin,
PlayerCountMax = playerMax,
@ -95,7 +95,7 @@ namespace Ryujinx.HLE.HOS.Applets
IsDocked = _system.State.DockedMode,
};
if (!_system.Device.UiHandler.DisplayMessageDialog(uiArgs))
if (!_system.Device.UIHandler.DisplayMessageDialog(uiArgs))
{
break;
}

View file

@ -3,7 +3,7 @@ using System.Collections.Generic;
namespace Ryujinx.HLE.HOS.Applets
{
public struct ControllerAppletUiArgs
public struct ControllerAppletUIArgs
{
public int PlayerCountMin;
public int PlayerCountMax;

View file

@ -166,13 +166,13 @@ namespace Ryujinx.HLE.HOS.Applets.Error
string[] buttons = GetButtonsText(module, description, "DlgBtn");
bool showDetails = _horizon.Device.UiHandler.DisplayErrorAppletDialog($"Error Code: {module}-{description:0000}", "\n" + message, buttons);
bool showDetails = _horizon.Device.UIHandler.DisplayErrorAppletDialog($"Error Code: {module}-{description:0000}", "\n" + message, buttons);
if (showDetails)
{
message = GetMessageText(module, description, "FlvMsg");
buttons = GetButtonsText(module, description, "FlvBtn");
_horizon.Device.UiHandler.DisplayErrorAppletDialog($"Details: {module}-{description:0000}", "\n" + message, buttons);
_horizon.Device.UIHandler.DisplayErrorAppletDialog($"Details: {module}-{description:0000}", "\n" + message, buttons);
}
}
@ -200,12 +200,12 @@ namespace Ryujinx.HLE.HOS.Applets.Error
buttons.Add("OK");
bool showDetails = _horizon.Device.UiHandler.DisplayErrorAppletDialog($"Error Number: {applicationErrorArg.ErrorNumber}", "\n" + messageText, buttons.ToArray());
bool showDetails = _horizon.Device.UIHandler.DisplayErrorAppletDialog($"Error Number: {applicationErrorArg.ErrorNumber}", "\n" + messageText, buttons.ToArray());
if (showDetails)
{
buttons.RemoveAt(0);
_horizon.Device.UiHandler.DisplayErrorAppletDialog($"Error Number: {applicationErrorArg.ErrorNumber} (Details)", "\n" + detailsText, buttons.ToArray());
_horizon.Device.UIHandler.DisplayErrorAppletDialog($"Error Number: {applicationErrorArg.ErrorNumber} (Details)", "\n" + detailsText, buttons.ToArray());
}
}

View file

@ -1,5 +1,5 @@
using Ryujinx.HLE.HOS.Services.Am.AppletAE;
using Ryujinx.HLE.Ui;
using Ryujinx.HLE.UI;
using Ryujinx.Memory;
using System;
using System.Runtime.InteropServices;

View file

@ -4,8 +4,8 @@ using Ryujinx.Common.Logging;
using Ryujinx.HLE.HOS.Applets.SoftwareKeyboard;
using Ryujinx.HLE.HOS.Services.Am.AppletAE;
using Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.Npad;
using Ryujinx.HLE.Ui;
using Ryujinx.HLE.Ui.Input;
using Ryujinx.HLE.UI;
using Ryujinx.HLE.UI.Input;
using Ryujinx.Memory;
using System;
using System.Diagnostics;
@ -92,14 +92,14 @@ namespace Ryujinx.HLE.HOS.Applets
_keyboardBackgroundInitialize = MemoryMarshal.Read<SoftwareKeyboardInitialize>(keyboardConfig);
_backgroundState = InlineKeyboardState.Uninitialized;
if (_device.UiHandler == null)
if (_device.UIHandler == null)
{
Logger.Error?.Print(LogClass.ServiceAm, "GUI Handler is not set, software keyboard applet will not work properly");
}
else
{
// Create a text handler that converts keyboard strokes to strings.
_dynamicTextInputHandler = _device.UiHandler.CreateDynamicTextInputHandler();
_dynamicTextInputHandler = _device.UIHandler.CreateDynamicTextInputHandler();
_dynamicTextInputHandler.TextChangedEvent += HandleTextChangedEvent;
_dynamicTextInputHandler.KeyPressedEvent += HandleKeyPressedEvent;
@ -107,7 +107,7 @@ namespace Ryujinx.HLE.HOS.Applets
_npads.NpadButtonDownEvent += HandleNpadButtonDownEvent;
_npads.NpadButtonUpEvent += HandleNpadButtonUpEvent;
_keyboardRenderer = new SoftwareKeyboardRenderer(_device.UiHandler.HostUiTheme);
_keyboardRenderer = new SoftwareKeyboardRenderer(_device.UIHandler.HostUITheme);
}
return ResultCode.Success;
@ -199,7 +199,7 @@ namespace Ryujinx.HLE.HOS.Applets
_keyboardForegroundConfig.StringLengthMax = 100;
}
if (_device.UiHandler == null)
if (_device.UIHandler == null)
{
Logger.Warning?.Print(LogClass.Application, "GUI Handler is not set. Falling back to default");
@ -209,7 +209,7 @@ namespace Ryujinx.HLE.HOS.Applets
else
{
// Call the configured GUI handler to get user's input.
var args = new SoftwareKeyboardUiArgs
var args = new SoftwareKeyboardUIArgs
{
KeyboardMode = _keyboardForegroundConfig.Mode,
HeaderText = StripUnicodeControlCodes(_keyboardForegroundConfig.HeaderText),
@ -222,7 +222,7 @@ namespace Ryujinx.HLE.HOS.Applets
InitialText = initialText,
};
_lastResult = _device.UiHandler.DisplayInputDialog(args, out _textValue) ? KeyboardResult.Accept : KeyboardResult.Cancel;
_lastResult = _device.UIHandler.DisplayInputDialog(args, out _textValue) ? KeyboardResult.Accept : KeyboardResult.Cancel;
_textValue ??= initialText ?? DefaultInputText;
}

View file

@ -1,4 +1,4 @@
using Ryujinx.HLE.Ui;
using Ryujinx.HLE.UI;
using Ryujinx.Memory;
using System;
using System.Threading;
@ -15,13 +15,13 @@ namespace Ryujinx.HLE.HOS.Applets.SoftwareKeyboard
private readonly object _stateLock = new();
private readonly SoftwareKeyboardUiState _state = new();
private readonly SoftwareKeyboardUIState _state = new();
private readonly SoftwareKeyboardRendererBase _renderer;
private readonly TimedAction _textBoxBlinkTimedAction = new();
private readonly TimedAction _renderAction = new();
public SoftwareKeyboardRenderer(IHostUiTheme uiTheme)
public SoftwareKeyboardRenderer(IHostUITheme uiTheme)
{
_renderer = new SoftwareKeyboardRendererBase(uiTheme);
@ -29,7 +29,7 @@ namespace Ryujinx.HLE.HOS.Applets.SoftwareKeyboard
StartRenderer(_renderAction, _renderer, _state, _stateLock);
}
private static void StartTextBoxBlinker(TimedAction timedAction, SoftwareKeyboardUiState state, object stateLock)
private static void StartTextBoxBlinker(TimedAction timedAction, SoftwareKeyboardUIState state, object stateLock)
{
timedAction.Reset(() =>
{
@ -45,9 +45,9 @@ namespace Ryujinx.HLE.HOS.Applets.SoftwareKeyboard
}, TextBoxBlinkSleepMilliseconds);
}
private static void StartRenderer(TimedAction timedAction, SoftwareKeyboardRendererBase renderer, SoftwareKeyboardUiState state, object stateLock)
private static void StartRenderer(TimedAction timedAction, SoftwareKeyboardRendererBase renderer, SoftwareKeyboardUIState state, object stateLock)
{
SoftwareKeyboardUiState internalState = new();
SoftwareKeyboardUIState internalState = new();
bool canCreateSurface = false;
bool needsUpdate = true;

View file

@ -1,4 +1,4 @@
using Ryujinx.HLE.Ui;
using Ryujinx.HLE.UI;
using Ryujinx.Memory;
using SixLabors.Fonts;
using SixLabors.ImageSharp;
@ -63,7 +63,7 @@ namespace Ryujinx.HLE.HOS.Applets.SoftwareKeyboard
private Point _logoPosition;
private float _messagePositionY;
public SoftwareKeyboardRendererBase(IHostUiTheme uiTheme)
public SoftwareKeyboardRendererBase(IHostUITheme uiTheme)
{
int ryujinxLogoSize = 32;
@ -205,7 +205,7 @@ namespace Ryujinx.HLE.HOS.Applets.SoftwareKeyboard
});
}
public void DrawMutableElements(SoftwareKeyboardUiState state)
public void DrawMutableElements(SoftwareKeyboardUIState state)
{
if (_surface == null)
{
@ -322,7 +322,7 @@ namespace Ryujinx.HLE.HOS.Applets.SoftwareKeyboard
return new RectangleF(rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height);
}
private void DrawTextBox(IImageProcessingContext context, SoftwareKeyboardUiState state)
private void DrawTextBox(IImageProcessingContext context, SoftwareKeyboardUIState state)
{
var inputTextRectangle = MeasureString(state.InputText, _inputTextFont);

View file

@ -2,7 +2,7 @@ using Ryujinx.HLE.HOS.Applets.SoftwareKeyboard;
namespace Ryujinx.HLE.HOS.Applets
{
public struct SoftwareKeyboardUiArgs
public struct SoftwareKeyboardUIArgs
{
public KeyboardMode KeyboardMode;
public string HeaderText;

View file

@ -1,11 +1,11 @@
using Ryujinx.HLE.Ui;
using Ryujinx.HLE.UI;
namespace Ryujinx.HLE.HOS.Applets.SoftwareKeyboard
{
/// <summary>
/// TODO
/// </summary>
internal class SoftwareKeyboardUiState
internal class SoftwareKeyboardUIState
{
public string InputText = "";
public int CursorBegin = 0;

View file

@ -97,7 +97,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.Applicati
if (titleId == 0)
{
context.Device.UiHandler.ExecuteProgram(context.Device, ProgramSpecifyKind.RestartProgram, titleId);
context.Device.UIHandler.ExecuteProgram(context.Device, ProgramSpecifyKind.RestartProgram, titleId);
}
else
{
@ -524,7 +524,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.Applicati
Logger.Stub?.PrintStub(LogClass.ServiceAm, new { kind, value });
context.Device.UiHandler.ExecuteProgram(context.Device, kind, value);
context.Device.UIHandler.ExecuteProgram(context.Device, kind, value);
return ResultCode.Success;
}

View file

@ -7,7 +7,7 @@ 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.HLE.UI;
using Ryujinx.Horizon.Common;
using System;
using System.Collections.Generic;

View file

@ -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.HLE.UI;
using Ryujinx.Memory;
using System;
@ -25,7 +25,7 @@ namespace Ryujinx.HLE
public PerformanceStatistics Statistics { get; }
public Hid Hid { get; }
public TamperMachine TamperMachine { get; }
public IHostUiHandler UiHandler { get; }
public IHostUIHandler UIHandler { get; }
public bool EnableDeviceVsync { get; set; } = true;
@ -39,7 +39,7 @@ namespace Ryujinx.HLE
Configuration = configuration;
FileSystem = Configuration.VirtualFileSystem;
UiHandler = Configuration.HostUiHandler;
UIHandler = Configuration.HostUIHandler;
MemoryAllocationFlags memoryAllocationFlags = configuration.MemoryManagerMode == MemoryManagerMode.SoftwarePageTable
? MemoryAllocationFlags.Reserve

View file

@ -1,4 +1,4 @@
namespace Ryujinx.HLE.Ui
namespace Ryujinx.HLE.UI
{
public delegate void DynamicTextChangedHandler(string text, int cursorBegin, int cursorEnd, bool overwriteMode);
}

View file

@ -1,6 +1,6 @@
using System;
namespace Ryujinx.HLE.Ui
namespace Ryujinx.HLE.UI
{
public interface IDynamicTextInputHandler : IDisposable
{

View file

@ -1,16 +1,16 @@
using Ryujinx.HLE.HOS.Applets;
using Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.ApplicationProxy.Types;
namespace Ryujinx.HLE.Ui
namespace Ryujinx.HLE.UI
{
public interface IHostUiHandler
public interface IHostUIHandler
{
/// <summary>
/// Displays an Input Dialog box to the user and blocks until text is entered.
/// </summary>
/// <param name="userText">Text that the user entered. Set to `null` on internal errors</param>
/// <returns>True when OK is pressed, False otherwise. Also returns True on internal errors</returns>
bool DisplayInputDialog(SoftwareKeyboardUiArgs args, out string userText);
bool DisplayInputDialog(SoftwareKeyboardUIArgs args, out string userText);
/// <summary>
/// Displays a Message Dialog box to the user and blocks until it is closed.
@ -22,7 +22,7 @@ namespace Ryujinx.HLE.Ui
/// Displays a Message Dialog box specific to Controller Applet and blocks until it is closed.
/// </summary>
/// <returns>True when OK is pressed, False otherwise.</returns>
bool DisplayMessageDialog(ControllerAppletUiArgs args);
bool DisplayMessageDialog(ControllerAppletUIArgs args);
/// <summary>
/// Tell the UI that we need to transisition to another program.
@ -46,6 +46,6 @@ namespace Ryujinx.HLE.Ui
/// <summary>
/// Gets fonts and colors used by the host.
/// </summary>
IHostUiTheme HostUiTheme { get; }
IHostUITheme HostUITheme { get; }
}
}

View file

@ -1,6 +1,6 @@
namespace Ryujinx.HLE.Ui
namespace Ryujinx.HLE.UI
{
public interface IHostUiTheme
public interface IHostUITheme
{
string FontFamily { get; }

View file

@ -1,6 +1,6 @@
using Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.Npad;
namespace Ryujinx.HLE.Ui.Input
namespace Ryujinx.HLE.UI.Input
{
delegate void NpadButtonHandler(int npadIndex, NpadButton button);
}

View file

@ -1,7 +1,7 @@
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.HLE.UI.Input
{
/// <summary>
/// Class that converts Hid entries for the Npad into pressed / released events.

View file

@ -1,6 +1,6 @@
using Ryujinx.Common.Configuration.Hid;
namespace Ryujinx.HLE.Ui
namespace Ryujinx.HLE.UI
{
public delegate bool KeyPressedHandler(Key key);
}

View file

@ -1,6 +1,6 @@
using Ryujinx.Common.Configuration.Hid;
namespace Ryujinx.HLE.Ui
namespace Ryujinx.HLE.UI
{
public delegate bool KeyReleasedHandler(Key key);
}

View file

@ -1,7 +1,7 @@
using Ryujinx.HLE.HOS.Services.SurfaceFlinger;
using System;
namespace Ryujinx.HLE.Ui
namespace Ryujinx.HLE.UI
{
/// <summary>
/// Information about the indirect layer that is being drawn to.

View file

@ -1,4 +1,4 @@
namespace Ryujinx.HLE.Ui
namespace Ryujinx.HLE.UI
{
public readonly struct ThemeColor
{